/* ==========================================================================
   Whitoo — Woo Cinema 2026 modern layer
   Loaded LAST in base.index.html but every rule is scoped under .woo-cinema-page,
   so only /cinema is affected. Markup and chatnet.js are NOT touched — this is a
   pure visual layer over the existing structure.

   The existing cinema rules (whitoo-modern.css ~212, whitoo-refresh.css ~52) use
   NO !important, so matching their specificity (.woo-cinema-page .x) wins by order.
   JS-generated hooks kept intact: data-cinema-*, .woo-cinema-tab/live/off/player/
   controls/chat-*/spoiler-note etc.
   ========================================================================== */

.woo-cinema-page {
    --wc-bg: #0a0b10;
    --wc-panel: #121319;
    --wc-panel-2: #16171f;
    --wc-line: rgba(255, 255, 255, .075);
    --wc-line-soft: rgba(255, 255, 255, .045);
    --wc-text: #eceef5;
    --wc-muted: #8b93a6;
    --wc-red: #e11d2a;
    --wc-red-2: #ff2d43;
    --wc-green: #22c55e;
    --wc-radius: 18px;
    --wc-gut: clamp(12px, 1.5vw, 26px);
}

body:has(.woo-cinema-page) {
    background:
        radial-gradient(1000px 520px at 82% -6%, rgba(225, 29, 42, .16), transparent 58%),
        radial-gradient(760px 460px at 8% 10%, rgba(120, 20, 30, .14), transparent 60%),
        #0a0b10 !important;
}

.woo-cinema-page {
    max-width: 1360px;
    margin: 0 auto;
    padding: calc(78px + 12px) var(--wc-gut) 40px;
    color: var(--wc-text);
}

.woo-cinema-page :is(h1, h2, h3, strong, b) {
    letter-spacing: -.015em;
}

/* ============================ HERO ============================ */

.woo-cinema-page .woo-cinema-public-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
    align-items: center;
    gap: 24px;
    margin: 0 0 var(--wc-gut);
    padding: clamp(22px, 3vw, 40px);
    border: 1px solid var(--wc-line);
    border-radius: 22px;
    background:
        linear-gradient(105deg, #14151c 0%, #14151c 42%, transparent 78%),
        radial-gradient(560px 340px at 82% 46%, rgba(225, 29, 42, .5), transparent 66%),
        radial-gradient(420px 300px at 96% 90%, rgba(140, 12, 22, .55), transparent 62%),
        linear-gradient(140deg, #1a1013, #0c0d12);
}

/* film-strip / seats texture stand-in on the right (no photo asset available) */
.woo-cinema-page .woo-cinema-public-hero::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 46%;
    background:
        repeating-linear-gradient(90deg, transparent 0 26px, rgba(0, 0, 0, .28) 26px 30px),
        radial-gradient(300px 200px at 70% 30%, rgba(255, 60, 76, .3), transparent 70%);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
    mask-image: linear-gradient(90deg, transparent, #000 40%);
    opacity: .5;
    pointer-events: none;
}

.woo-cinema-page .woo-cinema-public-hero > div:first-child {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.woo-cinema-page .woo-cinema-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--wc-red-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.woo-cinema-page .woo-cinema-public-hero h1 {
    margin: 14px 0 12px;
    color: #fff;
    font-size: clamp(30px, 4vw, 52px);
    font-weight: 900;
    line-height: 1.03;
}

.woo-cinema-page .woo-cinema-public-hero p {
    margin: 0 0 22px;
    max-width: 440px;
    color: rgba(255, 255, 255, .68);
    font-size: 14px;
    line-height: 1.6;
}

.woo-cinema-page .woo-cinema-hero-actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    align-self: end;
    justify-content: flex-start;
}

.woo-cinema-page .woo-cinema-chat-toggle,
.woo-cinema-page .woo-cinema-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, filter .16s ease, background .16s ease;
}

.woo-cinema-page .woo-cinema-chat-toggle {
    border: 0;
    background: linear-gradient(135deg, #ff2d43, #c1121f);
    color: #fff;
    box-shadow: 0 10px 26px rgba(225, 29, 42, .4);
}

.woo-cinema-page .woo-cinema-chat-toggle:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.woo-cinema-page .woo-cinema-home-link {
    border: 1px solid rgba(255, 45, 67, .5);
    background: rgba(225, 29, 42, .08);
    color: #ff8a95;
}

.woo-cinema-page .woo-cinema-home-link:hover {
    background: rgba(225, 29, 42, .16);
    color: #fff;
}

/* ============================ ROOM TABS ============================ */

.woo-cinema-page .woo-cinema-tabs {
    display: flex;
    gap: 10px;
    margin: 0 0 var(--wc-gut);
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.woo-cinema-page .woo-cinema-tabs::-webkit-scrollbar {
    display: none;
}

.woo-cinema-page .woo-cinema-tab {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    min-width: 200px;
    min-height: 62px;
    padding: 11px 60px 11px 16px;
    border: 1.5px solid var(--wc-line);
    border-radius: 14px;
    background: var(--wc-panel);
    color: var(--wc-text);
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.woo-cinema-page .woo-cinema-tab:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .18);
}

.woo-cinema-page .woo-cinema-tab.is-active {
    border-color: var(--wc-red);
    background: linear-gradient(160deg, rgba(225, 29, 42, .16), var(--wc-panel));
    box-shadow: 0 10px 26px rgba(225, 29, 42, .18);
}

.woo-cinema-page .woo-cinema-tab strong {
    color: #fff;
    font-size: 13.5px;
    font-weight: 800;
}

.woo-cinema-page .woo-cinema-tab span {
    color: var(--wc-muted);
    font-size: 12px;
    font-weight: 600;
}

/* live / off badges (JS toggles .woo-cinema-live / .woo-cinema-off) */
.woo-cinema-page .woo-cinema-tab .woo-cinema-live,
.woo-cinema-page .woo-cinema-tab .woo-cinema-off {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.woo-cinema-page .woo-cinema-tab .woo-cinema-live {
    background: rgba(34, 197, 94, .16);
    color: #4ade80;
}

.woo-cinema-page .woo-cinema-tab .woo-cinema-live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
}

.woo-cinema-page .woo-cinema-tab .woo-cinema-off {
    background: rgba(255, 255, 255, .06);
    color: var(--wc-muted);
}

/* ============================ STAGE ============================ */

.woo-cinema-page .woo-cinema-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 26vw, 360px);
    gap: 16px;
    align-items: stretch;
    padding: 0;
    background: none;
    border: 0;
}

/* ---- Player ---- */
.woo-cinema-page .woo-cinema-player {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
    border: 1px solid var(--wc-line);
    border-radius: var(--wc-radius);
    background: #000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}

.woo-cinema-page .woo-cinema-player video,
.woo-cinema-page .woo-cinema-player iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* empty / loading state */
.woo-cinema-page .woo-cinema-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 8px;
    padding: 20px;
    text-align: center;
    color: var(--wc-muted);
}

.woo-cinema-page .woo-cinema-empty i {
    font-size: 34px;
    color: rgba(255, 45, 67, .7);
}

.woo-cinema-page .woo-cinema-empty strong {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

.woo-cinema-page .woo-cinema-empty span {
    font-size: 12.5px;
    max-width: 320px;
}

/* live badge over the player (top-left) */
.woo-cinema-page .woo-cinema-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff2d43, #c1121f);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .04em;
    box-shadow: 0 6px 16px rgba(225, 29, 42, .45);
}

/* player top-right tool buttons + bottom controls */
.woo-cinema-page .woo-cinema-header-tools,
.woo-cinema-page .woo-cinema-player-tools {
    display: flex;
    gap: 8px;
}

.woo-cinema-page .woo-cinema-control-btn,
.woo-cinema-page .woo-cinema-fullscreen,
.woo-cinema-page .woo-cinema-pip,
.woo-cinema-page .woo-cinema-float,
.woo-cinema-page .woo-cinema-subtitle-toggle,
.woo-cinema-page .woo-cinema-mute {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 11px;
    background: rgba(12, 13, 18, .72);
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background .15s ease, border-color .15s ease;
}

.woo-cinema-page .woo-cinema-control-btn:hover,
.woo-cinema-page .woo-cinema-fullscreen:hover,
.woo-cinema-page .woo-cinema-pip:hover,
.woo-cinema-page .woo-cinema-mute:hover {
    background: rgba(225, 29, 42, .5);
    border-color: rgba(255, 45, 67, .7);
}

/* bottom control bar */
.woo-cinema-page .woo-cinema-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(10, 11, 16, .82);
    backdrop-filter: blur(10px);
    border: 1px solid var(--wc-line);
    color: var(--wc-text);
    font-size: 12px;
}

/* Range inputs (volume + any progress) -> red track & thumb.
   accent-color alone left the thumb browser-blue, so style the thumb directly. */
.woo-cinema-page .woo-cinema-controls input[type="range"],
.woo-cinema-page .woo-cinema-volume {
    -webkit-appearance: none;
    appearance: none;
    accent-color: var(--wc-red-2);
    height: 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .18);
    cursor: pointer;
}

.woo-cinema-page .woo-cinema-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(225, 29, 42, .35), 0 2px 6px rgba(0, 0, 0, .5);
    cursor: pointer;
}

.woo-cinema-page .woo-cinema-controls input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(225, 29, 42, .35);
    cursor: pointer;
}

.woo-cinema-page .woo-cinema-now,
.woo-cinema-page .woo-cinema-info {
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
}

/* the movie-title chip (bottom-right over the player) */
.woo-cinema-page .woo-cinema-info {
    padding: 9px 13px;
    border-radius: 12px;
    background: rgba(10, 11, 16, .78);
    backdrop-filter: blur(8px);
    border: 1px solid var(--wc-line);
}

.woo-cinema-page .woo-cinema-info strong {
    color: #fff;
    font-size: 13px;
}

/* Big centred "start watching" play button (JS toggles [hidden]) */
.woo-cinema-page .woo-cinema-start {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 28px;
    border: 0;
    border-radius: 30px;
    background: linear-gradient(135deg, #ff2d43, #c1121f);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(225, 29, 42, .5);
    transition: transform .16s ease, filter .16s ease;
}

.woo-cinema-page .woo-cinema-start:hover {
    transform: translate(-50%, -50%) scale(1.04);
    filter: brightness(1.08);
}

.woo-cinema-page .woo-cinema-start[hidden] {
    display: none;
}

/* Resume overlay: it is a PANEL (title + text + two buttons), not a button.
   The old rule made it inline-flex so everything squashed side-by-side. This
   turns it into a centred, vertical glass card over the video. */
.woo-cinema-page .woo-cinema-resume {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: min(380px, 86%);
    padding: 24px 26px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(14, 12, 15, .82);
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
    text-align: center;
}

.woo-cinema-page .woo-cinema-resume[hidden] {
    display: none;
}

.woo-cinema-page .woo-cinema-resume > strong {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.woo-cinema-page .woo-cinema-resume > span {
    color: rgba(255, 255, 255, .68);
    font-size: 12.5px;
    line-height: 1.5;
}

/* the two action buttons sit in a plain <div> — lay them out as a row */
.woo-cinema-page .woo-cinema-resume > div {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    width: 100%;
}

.woo-cinema-page .woo-cinema-continue,
.woo-cinema-page .woo-cinema-restart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease, background .15s ease;
}

.woo-cinema-page .woo-cinema-continue {
    border: 0;
    background: linear-gradient(135deg, #ff2d43, #c1121f);
    color: #fff;
    box-shadow: 0 8px 20px rgba(225, 29, 42, .4);
}

.woo-cinema-page .woo-cinema-continue:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.woo-cinema-page .woo-cinema-restart {
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .06);
    color: var(--wc-text);
}

.woo-cinema-page .woo-cinema-restart:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

/* quality / auto-quality pill */
.woo-cinema-page .woo-cinema-quality,
.woo-cinema-page .woo-cinema-select-wrap select {
    padding: 7px 12px;
    border: 1px solid var(--wc-line);
    border-radius: 9px;
    background: rgba(12, 13, 18, .7);
    color: var(--wc-text);
    font-size: 12px;
    cursor: pointer;
}

/* ============================ CHAT PANEL ============================ */

.woo-cinema-page .woo-cinema-chat-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid var(--wc-line);
    border-radius: var(--wc-radius);
    background: var(--wc-panel);
    overflow: hidden;
}

.woo-cinema-page .woo-cinema-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--wc-line-soft);
}

.woo-cinema-page .woo-cinema-chat-head strong {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.woo-cinema-page .woo-cinema-chat-head small {
    color: var(--wc-muted);
    font-size: 11px;
}

.woo-cinema-page .woo-cinema-chat-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--wc-line);
    border-radius: 9px;
    background: transparent;
    color: var(--wc-muted);
    font-size: 16px;
    cursor: pointer;
}

.woo-cinema-page .woo-cinema-chat-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.woo-cinema-page .woo-cinema-spoiler-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 14px 0;
    padding: 12px 13px;
    border: 1px solid rgba(225, 29, 42, .28);
    border-radius: 12px;
    background: rgba(225, 29, 42, .1);
    color: #ffb3ba;
    font-size: 12px;
    line-height: 1.5;
}

.woo-cinema-page .woo-cinema-spoiler-note i {
    color: var(--wc-red-2);
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.woo-cinema-page .woo-cinema-chat-list {
    flex: 1;
    min-height: 0;
    padding: 14px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .12) transparent;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.woo-cinema-page .woo-cinema-chat-list::-webkit-scrollbar {
    width: 5px;
}

.woo-cinema-page .woo-cinema-chat-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .12);
    border-radius: 4px;
}

.woo-cinema-page .woo-cinema-chat-msg {
    padding: 9px 12px;
    border-radius: 11px;
    background: var(--wc-panel-2);
    font-size: 12.5px;
    line-height: 1.45;
}

.woo-cinema-page .woo-cinema-chat-msg strong {
    color: #ff8a95;
    font-size: 11.5px;
    font-weight: 700;
}

.woo-cinema-page .woo-cinema-chat-form {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 14px;
    border-top: 1px solid var(--wc-line-soft);
}

.woo-cinema-page .woo-cinema-chat-form input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 15px;
    border: 1px solid var(--wc-line);
    border-radius: 24px;
    background: rgba(9, 10, 15, .7);
    color: var(--wc-text);
    font-size: 12.5px;
    outline: 0;
}

.woo-cinema-page .woo-cinema-chat-form input::placeholder {
    color: var(--wc-muted);
}

.woo-cinema-page .woo-cinema-chat-form input:focus {
    border-color: rgba(255, 45, 67, .55);
}

.woo-cinema-page .woo-cinema-chat-form button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff2d43, #c1121f);
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(225, 29, 42, .4);
    transition: transform .15s ease, filter .15s ease;
}

.woo-cinema-page .woo-cinema-chat-form button:hover {
    transform: scale(1.05);
    filter: brightness(1.08);
}

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

@media (max-width: 1080px) {
    .woo-cinema-page .woo-cinema-public-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .woo-cinema-page .woo-cinema-public-hero::after {
        opacity: .28;
    }

    .woo-cinema-page .woo-cinema-stage {
        grid-template-columns: minmax(0, 1fr);
    }

    .woo-cinema-page .woo-cinema-chat-panel {
        min-height: 300px;
        max-height: 420px;
    }
}

@media (max-width: 640px) {
    .woo-cinema-page { padding-left: 12px; padding-right: 12px; }
    .woo-cinema-page .woo-cinema-public-hero { padding: 20px 16px; }
    .woo-cinema-page .woo-cinema-public-hero h1 { font-size: clamp(26px, 8vw, 34px); }
    .woo-cinema-page .woo-cinema-hero-actions { width: 100%; }
    .woo-cinema-page .woo-cinema-chat-toggle,
    .woo-cinema-page .woo-cinema-home-link { flex: 1; justify-content: center; }
    .woo-cinema-page .woo-cinema-tab { min-width: 168px; }
}

@media (prefers-reduced-motion: reduce) {
    .woo-cinema-page * { animation: none !important; }
}
