/* @import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap'); */

@font-face {
    font-family: 'Quicksand';
    src: url('Quicksand/static/Quicksand-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Quicksand';
    src: url('Quicksand/static/Quicksand-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Quicksand';
    src: url('Quicksand/static/Quicksand-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Quicksand';
    src: url('Quicksand/static/Quicksand-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Quicksand';
    src: url('Quicksand/static/Quicksand-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}


:root {
    /* === LUXURY RELAXATION PALETTE === */

    /* Backgrounds: Obsidian & Deep Violet */
    --bg-deep: #0a0812;
    --bg-surface: #1a1625;

    /* Accents: Champagne & Muted Gold */
    --accent-primary: #d4c5a3;
    /* Champagne */
    --accent-secondary: #8c9eff;
    /* Periwinkle */
    --accent-warm: #c5a059;
    /* Muted Gold */
    --accent-glow: #6366f1;
    /* Indigo Glow */

    /* Typography: High-End Editorial */
    --text-main: #f5f5f7;
    --text-muted: #a8a8b3;
    --text-dim: #6b6b78;

    /* Glassmorphism: Crystal Clear */
    --glass-bg: rgba(18, 14, 28, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    /* Thinner, subtler */
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --glass-blur: blur(24px);
    --glass-highlight: rgba(255, 255, 255, 0.06);

    /* Glow Effects */
    --glow-primary: rgba(99, 102, 241, 0.4);
    --glow-warm: rgba(197, 160, 89, 0.5);
    --glow-ambient: rgba(140, 158, 255, 0.15);

    /* Tokens */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --spacing-lg: 3rem;
    --spacing-md: 1.5rem;
    --spacing-sm: 0.75rem;

    /* Animation */
    --transition-slow: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    /* Elegant ease */
    --transition-smooth: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-instant: all 0.15s ease;
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === AWARD-WINNING KEYFRAME ANIMATIONS === */
@keyframes ambientFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(10px, -20px) scale(1.05);
    }

    50% {
        transform: translate(-5px, 10px) scale(0.95);
    }

    75% {
        transform: translate(-15px, -10px) scale(1.02);
    }
}

@keyframes ambientPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes breathe {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px var(--glow-warm), 0 0 40px rgba(197, 160, 89, 0.2);
    }

    50% {
        box-shadow: 0 0 30px var(--glow-warm), 0 0 60px rgba(197, 160, 89, 0.4);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) var(--bg-deep);
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    /* Slightly thinner */
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.03);
    /* Barely visible */
    border-radius: 20px;
    border: 2px solid var(--bg-deep);
    transition: background-color 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.15);
    /* Subtle highlight */
}



body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;

    background: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    letter-spacing: 0.01em;
}

/* === AMBIENT GLOW ORBS - Premium atmosphere === */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(ellipse 600px 600px at 20% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 500px 500px at 80% 20%, rgba(197, 160, 89, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 700px 700px at 70% 80%, rgba(140, 158, 255, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 400px 400px at 10% 90%, rgba(212, 197, 163, 0.05) 0%, transparent 50%);
    animation: ambientFloat 25s ease-in-out infinite;
    filter: blur(100px);
    /* Smooth out gradients to prevent banding */
}

/* === NOISE TEXTURE OVERLAY - Cinematic grain === */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10000;
    opacity: 0.05;
    /* Increased opacity for better dithering */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* === VIGNETTE EFFECT - Cinematic focus === */
.app-container::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
}










/* === PARTICLE CANVAS === */
#particle-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}



/* === GLASS COMPONENTS - Premium frosted glass with glow === */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--glass-highlight) 0%, transparent 40%);
    pointer-events: none;
    opacity: 1;
    transition: var(--transition-smooth);
}

.glass:hover::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.glass:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--glass-shadow), 0 0 40px rgba(99, 102, 241, 0.05);
}


/* === LAYOUT - Generous whitespace === */
.container {
    max-width: 1100px;
    margin: 0 auto;

    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 1;
}

.app-container {
    padding-bottom: 160px;
    padding-top: var(--spacing-md);
}

/* === HEADER - Minimal, calm === */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) 0;
    transition: var(--transition-slow);
}

header:hover {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #fff 0%, #d4c5a3 50%, #8c9eff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 8s ease-in-out infinite;
}

.logo p {
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 300;
    margin-top: 0.25rem;
    letter-spacing: 0.05em;
}

/* === BUTTONS - Large touch targets, premium feedback === */
.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: 50%;
    transition: var(--transition-smooth);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.btn-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, var(--glow-ambient) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.btn-icon:hover::after {
    opacity: 1;
}

.btn-icon:hover,
.btn-icon:focus {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    outline: none;
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.96);
}

.btn-mask {
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

/* === SECTION TITLES - Understated === */
.section-title {
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}

/* === PRESET CAROUSEL PLAYER === */
.preset-carousel {
    margin-bottom: var(--spacing-lg);
}

.carousel-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) var(--spacing-md);
    gap: var(--spacing-md);
    min-height: 280px;
    /* Fixed height to prevent resizing */
}

.carousel-content {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    min-height: 200px;
    /* Fixed content area */
    justify-content: center;
}

.carousel-preset-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.02em;
    min-height: 2.5rem;
    /* Fixed line height */
}

.carousel-preset-desc {
    font-size: 1rem;
    max-width: 400px;
    line-height: 1.5;
    min-height: 3rem;
    /* Reserve space for 2 lines */
}

.carousel-play-btn {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-warm) 0%, #e8c97a 100%);
    color: var(--bg-deep);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--spacing-md);
    transition: var(--transition-bounce);
    box-shadow:
        0 4px 20px rgba(197, 160, 89, 0.4),
        0 0 40px rgba(197, 160, 89, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.carousel-play-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-warm), transparent);
    opacity: 0;
    z-index: -1;
    filter: blur(12px);
    transition: var(--transition-smooth);
}

.carousel-play-btn:hover::before {
    opacity: 0.6;
}

.carousel-play-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow:
        0 8px 30px rgba(197, 160, 89, 0.5),
        0 0 60px rgba(197, 160, 89, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.carousel-play-btn:active {
    transform: scale(0.95);
    transition: var(--transition-instant);
}

.carousel-play-btn.playing {
    background: linear-gradient(135deg, var(--accent-secondary) 0%, #a5b4fc 100%);
    box-shadow:
        0 4px 20px rgba(140, 158, 255, 0.4),
        0 0 40px rgba(140, 158, 255, 0.2);
    animation: glowPulse 2s ease-in-out infinite;
}

.carousel-play-btn .icon.large svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Optically center the play triangle (triangles appear off-center due to visual weight) */
.carousel-play-btn .icon.large {
    margin-left: 2.5px;
}

#play-pause-btn .icon {
    margin-left: 1px;
}

.carousel-nav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.15);
}

.carousel-nav:active {
    transform: scale(0.92);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: var(--spacing-md);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    transition: var(--transition-bounce);
    padding: 0;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: linear-gradient(90deg, var(--accent-warm), #e8c97a);
    width: 28px;
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.5);
}

@media (max-width: 640px) {
    .carousel-preset-name {
        font-size: 1.5rem;
    }

    .carousel-play-btn {
        width: 64px;
        height: 64px;
    }

    .carousel-play-btn .icon.large svg {
        width: 28px;
        height: 28px;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }
}


/* === PRESETS GRID - Spacious, breathable === */
.presets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 640px) {
    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .presets-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* === PRESET CARDS - Premium 3D with glow effects === */
.preset-card {
    padding: var(--spacing-lg);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-slow);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    /* Removed entrance animation to prevent blinking on state changes */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.preset-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(140, 158, 255, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.preset-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, transparent, rgba(140, 158, 255, 0.1), transparent);
    opacity: 0;
    z-index: -1;
    filter: blur(8px);
    transition: var(--transition-smooth);
}

.preset-card:hover::before {
    opacity: 1;
}

.preset-card:hover::after {
    opacity: 1;
}

.preset-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(140, 158, 255, 0.2);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(140, 158, 255, 0.08);
}

.preset-card.active {
    background: linear-gradient(135deg, rgba(26, 22, 37, 0.9) 0%, rgba(30, 25, 40, 0.9) 100%);
    border-color: rgba(197, 160, 89, 0.4);
    box-shadow:
        0 0 40px rgba(197, 160, 89, 0.15),
        0 8px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: none;
}

.preset-card.active::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.1) 0%, transparent 50%);
}

.preset-card.active::after {
    opacity: 1;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.2), transparent);
}

.preset-content {
    display: flex;
    align-items: flex-start;
    /* Changed from center to fix alignment on multi-line cards */
    justify-content: space-between;
    gap: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.preset-info h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    letter-spacing: -0.01em;
    transition: var(--transition-smooth);
}

.preset-card:hover .preset-info h3 {
    color: #fff;
}

.preset-card.active .preset-info h3 {
    background: linear-gradient(135deg, #fff, var(--accent-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.preset-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.6;
    transition: var(--transition-smooth);
}

.preset-card:hover .preset-info p {
    color: var(--text-main);
}


.preset-action {
    color: var(--text-main);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition-bounce);
    flex-shrink: 0;
    position: relative;
    margin-top: 4px;
    /* Align with the title cap-height */
}

/* Optically center the play icon (only the triangle) */
.preset-action .icon svg polygon {
    transform: translateX(3px);
}

.preset-action::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-ambient) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.preset-card:hover .preset-action::before {
    opacity: 1;
}

.preset-card:hover .preset-action {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent-secondary);
    transform: scale(1.1);
}

.preset-card.active .preset-action {
    background: linear-gradient(135deg, var(--accent-warm), #e8c97a);
    color: var(--bg-deep);
    box-shadow: 0 4px 20px rgba(197, 160, 89, 0.4);
}

/* === MIXER SECTION - Collapsible, unobtrusive === */
.mixer-section {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
}

.mixer-toggle {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 500;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    font-family: inherit;
    letter-spacing: 0.02em;
}


.mixer-toggle:hover {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

/* === SOUNDS GRID - Compact, scannable === */
.sounds-grid {
    display: none;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    animation: fadeInUp 0.4s ease-out;
}

.sounds-grid.visible {
    display: grid;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === SOUND CARDS - Premium interactive === */
.sound-card {
    padding: var(--spacing-md);
    text-align: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    background: transparent;
    position: relative;
    overflow: hidden;
}

.sound-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--glow-ambient) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.sound-card:hover::before {
    opacity: 0.5;
}

.sound-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(140, 158, 255, 0.15);
    transform: translateY(-2px);
}

.sound-card.active {
    background: linear-gradient(135deg, rgba(26, 22, 37, 0.8) 0%, rgba(30, 25, 40, 0.8) 100%);
    border-color: rgba(140, 158, 255, 0.3);
    box-shadow:
        0 0 20px rgba(140, 158, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sound-card.active::before {
    opacity: 0.3;
}

.sound-card .icon {
    margin-bottom: 0.8rem;
    color: var(--text-dim);
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}

.sound-card:hover .icon {
    color: var(--text-muted);
    transform: scale(1.1);
}

.sound-card.active .icon {
    color: var(--accent-secondary);
    filter: drop-shadow(0 0 8px rgba(140, 158, 255, 0.5));
}

.sound-card h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
    transition: var(--transition-smooth);
}

.sound-card:hover h4 {
    color: var(--text-main);
}

.sound-card.active h4 {
    color: var(--text-main);
}

/* === VOLUME SLIDERS - Premium with glow === */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: linear-gradient(to right, var(--accent-secondary) var(--val, 0%), rgba(255, 255, 255, 0.08) var(--val, 0%));
    border-radius: 3px;
    outline: none;
    width: 100%;
    cursor: pointer;
    position: relative;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--accent-secondary), #a5b4fc);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 12px rgba(140, 158, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(140, 158, 255, 0.5);
}

input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(0.9);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--accent-secondary), #a5b4fc);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 12px rgba(140, 158, 255, 0.3);
}

.volume-slider {
    margin-top: var(--spacing-sm);
    padding: 0 0.5rem;
    position: relative;
}

/* === PLAYER BAR - Premium floating glass === */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md) 0;
    z-index: 100;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    background: linear-gradient(180deg, rgba(18, 14, 28, 0.95) 0%, rgba(10, 8, 18, 0.98) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow:
        0 -8px 40px rgba(0, 0, 0, 0.6),
        0 -2px 20px rgba(99, 102, 241, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: visible !important;
    /* Force override glass-default overflow:hidden for the timer menu */
}

.player-bar .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--spacing-md);
}

.now-playing {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
}



.playback-controls {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 1rem;
    /* Allow timer menu to overflow */
    overflow: visible;
    position: relative;
}

.master-volume {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: auto;
}




.pulse-dot {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--accent-warm), #e8c97a);
    border-radius: 50%;
    animation: gentlePulse 2s ease-in-out infinite;
    position: relative;
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.6);
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(197, 160, 89, 0.3);
    animation: ringPulse 2s ease-in-out infinite;
}

@keyframes gentlePulse {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
        box-shadow: 0 0 12px rgba(197, 160, 89, 0.4);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
        box-shadow: 0 0 20px rgba(197, 160, 89, 0.7);
    }
}

@keyframes ringPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* === PLAYBACK CONTROLS === */



.timer-container {
    position: relative;
}

.timer-display {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 0.7rem;
    background: linear-gradient(135deg, var(--accent-warm), #e8c97a);
    color: var(--bg-deep);
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 700;
    pointer-events: none;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 12px rgba(197, 160, 89, 0.4);
    animation: float 3s ease-in-out infinite;
}


.timer-menu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 100px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    /* Lifted shadow */
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 5000;
    /* Ensure it's above everything */
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 1rem;
}

.timer-menu.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.timer-menu button {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 0.8rem 1.2rem;
    /* Larger touch targets */
    text-align: center;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition-instant);
    width: 100%;
}

.timer-menu button:hover {
    background: var(--accent-primary);
    color: #fff;
}


.timer-menu button.clear-timer {
    color: #e57373;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0.25rem;
    padding-top: 0.75rem;
}

.timer-menu button.clear-timer:hover {
    background: rgba(229, 115, 115, 0.1);
}

.master-volume input[type="range"] {
    width: 120px;
    /* Slightly wider */

}



/* === ICONS - Consistent sizing === */
.icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.icon.large svg {
    width: 28px;
    height: 28px;
}

/* === UTILITY CLASSES === */
.dim-text {
    color: var(--text-dim);
}

.hidden {
    display: none !important;
}

/* === ACCESSIBILITY - Reduced motion === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


@media (max-width: 640px) {
    html {
        font-size: 16px;
    }

    :root {
        --spacing-lg: 1.75rem;
        --spacing-md: 1rem;
        --radius-lg: 20px;
    }

    /* Disable heavy animations on mobile for performance */
    .preset-card {
        animation: none;
    }

    .logo h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }

    .logo p {
        font-size: 0.85rem;
    }

    /* Premium mobile carousel */
    .carousel-container {
        padding: var(--spacing-md);
        min-height: 220px;
    }

    .carousel-preset-name {
        font-size: 1.4rem;
    }

    .carousel-preset-desc {
        font-size: 0.9rem;
        min-height: 2.5rem;
    }

    .carousel-play-btn {
        width: 72px;
        height: 72px;
    }

    .carousel-play-btn .icon.large svg {
        width: 28px;
        height: 28px;
    }

    /* Touch-optimized preset cards */
    .preset-card {
        padding: var(--spacing-md);
        min-height: 100px;
    }

    .preset-card:active {
        transform: scale(0.98);
        transition: var(--transition-instant);
    }

    .preset-info h3 {
        font-size: 1.15rem;
    }

    .preset-info p {
        font-size: 0.95rem;
    }

    .preset-action {
        width: 48px;
        height: 48px;
    }

    /* Touch-friendly sound grid */
    .sounds-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .sound-card {
        padding: var(--spacing-sm);
        min-height: 80px;
    }

    .sound-card:active {
        transform: scale(0.95);
        transition: var(--transition-instant);
    }

    /* Premium mobile player bar */
    .player-bar {
        padding: var(--spacing-sm) 0;
        padding-bottom: calc(var(--spacing-sm) + env(safe-area-inset-bottom));
        border-radius: 20px 20px 0 0;
    }

    .player-bar .container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "controls controls"
            "playing volume";
        gap: 0.75rem;
    }

    .playback-controls {
        grid-area: controls;
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
    }

    .btn-icon {
        min-width: 44px;
        min-height: 44px;
    }

    .now-playing {
        grid-area: playing;
        font-size: 0.8rem;
    }

    .now-playing .pulse-dot {
        width: 8px;
        height: 8px;
    }

    .master-volume {
        grid-area: volume;
    }

    .master-volume input[type="range"] {
        width: 90px;
    }

    /* Mobile timer menu */
    .timer-menu {
        min-width: 120px;
    }

    .timer-menu button {
        padding: 0.9rem 1rem;
    }

    /* Hide vignette on mobile for performance */
    .app-container::before {
        display: none;
    }

    /* Simpler ambient glow on mobile */
    body::before {
        background:
            radial-gradient(ellipse 400px 400px at 30% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
            radial-gradient(ellipse 400px 400px at 70% 80%, rgba(140, 158, 255, 0.05) 0%, transparent 50%);
        animation: none;
    }
}


/* === SEO SECTION === */
.seo-section {
    margin-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

.seo-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
}

.seo-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.seo-card h3:not(:first-child) {
    margin-top: 2rem;
}

.seo-card p {
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 65ch;
    margin-bottom: 1rem;
}

.seo-card ul {
    list-style: none;
    margin: 1rem 0;
}

.seo-card li {
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.seo-card li::before {
    content: '•';
    color: var(--accent-secondary);
    font-size: 1.5rem;
    line-height: 0;
}

.seo-card strong {
    color: var(--text-main);
    font-weight: 600;
}

.seo-card .small {
    font-size: 0.85rem;
    margin-top: 2rem;
    font-style: italic;
    opacity: 0.6;
}