:root {
    color: #0f172a;
    background: #f1f5f9;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.95), transparent 42%),
        #f1f5f9;
}

button {
    font: inherit;
}

.counter-card {
    width: min(100%, 420px);
    padding: 40px;
    border: 1px solid #dbe3ee;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.counter-title {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.counter-number {
    margin: 30px 0 8px;
    color: #172033;
    font-size: clamp(4.5rem, 18vw, 7rem);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.06em;
    line-height: 0.9;
    overflow-wrap: anywhere;
}

.counter-caption {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.counter-form {
    margin-top: 30px;
}

.counter-button {
    width: 100%;
    min-height: 50px;
    padding: 13px 20px;
    border: 0;
    border-radius: 12px;
    background: #2563eb;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
    transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

@media (hover: hover) {
    .counter-button:hover:not(:disabled) {
        transform: translateY(-1px);
        background: #1d4ed8;
        box-shadow: 0 13px 28px rgba(37, 99, 235, 0.3);
    }
}

.counter-button:active:not(:disabled) {
    transform: scale(0.98);
}

.counter-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.32);
    outline-offset: 4px;
}

.counter-button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.counter-error {
    min-height: 1.3em;
    margin: 14px 0 0;
    color: #b91c1c;
    font-size: 0.875rem;
    line-height: 1.3;
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .counter-card {
        padding: 32px 22px;
        border-radius: 20px;
    }

    .counter-number {
        margin-top: 26px;
        font-size: clamp(4rem, 24vw, 6rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .counter-button {
        transition: none;
    }
}
