/* ==========================================================================
   PlayTV — "The Set" — Design Tokens
   ==========================================================================
   Concept: the entire page is a television. It powers on, lands on a
   4-channel select screen, and a physical, draggable remote control
   changes the channel live.

   Palette:
     Void        #050506   room behind the TV
     Bezel       #0D0D10   TV chassis / remote body
     Bezel-2     #17171B   raised plastic highlight
     Screen      #0A0A0C   the panel itself, pre-content
     Ink         #EAE7E1   warm phosphor-white (not pure #fff — CRT feel)
     Ink Dim     rgba(234,231,225,.6)

     Live        #FF3B30   (broadcast red)
     Cinema      #7C5CFF   (projector violet)
     Music       #00D9C0   (teal — deliberately not purple/pink, breaks
                            from generic streaming-neon default)
     Kids        #FFB020   (amber)

   Type:
     Display — 'Clash Display'  (OSD channel numbers, headline, logo)
     Body/UI — 'General Sans'   (labels, remote text, modal copy)
   ========================================================================== */

:root {
    --void: #050506;
    --bezel: #0d0d10;
    --bezel-2: #17171b;
    --bezel-3: #202024;
    --screen: #0a0a0c;

    --ink: #eae7e1;
    --ink-dim: rgba(234, 231, 225, 0.6);
    --ink-faint: rgba(234, 231, 225, 0.34);

    --live: #ff3b30;
    --live-dim: #7a1e19;
    --cinema: #7c5cff;
    --cinema-dim: #3a2c7a;
    --music: #00d9c0;
    --music-dim: #0a6a5f;
    --kids: #ffb020;
    --kids-dim: #7a5710;

    --font-display: 'Clash Display', 'General Sans', 'Segoe UI', sans-serif;
    --font-body: 'General Sans', 'Segoe UI', sans-serif;

    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 160ms;
    --dur-mid: 380ms;
    --dur-slow: 700ms;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 28px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--void);
}

body {
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button, input, textarea { font-family: inherit; color: inherit; }
button {
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px; top: -60px;
    background: var(--ink);
    color: var(--void);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    z-index: 999;
    transition: top var(--dur-fast) var(--ease-premium);
}
.skip-link:focus { top: 12px; }

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ==========================================================================
   THE ROOM — backdrop behind the TV, subtle so the screen stays the focus
   ========================================================================== */

.room {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(120% 90% at 50% 15%, rgba(255,255,255,0.03), transparent 60%),
        var(--void);
}

.room__floor-glow {
    position: absolute;
    left: 50%; bottom: 0;
    transform: translateX(-50%);
    width: 70%; height: 40%;
    background: radial-gradient(ellipse at center, var(--glow-color, var(--cinema-dim)), transparent 70%);
    opacity: 0.35;
    filter: blur(40px);
    transition: background var(--dur-slow) var(--ease-out);
    pointer-events: none;
}

/* ==========================================================================
   THE SET — TV chassis + screen, fills the viewport
   ========================================================================== */

.tv {
    position: fixed;
    inset: clamp(24px, 5vw, 64px);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background:
        linear-gradient(155deg, var(--bezel-3) 0%, var(--bezel) 40%, #08080a 100%);
    box-shadow:
        0 60px 120px -30px rgba(0,0,0,0.85),
        0 0 0 1px rgba(255,255,255,0.05) inset,
        0 2px 0 rgba(255,255,255,0.06) inset,
        0 -30px 60px -40px rgba(0,0,0,0.6) inset;
    padding: clamp(16px, 2vw, 26px);
}

/* Visible chassis frame around the screen — the part that reads as "TV" */
.tv::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.03) 50%, transparent 80%);
    pointer-events: none;
}

/* Stand — small physical foot, purely decorative, grounds the TV in the room */
.tv__stand {
    position: absolute;
    bottom: clamp(-30px, -3.5vw, -22px);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(90px, 10vw, 140px);
    height: clamp(14px, 1.6vw, 20px);
    background: linear-gradient(160deg, var(--bezel-3), #08080a);
    border-radius: 6px;
    box-shadow: 0 10px 20px -6px rgba(0,0,0,0.6);
}
.tv__stand::before {
    content: '';
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%);
    width: 8px; height: 16px;
    background: linear-gradient(160deg, var(--bezel-3), #08080a);
}

.tv__brand {
    position: absolute;
    bottom: clamp(6px, 1vw, 12px);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: rgba(234,231,225,0.22);
    text-transform: uppercase;
}

.tv__led {
    position: absolute;
    bottom: clamp(6px, 1vw, 12px);
    right: clamp(14px, 2vw, 22px);
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #2a2a2e;
    box-shadow: 0 0 0 rgba(0,217,192,0);
    transition: background var(--dur-mid), box-shadow var(--dur-mid);
}
.tv.is-on .tv__led {
    background: var(--music);
    box-shadow: 0 0 8px 2px var(--music);
}

/* Screen */
.screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--radius-lg) - 12px);
    background: var(--screen);
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.6) inset;
}

/* Screen curvature + vignette, always present for authenticity */
.screen__vignette {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    background:
        radial-gradient(120% 120% at 50% 50%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

.screen__scanlines {
    position: absolute;
    inset: 0;
    z-index: 9;
    pointer-events: none;
    opacity: 0.06;
    background: repeating-linear-gradient(
        to bottom,
        #fff 0px,
        #fff 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: overlay;
}

.screen__glow-edge {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--dur-slow) var(--ease-out);
    box-shadow: 0 0 80px 10px var(--glow-color, var(--cinema)) inset;
}
.screen.is-live .screen__glow-edge { opacity: 0.35; }

/* ==========================================================================
   POWER-ON SEQUENCE
   ========================================================================== */

.screen__standby {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.screen__standby-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 380ms cubic-bezier(0.7, 0, 0.84, 0);
}

/* When powering: dot expands into a horizontal line, then flashes out */
.tv.is-booting .screen__standby-dot {
    animation: bootLine 900ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes bootLine {
    0%   { width: 6px; height: 6px; opacity: 1; }
    35%  { width: 100%; height: 3px; opacity: 1; border-radius: 0; }
    60%  { width: 100%; height: 100%; opacity: 1; border-radius: 0; background: #fff; }
    100% { width: 100%; height: 100%; opacity: 0; border-radius: 0; background: #fff; }
}

.tv.is-booting .screen__standby,
.tv.is-on .screen__standby {
    animation: standbyHide 900ms linear forwards;
}
@keyframes standbyHide {
    0%, 70% { visibility: visible; }
    100% { visibility: hidden; }
}

/* Static/noise burst during boot */
.screen__static {
    position: absolute;
    inset: 0;
    z-index: 19;
    opacity: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    pointer-events: none;
}
.tv.is-booting .screen__static {
    animation: staticFlicker 900ms steps(2) forwards;
}
@keyframes staticFlicker {
    0%   { opacity: 0; }
    40%  { opacity: 0.9; }
    55%  { opacity: 0.2; }
    65%  { opacity: 0.8; }
    75%  { opacity: 0.1; }
    100% { opacity: 0; }
}

/* Content fade-in after boot completes */
.screen__content {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    opacity: 0;
    filter: brightness(0.4);
}
.tv.is-on .screen__content {
    animation: contentReveal 500ms var(--ease-out) 850ms forwards;
}
@keyframes contentReveal {
    0%   { opacity: 0; filter: brightness(0.2); }
    50%  { opacity: 1; filter: brightness(1.8); }
    100% { opacity: 1; filter: brightness(1); }
}

/* ==========================================================================
   CHANNEL GRID — the four channel tiles shown on screen
   ========================================================================== */

.channels {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 4vh, 40px);
    padding: clamp(16px, 4vh, 40px) clamp(16px, 4vw, 48px);
}

.channels__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.channels__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.05em;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    letter-spacing: -0.01em;
    color: var(--ink);
}
.channels__logo-play {
    width: 0.5em;
    height: 0.5em;
    display: inline-flex;
    margin: 0 0.02em;
}
.channels__logo-play svg { width: 100%; height: 100%; }

.channels__tagline {
    font-size: clamp(0.62rem, 1vw, 0.75rem);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 1.6vw, 20px);
    width: 100%;
    max-width: 980px;
}

.channel {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: var(--radius-md);
    background: linear-gradient(165deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.08);
    padding: clamp(14px, 2vw, 22px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--dur-mid) var(--ease-out), border-color var(--dur-mid) var(--ease-out), background var(--dur-mid) var(--ease-out);
}

.channel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 100% at 50% 120%, var(--c-glow, var(--cinema)), transparent 60%);
    opacity: 0.18;
    transition: opacity var(--dur-mid) var(--ease-out);
}

.channel--live   { --c-glow: var(--live); }
.channel--cinema { --c-glow: var(--cinema); }
.channel--music  { --c-glow: var(--music); }
.channel--kids   { --c-glow: var(--kids); }

.channel:hover,
.channel:focus-visible {
    transform: translateY(-6px);
    border-color: var(--c-glow);
}
.channel:hover::before,
.channel:focus-visible::before { opacity: 0.32; }

.channel.is-active {
    border-color: var(--c-glow);
    background: linear-gradient(165deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02));
}
.channel.is-active::before { opacity: 0.4; }

.channel__num {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(0.75rem, 1.4vw, 0.95rem);
    color: var(--ink-faint);
    letter-spacing: 0.04em;
}
.channel__num b { color: var(--c-glow); }

.channel__icon {
    width: clamp(30px, 4vw, 44px);
    height: clamp(30px, 4vw, 44px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.channel__icon svg { width: 100%; height: 100%; color: var(--c-glow); }

.channel__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.channel__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(0.9rem, 1.6vw, 1.25rem);
    color: var(--ink);
    line-height: 1.15;
}
.channel__desc {
    font-size: clamp(0.62rem, 1vw, 0.78rem);
    color: var(--ink-dim);
    line-height: 1.4;
    display: none;
}

@media (min-width: 640px) {
    .channel__desc { display: block; }
}

@media (max-width: 640px) {
    .channel-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .channels { justify-content: flex-start; padding-top: clamp(40px, 8vh, 64px); }
}

/* On-screen display (OSD) — appears briefly when channel changes, like a real TV */
.osd {
    position: absolute;
    top: clamp(16px, 3vh, 32px);
    left: clamp(16px, 3vw, 32px);
    z-index: 15;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(10,10,12,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--c-glow, var(--cinema));
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
}
.osd.is-showing {
    animation: osdShow 2200ms var(--ease-out) forwards;
}
@keyframes osdShow {
    0%   { opacity: 0; transform: translateX(-8px); }
    10%  { opacity: 1; transform: translateX(0); }
    80%  { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(0); }
}
.osd__num {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--c-glow, var(--ink));
}
.osd__name {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
}

/* Channel-change flicker on the whole screen content */
.screen__content.is-switching {
    animation: channelSwitch 260ms steps(3) both;
}
@keyframes channelSwitch {
    0%   { opacity: 1; filter: brightness(1); }
    30%  { opacity: 0.3; filter: brightness(2.4); }
    60%  { opacity: 0.7; filter: brightness(0.6); }
    100% { opacity: 1; filter: brightness(1); }
}

/* ==========================================================================
   CHANNEL DETAIL — expanded state shown for the active channel
   ========================================================================== */

.detail {
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: clamp(14px, 2.4vh, 24px);
    padding: clamp(20px, 4vh, 40px);
}
.detail.is-active { display: flex; }

.detail__eyebrow {
    font-size: clamp(0.66rem, 1vw, 0.78rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--c-glow, var(--ink-dim));
}
.detail__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.8rem, 6vw, 3.4rem);
    line-height: 1.05;
    color: var(--ink);
}
.detail__desc {
    max-width: 480px;
    color: var(--ink-dim);
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    line-height: 1.6;
}
.detail__back {
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    transition: color var(--dur-fast);
}
.detail__back:hover { color: var(--ink); }
.detail__back svg { width: 14px; height: 14px; }

/* ==========================================================================
   SCREEN FOOTER BAR — persistent CTA strip at bottom of screen
   ========================================================================== */

.screen__footer {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: clamp(12px, 2vh, 20px);
    background: linear-gradient(to top, rgba(5,5,6,0.85), transparent);
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    overflow: hidden;
    transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.96); }

.btn--primary {
    color: #0a0a0c;
    background: var(--ink);
    box-shadow: 0 8px 24px -6px rgba(0,0,0,0.5);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -6px rgba(0,0,0,0.6); }

.btn--ghost {
    color: var(--ink);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }

.btn__ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0,0,0,0.25);
    transform: scale(0);
    animation: rippleAnim 550ms ease-out forwards;
    pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(3); opacity: 0; } }

/* ==========================================================================
   THE REMOTE — signature element. A believable, physical, draggable
   remote control that changes the TV's channel live.
   ========================================================================== */

.remote {
    position: fixed;
    z-index: 100;
    width: clamp(120px, 10vw, 148px);
    padding: 14px 11px 16px;
    border-radius: 26px;
    background:
        linear-gradient(155deg, #232327 0%, #17171a 45%, #0e0e10 100%);
    box-shadow:
        0 20px 40px -14px rgba(0,0,0,0.7),
        0 0 0 1px rgba(255,255,255,0.06) inset,
        0 1px 0 rgba(255,255,255,0.08) inset;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.remote:active { cursor: grabbing; }
.remote.is-dragging { transition: none !important; }

.remote__notch {
    width: 34px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.12);
    margin-bottom: 2px;
}

/* Power button */
.remote__power {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(160deg, #2c2c30, #131315);
    box-shadow: 0 3px 6px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05) inset;
    display: flex; align-items: center; justify-content: center;
    transition: transform 90ms ease, box-shadow var(--dur-mid);
}
.remote__power svg { width: 16px; height: 16px; color: var(--ink-faint); transition: color var(--dur-mid); }
.remote__power:active { transform: scale(0.92); }
.remote.is-powered .remote__power { box-shadow: 0 3px 6px rgba(0,0,0,0.5), 0 0 10px 2px var(--music), 0 0 0 1px rgba(255,255,255,0.05) inset; }
.remote.is-powered .remote__power svg { color: var(--music); }

/* D-pad */
.remote__dpad {
    position: relative;
    width: 92px; height: 92px;
    border-radius: 50%;
    background: linear-gradient(160deg, #26262a, #0e0e10);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05) inset;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}
.remote__dpad-btn {
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-faint);
    transition: color var(--dur-fast), transform 90ms ease;
}
.remote__dpad-btn:active { transform: scale(0.9); color: var(--ink); }
.remote__dpad-btn svg { width: 13px; height: 13px; }
.remote__dpad-up    { grid-column: 2; grid-row: 1; }
.remote__dpad-left  { grid-column: 1; grid-row: 2; }
.remote__dpad-ok {
    grid-column: 2; grid-row: 2;
    border-radius: 50%;
    background: linear-gradient(160deg, #34343a, #1a1a1d);
    margin: 6px;
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--ink-dim);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.remote__dpad-ok:active { transform: scale(0.92); }
.remote__dpad-right { grid-column: 3; grid-row: 2; }
.remote__dpad-down  { grid-column: 2; grid-row: 3; }

/* Channel buttons — the 4 real navigation buttons */
.remote__channels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

.remote__chbtn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 4px;
    border-radius: 14px;
    background: linear-gradient(160deg, #232327, #131315);
    box-shadow: 0 3px 6px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04) inset;
    overflow: hidden;
    transition: transform 90ms ease, box-shadow var(--dur-fast) var(--ease-out);
}
.remote__chbtn:active { transform: scale(0.94) translateY(1px); }

.remote__chbtn svg { width: 16px; height: 16px; color: var(--btn-c, var(--ink-faint)); transition: color var(--dur-fast); }
.remote__chbtn span {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-faint);
    transition: color var(--dur-fast);
}

.remote__chbtn--live   { --btn-c: var(--live); }
.remote__chbtn--cinema { --btn-c: var(--cinema); }
.remote__chbtn--music  { --btn-c: var(--music); }
.remote__chbtn--kids   { --btn-c: var(--kids); }

.remote__chbtn.is-active {
    box-shadow: 0 3px 6px rgba(0,0,0,0.45), 0 0 0 1.5px var(--btn-c), 0 0 12px 1px var(--btn-c), 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.remote__chbtn.is-active span,
.remote__chbtn.is-active svg { color: var(--btn-c); }

/* Volume rocker */
.remote__volume {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
    margin-top: 2px;
}
.remote__vol-btn {
    width: 30px; height: 22px;
    border-radius: 8px;
    background: linear-gradient(160deg, #232327, #131315);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04) inset;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
    color: var(--ink-faint);
    transition: transform 90ms ease;
}
.remote__vol-btn:active { transform: scale(0.9); }

/* Press ripple feedback shared by remote buttons */
.remote__ripple {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255,255,255,0.15);
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
}
.remote__chbtn.is-pressed .remote__ripple,
.remote__power.is-pressed .remote__ripple {
    animation: btnFlash 320ms ease-out forwards;
}
@keyframes btnFlash {
    0% { opacity: 0.9; transform: scale(0.6); }
    100% { opacity: 0; transform: scale(1.3); }
}

/* IR beam — a subtle visual pulse from the remote toward the TV on press */
.remote__beam {
    position: fixed;
    z-index: 99;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(to top, var(--beam-c, var(--music)), transparent);
    opacity: 0;
    pointer-events: none;
}
.remote__beam.is-firing {
    animation: beamFire 380ms ease-out forwards;
}
@keyframes beamFire {
    0% { opacity: 0.8; }
    100% { opacity: 0; }
}

/* Collapsed state — small tab to reopen if user drags it off/minimizes */
.remote__toggle {
    position: fixed;
    z-index: 100;
    bottom: 24px;
    left: 24px;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: linear-gradient(160deg, #232327, #131315);
    box-shadow: 0 10px 24px -6px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06) inset;
    display: none;
    align-items: center;
    justify-content: center;
}
.remote__toggle.is-visible { display: flex; }
.remote__toggle svg { width: 22px; height: 22px; color: var(--ink-dim); }

@media (max-width: 760px) {
    .remote {
        width: 132px;
        padding: 14px 10px 18px;
        gap: 10px;
    }
    .remote__dpad { width: 76px; height: 76px; }
    .remote__power { width: 32px; height: 32px; }
}

/* ==========================================================================
   WHATSAPP FAB
   ========================================================================== */

.wa-fab {
    position: fixed;
    right: clamp(16px, 3vw, 32px);
    bottom: clamp(16px, 3vw, 32px);
    width: 54px; height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C4A);
    display: flex; align-items: center; justify-content: center;
    z-index: 90;
    box-shadow: 0 10px 26px -6px rgba(37,211,102,0.55);
    transition: transform var(--dur-fast) var(--ease-out);
}
.wa-fab:hover { transform: scale(1.08) translateY(-2px); }
.wa-fab:active { transform: scale(0.95); }
.wa-fab__icon { width: 26px; height: 26px; fill: #fff; }
.wa-fab__pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(37,211,102,0.45);
    animation: waPulse 2.4s ease-out infinite;
}
@keyframes waPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ==========================================================================
   MODAL
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal[hidden] { display: none; }

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(5,5,6,0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn var(--dur-mid) var(--ease-out);
}

.modal__panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    background: var(--bezel);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 4vw, 34px);
    animation: modalIn var(--dur-mid) var(--ease-premium);
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
    position: absolute;
    top: 14px; right: 14px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    transition: background var(--dur-fast);
}
.modal__close:hover { background: rgba(255,255,255,0.14); }

.modal__eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cinema);
    margin-bottom: 8px;
}
.modal__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    line-height: 1.25;
    margin-bottom: 12px;
}
.modal__body {
    color: var(--ink-dim);
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.92rem;
}
.modal__body strong { color: var(--ink); }
.modal__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
}
.modal__list li {
    padding-left: 24px;
    position: relative;
    color: var(--ink-dim);
    font-size: 0.88rem;
}
.modal__list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--music);
    font-weight: 700;
}
.modal__cta {
    width: 100%;
    padding: 15px;
    border-radius: 999px;
    background: var(--ink);
    color: #0a0a0c;
    font-weight: 700;
    font-size: 0.92rem;
    text-align: center;
    transition: transform var(--dur-fast) var(--ease-out);
}
.modal__cta:hover { transform: translateY(-2px); }
.modal__fineprint {
    text-align: center;
    font-size: 0.76rem;
    color: var(--ink-faint);
    margin-top: 12px;
}

/* WhatsApp form */
.wa-form__options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    border: none;
    padding: 0;
}
.wa-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    font-size: 0.86rem;
    transition: border-color var(--dur-fast), background var(--dur-fast);
}
.wa-option:has(input:checked) {
    border-color: rgba(37,211,102,0.6);
    background: rgba(37,211,102,0.08);
}
.wa-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.wa-option__radio {
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid var(--ink-faint);
    flex-shrink: 0;
    position: relative;
}
.wa-option input:checked + .wa-option__radio { border-color: #25D366; }
.wa-option input:checked + .wa-option__radio::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: #25D366;
}
.wa-form__label {
    display: block;
    font-size: 0.8rem;
    color: var(--ink-dim);
    margin-bottom: 6px;
}
.wa-form__textarea {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 0.88rem;
    resize: vertical;
    margin-bottom: 16px;
}
.wa-form__textarea:focus { border-color: rgba(37,211,102,0.6); outline: none; }
.wa-form__submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #25D366, #128C4A);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform var(--dur-fast) var(--ease-out);
}
.wa-form__submit svg { width: 18px; height: 18px; fill: #fff; }
.wa-form__submit:hover { transform: translateY(-2px); }
