/* watch.css — scoped styles for /watch.php (Live QTV spectator).
   Inherits vars/typography from assets/style.css. */

.watch-page {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 16px 24px 48px;
}

/* ---------- hero ---------- */
.watch-hero {
    background: linear-gradient(180deg, rgba(30,40,60,.55) 0%, rgba(11,16,24,.65) 100%);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 22px;
    overflow: hidden;
    position: relative;
}
.watch-hero::before {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 12% 30%, rgba(212,166,87,.10) 0%, transparent 50%),
        radial-gradient(circle at 88% 70%, rgba(74,144,226,.10) 0%, transparent 50%);
    pointer-events: none;
}
.watch-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 28px;
    padding: 22px 26px;
}
.watch-title h1 {
    font-family: var(--display);
    font-weight: 800;
    font-size: 30px;
    margin: 8px 0 8px;
    color: var(--txt);
    letter-spacing: .01em;
}
.watch-tagline {
    margin: 0;
    color: var(--txt-soft);
    font-size: 14px;
    max-width: 60ch;
    line-height: 1.5;
}
.watch-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,58,58,.15);
    color: #ff7373;
    border: 1px solid rgba(255,58,58,.45);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.watch-pulse {
    width: 8px; height: 8px;
    background: var(--neon-red);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255,58,58,.7);
    animation: watch-pulse 1.6s ease-out infinite;
}
@keyframes watch-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,58,58,.7); }
    100% { box-shadow: 0 0 0 14px rgba(255,58,58,0); }
}
.watch-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: end;
}
.wm-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--txt-soft);
}
.wm-row code {
    font-family: var(--mono);
    background: rgba(255,255,255,.06);
    border: 1px solid var(--line);
    padding: 2px 6px;
    border-radius: 5px;
    color: var(--txt);
    font-size: 12px;
}
.wm-row a { color: var(--accent-3); text-decoration: none; }
.wm-row a:hover { color: var(--accent); text-decoration: underline; }
.wm-k { color: var(--txt-mute); text-transform: uppercase; font-size: 10px; letter-spacing: .08em; min-width: 70px; }
.wm-bridge-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #888;
    transition: background-color .25s;
    margin-left: 4px;
    color: transparent;
}
.wm-bridge-dot.ok  { background: var(--good); box-shadow: 0 0 8px rgba(93,179,93,.6); }
.wm-bridge-dot.bad { background: var(--bad);  box-shadow: 0 0 8px rgba(193,64,64,.6); }

@media (max-width: 880px) {
    .watch-hero-inner { grid-template-columns: 1fr; }
    .watch-title h1 { font-size: 24px; }
}

/* ---------- main stage (focused stream) ---------- */
.watch-stage { margin-bottom: 28px; }
.ws-frame {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000 center/cover no-repeat;
    border: 1px solid var(--line);
    min-height: 460px;
    box-shadow: var(--shadow);
}
.ws-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(7,10,15,.20) 0%, rgba(7,10,15,.78) 60%, rgba(7,10,15,.92) 100%);
}
.ws-frame-body {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    min-height: inherit;
    padding: 18px 22px;
}
.ws-headline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.ws-stream-tag {
    font-family: var(--mono);
    background: var(--accent);
    color: #1a1308;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 13px;
}
.ws-server {
    font-family: var(--display);
    font-weight: 600;
    color: var(--txt);
    font-size: 18px;
}
.ws-pill {
    background: rgba(255,255,255,.08);
    border: 1px solid var(--line);
    color: var(--txt-soft);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ws-pill-map { color: var(--txt); border-color: rgba(212,166,87,.3); }
.ws-pill-sub {
    color: var(--txt-mute);
    font-family: var(--mono);
    font-size: 11px;
}

/* ---------- WebGL placeholder slot ---------- */
.ws-gl-shell {
    aspect-ratio: 16 / 9;
    background: rgba(0,0,0,.55);
    border: 1px dashed rgba(255,255,255,.12);
    border-radius: 10px;
    display: grid;
    place-items: center;
    margin: 0 0 16px;
    overflow: hidden;
    position: relative;
}
.ws-gl-msg {
    text-align: center;
    padding: 18px 24px;
    max-width: 560px;
}
.ws-gl-icon {
    color: var(--accent);
    display: inline-flex;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 14px rgba(212,166,87,.4));
}
.ws-gl-title {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 700;
    color: var(--txt);
    margin-bottom: 8px;
}
.ws-gl-body {
    color: var(--txt-soft);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
}
.ws-gl-body code {
    font-family: var(--mono);
    font-size: 12px;
    background: rgba(255,255,255,.06);
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--txt);
}
.ws-gl-cta {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- scoreboard ---------- */
.ws-board {
    background: rgba(7,10,15,.55);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    backdrop-filter: blur(6px);
}
.ws-board-empty {
    text-align: center;
    color: var(--txt-soft);
    font-size: 13px;
    padding: 16px 0;
    font-style: italic;
}
.ws-scoreboard {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ws-scoreboard th {
    text-align: left;
    color: var(--txt-mute);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: .08em;
    padding: 4px 8px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
}
.ws-scoreboard td {
    padding: 5px 8px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--txt);
}
.ws-scoreboard tr:last-child td { border-bottom: 0; }
.ws-scoreboard .num {
    text-align: right;
    font-family: var(--mono);
    color: var(--txt-soft);
}
.ws-scoreboard td.num { color: var(--txt); }

@media (max-width: 880px) {
    .ws-frame-body { padding: 14px 14px; }
    .ws-server { font-size: 15px; }
}

/* ---------- streams grid (all 5) ---------- */
.watch-streams { margin-top: 8px; }
.ws-row-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 4px;
}
.ws-row-head h2 {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--txt);
}
.ws-row-sub { color: var(--txt-mute); font-size: 12px; }
.ws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.ws-card {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 9px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--line);
    background: #0c1018;
    transition: transform .15s, border-color .15s, box-shadow .15s;
    display: block;
}
.ws-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212,166,87,.5);
    box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.ws-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(212,166,87,.35), 0 4px 18px rgba(212,166,87,.15);
}
.ws-card-bg {
    position: absolute; inset: 0;
    background: #1a2030 center/cover no-repeat;
}
.ws-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(8,12,18,.05) 0%, rgba(8,12,18,.85) 100%);
}
.ws-card-body {
    position: absolute; inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 12px;
    color: var(--txt);
}
.ws-card-top {
    display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.ws-card-id {
    font-family: var(--mono);
    background: rgba(212,166,87,.85);
    color: #1a1308;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
}
.ws-card-name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 14px;
    color: var(--txt);
    text-shadow: 0 1px 2px rgba(0,0,0,.7);
}
.ws-card-mode {
    margin-left: auto;
    color: var(--accent-3);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: rgba(74,144,226,.12);
    border: 1px solid rgba(74,144,226,.3);
    padding: 1px 6px;
    border-radius: 4px;
}
.ws-card-mid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--txt-soft);
    font-size: 12px;
}
.ws-card-map {
    font-family: var(--mono);
    text-shadow: 0 1px 2px rgba(0,0,0,.7);
}
.ws-card-pl {
    font-family: var(--mono);
    font-weight: 700;
    color: var(--txt);
}
.ws-card-foot {
    display: flex; justify-content: flex-end;
}
.ws-card-link {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,.7);
}

/* ---------- howto ---------- */
.watch-howto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
    margin-top: 32px;
}
.how-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px 18px;
}
.how-card h3 {
    font-family: var(--display);
    font-size: 16px;
    margin: 0 0 10px;
    color: var(--txt);
}
.how-card ol {
    margin: 0;
    padding-left: 22px;
    color: var(--txt-soft);
    font-size: 13px;
    line-height: 1.6;
}
.how-card ol li { margin-bottom: 6px; }
.how-card p { color: var(--txt-soft); font-size: 13px; line-height: 1.55; margin: 0 0 8px; }
.how-card p.muted { color: var(--txt-mute); font-size: 12px; }
.how-card code {
    font-family: var(--mono);
    background: rgba(255,255,255,.06);
    border: 1px solid var(--line);
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--txt);
    font-size: 12px;
}
.how-card a { color: var(--accent-3); text-decoration: none; }
.how-card a:hover { color: var(--accent); text-decoration: underline; }
