@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

/* Base resets & scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* --- Phase 2: HigherSERV Before/After Slider ---
   SCOPED to #before-after-slider. This rule used to target every input[type=range] on the
   page and set `-webkit-appearance:none` with no background, which rendered the thumb
   completely invisible on the audio volume sliders (they looked like they "didn't move"). */
#before-after-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: all;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: ew-resize;
    background: transparent; /* intentionally invisible: the gold handle div is the visual */
}
#before-after-slider::-moz-range-thumb {
    pointer-events: all;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: ew-resize;
    background: transparent;
}

/* --- Audio volume sliders (navbar mini-player + HigherSYNTH massive player) ---
   A real, visible, draggable thumb. `.volume-range` is applied in index.html. */
.volume-range {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 9999px;
    background: #334155;          /* slate-700 track */
    outline: none;
}
.volume-range:focus-visible {
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.6); /* brand-teal focus ring */
}
.volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #14b8a6;          /* brand-teal */
    border: 2px solid #0f172a;    /* brand-navy ring so it reads on the track */
    cursor: pointer;
    box-shadow: 0 0 8px rgba(20, 184, 166, 0.6);
    transition: transform 0.15s ease, background 0.15s ease;
}
.volume-range::-webkit-slider-thumb:hover,
.volume-range:active::-webkit-slider-thumb {
    transform: scale(1.2);
    background: #2dd4bf;
}
.volume-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #14b8a6;
    border: 2px solid #0f172a;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(20, 184, 166, 0.6);
}
.volume-range::-moz-range-track {
    height: 6px;
    border-radius: 9999px;
    background: #334155;
}

/* --- Phase 2: HigherSYS Device Morph --- */
.device-phone {
    width: 300px;
    height: 600px;
    border-radius: 3rem;
    transition: all 0.1s ease-out; /* GSAP will control the main transition, but this smooths micro-stutters */
}

/* --- V2.5: Utility - hide horizontal scrollbar on mobile icon strip --- */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* --- V2.5: YEW AI 3D Orb Widget --- */
.yew-orb {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 9999px;
    padding: 5px; /* metallic bezel thickness */
    background: conic-gradient(from 210deg,
        #7c5a1e, #d9a648, #f7e7b6, #b07d2b, #6e4a14, #e3b95c, #7c5a1e);
    box-shadow:
        0 0 22px rgba(34, 211, 238, 0.55),
        0 0 46px rgba(20, 184, 166, 0.35),
        0 4px 10px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.yew-orb:hover {
    transform: scale(1.06);
    box-shadow:
        0 0 30px rgba(34, 211, 238, 0.8),
        0 0 60px rgba(20, 184, 166, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.6);
}
.yew-orb-core {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background: radial-gradient(circle at 35% 30%, #16233f 0%, #0b1220 70%);
    box-shadow:
        inset 0 0 14px rgba(34, 211, 238, 0.45),
        inset 0 2px 6px rgba(255, 255, 255, 0.08);
}
.yew-waveform { width: 40px; height: 28px; overflow: visible; }
.yew-label {
    margin-top: 6px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: #67e8f9;
    text-shadow: 0 0 6px rgba(34, 211, 238, 0.9), 0 0 14px rgba(34, 211, 238, 0.5);
    user-select: none;
}

/* Waveform states: setYewState() in app.js toggles these classes on .yew-orb */
.yew-bar { transform-box: fill-box; transform-origin: center; }

/* idle: gentle pulsing bars */
.yew-orb.state-idle .yew-bar { animation: yew-pulse 1.6s ease-in-out infinite; }
.yew-orb.state-idle .yew-bar-1 { animation-delay: 0s; }
.yew-orb.state-idle .yew-bar-2 { animation-delay: 0.15s; }
.yew-orb.state-idle .yew-bar-3 { animation-delay: 0.3s; }
.yew-orb.state-idle .yew-bar-4 { animation-delay: 0.45s; }
.yew-orb.state-idle .yew-bar-5 { animation-delay: 0.6s; }
@keyframes yew-pulse {
    0%, 100% { transform: scaleY(0.5); opacity: 0.7; }
    50%      { transform: scaleY(1); opacity: 1; }
}

/* processing: DNA double-helix style morph (counter-rotating skewed bars) */
.yew-orb.state-processing .yew-bar { animation: yew-helix 1.1s ease-in-out infinite; }
.yew-orb.state-processing .yew-bar-1 { animation-delay: 0s; }
.yew-orb.state-processing .yew-bar-2 { animation-delay: 0.11s; }
.yew-orb.state-processing .yew-bar-3 { animation-delay: 0.22s; }
.yew-orb.state-processing .yew-bar-4 { animation-delay: 0.33s; }
.yew-orb.state-processing .yew-bar-5 { animation-delay: 0.44s; }
@keyframes yew-helix {
    0%   { transform: scaleY(1) rotate(0deg); }
    25%  { transform: scaleY(0.25) rotate(28deg); }
    50%  { transform: scaleY(1) rotate(0deg); }
    75%  { transform: scaleY(0.25) rotate(-28deg); }
    100% { transform: scaleY(1) rotate(0deg); }
}

/* speaking: high-amplitude waveform */
.yew-orb.state-speaking .yew-bar { animation: yew-speak 0.45s ease-in-out infinite; }
.yew-orb.state-speaking .yew-bar-1 { animation-delay: 0s; }
.yew-orb.state-speaking .yew-bar-2 { animation-delay: 0.07s; }
.yew-orb.state-speaking .yew-bar-3 { animation-delay: 0.14s; }
.yew-orb.state-speaking .yew-bar-4 { animation-delay: 0.21s; }
.yew-orb.state-speaking .yew-bar-5 { animation-delay: 0.28s; }
@keyframes yew-speak {
    0%, 100% { transform: scaleY(0.4); }
    50%      { transform: scaleY(1.5); }
}
