.custom-select {
    position: relative;
    width: 120px;
    margin-right: 60px;
}

.language-select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--card-border-color);
    color: var(--text-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1em;
    text-align: center;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    transition: all 0.2s ease;
    transform: perspective(1000px) rotateX(1deg) translateZ(2px);
    will-change: transform;
    z-index: 2;
}

[data-theme="dark"] .language-select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.language-select:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--accent-color);
    border-color: rgba(0, 0, 0, 0.15);
    transform: perspective(1000px) rotateX(0deg) translateY(-3px) translateZ(8px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .language-select:hover {
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transform: perspective(1000px) rotateX(2deg) translateY(-20px) translateZ(5px);
    will-change: transform;
    z-index: 9999;
    will-change: transform;
    z-index: 9999;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 8px;
    overflow: visible;
    padding: 8px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    pointer-events: none;
}

[data-theme="dark"] .select-dropdown {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.custom-select.active .select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: perspective(1000px) rotateX(0deg) translateY(0) translateZ(8px);
    pointer-events: auto;
}

.select-option {
    padding: 12px 16px;
    padding: 12px 16px;
    margin: 4px 8px;
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    transition: all 0.2s ease;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--card-border-color);
}

.select-option::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.select-option::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: all 0.4s ease;
}

.select-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.select-option:hover::before {
    width: 80%;
}

.select-option:hover::after {
    width: 100px;
    height: 100px;
    bottom: -30px;
}

[data-theme="dark"] .select-option {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .select-option:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .select-option::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

[data-theme="dark"] .select-option::after {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.language-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    font-family: 'Raleway', sans-serif;
}

.flag-icon {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.custom-select:hover .language-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.custom-select.active .language-tooltip {
    opacity: 0;
    visibility: hidden;
}