/* 语言选择弹窗样式 */
.language-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.language-popup-container {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: languagePopupSlideIn 0.4s ease-out;
    transform-origin: center;
}

@keyframes languagePopupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 弹窗头部 */
.language-popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 30px 20px;
    text-align: center;
    position: relative;
}

.language-popup-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.language-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.language-popup-close svg {
    width: 20px;
    height: 20px;
}

/* 弹窗内容 */
.language-popup-content {
    padding: 30px;
}

.language-popup-description {
    margin: 0 0 30px 0;
    color: #666;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}

/* 语言选项 */
.language-popup-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.language-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
    position: relative;
    overflow: hidden;
}

/* 当前语言样式 */
.language-option.current-language {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
    position: relative;
}

.language-option.current-language::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: #667eea;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.language-option.current-language .current-indicator {
    display: inline-block;
    background: #667eea;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.language-option.current-language:hover {
    border-color: #5a67d8;
    background: linear-gradient(135deg, #e6f0ff 0%, #d6e6ff 100%);
    transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.language-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.language-option:hover::before {
    left: 100%;
}

.language-option:hover {
    border-color: #667eea;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.language-option:active {
    transform: translateY(0);
}

/* 国旗 */
.language-flag {
    font-size: 32px;
    margin-right: 20px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 语言信息 */
.language-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.language-name {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.language-native {
    font-size: 14px;
    color: #718096;
    font-style: italic;
}

/* 箭头 */
.language-arrow {
    color: #cbd5e0;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.language-option:hover .language-arrow {
    color: #667eea;
    transform: translateX(5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .language-popup-container {
        width: 95%;
        margin: 20px;
        border-radius: 15px;
    }
    
    .language-popup-header {
        padding: 25px 20px 15px;
    }
    
    .language-popup-header h2 {
        font-size: 20px;
    }
    
    .language-popup-content {
        padding: 20px;
    }
    
    .language-option {
        padding: 15px;
    }
    
    .language-flag {
        font-size: 28px;
        margin-right: 15px;
    }
    
    .language-name {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .language-popup-container {
        width: 98%;
        margin: 10px;
        border-radius: 12px;
    }
    
    .language-popup-header h2 {
        font-size: 18px;
    }
    
    .language-popup-content {
        padding: 15px;
    }
    
    .language-option {
        padding: 12px;
    }
    
    .language-flag {
        font-size: 24px;
        margin-right: 12px;
    }
    
    .language-name {
        font-size: 16px;
    }
    
    .language-native {
        font-size: 12px;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .language-popup-container {
        background: #1a202c;
        color: #f7fafc;
    }
    
    .language-popup-header {
        background: linear-gradient(135deg, #4c51bf 0%, #553c9a 100%);
    }
    
    .language-option {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .language-option:hover {
        background: #374151;
        border-color: #4c51bf;
    }
    
    .language-name {
        color: #f7fafc;
    }
    
    .language-native {
        color: #a0aec0;
    }
    
    .language-popup-description {
        color: #a0aec0;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .language-option {
        border-width: 3px;
    }
    
    .language-popup-container {
        border: 3px solid #000;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .language-popup-container {
        animation: none;
    }
    
    .language-option:hover {
        transform: none;
    }
    
    .language-option:hover .language-arrow {
        transform: none;
    }
    
    .language-option::before {
        display: none;
    }
}

/* 打印样式 */
@media print {
    .language-popup-overlay {
        display: none !important;
    }
}
