:root {
    --bg: #fbf9f6;
    --bg2: #ffffff;
    --line: #e7e0d8;
    --text: #2b2422;
    --muted: #776b65;
    --accent: #b3202a;
    --gold: #d08a1f;
    --gold-dark: #a86d12;
    --velvet: #e6cbc5;
    --velvet2: #d9b9b2;
    
}
* {box-sizing: border-box;}
html, body {margin: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 "DM Sans", system-ui, sans-serif; 
    /* 2 CHANGE UR FONTS */
    min-height: 100vh;
}
a {color: var(--accent); }
code {background: #00000010; padding: 1px 5px; border-radius: 4px;}

.wrap {max-width: 760px; margin: 0 auto; padding: 40px 16px 64px;}
.display, h1 {font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; letter-spacing: 0.02em; line-height: 0.95;}
h1 {font-size: clamp(44px, 11vw, 80px); margin: 0.12em 0 0.2em; }
.eyebrow {color: var(--accent); letter-spacing: 0.2em; text-transform: uppercase; font-size: 13px; font-weight: 600; margin: 0;}
.lede {color: var(--muted); font-size: 18px; max-width: 46ch; margin: 0 0 26px; }
.hint {color: var(--muted); font-size: 14px;}
.err {color: #b3202a; min-height: 1.5em;}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
    font: 600 17px "DM Sans", sans-serif; padding: 14px 26px; border-radius: 999px; border: 0;
    background: var(--text); color: #fff; cursor: pointer; text-decoration: none;
    transition: transform 0.15s, background 0.15s, opacity 0.2s;
}
.btn:hover {background: #000; }
.btn:active {transform: scale(0.98);}
.btn:disabled {opacity: 0.4; cursor: default; transform: none;}
.btn.ghost {background: transparent; color: var(--text); border: 1px solid #d8cfc5;}
.btn.ghost:hover {background: #f2ede7;}
.btn.block {width: 100%;}
.row {display: flex; gap: 12px; flex-wrap: wrap; align-items: center;}

.ticket-img {
    width: 100%; height: auto; display: block; margin: 28px 0 22px; 
    filter: drop-shadow(0 10px 18px rgba (60, 40, 30, .16));
    animation: drop 0.5s ease-out;
}
@keyframes drop {from {opacity: 0; transform: translateY(-14px);}}

.demo-banner {
    background: #fff6dc; color: #6b4e12; border-bottom: 1px solid #f0e0b0;
    padding: 10px 16px; font-size: 14px; text-align: center; 
}

/* THEATRE STUFF YIPPPPPEEE */
.theater {
    background: var(--bg2);
    border: 1px solid var (--line); border-radius: 18px;
    padding: 18px 12px 16px; margin: 22px 0;
    
}
/* SIX SEVEN GRAHHHH */

.screen {
    position: relative; height: clamp(22px, 5vw, 60px); margin: 0 6% 7%;
    border-top: clamp(4px, 0.6vw, 8px) solid #cfc6bc;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;     
}

.screen span {
    position: absolute; left: 0; right: 0; top: 28%; text-align: center;
    font-family: "Bebas Neue", Impact, sans-serif; color: #a89d93;
    letter-spacing: 0.35em; font-size: clamp(11px, 1.6vw, 22px);
}

.seat-grid {
    display: grid;
    grid-template-columns: 1.3em repeat(var(--left), 1fr) .7fr repeat(var(--right), 1fr) 1.3em;
    gap: clamp(3px, 0.9vw, 12px) clamp(2px, 0.5vw, 8px);
    align-items: center;
}

.row-label {color: var(--muted); font: 600 clamp(10px, 1.3vw, 15px) "DM Sans", sans-serif; text-align: center; opacity: 0.6;}

.seat {
    position: relative; aspect-ratio: 1 / 1; border: 0; padding: 0; background: none; cursor: default;
    --c1: #dcc3bd; --c2: #ceaea7;
    
}

.seat::before {
    content: ""; position: absolute; left: 14%; right: 14%; top: 6%; height: 58%;
    background: var(--c1); border-radius: 30% 30% 10% 10%; 
    transition: background 0.15s, box-shadow 0.2s; 
}

.seat::after {
    content: ""; position: absolute; left: 2%; right: 2%; bottom: 6%; height: 34%;
    background: var(--c2); border-radius: 22% 22% 30% 30%;
    transition: background 0.15s;    
}

.seat:not(.taken) {--c1: var(--velvet); --c2: var(--velvet2); }
.pickable .seat:not(:disabled) {cursor: pointer;}
.pickable .seat:not(.taken):not(:disabled):hover {--c1: #d9a59c; --c2: #cb948a; }
.seat.selected {--c1: var(--accent); --c2: #8e1820; }
.seat:focus-visible {outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px;}

.person {position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.person::before {
    content: ""; position: absolute; width: 40%; aspect-ratio: 1; left: 30%; top: -6%; 
    border-radius: 50%; background: #55504d; 
}
.person::after {
    content: ""; position: absolute; width: 72%; height: 34%; left: 14%; top: 30%;
    border-radius: 50% 50% 14% 14%; background: #45403d;     
}

.seat.mine .person::before {background: var(--gold); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold); }
.seat.mine .person::after {background: var(--gold-dark); }
.seat.fresh .person {animation: pop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.3); transform-origin: 50% 100% }
@keyframes pop {
    0% {transform: translateY(-100%) scale(0.6); opacity: 0; }
    60% {transform: translateY(4%) scale(1.06); opacity: 1; }
    100% {transform: none;}
}

/* POPCORN throwing targets */
.seat.target::before {box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.seat.target.taken .person::before {box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.seat.hit .person {animation: hit 0.45s ease-out; }
@keyframes hit {25% {transform: translateX(-8%) rotate(-8deg); } 55% {transform: translateX(6%) rotate(6deg); } }

.legend {display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 16px; }
.legend i {display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.field {
    display: block; width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid #d8cfc5; background: var(--bg2); color: var(--text); font: 16px "DM Sans", sans-serif; margin: 6px 0 14px;
    
}
.field:focus {outline: 2px solid var(--text); outline-offset: 1px; } 
label {font-size: 14px; color: var(--muted); }
.flash {color: var(--accent); min-height: 1.5em; margin: 0 0 10px; }

/* Host: selected take seat */
.seat.selected-taken .person::before {box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--text); }

/* Spotlight seat colours and outlines */
.seat.spot .person {
    --o: max(1.5px, 0.2vw);
    filter: drop-shadow(var(--o) 0 0 #f0b429)
        drop-shadow(calc(-1 * var(--o)) 0 0 #f0b429)
        drop-shadow(0 var(--o) 0 #f0b429)
        drop-shadow(0 calc(-1 * var(--o)) 0 #f0b429);
    
}

.seat.throw .person {animation: toss 0.35s ease-out; }
@keyframes toss {40% {transform: translateY(-14%) rotate(-6deg); } }

/* POPCORNN */
.popcorn-layer {position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.kernel {
    position: absolute; border-radius: 45% 55% 50% 50%; 
    background: radial-gradient(circle at 35% 35%, #fffdf7 0 30%, #f7e6b8 60%, #dca94a 100%); 
    box-shadow: 0.28em -0.14em 0 -0.06em #fff4d6, -0.22em -0.2em 0 -0.1em #f9ebc6, 0.05em 0.25em 0 -0.12em #e2b75d, 0 0 0 0.04em rgba(150, 105, 30, 0.35);
    will-change: transform, opacity;
}

/* phone seated tools  */
.aim {text-align: center; margin: 8px 0 0; }
.aim b {color: var(--accent); }
.toast {
    position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70;
    background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; 
    font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); max-width: calc(100vw - 32px); 
    animation: toastIn 0.3s ease-out;
}

@keyframes toastIn {from {opacity: 0; transform: translate(-50%, 12px); } }
.spot-banner {
    margin: 0 0 18px; padding: 14px 16px; border-radius: 14px; text-align: center; 
    background: #fff4cc; border: 1px solid #f0d36e; color: #5a4208; font-weight: 600; 
    
}
.spot-banner .display {font-size: 34px; display: block; color: #3d2c04; }

/* host and control page */
.host-grid {display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 12px 0 6px; }
.host-grid .btn {width: 100%; }
.btn.danger {background: #fdecec; color: #a12a2a; border: 1px solid #f3c6c6;}
.btn.danger:hover {background: #fadcdc;}
.stat {display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 15px;}
.stat b {color: var(--text); }
.pill {display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;}
.pill.on {background: #e3f4e5; color: #23652e; }
.pill.off {background: #fbefd9; color: #7a5410; }
.pill.end {background: #ececf4; color: #44446a; }
.panel {background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 16px 0; }
.panel h2 {font: 400 26px "Bebas Neue", Impact, sans-serif; letter-spacing: 0.04em; margin: 0 0 6px; }

/* Chat code */
.code-box {
    display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center;
    background: var(--bg2); border: 2px dashed #d9c49a; border-radius: 16px; 
    padding: 16px 18px; margin: 4px 0 10px; 
}

.code-label {grid-column: 1/-1; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.code-cmd {
    background: none; padding: 0; font: 700 clamp(18px, 6vw, 32px) "Courier New", monospace; 
    color: var(--text); letter-spacing: 0.02em; white-space: nowrap;
}

/* Speech bubble 4 stream */
.bubble-layer {position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.bubble {
    position: absolute; transform: translate(-50%, -100%);
    max-width: clamp(140px, 15vw, 300px); width: max-content;
    background: #fff; color: var(--text); border: 1px solid #ddd3c8;
    font: 600 clamp(11px, 0.95vw, 18px)/1.25 "DM Sans", sans-serif; 
    padding: 0.45em 0.7em; border-radius: 0.8em; 
    box-shadow: 0 0.2em 0.6em rgba(40, 30, 20, 0.14);
    overflow-wrap: anywhere; text-align: center; 
    animation: bubbleIn 0.25s ease-out;
}
.bubble::after {
    content: ""; position: absolute; left: 50%; bottom: -0.45em; transform: translateX(-50%) rotate(45deg); 
    width:  0.8em; height: 0.8em; background: #fff; border-right: 1px solid #ddd3c8; border-bottom: 1px solid #ddd3c8; 
}
.bubble.out {animation: bubbleOut 0.3s ease-in forwards;}
@keyframes bubbleIn {from{opacity: 0; transform: translate(-50%, -80%) scale(0.8);}}
@keyframes bubbleOut {to {opacity: 0; transform: translate(-50%, -120%); } }

/* Host: chat logs  */
.log {list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; max-height: 220px; overflow: auto; }
.log li {padding: 6px 0; border-top: 1px solid var(--line); }
.log .ok {color: #23652e;}
.log .no {color: #a12a2a;}
.log .chat {color: var(--muted); }

/* Nametags (above viewers heads) */
.tag {
    position: absolute; z-index: 2; left: 50%; top: -30%; transform: translateX(-50%); 
    max-width: 106%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: rgba(43, 36, 34, 0.82); color: #fff; 
    font: 600 clamp(9px, 0.72vw, 15px)/1.2 "DM Sans", sans-serif;
    padding: 0.15em 0.5em; border-radius: 999px; pointer-events: none;

}
.seat.spot .tag {background: #f0b429; color: #2b2422; }

/* ANYTHING marked hidden says hidden, including the buttons */
[hidden] {display: none !important; }

/* DESKTOP LAYOUT */
.wrap.wide {max-width: 1240px; }
.ticket-img.sample {transform: rotate(-2.5deg); margin-top: 36px; }
@media (min-width: 1000px) {
    .wrap.wide {padding-top: 56px; }
    .layout {display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
    .col-side {position: sticky; top: 24px }
    .col-side > :first-child {margin-top: 0; }
    .col-main > .panel:first-child {margin-top: 0; }
    .hero {display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; min-height: calc(100vh - 160px); }
    .hero .ticket-img.sample {margin: 0; }
    .hero h1 {font-size: clamp(64px, 7vw, 104px); }
}
#stats {margin: 0 0 20px; }

/* Theatre popping up on viewers pages */
.theater.popin {animation: popin 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes popin {from {opacity: 0; transform: translateY(24px) scale(0.97); } }
@media (min-width: 1000px) {
    .layout.solo {grid-template-columns: minmax(0, 760px); }
    
}

/* Host: Cinema size */
.presets {display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.presets .btn {padding: 8px 14px; font-size: 14px; }
.size-row {display: flex; align-items: flex-end; gap: 12px; }
.size-row label {flex: 1;}
.size-row .field {margin-bottom: 6px; }
.size-row .times {font-size: 22px; color: var(--muted); padding-bottom: 18px; }

/* Snack buttons  */
.snack-grid {display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.snack-btn {flex-direction: column; gap: 2px; padding: 14px 10px; border-radius: 16px; font-size: 15px; line-height: 1.2; }
.snack-btn .em {font-size: 26px; line-height: 1; }

/* Drink Droplets */
.drop {
    position: absolute; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background :radial-gradient(circle at 35% 30%, #e8f6ff 0 18%, #7cc6f2 45%, #2f8fd0 100%);
    box-shadow: 0 0 0 0.04em rgba(20, 80, 130, 0.35);
    will-change: transform, opacity; 
}

/* Props next 2 heads */
.prop {position: absolute; transform: translate(-50%, -50%); line-height: 1; pointer-events: none; z-index: 2; }
.prop.bucket {animation: propIn 0.25s ease-out, bob 0.45s ease-in-out 0.25s 3 alternate, propOut 0.3s ease-in 1.5s forwards; }
.prop.sip {transform-origin: 30% 90%; animation: propIn 0.25s ease-out, sip 0.6s ease-in-out 0.25s 2, propOut 0.3s ease-in 1.5s forwards; }
@keyframes propIn {from {opacity: 0; transform: translate(-50%, -20%) scale(0.5); } }
@keyframes propOut {to {opacity: 0; transform: translate(-50%, -30%) scale(0.7); } }
@keyframes bob {to {transform: translate(-50%, -62%); } }
@keyframes sip {50% {transform: translate(-80%, -70%) rotate(-38deg); } }

/* Person animations */
.seat.munch .person {animation: munch 0.3s ease-in-out 5 alternate; }
@keyframes munch {to {transform: translateY(-4%) scaleY(1.03); } }
.seat.soaked .person::before {background: #5b8db8 !important; transition: background 0.2s;}
.seat.soaked .person::after {background: #47739a !important; transition: background 0.2s;}

/* Flying drink cup */
.cupfly {
    position: absolute; line-height: 1; display: flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 0.08em 0.12em rgba(0, 0, 0, 0.25)); will-change: transform, opacity;
    
}

/* Ticket Images: vertical */
.ticket-img {max-width: 100%; width: auto; max-height: 75vh; margin-left: auto; margin-right: auto; }
.ticket-img.preview {max-height: 320px; margin: 12px auto; }

/* Host Horizontal/vertical switch  */
.seg {display: inline-flex; border: 1px solid #d8cfc5; border-radius: 999px; padding: 4px; gap: 4px; margin: 6px 0 4px; }
.seg label {display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--text); font-weight: 600; font-size: 15px; }
.seg input {accent-color: var(--text); }
.seg label:has(input:checked) {background: var(--text); color: #fff; }


