/* 多语言切换器样式 */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 10px 15px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    line-height: 1;
}

.language-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.language-flag {
    font-size: 16px;
}

.language-name {
    min-width: 80px;
    text-align: left;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.language-button.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid #e9ecef;
}

.language-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: #f8f9fa;
}

.language-option.active {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
}

.language-option .language-name {
    font-size: 14px;
    min-width: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: inline-block;
    visibility: visible;
    color: #666;
}

.language-option.active .language-name {
    color: #1976d2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .language-switcher {
        top: 10px;
        right: 10px;
    }
    
    .language-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .language-button .language-name {
        display: none;
    }
    
    .language-menu {
        min-width: 150px;
    }
}

/* 语言特定的字体优化 */
[lang="zh"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

[lang="ja"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
}

[lang="ko"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', '맑은 고딕', sans-serif;
}

[lang="hi"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Devanagari', sans-serif;
}

[lang="ru"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* RTL语言支持（如果需要） */
[dir="rtl"] .language-switcher {
    right: auto;
    left: 20px;
}

[dir="rtl"] .language-menu {
    right: auto;
    left: 0;
}

[dir="rtl"] .language-name {
    text-align: right;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-option {
    animation: fadeInUp 0.3s ease forwards;
}

.language-option:nth-child(1) { animation-delay: 0.05s; }
.language-option:nth-child(2) { animation-delay: 0.1s; }
.language-option:nth-child(3) { animation-delay: 0.15s; }
.language-option:nth-child(4) { animation-delay: 0.2s; }
.language-option:nth-child(5) { animation-delay: 0.25s; }
.language-option:nth-child(6) { animation-delay: 0.3s; }
.language-option:nth-child(7) { animation-delay: 0.35s; }
.language-option:nth-child(8) { animation-delay: 0.4s; }
