/* apple-liquid-glass.css */

/**
 * Cosmic Focus - Apple Liquid Glass Design System
 * Inspired by Apple's new fluid, morphing button design
 * Features: Organic shapes, rich depth, layered shadows, context-aware appearance
 * Version: 1.0
 */

/* ===== APPLE LIQUID GLASS BASE SYSTEM ===== */

/* Base button reset and structure */
.liquid-glass-btn {
    /* Reset */
    all: unset;
    box-sizing: border-box;
    
    /* Structure */
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

:root {
    /* Liquid Glass Color Palette */
    --apple-glass-bg: rgba(255, 255, 255, 0.12);
    --apple-glass-bg-hover: rgba(255, 255, 255, 0.18);
    --apple-glass-bg-active: rgba(255, 255, 255, 0.22);
    --apple-glass-border: rgba(255, 255, 255, 0.25);
    --apple-glass-border-hover: rgba(255, 255, 255, 0.35);
    --apple-glass-shadow: rgba(0, 0, 0, 0.3);
    --apple-glass-inner-glow: rgba(255, 255, 255, 0.2);
    --apple-glass-outer-glow: rgba(176, 224, 230, 0.4);
    
    /* Animation Timing */
    --apple-morph-duration: 0.4s;
    --apple-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --apple-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== NAVIGATION BUTTONS - APPLE STYLE ===== */
/* All navigation button styling handled in responsive.css */
/* This prevents duplication and ensures single source of truth */

/* ===== SOUND SEARCH BAR - FLOATING GLASS DESIGN ===== */

/* Unified glass container for search + sounds */
.ambient-section {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* Clean transparent container */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 32px;
    
    margin-top: 40px;
    padding: 32px;
    
    box-shadow: none;
}

.sound-search-container {
    position: relative;
    width: 100%;
    margin: 0 0 28px 0;
    padding: 0;
}

.sound-search-input {
    width: 100%;
    height: 48px;
    padding: 12px 50px 12px 18px;
    border-radius: 24px;
    
    /* Refined glass morphism */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Subtle inner elevation */
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.15),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.03);
    
    /* Typography */
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.95);
    
    /* Smooth transitions */
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
}

.sound-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/* Search icon */
.sound-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0.5;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus state - spring animation with cosmic glow */
.sound-search-container.focused .sound-search-input,
.sound-search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(138, 43, 226, 0.35);
    transform: translateY(-1px) scale(1.005);
    
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(138, 43, 226, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 0 30px rgba(138, 43, 226, 0.06),
        0 0 40px rgba(138, 43, 226, 0.15);
}

.sound-search-container.focused .sound-search-icon,
.sound-search-input:focus + .sound-search-icon {
    opacity: 0.8;
    color: rgba(138, 43, 226, 0.9);
    filter: drop-shadow(0 0 8px rgba(138, 43, 226, 0.6));
}

/* Hover state */
.sound-search-input:hover:not(:focus) {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ===== AMBIENT SOUND BUTTONS - APPLE STYLE ===== */

.ambient-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 100%;
    padding: 0;
    
    /* Allow natural expansion for more sounds */
    max-height: none;
    overflow: visible;
}

.ambient-controls .liquid-glass-btn {
    /* Compact elegant cards */
    min-height: 110px;
    padding: 20px 16px;
    border-radius: 22px;
    
    /* Refined glass material */
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Refined shadow system */
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 0 20px rgba(255, 255, 255, 0.03);
    
    /* Layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    
    /* Typography */
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.02em;
    
    /* Apple's morphing animation */
    transition: 
        all var(--apple-morph-duration) var(--apple-ease),
        transform 0.2s var(--apple-ease);
    
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Icon styling */
.ambient-controls .liquid-glass-btn .btn-icon {
    font-size: 40px;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.35));
    transition: transform 0.3s var(--apple-ease-bounce);
}

/* Hover state - elegant lift and glow */
.ambient-controls .liquid-glass-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 1);
    transform: translateY(-4px) scale(1.02);
    
    box-shadow: 
        0 12px 36px rgba(0, 0, 0, 0.35),
        0 3px 16px rgba(138, 43, 226, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 0 25px rgba(255, 255, 255, 0.06),
        0 0 40px rgba(138, 43, 226, 0.3);
}

.ambient-controls .liquid-glass-btn:hover .btn-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 4px 14px rgba(138, 43, 226, 0.5));
}

.ambient-controls .liquid-glass-btn:hover .btn-text {
    text-shadow: 0 0 18px rgba(138, 43, 226, 0.5);
}

/* Active state - with cosmic pulse animation */
.ambient-controls .liquid-glass-btn.active,
.ambient-controls .liquid-glass-btn[data-playing="true"] {
    background: rgba(138, 43, 226, 0.15);
    border-color: rgba(138, 43, 226, 0.3);
    
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 12px rgba(138, 43, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 0 25px rgba(138, 43, 226, 0.12),
        0 0 40px rgba(138, 43, 226, 0.35);
    
    color: rgba(255, 255, 255, 0.98);
    text-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
    
    /* Constant cosmic pulse */
    animation: cosmicSoundPulse 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Enhanced hover on active sounds */
.ambient-controls .liquid-glass-btn.active:hover,
.ambient-controls .liquid-glass-btn[data-playing="true"]:hover {
    background: rgba(138, 43, 226, 0.2);
    transform: translateY(-6px) scale(1.04);
}

/* Press effect */
.ambient-controls .liquid-glass-btn:active {
    transform: translateY(-2px) scale(0.98);
    transition: transform 0.1s var(--apple-ease);
}

/* ===== TIMER CONTROLS - APPLE STYLE ===== */

.timer-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
    padding: 0 20px;
}

/* Base timer button style */
.timer-controls .liquid-glass-btn {
    /* Apple's pill shape - smaller size */
    min-height: 44px;
    padding: 12px 24px;
    border-radius: 26px;
    
    /* Apple's ultra-transparent material - barely visible */
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    
    /* Apple's minimal shadows */
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 1px 4px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 0 15px rgba(255, 255, 255, 0.04);
    
    /* Typography */
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.85);
    
    /* Apple's smooth morphing */
    transition: 
        all var(--apple-morph-duration) var(--apple-ease),
        transform 0.2s var(--apple-ease);
    
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Primary button (Start Focus) - with translucent color fill */
.timer-controls .liquid-glass-btn--primary {
    background: rgba(176, 224, 230, 0.12);
    border-color: rgba(176, 224, 230, 0.2);
    
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 1px 4px rgba(176, 224, 230, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(176, 224, 230, 0.06),
        0 0 25px rgba(176, 224, 230, 0.2);
    
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-shadow: 0 0 12px rgba(176, 224, 230, 0.25);
}

.timer-controls .liquid-glass-btn--primary:hover {
    background: rgba(176, 224, 230, 0.18);
    border-color: rgba(176, 224, 230, 0.3);
    color: rgba(255, 255, 255, 1);
    transform: translateY(-2px) scale(1.03);
    
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 12px rgba(176, 224, 230, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 0 25px rgba(176, 224, 230, 0.08),
        0 0 35px rgba(176, 224, 230, 0.3);
    
    text-shadow: 0 0 18px rgba(176, 224, 230, 0.35);
}

/* Warning button (Pause) - with translucent color fill */
.timer-controls .liquid-glass-btn--warning {
    background: rgba(255, 149, 0, 0.1);
    border-color: rgba(255, 149, 0, 0.18);
    
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 1px 4px rgba(255, 149, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 0 15px rgba(255, 149, 0, 0.04),
        0 0 20px rgba(255, 149, 0, 0.15);
}

.timer-controls .liquid-glass-btn--warning:hover {
    background: rgba(255, 149, 0, 0.15);
    border-color: rgba(255, 149, 0, 0.25);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px) scale(1.03);
    
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 12px rgba(255, 149, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(255, 149, 0, 0.06),
        0 0 30px rgba(255, 149, 0, 0.25);
}

/* Success button (Skip) - with translucent color fill */
.timer-controls .liquid-glass-btn--success {
    background: rgba(52, 199, 89, 0.1);
    border-color: rgba(52, 199, 89, 0.18);
    
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 1px 4px rgba(52, 199, 89, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 0 15px rgba(52, 199, 89, 0.04),
        0 0 20px rgba(52, 199, 89, 0.15);
}

.timer-controls .liquid-glass-btn--success:hover {
    background: rgba(52, 199, 89, 0.15);
    border-color: rgba(52, 199, 89, 0.25);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px) scale(1.03);
    
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 12px rgba(52, 199, 89, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(52, 199, 89, 0.06),
        0 0 30px rgba(52, 199, 89, 0.25);
}

/* Small button (Reset Session) */
.timer-controls .liquid-glass-btn--small {
    min-height: 38px;
    padding: 10px 20px;
    border-radius: 22px;
    font-size: 13px;
}

/* Hover state for all timer buttons */
.timer-controls .liquid-glass-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px) scale(1.02);
    
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.06),
        0 0 30px rgba(255, 255, 255, 0.12);
}

/* Press effect */
.timer-controls .liquid-glass-btn:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s var(--apple-ease);
}

/* ===== APPLE MORPHING ANIMATIONS ===== */

/* Fluid morph on state change */
@keyframes appleMorph {
    0% {
        transform: scale(1);
        border-radius: 40px;
    }
    50% {
        transform: scale(1.05);
        border-radius: 50%;
    }
    100% {
        transform: scale(1);
        border-radius: 40px;
    }
}

/* Morphing animation for ambient and timer controls only */
.ambient-controls .liquid-glass-btn.morphing,
.timer-controls .liquid-glass-btn.morphing {
    animation: appleMorph 0.6s var(--apple-ease);
}

/* Sound card filter animations */
@keyframes soundCardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes soundCardFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* ===== SOUND LIBRARY MODAL SYSTEM ===== */

/* Browse button - semi-transparent minimal */
.browse-sounds-btn {
    width: 100%;
    max-width: 400px;
    min-height: 60px;
    padding: 18px 28px;
    margin-top: 16px;
    
    background: rgba(138, 43, 226, 0.05) !important;
    backdrop-filter: blur(40px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(140%) !important;
    border: 1px solid rgba(138, 43, 226, 0.15) !important;
    border-radius: 30px !important;
    
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.15),
        0 1px 6px rgba(138, 43, 226, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 20px rgba(138, 43, 226, 0.04),
        0 0 30px rgba(138, 43, 226, 0.1) !important;
    
    font-size: 17px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85) !important;
    text-shadow: 0 0 15px rgba(138, 43, 226, 0.25) !important;
    
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    cursor: pointer;
    
    overflow: visible !important;
}

.browse-sounds-btn:hover {
    background: rgba(138, 43, 226, 0.12) !important;
    border-color: rgba(138, 43, 226, 0.25) !important;
    transform: translateY(-3px) scale(1.02) !important;
    
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.25),
        0 3px 16px rgba(138, 43, 226, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 0 25px rgba(138, 43, 226, 0.08),
        0 0 50px rgba(138, 43, 226, 0.25) !important;
}

.browse-sounds-btn .btn-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 8px rgba(138, 43, 226, 0.6));
}

/* Active sounds display */
.active-sounds-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-height: 40px;
    margin-bottom: 8px;
    width: 100%;
}

.active-sound-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    
    background: rgba(138, 43, 226, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 43, 226, 0.25);
    
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 0 15px rgba(138, 43, 226, 0.08);
    
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    
    animation: chipSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.active-sound-chip .chip-icon {
    font-size: 18px;
}

.active-sound-chip .chip-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.active-sound-chip .chip-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

@keyframes chipSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal overlay */
.sound-library-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.sound-library-modal.active {
    display: flex;
    pointer-events: auto;
}

/* Backdrop blur */
.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sound-library-modal.active .modal-backdrop {
    opacity: 1;
}

/* Modal container */
.modal-container {
    position: relative;
    width: 90vw;
    max-width: 1200px;
    height: 85vh;
    max-height: 900px;
    
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    
    box-shadow: 
        0 25px 100px rgba(0, 0, 0, 0.6),
        0 10px 40px rgba(138, 43, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 0 60px rgba(138, 43, 226, 0.05);
    
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    transform: scale(0.9) translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sound-library-modal.active .modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Modal header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 30px rgba(138, 43, 226, 0.4);
    margin: 0;
}

.modal-close-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 1);
    transform: rotate(90deg) scale(1.1);
}

/* Modal search */
.modal-search-container {
    position: relative;
    padding: 24px 36px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-search-input {
    width: 100%;
    height: 52px;
    padding: 14px 54px 14px 20px;
    border-radius: 26px;
    
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 17px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.modal-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.modal-search-input:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 
        0 6px 28px rgba(0, 0, 0, 0.25),
        0 0 40px rgba(138, 43, 226, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-search-icon {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    opacity: 0.5;
    pointer-events: none;
}

/* Modal content - scrollable */
.modal-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px 36px;
    
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(138, 43, 226, 0.3) transparent;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(138, 43, 226, 0.3);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 43, 226, 0.5);
}

/* Sound categories */
.sound-category {
    margin-bottom: 40px;
}

.sound-category:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Sound grid */
.sound-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

/* Sound card */
.sound-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px;
    min-height: 140px;
    
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Typography */
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.sound-card .sound-icon {
    font-size: 48px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.sound-card .sound-name {
    font-size: 14px;
    letter-spacing: -0.01em;
}

/* Sound card hover */
.sound-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px) scale(1.03);
    color: rgba(255, 255, 255, 1);
    
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 4px 16px rgba(138, 43, 226, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 35px rgba(138, 43, 226, 0.3);
}

.sound-card:hover .sound-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 6px 18px rgba(138, 43, 226, 0.5));
}

/* Sound card active state */
.sound-card.active {
    background: rgba(138, 43, 226, 0.18);
    border-color: rgba(138, 43, 226, 0.35);
    color: rgba(255, 255, 255, 0.98);
    
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 12px rgba(138, 43, 226, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 0 30px rgba(138, 43, 226, 0.15),
        0 0 50px rgba(138, 43, 226, 0.4);
    
    animation: cosmicSoundPulse 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.sound-card.active:hover {
    background: rgba(138, 43, 226, 0.25);
    transform: translateY(-6px) scale(1.05);
}

/* Sound card press */
.sound-card:active {
    transform: translateY(-2px) scale(0.98);
    transition: transform 0.1s ease;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-container {
        width: 95vw;
        height: 90vh;
        border-radius: 24px;
    }
    
    .modal-header {
        padding: 20px 24px;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .modal-close-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .modal-search-container {
        padding: 20px 24px;
    }
    
    .modal-content {
        padding: 24px;
    }
    
    .sound-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .sound-card {
        min-height: 120px;
        padding: 20px 12px;
    }
    
    .sound-card .sound-icon {
        font-size: 42px;
    }
}

@media (max-width: 480px) {
    .modal-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        max-height: none;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-title {
        font-size: 22px;
    }
    
    .modal-search-container {
        padding: 16px 20px;
    }
    
    .modal-search-input {
        height: 48px;
        font-size: 16px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .sound-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .sound-card {
        min-height: 110px;
        padding: 16px 10px;
    }
    
    .sound-card .sound-icon {
        font-size: 38px;
    }
    
    .sound-card .sound-name {
        font-size: 13px;
    }
}

/* Active sound pulse with cosmic colors */
@keyframes cosmicSoundPulse {
    0%, 100% {
        border-color: rgba(138, 43, 226, 0.3);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.3),
            0 2px 12px rgba(138, 43, 226, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.25),
            inset 0 0 25px rgba(138, 43, 226, 0.12),
            0 0 40px rgba(138, 43, 226, 0.35);
    }
    50% {
        border-color: rgba(0, 255, 255, 0.4);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.3),
            0 2px 12px rgba(0, 255, 255, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            inset 0 0 30px rgba(0, 255, 255, 0.15),
            0 0 60px rgba(0, 255, 255, 0.5);
    }
}

/* Subtle glow pulse */
@keyframes appleGlowPulse {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.4),
            0 2px 8px rgba(176, 224, 230, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.25),
            inset 0 0 20px rgba(176, 224, 230, 0.08),
            0 0 30px rgba(176, 224, 230, 0.3);
    }
    50% {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.4),
            0 2px 8px rgba(176, 224, 230, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            inset 0 0 20px rgba(176, 224, 230, 0.12),
            0 0 50px rgba(176, 224, 230, 0.5);
    }
}

/* Apply pulse to active elements (ambient and timer only) */
.ambient-controls .liquid-glass-btn.active.pulsing,
.timer-controls .liquid-glass-btn--primary.pulsing {
    animation: appleGlowPulse 2s var(--apple-ease) infinite;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 768px) {
    .ambient-section {
        padding: 24px;
        border-radius: 28px;
    }
    
    .sound-search-container {
        margin-bottom: 20px;
    }
    
    .ambient-controls {
        gap: 10px;
    }
    
    .ambient-controls .liquid-glass-btn {
        min-height: 100px;
        padding: 18px 14px;
        border-radius: 20px;
    }
    
    .ambient-controls .liquid-glass-btn .btn-icon {
        font-size: 36px;
    }
    
    .timer-controls {
        gap: 10px;
        padding: 0 15px;
    }
    
    .timer-controls .liquid-glass-btn {
        min-height: 48px;
        padding: 14px 24px;
        border-radius: 26px;
        font-size: 15px;
    }
    
    .timer-controls .liquid-glass-btn--small {
        min-height: 40px;
        padding: 10px 14px;
        border-radius: 22px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ambient-section {
        padding: 20px;
        border-radius: 24px;
    }
    
    .sound-search-input {
        height: 44px;
        font-size: 15px;
    }
    
    .ambient-controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .ambient-controls .liquid-glass-btn {
        min-height: 90px;
        padding: 16px 12px;
        border-radius: 18px;
        font-size: 14px;
    }
    
    .ambient-controls .liquid-glass-btn .btn-icon {
        font-size: 32px;
    }
    
    .timer-controls {
        gap: 8px;
        padding: 0 10px;
        flex-direction: column;
        width: 100%;
    }
    
    .timer-controls .liquid-glass-btn {
        width: 100%;
        min-height: 44px;
        padding: 12px 20px;
        border-radius: 24px;
        font-size: 14px;
    }
    
    .timer-controls .liquid-glass-btn--small {
        min-height: 38px;
        padding: 8px 12px;
        border-radius: 20px;
        font-size: 12px;
    }
}

/* ===== ACCESSIBILITY ===== */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ambient-controls .liquid-glass-btn,
    .timer-controls .liquid-glass-btn {
        transition: none;
        animation: none;
    }
    
    .ambient-controls .liquid-glass-btn .btn-icon {
        transition: none;
    }
}

/* Focus visible for keyboard navigation */
.ambient-controls .liquid-glass-btn:focus-visible,
.timer-controls .liquid-glass-btn:focus-visible {
    outline: 3px solid rgba(176, 224, 230, 0.8);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .ambient-controls .liquid-glass-btn,
    .timer-controls .liquid-glass-btn {
        border-width: 2px;
        font-weight: 600;
    }
}

/* ===== REMOVED DUPLICATE NAV BUTTON OVERRIDES ===== */
/* Navigation buttons are now exclusively handled in responsive.css */
/* This section previously contained duplicate rules that competed with responsive.css */

/* Force override for ambient controls */
.ambient-controls .liquid-glass-btn {
    all: unset;
    box-sizing: border-box;
    min-height: 100px;
    padding: 20px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 0 20px rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 
        all var(--apple-morph-duration) var(--apple-ease),
        transform 0.2s var(--apple-ease);
}

/* Force override for timer controls */
.timer-controls .liquid-glass-btn {
    all: unset;
    box-sizing: border-box;
    min-height: 54px;
    padding: 16px 32px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 0 20px rgba(255, 255, 255, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 
        all var(--apple-morph-duration) var(--apple-ease),
        transform 0.2s var(--apple-ease);
}

/* Force text visibility */
.ambient-controls .liquid-glass-btn .btn-text,
.timer-controls .liquid-glass-btn .btn-text {
    position: relative;
    z-index: 2;
    font-weight: inherit;
}

/* ===== TASK INPUT - APPLE STYLE ===== */

.task-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 20px;
}

.task-input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 24px;
    
    /* Apple's translucent input */
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    
    /* Typography */
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    
    /* Shadow */
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 1px 4px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    
    transition: all var(--apple-morph-duration) var(--apple-ease);
    outline: none;
}

.task-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.task-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(176, 224, 230, 0.3);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.25),
        0 1px 4px rgba(176, 224, 230, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 25px rgba(176, 224, 230, 0.2);
}

/* Task list styling */
.task-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-item {
    padding: 12px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s var(--apple-ease);
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Removed duplicate opacity rule - handled in liquid-glass-buttons.css */
