.counter-section {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.counter-input-card {
    background: var(--zinc-50);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.counter-input-card label {
    display: block;
    margin-bottom: 12px;
    color: var(--zinc-800);
    font-size: 1rem;
    font-weight: 600;
}

#textInput {
    width: 100%;
    min-height: 300px;
    padding: 16px 18px;
    border: 1px solid var(--zinc-300);
    border-radius: 12px;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--zinc-700);
    background: #ffffff;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#textInput:focus {
    outline: none;
    border-color: var(--orange-500);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

#textInput::placeholder {
    color: var(--zinc-400);
}

.counter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 600;
    color: var(--zinc-700);
    background: transparent;
    border: 1px solid var(--zinc-300);
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--zinc-500);
    box-shadow: 0 5px 15px rgba(24, 24, 27, 0.12);
}

.btn-secondary:active {
    transform: translateY(0);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--zinc-50);
    border-radius: 12px;
    padding: 22px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--zinc-900);
    transition: transform 0.18s ease, color 0.18s ease;
}

.stat-number.updated {
    transform: scale(1.06);
    color: var(--orange-600);
}

.stat-label {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--zinc-500);
}

@media (max-width: 768px) {
    .counter-section {
        padding: 0 16px;
    }

    .counter-input-card {
        padding: 20px;
    }

    #textInput {
        min-height: 260px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .counter-actions {
        justify-content: stretch;
    }

    .counter-actions button {
        flex: 1;
    }
}

@media (max-width: 520px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 1.8rem;
    }
}
