/* LANGUAGE SELECTION MODAL */
.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.language-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.language-modal__content {
    background: white;
    border-radius: 25px;
    padding: 4rem 3rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
    overflow: hidden;
}

.language-modal__content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(153, 38, 240, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.language-modal__content::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(209, 34, 227, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.language-modal__header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.language-modal__title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #9926f0 0%, #d122e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 1rem 0;
    letter-spacing: -1px;
}

.language-modal__subtitle {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
    margin: 0;
}

.language-modal__options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(153, 38, 240, 0.05) 0%, rgba(209, 34, 227, 0.05) 100%);
    border: 2px solid rgba(153, 38, 240, 0.2);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: left;
}

.language-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.language-option:hover::before {
    left: 100%;
}

.language-option:hover {
    background: linear-gradient(135deg, rgba(153, 38, 240, 0.15) 0%, rgba(209, 34, 227, 0.15) 100%);
    border-color: #9926f0;
    transform: translateX(10px);
    box-shadow: 0 15px 40px rgba(153, 38, 240, 0.2);
}

.language-option:active {
    transform: translateX(10px) scale(0.98);
}

.language-option__flag {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

.language-option__content {
    flex: 1;
    text-align: left;
}

.language-option__content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.language-option__content p {
    margin: 0;
    font-size: 0.9rem;
    color: #999;
    font-weight: 500;
}

.language-option i {
    font-size: 1.5rem;
    color: #9926f0;
    transition: transform 0.3s ease;
}

.language-option:hover i {
    transform: translateX(5px);
}

.language-modal__footer {
    text-align: center;
    position: relative;
    z-index: 2;
}

.language-modal__notice {
    font-size: 0.85rem;
    color: #999;
    margin: 0.5rem 0;
    line-height: 1.5;
}

/* Animation */
@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Language Selector in Navbar */
.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-right: 1rem;
}

.language-switch {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    cursor: pointer;
}

.language-switch:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.language-switch.active {
    background: linear-gradient(135deg, #9926f0 0%, #d122e3 100%);
    border-color: #d122e3;
    color: white;
    box-shadow: 0 4px 15px rgba(153, 38, 240, 0.4);
}

.language-modal {
    background:
        radial-gradient(ellipse at 15% 15%, rgba(16, 185, 129, 0.2), transparent 42%),
        radial-gradient(ellipse at 85% 85%, rgba(5, 150, 105, 0.16), transparent 40%),
        rgba(3, 7, 6, 0.94);
    backdrop-filter: blur(10px);
}

.language-modal__content {
    border: 1px solid rgba(52, 211, 153, 0.3);
    background: linear-gradient(145deg, #111a17, #090e0d);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 55px rgba(16, 185, 129, 0.1);
}

.language-modal__content::before {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, transparent 70%);
}

.language-modal__content::after {
    background: radial-gradient(circle, rgba(5, 150, 105, 0.13) 0%, transparent 70%);
}

.language-modal__title {
    background: linear-gradient(135deg, #a7f3d0 0%, #10b981 100%);
    -webkit-text-fill-color: transparent;
}

.language-modal__subtitle {
    color: #cbd5d1;
}

.language-option {
    border-color: rgba(52, 211, 153, 0.22);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.035));
}

.language-option::before {
    background: linear-gradient(90deg, transparent, rgba(110, 231, 183, 0.12), transparent);
}

.language-option:hover,
.language-option:focus-visible {
    border-color: #34d399;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1));
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.16);
}

.language-option:focus-visible {
    outline: 2px solid #6ee7b7;
    outline-offset: 3px;
}

.language-option__content h3 {
    color: #f3f4f6;
}

.language-option__content p,
.language-modal__notice {
    color: #9ca3af;
}

.language-option i {
    color: #6ee7b7;
}

.menu .language-selector-pill {
    border-color: rgba(52, 211, 153, 0.28);
    background: rgba(16, 185, 129, 0.1);
}

.menu .language-selector-pill .language-select {
    accent-color: #10b981;
}

.menu .language-selector-pill:focus-within {
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

.menu .language-selector-pill .language-select option {
    background: #101a17;
    color: #f3f4f6;
}

.language-switch.active {
    border-color: #34d399;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.language-switch:hover {
    border-color: rgba(52, 211, 153, 0.65);
    background: rgba(16, 185, 129, 0.14);
    color: #a7f3d0;
}

.language-switch:focus-visible {
    outline: 2px solid #6ee7b7;
    outline-offset: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .language-modal__content {
        padding: 2.5rem 1.5rem;
    }

    .language-modal__title {
        font-size: 1.8rem;
    }

    .language-option {
        padding: 1.2rem 1.5rem;
    }

    .language-option__flag {
        font-size: 2rem;
    }

    .language-option__content h3 {
        font-size: 1.1rem;
    }

    .language-selector {
        margin-right: 0.5rem;
    }

    .language-switch {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .language-modal,
    .language-modal__content,
    .language-option,
    .language-option__flag,
    .language-option i {
        animation: none;
        transition: none;
    }
}