/* ==========================================
   LiveTV — residual styles
   Everything visual now lives in Tailwind (utility classes + the
   `tailwind.config` and `@layer` blocks inside index.html). This file
   keeps only the few rules Tailwind utilities can't express cleanly:
   the ambilight canvas/backdrop, the JS-driven play-flash animation,
   the theater-mode dim overlay, and the custom range-slider thumb.
   ========================================== */

/* ---- Ambilight: dynamic canvas backlight (color set by app.js) ---- */
.ambient-glow-canvas {
    position: absolute;
    top: -4%;
    left: -4%;
    width: 108%;
    height: 108%;
    filter: blur(50px) opacity(0);
    z-index: -1;
    pointer-events: none;
    transform: scale(1.04);
    border-radius: 20px;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Secondary ambient backdrop glow (background also updated by app.js) */
.ambient-glow-backdrop {
    position: absolute;
    top: 50%;
    left: 35%;
    transform: translate(-50%, -50%);
    width: 70vw;
    height: 70vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.12) 0%, rgba(255, 8, 68, 0.04) 50%, transparent 100%);
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    transition: background 1s ease;
}

/* ---- Theater (dim lights) mode — toggled via body.theater-mode ---- */
body.theater-mode::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(2, 3, 7, 0.9);
    pointer-events: none;
    z-index: 8;
    animation: fadeIn 0.4s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---- Play / pause flash overlay (JS toggles `.animate`) ---- */
.play-flash-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 4;
}

.flash-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00f2fe;
    opacity: 0;
    transform: scale(0.5);
}

.flash-circle svg {
    width: 38px;
    height: 38px;
    fill: currentColor;
}

.play-flash-overlay.animate .flash-circle {
    animation: flashCircleAnim 0.7s forwards;
}

@keyframes flashCircleAnim {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(1.3); }
}

/* ---- Custom volume range slider (thumb can't be utility-styled) ---- */
.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00f2fe;
    box-shadow: 0 0 8px #00f2fe;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: #00f2fe;
    box-shadow: 0 0 8px #00f2fe;
    cursor: pointer;
}
