/* Компактен Navbar с долен стъклен ефект */
:root {
    /* цветове */
    --fb-blue: rgba(75, 159, 62, 0);
    --fb-blue-hover: #1e8d92;
    --fb-bg: #f0f2f5;
    --fb-white: #ffffff;
    --fb-text: #1c1e21;
    --fb-text-secondary: #65676b;
    --fb-border: #e4e6ea;
    --fb-hover: #f0f2f5;
    --fb-green: #42b883;
    --fb-red: #e74c3c;

    /* SmolyanVote цветове */
    --primary-color: #4cb15c;
    --primary-dark: #198754;
    --accent-green: #228e55;

    /* Размери и shadow */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --sidebar-width: 280px;
    --main-feed-width: 680px;
    --transition: all 0.2s ease;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Main Navbar Container */
.navbar-glassmorphism {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 0;
    margin: 0;
    width: 100%;
}

.navbar-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

.navbar-content {
    position: relative;
    z-index: 2;
    /* Градиент от плътен сив към стъклен ефект */
    background: linear-gradient(180deg,
            rgba(248, 249, 250, 0.95) 0%,
            rgba(248, 249, 250, 0.85) 40%,
            rgba(255, 255, 255, 0.6) 70%,
            rgba(255, 255, 255, 0.3) 100%);
    backdrop-filter: blur(5px);
    border-radius: 0;
    padding: 0.75rem 1rem; /* по-тънък navbar */
    /* Само долен border */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 100%;
}


/* Brand Section - най-вляво */
.navbar-brand-section {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 0.5rem;
    /* Фиксирана позиция вляво */
}

.navbar-brand-glass {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.brand-logo-glass {
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}

.navbar-brand-glass:hover .brand-logo-glass {
    transform: scale(1.05);
}

.brand-text-glass {
    font-family: sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

/* Navigation Section - desktop only */
@media (min-width: 769px) {
    .navbar-nav-section-glass {
        display: flex;
        align-items: center;
        gap: 0.5rem; /* минимално разстояние между групите */
        flex: 1;
        justify-content: flex-end;
        max-width: none;
        margin-right: 1rem; /* почти залепено до дясната страна */
    }
}

/* Search Component в navigation section-а */
.search-container-glass {
    margin-right: 1rem;
    /* Умерено разстояние след search-а */
    position: relative;
}

.search-input-glass {
    width: 200px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.search-input-glass:focus {
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--primary-green);
}

.search-input-glass::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.search-icon-glass {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Navigation Links - desktop only */
@media (min-width: 769px) {
    .nav-links-glass {
        display: flex;
        align-items: center;
        gap: 0.35rem; /* максимално събрани бутони */
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-item-glass {
        list-style: none;
    }

    .nav-link-glass {
        font-family: var(--font-primary);
        font-size: 0.8rem;        /* по-малък текст */
        font-weight: 300;         /* тънък елегантен шрифт */
        color: var(--text-primary);
        text-decoration: none;
        padding: 0.3rem 0.5rem;   /* по-малки „табове“ */
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0;
        border-radius: 999px;     /* компактни „pill“ бутони */
        overflow: visible;
    }

    /* Икони - по-големи с тънки контури */
    .nav-link-glass>i:first-child {
        font-size: 1.3rem;        /* по-малка икона до текста */
        font-weight: 300;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        color: var(--text-primary);
        flex-shrink: 0;
        z-index: 2;
        transform: translateZ(0);
        will-change: transform, color;
    }

    /* Текстови етикети - винаги видими, тънък изискан шрифт */
    .nav-text-glass {
        max-width: 150px;
        opacity: 1;
        overflow: visible;
        white-space: nowrap;
        margin-left: 12px;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateX(0);
        will-change: max-width, opacity, margin-left, transform;
        font-weight: 300;
        letter-spacing: 0.3px;
    }

    /* Premium hover – фино подчертаване, без бутон около текста */
    .nav-link-glass::before {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 0;
        width: 0;
        height: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--primary-green), var(--accent-green));
        transform: translateX(-50%);
        transition: width 0.3s ease;
    }

    .nav-link-glass:hover {
        background: transparent;
        text-decoration: none;
        transform: translateY(0);
        box-shadow: none;
    }

    .nav-link-glass:hover::before {
        width: 70%;
    }

    /* Premium hover – лек цветен акцент на текста и иконата */
    .nav-link-glass:hover .nav-text-glass {
        color: var(--primary-green);
    }

    .nav-link-glass:hover>i:first-child {
        color: var(--primary-green);
        transform: scale(1.05) translateZ(0);
    }

    /* Премахваме старата долна линия при hover */
    .nav-link-glass::after {
        display: none;
    }

    /* App Banner in Navbar */
    .app-banner-nav {
        margin-right: 0.5rem;
        display: flex;
        align-items: center;
    }

    .app-banner-nav .nav-link-glass {
        background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
        color: white !important;
        padding: 0.5rem 1.2rem !important;
        border-radius: 100px;
        font-weight: 700 !important;
        box-shadow: 0 4px 12px rgba(22, 197, 94, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        gap: 8px;
        line-height: 1;
    }

    .app-banner-nav .nav-link-glass:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 16px rgba(22, 197, 94, 0.4);
        background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
        color: white !important;
    }

    .app-banner-nav .nav-link-glass::after {
        display: none !important;
    }

    .app-banner-nav .bi-phone {
        font-size: 1.1rem;
    }

    /* Mobile adjustments for App Banner */
    @media (max-width: 768px) {
        .app-banner-nav {
            margin: 10px 16px !important;
            display: block !important;
        }

        .app-banner-nav .nav-link-glass {
            padding: 14px 20px !important;
            border-radius: 12px !important;
            justify-content: center !important;
            width: 100% !important;
        }
    }

    /* Vote Toggle - desktop */
    .vote-toggle-glass {
        color: var(--text-primary) !important;
        background: none !important;
        border: none !important;
        display: flex;
        align-items: center;
        gap: 0;
        font-weight: 400;
        padding: 0.5rem 0.8rem;
        border-radius: 12px;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .vote-toggle-glass:hover {
        background: rgba(76, 177, 92, 0.08) !important;
    }

    /* Икона в Vote toggle - по-голяма с тънки контури */
    .vote-toggle-glass>i:first-child {
        font-size: 1.7rem;
        font-weight: 300;
        color: var(--text-primary);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        flex-shrink: 0;
    }

    .vote-toggle-glass:hover>i:first-child {
        color: var(--primary-green);
        transform: scale(1.1);
    }

    .vote-arrow-glass {
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 0.9rem;
        margin-left: 6px;
        will-change: transform;
        opacity: 0;
        color: var(--text-primary);
        font-weight: 400;
    }

    .vote-toggle-glass:hover .vote-arrow-glass {
        opacity: 1;
    }

    .vote-arrow-glass.rotated {
        transform: rotate(180deg);
    }
}

/* End desktop nav styles */

/* Auth/Profile Section - desktop only */
@media (min-width: 769px) {
    .auth-profile-section-glass {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex-shrink: 0;
        position: relative;
        z-index: 1040;
        justify-content: flex-end;
        border-left: 0 solid rgba(255, 255, 255, 0.15);
        margin-left: 1rem;
    }

    .auth-profile-section-glass::before {
        content: '';
        position: absolute;
        left: -1rem;
        top: 20%;
        bottom: 20%;
        width: 0;
        background: linear-gradient(180deg,
                transparent 0%,
                rgba(255, 255, 255, 0.3) 20%,
                rgba(255, 255, 255, 0.3) 80%,
                transparent 100%);
        pointer-events: none;
    }
}

/* Auth Buttons & Links - desktop only */
@media (min-width: 769px) {
    .auth-buttons-glass {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    /* Auth Links като привлекателни бутони */
    .auth-link-glass {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--white);
        text-decoration: none;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        transition: all 0.3s ease;
        border: 1px solid transparent;
        position: relative;
        overflow: hidden;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        animation: buttonPulse 3s ease-in-out infinite;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        cursor: pointer;
    }

    /* Pulse анимация за привличане на внимание */
    @keyframes buttonPulse {

        0%,
        100% {
            transform: scale(1);
            box-shadow: 0 4px 15px rgba(25, 134, 28, 0.3);
        }

        50% {
            transform: scale(1.02);
            box-shadow: 0 6px 20px rgba(25, 134, 28, 0.4);
        }
    }

    /* Вход бутон - акцентен зелен */
    .auth-link-glass:first-of-type {
        background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
        box-shadow: 0 4px 15px rgba(25, 134, 28, 0.3);
        font-weight: 700;
    }

    .auth-link-glass:first-of-type:hover {
        background: linear-gradient(135deg, var(--accent-green), var(--primary-green));
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 8px 25px rgba(25, 134, 28, 0.5);
        color: var(--white);
        text-decoration: none;
        animation: none;
        /* Спира pulse при hover */
    }

    /* Регистрация бутон - outline стил с акцент */
    .auth-link-glass:last-of-type {
        background: rgba(255, 255, 255, 0.15);
        border: 2px solid var(--primary-green);
        color: var(--primary-green);
        backdrop-filter: blur(8px);
        animation-delay: 0.5s;
        /* Малко закъснение за по-интересен ефект */
        font-weight: 600;
        position: relative;
    }

    .auth-link-glass:last-of-type::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 20px;
        background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
    }

    .auth-link-glass:last-of-type:hover {
        color: var(--white);
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 8px 25px rgba(25, 134, 28, 0.4);
        text-decoration: none;
        animation: none;
        /* Спира pulse при hover */
        border-color: transparent;
    }

    .auth-link-glass:last-of-type:hover::after {
        opacity: 1;
    }

    /* Shimmer ефект за бутоните */
    .auth-link-glass::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.6s ease;
        z-index: -1;
    }

    .auth-link-glass:hover::before {
        left: 100%;
    }

    .profile-dropdown-glass {
        position: relative;
        z-index: 1050;
        /* Най-висок z-index */
    }

    /* ===== EXPANDING PROFILE TOGGLE - NATURAL BALLOON ===== */
    .profile-toggle-glass {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 12px 6px 6px;

        /* Apple-style glassmorphism */
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);

        /* Tesla-style minimal border */
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 24px;

        /* Professional shadow */
        box-shadow:
            0 2px 16px rgba(0, 0, 0, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);

        color: #1d1d1f;
        text-decoration: none;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        font-weight: 500;
        font-size: 14px;

        /* Smooth hover animation */
        position: relative;
        overflow: hidden;

        /* За да изглежда като отварящ се балон */
        min-width: fit-content;
        width: auto;
    }

    .profile-toggle-glass::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.04);
        opacity: 0;
        transition: opacity 0.2s ease;
        z-index: -1;
    }

    .profile-toggle-glass:hover::before {
        opacity: 1;
    }

    .profile-toggle-glass:hover {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(255, 255, 255, 0.4);
        transform: translateY(-1px);
        color: #1d1d1f;
        text-decoration: none;

        /* Enhanced shadow on hover */
        box-shadow:
            0 4px 24px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    /* ===== EXPANDED STATE - КОГАТО DROPDOWN Е ОТВОРЕНО ===== */

    .profile-dropdown-glass:has(.dropdown-menu-glass.show) .profile-toggle-glass {
        /* Когато dropdown е отворено, балончето изглежда "разтегнато" */
        border-radius: 24px 24px 0 0;
        border-bottom: none;

        /* По-силна сянка за да изглежда "отворено" */
        box-shadow:
            0 4px 24px rgba(0, 0, 0, 0.12),
            0 2px 8px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);

        /* Леко "издигане" на балончето */
        transform: translateY(-2px);
    }

    /* Fallback за браузъри които не поддържат :has() */
    .profile-dropdown-glass.expanded .profile-toggle-glass {
        border-radius: 24px 24px 0 0;
        border-bottom: none;

        box-shadow:
            0 4px 24px rgba(0, 0, 0, 0.12),
            0 2px 8px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);

        transform: translateY(-2px);
    }

    /* ===== PROFESSIONAL PROFILE IMAGE STYLING ===== */

    .profile-image-glass {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;

        /* Apple-style border */
        border: 2px solid rgba(255, 255, 255, 0.6);

        /* Smooth transition */
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

        /* Professional shadow */
        box-shadow:
            0 2px 8px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }

    .avatar-placeholder-glass {
        width: 32px;
        height: 32px;
        border-radius: 50%;

        /* Apple-style gradient */
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 13px;

        /* Professional border */
        border: 2px solid rgba(255, 255, 255, 0.6);

        /* Smooth transition */
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

        /* Professional shadow */
        box-shadow:
            0 2px 8px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }

    .username-glass {
        font-weight: 500;
        font-size: 14px;
        color: #1d1d1f;
        padding-right: 8px;

        /* Smooth transition */
        transition: color 0.2s ease;
    }

    .profile-toggle-glass:hover .username-glass {
        color: #1d1d1f;
    }
}

/* End auth & profile desktop styles */

/* ===== EXPANDING PROFILE DROPDOWN - NATURAL EXTENSION ===== */

.dropdown-menu-glass {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    /* Начално състояние - скрито */
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    visibility: hidden;

    /* Плавна анимация на разтягане */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Същия стил като profile toggle за единство */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* Същата граница като profile toggle */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: none;
    /* Без горна граница за плавен преход */

    /* Закръглени ъгли само отдолу */
    border-radius: 0 0 24px 24px;

    /* Професионална сянка */
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    overflow: hidden;
    padding: 0;
    margin: 0;
    z-index: 1060;

    /* Ширината е винаги същата като profile toggle */
    width: 100%;
    min-width: auto;
}

.dropdown-menu-glass.show {
    opacity: 1;
    transform: scaleY(1);
    visibility: visible;
}

/* ===== DROPDOWN ITEMS - MINIMALIST DESIGN ===== */

.dropdown-item-glass {
    font-size: 14px;
    font-weight: 400;
    padding: 12px 16px;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

    color: #1d1d1f;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;

    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;

    /* Subtle hover effect */
    position: relative;
    overflow: hidden;
}

.dropdown-item-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.04);
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: -1;
}

.dropdown-item-glass:hover::before {
    opacity: 1;
}

.dropdown-item-glass:hover {
    color: #1d1d1f;
    text-decoration: none;
    transform: translateX(2px);
}

/* Icon styling */
.dropdown-item-glass i {
    font-size: 16px;
    width: 16px;
    text-align: center;
    color: #6e6e73;
    transition: color 0.15s ease;
}

.dropdown-item-glass:hover i {
    color: #1d1d1f;
}

/* ===== LOGOUT BUTTON - SPECIAL STYLING ===== */

.logout-btn-glass {
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 400;
    padding: 12px 16px;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

    color: #d70015;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;

    position: relative;
    overflow: hidden;
}

.logout-btn-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(215, 0, 21, 0.08);
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: -1;
}

.logout-btn-glass:hover::before {
    opacity: 1;
}

.logout-btn-glass:hover {
    color: #d70015;
    text-decoration: none;
    transform: translateX(2px);
}

.logout-btn-glass i {
    font-size: 16px;
    width: 16px;
    text-align: center;
    color: #d70015;
    transition: color 0.15s ease;
}

/* ===== DIVIDER BETWEEN SECTIONS ===== */

.dropdown-menu-glass li:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dropdown-menu-glass li:last-child {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 4px;
    padding-top: 8px;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 768px) {
    .dropdown-menu-glass {
        min-width: 100%;
        border-radius: 0;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: none;
        border: none;
    }
}

/* Mobile elements - hide on desktop */
@media (min-width: 769px) {
    .mobile-toggler-glass {
        display: none !important;
    }

    /* Hide mobile auth/profile that's inside mobile menu */
    .navbar-nav-section-glass .auth-buttons-glass,
    .navbar-nav-section-glass .profile-dropdown-glass {
        display: none !important;
    }
}

/* Vote Menu Container - Подобрена плавна анимация */
.vote-menu-container-glass {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1020;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transform: translateY(-100%);
    opacity: 0;
    will-change: transform, opacity, max-height;
    transition:
        transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
        max-height 0.85s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.vote-menu-container-glass.show {
    margin-top: 60px;
    /* Точно под navbar-а */
    max-height: 500px;
    padding: 1.5rem 0;
    transform: translateY(0);
    opacity: 1;
}

.vote-overlay-glass {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    will-change: opacity, visibility;
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.vote-overlay-glass.show {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   LANGUAGE SWITCHER STYLING
   ======================================== */

/* Language Switcher Item */
.language-switcher-item {
    position: relative;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.language-toggle .arrow-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.language-toggle.active .arrow-icon {
    transform: rotate(180deg);
}

/* Flag Icons Styling */
.language-option .fi {
    font-size: 1.3rem;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Language Dropdown */
.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Language Options */
.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.language-option:hover {
    background: rgba(76, 177, 92, 0.1);
    color: var(--primary-color);
}

.language-option .flag {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Скриване на оригиналния Google Translate widget */
#google_translate_element,
.goog-te-banner-frame,
.goog-te-balloon-frame,
div#goog-gt-,
.goog-te-gadget {
    display: none !important;
}

body {
    top: 0 !important;
}

/* Премахване на Google Translate toolbar */
.skiptranslate {
    display: none !important;
}

/* Оптимизация на Google Translate */
body.translated {
    will-change: auto;
}

/* Prevent layout shifts */
.goog-te-banner-frame {
    display: none !important;
}

/* Изключи хардуерно ускорение за преведени елементи */
.translated * {
    transform: translateZ(0);
    backface-visibility: hidden;
}