/* 语言选择器样式 */
.language-selector {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.language-current {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color: #333;
    font-weight: 500;
    min-width: 120px;
    justify-content: space-between;
}

.language-current:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.language-current.active {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.3);
}

.language-flag {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.language-text {
    flex: 1;
    font-size: 14px;
}

.language-arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
    font-size: 12px;
}

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

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.language-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.language-option:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

.language-option.selected {
    background: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
    font-weight: 600;
}

.language-option .language-flag {
    margin-right: 12px;
}

.language-option .language-text {
    font-size: 14px;
    font-weight: 500;
}

/* 国旗图标 */
.flag-en { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30"><rect width="60" height="30" fill="%23012169"/><g stroke="%23fff" stroke-width="6"><path d="m0,0 60,30 m0,-30 L0,30"/></g><g stroke="%23C8102E" stroke-width="4"><path d="m0,0 60,30 m0,-30 L0,30"/></g><path stroke="%23fff" stroke-width="10" d="M30,0 v30 M0,15 h60"/><path stroke="%23C8102E" stroke-width="6" d="M30,0 v30 M0,15 h60"/></svg>'); }

.flag-zh { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23de2910"/><polygon fill="%23ffde00" points="5,3 6,6 9,6 7,8 8,11 5,9 2,11 3,8 1,6 4,6"/></svg>'); }

.flag-zh-tw { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23fe0000"/><rect width="15" height="10" fill="%23000095"/><polygon fill="%23fff" points="7.5,2 8.5,5 11.5,5 9,7 10,10 7.5,8 5,10 6,7 3.5,5 6.5,5"/></svg>'); }

.flag-es { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23AA151B"/><rect width="30" height="10" y="5" fill="%23F1BF00"/></svg>'); }

.flag-ja { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23fff"/><circle cx="15" cy="10" r="6" fill="%23bc002d"/></svg>'); }

.flag-ko { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23fff"/><circle cx="15" cy="10" r="4" fill="%23c60c30" stroke="%23003478" stroke-width="0.5"/></svg>'); }

.flag-ar { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23007A3D"/><rect width="30" height="13.33" fill="%23fff"/><rect width="30" height="6.67" fill="%23CE1126"/></svg>'); }

.flag-pt { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23ff0000"/><rect width="12" height="20" fill="%23006600"/></svg>'); }

.flag-fr { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23fff"/><rect width="10" height="20" fill="%23002395"/><rect width="10" height="20" x="20" fill="%23ed2939"/></svg>'); }

.flag-de { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23000"/><rect width="30" height="13.33" fill="%23dd0000"/><rect width="30" height="6.67" fill="%23ffce00"/></svg>'); }

.flag-hi { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23fff"/><rect width="30" height="6.67" fill="%23ff9933"/><rect width="30" height="6.67" y="13.33" fill="%23138808"/><circle cx="15" cy="10" r="3" fill="none" stroke="%23000080" stroke-width="0.5"/></svg>'); }

.flag-it { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23fff"/><rect width="10" height="20" fill="%23009246"/><rect width="10" height="20" x="20" fill="%23ce2b37"/></svg>'); }

.flag-tr { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23e30a17"/><circle cx="12" cy="10" r="4" fill="%23fff"/><circle cx="13" cy="10" r="3.2" fill="%23e30a17"/><polygon fill="%23fff" points="16,7 17,9 19,9 17.5,10.5 18,12.5 16,11 14,12.5 14.5,10.5 13,9 15,9"/></svg>'); }

.flag-ru { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23fff"/><rect width="30" height="6.67" fill="%23fff"/><rect width="30" height="6.67" y="6.67" fill="%230039a6"/><rect width="30" height="6.67" y="13.33" fill="%23d52b1e"/></svg>'); }

/* 响应式设计 */
@media (max-width: 768px) {
    .language-current {
        min-width: 100px;
        padding: 6px 10px;
    }
    
    .language-text {
        font-size: 12px;
    }
    
    .language-dropdown {
        max-height: 300px;
    }
    
    .language-option {
        padding: 10px 12px;
    }
}

/* 滚动条样式 */
.language-dropdown::-webkit-scrollbar {
    width: 6px;
}

.language-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.language-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.language-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}
