/* Control Components - Audio Player & Language Switcher */
/* Glassmorphism styling for interactive control elements */

/* Audio Player Component */
.audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--nav-bg);
    border: 1px solid var(--nav-btn-border);
    border-radius: 32px;
    padding: 6px 16px 6px 6px;
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    box-shadow: var(--shadow-md), 
                0 2px 0 var(--primary-light) inset,
                0 -1px 0 rgba(0, 0, 0, 0.1) inset;
    transition: var(--theme-transition);
}

.audio-player:hover {
    background: var(--nav-bg-hover);
    border-color: var(--nav-btn-border-active);
    box-shadow: var(--shadow-lg), 
                0 2px 0 var(--primary-light) inset,
                0 -1px 0 rgba(0, 0, 0, 0.08) inset;
}

/* Simple Audio Button - YOUGU Green Theme */
.audio-btn {
    background: #051810;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(32, 140, 100, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 
        0 2px 8px rgba(5, 24, 16, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(32, 140, 100, 0.1);
    position: relative;
}

/* Show play icon when not playing */
.audio-btn:not(.playing) .play-icon {
    display: block;
}

.audio-btn:not(.playing) .pause-icon {
    display: none;
}

/* Show pause icon when playing */
.audio-btn.playing .play-icon {
    display: none;
}

.audio-btn.playing .pause-icon {
    display: block;
}

/* Clean professional hover effect */
.audio-btn:hover {
    background: var(--accent-mint, #53eeae);
    border-color: var(--accent-mint, #53eeae);
    color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(83, 238, 174, 0.25);
    transform: translateY(-1px);
}

/* Active state */
.audio-btn:active {
    transform: scale(0.95);
}

/* Theme Toggle Button - Clean Design */
.theme-toggle {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Clean professional theme toggle hover */
.theme-toggle:hover {
    background: var(--accent-mint, #53eeae);
    border-color: var(--accent-mint, #53eeae);
    color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(83, 238, 174, 0.25);
}

/* Theme toggle active state */
.theme-toggle:active {
    transform: scale(0.95);
}

/* Search Button - YOUGU Green Theme */
.search-btn {
    background: #051810;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(32, 140, 100, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 
        0 2px 8px rgba(5, 24, 16, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(32, 140, 100, 0.1);
    position: relative;
}

.search-btn:hover {
    background: var(--accent-mint, #53eeae);
    border-color: var(--accent-mint, #53eeae);
    color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(83, 238, 174, 0.25);
    transform: translateY(-1px);
}

.search-btn:active {
    transform: scale(0.95);
}

/* Clean professional playing state */
.audio-btn.playing {
    background: var(--accent-mint, #53eeae);
    border-color: var(--accent-mint, #53eeae);
    box-shadow: 0 2px 8px rgba(83, 238, 174, 0.3);
    color: rgba(255, 255, 255, 1);
}

/* Volume Controls */
.volume-section { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.volume-icon { 
    color: rgba(255,255,255,0.9); 
    width: 16px; 
    height: 16px; 
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(120,160,255,0.25);
    border-radius: 4px;
    outline: none; 
    border: none; 
    cursor: pointer;
    -webkit-appearance: none; 
    appearance: none;
    transition: var(--transition);
    position: relative;
}

.volume-slider:hover { 
    height: 6px; 
    background: rgba(140,160,255,0.35); 
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; 
    appearance: none;
    width: 20px; 
    height: 20px;
    background: var(--control-bg);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: var(--radius-full); 
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(120,160,255,0.4);
    transition: var(--transition);
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--control-bg-hover);
    border-color: rgba(255,255,255,0.6);
    transform: scale(1.2);
    box-shadow: 0 6px 16px rgba(140,160,255,0.5);
}

/* Language Switcher Component */
.language-switch { 
    position: relative; 
}

.language-switch-track {
    position: relative;
    width: 120px; 
    height: 52px;
    background: rgba(15, 15, 40, 0.6);
    border: 1px solid var(--nav-btn-border);
    border-radius: 32px; 
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; 
    align-items: center; 
    padding: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 
                0 2px 0 rgba(140, 160, 255, 0.1) inset,
                0 -1px 0 rgba(0, 0, 0, 0.1) inset;
    z-index: var(--z-controls);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

.language-switch-track:hover { 
    background: rgba(15, 15, 40, 0.8); 
    border-color: var(--nav-btn-border-active); 
    box-shadow: 0 8px 24px rgba(120, 160, 255, 0.15), 
                0 2px 0 rgba(140, 160, 255, 0.15) inset,
                0 -1px 0 rgba(0, 0, 0, 0.08) inset;
}

.language-switch-thumb {
    position: absolute; 
    width: 40px; 
    height: 40px; 
    left: 6px;
    background: var(--control-bg);
    border-radius: var(--radius-full); 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--control-shadow);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 3;
}

.language-switch-track.cn .language-switch-thumb { 
    left: 74px; 
    box-shadow: var(--control-shadow-hover);
    background: var(--control-bg-hover);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-labels { 
    position: absolute; 
    inset: 0; 
    display: flex; 
    align-items: center; 
    pointer-events: none; 
    font-size: 14px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    z-index: 15;
}

.language-label { 
    color: rgba(255,255,255,0.4); 
    transition: color 0.3s ease, text-shadow 0.3s ease; 
    width: 40px; 
    height: 40px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 13px !important;
}

.language-label.en { 
    left: 6px; 
}

.language-label.cn { 
    right: 6px; 
}

.language-switch-track:not(.cn) .language-label.en, 
.language-switch-track.cn .language-label.cn { 
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 12px rgba(120, 160, 255, 0.6);
    font-weight: 900;
    transform: translateY(-50%);
}
