:root {
  --bg: #08090b;
  --panel: #111318;
  --panel-2: #171a20;
  --line: #2a2e37;
  --text: #f4f5f7;
  --muted: #9299a6;
  --accent: #4f7cff;
  --accent-2: #3155c6;
  --success: #32c981;
  --warning: #ffb84d;
  --danger: #ff5f69;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 50% -20%, #19213b 0, transparent 35%), var(--bg); }
button, input { font: inherit; }
button { border: 0; border-radius: 10px; padding: 12px 16px; background: var(--accent); color: white; font-weight: 750; cursor: pointer; transition: .16s ease; }
button:hover:not(:disabled) { transform: translateY(-1px); background: #648cff; }
button:disabled { opacity: .4; cursor: not-allowed; }
button.secondary { background: #252a34; border: 1px solid #343a47; }
button.tiny { padding: 7px 10px; font-size: 12px; }
input { width: 100%; margin-top: 8px; background: #0b0d11; color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 12px 13px; outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,124,255,.15); }
label { display: block; color: #d6d9df; font-size: 13px; font-weight: 650; }
.shell { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }
.hidden { display: none !important; }
.eyebrow { color: var(--accent); font-size: 11px; letter-spacing: .19em; font-weight: 800; }
.landing { padding: 90px 0; }
.hero { max-width: 720px; margin-bottom: 45px; }
.hero h1 { font-size: clamp(42px, 7vw, 82px); line-height: .97; margin: 16px 0; letter-spacing: -.055em; }
.hero p { color: var(--muted); font-size: 18px; }
.landing-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.panel { background: linear-gradient(180deg, rgba(25,28,35,.98), rgba(15,17,21,.98)); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.panel h2, .panel h1 { margin-top: 0; }
.panel form, form.panel { display: grid; gap: 18px; }
.hint, .panel p { color: var(--muted); font-size: 13px; }
.message { margin-top: 20px; color: var(--danger); }
.topbar { height: 72px; padding: 0 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; background: rgba(8,9,11,.85); backdrop-filter: blur(18px); }
.brand { color: white; font-weight: 900; letter-spacing: .2em; text-decoration: none; }
.room-meta { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.room-meta strong { color: white; letter-spacing: .14em; }
.round-label { font-weight: 800; font-size: 12px; color: var(--muted); }
.room-shell { padding: 42px 0 80px; }
.join-panel, #host-auth { max-width: 480px; margin: 60px auto; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.section-heading h1 { margin: 6px 0 0; font-size: 34px; letter-spacing: -.035em; }
.status-pill { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 750; }
.status-pill[data-status="betting"] { color: var(--success); }
.status-pill[data-status="running"] { color: var(--warning); }
.status-pill[data-status="closed"] { color: var(--muted); }
.players-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 15px; align-items: stretch; }
.player-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 19px; min-height: 335px; display: flex; flex-direction: column; }
.player-card.mine { border-color: rgba(79,124,255,.8); box-shadow: inset 0 0 0 1px rgba(79,124,255,.18); }
.player-head { display: flex; justify-content: space-between; align-items: start; }
.player-head span, .balance span, .confirmed-bet span { color: var(--muted); font-size: 10px; letter-spacing: .13em; font-weight: 800; }
.player-head h3 { margin: 6px 0 0; font-size: 20px; }
.you { color: var(--accent); border: 1px solid rgba(79,124,255,.45); border-radius: 999px; padding: 5px 8px; font-size: 10px; font-weight: 800; }
.balance { margin: 22px 0; padding: 15px; background: #0b0d11; border: 1px solid #23262e; border-radius: 10px; }
.balance strong { display: block; margin-top: 6px; font-size: 19px; }
.bet-form { display: grid; gap: 13px; flex: 1; }
.bet-form button { margin-top: auto; }
.bet-form small { color: var(--muted); font-size: 11px; text-align: center; }
.confirmed-bet { display: grid; gap: 14px; }
.confirmed-bet > div:not(.locked) { padding: 13px; border: 1px solid var(--line); border-radius: 9px; }
.confirmed-bet strong { display: block; margin-top: 7px; }
.locked { color: var(--success); font-size: 12px; font-weight: 850; text-align: center; padding-top: 5px; }
.waiting { color: var(--muted); display: grid; place-items: center; flex: 1; border: 1px dashed var(--line); border-radius: 10px; min-height: 145px; }
.host-controls { margin-top: 20px; }
.control-grid { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto auto; gap: 12px; align-items: end; }
.winner-panel { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
#winner-list { display: grid; gap: 9px; margin: 14px 0; }
.winner-option { display: flex; gap: 12px; align-items: center; background: #0c0e12; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.winner-option input { width: auto; margin: 0; }
.winner-option small { display: block; color: var(--muted); margin-top: 3px; }
.video-section { margin-top: 34px; }
.video-header { display: flex; justify-content: space-between; align-items: end; margin-bottom: 15px; }
.video-header h2 { margin: 5px 0 0; font-size: 30px; }
.video-header span { color: var(--muted); font-size: 12px; }
.video-frame-wrap { min-height: 610px; background: #050607; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; place-items: center; }
.video-frame-wrap iframe { width: min(100%, 480px); height: 760px; border: 0; }
.video-placeholder { color: var(--muted); }
.toast { position: fixed; right: 24px; bottom: 24px; background: #1b1f27; border: 1px solid #343a47; color: white; padding: 13px 16px; border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.35); z-index: 50; }
@media (max-width: 850px) {
  .landing-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
  .round-label { display: none; }
  .control-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; gap: 14px; flex-direction: column; }
  .video-frame-wrap { min-height: 500px; }
  .video-frame-wrap iframe { height: 680px; }
}

/* ARKON CLIENT VIDEO LOCK */
.client-video-locked {
    position: relative !important;
    isolation: isolate;
}

.client-video-locked iframe,
.client-video-locked video,
.client-video-locked blockquote,
.client-video-locked .tiktok-embed {
    pointer-events: none !important;
    user-select: none !important;
}

.client-video-lock-overlay {
    position: absolute;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    cursor: not-allowed;
    user-select: none;
    touch-action: none;
    background: rgba(4, 6, 10, 0.42);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

.client-video-lock-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 260px;
    padding: 16px 20px;
    text-align: center;
    color: #ffffff;
    background: rgba(8, 10, 15, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
}

.client-video-lock-message strong {
    font-size: 14px;
    line-height: 1.3;
}

.client-video-lock-message small {
    opacity: 0.72;
    font-size: 12px;
}

.client-video-lock-icon {
    font-size: 20px;
}

