/* ==========================================================================
   COUNTER & UI CONTROLS STYLES
   ========================================================================== */

.counter-container {
    position: fixed;
    top: 25px;
    left: 30px;
    z-index: 100000;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    pointer-events: none;
    max-width: 60vw;
}

.counter-box {
    background: var(--counter-bg);
    border: 2px solid var(--text-color);
    border-radius: 25px;
    padding: 8px 22px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 15px rgba(128, 128, 128, 0.15);
    backdrop-filter: blur(5px);
    transition: border-color 1.2s ease, background 1.2s ease, width 0.3s ease, opacity 0.3s ease;
}

.counter-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-color);
    opacity: 0.85;
    transition: color 1.2s ease;
}

.counter-value {
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 900;
    color: var(--text-color);
    letter-spacing: 0.05em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    transition: color 1.2s ease, transform 0.1s ease;
}

.counter-value.pop-bump {
    transform: scale(1.2);
}

.controls-container {
    position: fixed;
    top: 25px;
    right: 30px;
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-btn {
    position: relative;
    background: rgba(128, 128, 128, 0.15);
    border: 2px solid var(--text-color);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(128, 128, 128, 0.2);
    backdrop-filter: blur(5px);
    transition: transform 0.2s ease, background 0.3s ease, border-color 1.2s ease, color 1.2s ease, opacity 0.3s ease;
}

.audio-btn svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
    transition: transform 0.15s ease;
}

.audio-btn.muted {
    opacity: 0.6;
}

.audio-btn:hover {
    transform: scale(1.08);
    background: var(--text-color);
    color: var(--bg-color);
    opacity: 1;
    cursor: pointer;
}

.lang-btn {
    position: relative;
    background: rgba(128, 128, 128, 0.15);
    border: 2px solid var(--text-color);
    border-radius: 30px;
    padding: 10px 22px;
    color: var(--text-color);
    font-family: 'Montserrat', 'Arial Black', sans-serif;
    font-size: 0.85rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(128, 128, 128, 0.2);
    backdrop-filter: blur(5px);
    transition: transform 0.2s ease, background 0.3s ease, border-color 1.2s ease, color 1.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-dot {
    color: var(--dot-color);
    font-size: 1.1rem;
    line-height: 1;
    transition: color 1.2s ease;
}

.lang-btn:hover {
    transform: scale(1.08);
    background: var(--text-color);
    color: var(--bg-color);
    cursor: pointer;
}

.lang-btn:hover .lang-dot {
    color: var(--bg-color);
}

.footer-copyright {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    font-family: Arial, sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--copyright-color);
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    transition: color 1.2s ease;
}

@media (max-width: 600px) {
    .controls-container {
        top: 20px;
        right: 20px;
        gap: 6px;
    }

    .counter-container {
        top: 20px;
        left: 20px;
        /* Leave room for the audio/lang controls on the right so large
           numbers never overlap them — falls back to wrapping (via
           flex-wrap on the container) if it's ever still too tight. */
        max-width: calc(100vw - 140px);
        gap: 6px;
    }

    .counter-box {
        padding: 6px 12px;
        gap: 6px;
        width: auto !important;
    }

    .counter-value { font-size: 0.95rem; }
    .counter-icon { width: 14px; height: 14px; }

    .lang-btn {
        padding: 7px 14px;
        font-size: 0.75rem;
        gap: 6px;
    }

    .audio-btn { width: 36px; height: 36px; }
    .audio-btn svg { width: 15px; height: 15px; }
    .footer-copyright { font-size: 0.6rem; bottom: 14px; }
}
