/* TrashBox shared-screen and phone-controller presentation. */
:root {
  color-scheme: dark;
  --ink: #100d1d;
  --paper: #f9f6ef;
  --muted: #b6afc9;
  --line: rgba(249, 246, 239, .15);
  --card: rgba(35, 27, 59, .78);
  --card-solid: #241d3d;
  --violet: #a47cff;
  --mint: #9dffc4;
  --gold: #ffc763;
  --coral: #ff827c;
  --shadow: 0 20px 60px rgba(0, 0, 0, .38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 12% -15%, rgba(164, 124, 255, .28), transparent 36rem),
    radial-gradient(circle at 94% 16%, rgba(157, 255, 196, .1), transparent 27rem),
    linear-gradient(145deg, #120e24 0%, #0d0b18 52%, #17102a 100%);
  overflow-x: hidden;
}
button, input, textarea { font: inherit; }
button { border: 0; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }

.ambient { position: fixed; z-index: -1; width: 32rem; height: 32rem; border-radius: 50%; filter: blur(70px); pointer-events: none; opacity: .13; }
.ambient-one { background: var(--violet); left: -16rem; top: 32vh; }
.ambient-two { background: var(--gold); right: -18rem; bottom: -15rem; }
.app-shell { width: min(1180px, calc(100% - 32px)); min-height: 100vh; margin: 0 auto; padding: 24px 0 48px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: clamp(28px, 7vh, 72px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font-size: 16px; font-weight: 900; letter-spacing: .11em; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--mint); border-radius: 50% 50% 50% 7px; color: var(--mint); font-size: 15px; transform: rotate(-18deg); }
.host-pill, .status-pill, .phase-pill, .score-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 11px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px currentColor; }
.status-dot.good { background: var(--mint); color: var(--mint); }
.status-dot.bad { background: var(--coral); color: var(--coral); }

.landing { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr); align-items: center; gap: clamp(34px, 8vw, 112px); max-width: 1050px; margin: 0 auto; }
.eyebrow { margin: 0 0 15px; color: var(--mint); font-size: 11px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.landing h1, .host-hero h1 { max-width: 680px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(50px, 8vw, 102px); font-weight: 500; letter-spacing: -.07em; line-height: .86; }
.landing h1 em, .host-hero h1 em { color: var(--gold); font-style: normal; }
.landing-copy { max-width: 510px; margin: 24px 0 0; color: var(--muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.55; }
.value-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 34px; }
.value-list div { border-top: 1px solid var(--line); padding-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.value-list strong { display: block; margin-bottom: 3px; color: var(--paper); font-size: 16px; }

.join-card, .control-card, .stage-card, .entry-card, .result-card, .mini-card { border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(150deg, rgba(47, 37, 78, .91), rgba(25, 20, 43, .86)); box-shadow: var(--shadow); }
.join-card { padding: clamp(24px, 4vw, 38px); }
.join-card h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.join-card > p { margin: 7px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.field-label { display: block; margin: 17px 0 7px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.field { width: 100%; min-height: 50px; border: 1px solid rgba(249, 246, 239, .18); border-radius: 13px; padding: 12px 14px; color: var(--paper); background: rgba(5, 4, 13, .3); font-weight: 700; }
.field::placeholder { color: #817994; opacity: 1; }
.code-field { letter-spacing: .25em; text-transform: uppercase; }
.field:disabled { opacity: .6; }
.form-error { min-height: 20px; margin: 11px 0 0; color: var(--coral); font-size: 12px; line-height: 1.35; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; gap: 8px; border-radius: 13px; padding: 12px 17px; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease, background .16s ease; font-size: 13px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { cursor: not-allowed; opacity: .42; }
.btn-primary { color: #181021; background: var(--mint); box-shadow: 0 11px 24px rgba(157, 255, 196, .16); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 16px 30px rgba(157, 255, 196, .25); }
.btn-gold { color: #261607; background: var(--gold); }
.btn-ghost { border: 1px solid var(--line); color: var(--paper); background: rgba(255, 255, 255, .05); }
.btn-danger { color: #2c0f13; background: var(--coral); }
.btn-wide { width: 100%; margin-top: 18px; }
.btn-small { min-height: 36px; padding: 7px 10px; font-size: 10px; }
.text-link { display: inline; border: 0; padding: 0; color: var(--mint); background: none; cursor: pointer; font-size: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.host-shell { display: grid; gap: 20px; }
.host-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.host-hero h1 { font-size: clamp(42px, 6vw, 76px); }
.host-note { max-width: 330px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.host-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: 20px; align-items: start; }
.control-card, .stage-card { padding: clamp(20px, 3.5vw, 34px); }
.section-kicker { margin: 0 0 9px; color: var(--mint); font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.room-code { margin: 0; color: var(--paper); font-family: Georgia, "Times New Roman", serif; font-size: clamp(54px, 9vw, 94px); font-weight: 500; letter-spacing: .09em; line-height: .95; }
.share-url { display: block; overflow: hidden; margin: 18px 0 10px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.subtle-copy { margin: 17px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.roster { display: grid; gap: 8px; margin-top: 17px; }
.roster-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid rgba(249, 246, 239, .1); border-radius: 12px; padding: 10px 11px; background: rgba(7, 5, 15, .2); }
.roster-name { display: flex; min-width: 0; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; }
.roster-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-orb { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--mint); box-shadow: 0 0 9px rgba(157, 255, 196, .6); }
.player-orb.offline { background: #777184; box-shadow: none; }
.roster-meta { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.empty-roster { margin: 17px 0 0; color: var(--muted); font-size: 13px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.toggle { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.toggle input { width: 18px; height: 18px; accent-color: var(--mint); }

.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.phase-pill { color: var(--mint); border-color: rgba(157, 255, 196, .32); }
.timer { color: var(--gold); font-feature-settings: "tnum" 1; font-size: 18px; font-weight: 900; }
.prompt { max-width: 780px; margin: 22px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(31px, 4.6vw, 64px); font-weight: 500; letter-spacing: -.06em; line-height: .97; }
.stage-guide { max-width: 660px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.progress-line { height: 5px; overflow: hidden; margin: 24px 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.progress-line span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--gold)); transition: width .35s ease; }
.stage-count { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.stage-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.stage-warning { margin: 16px 0 0; color: var(--gold); font-size: 12px; line-height: 1.4; }

.entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 25px; }
.entry-card { position: relative; min-height: 150px; padding: 19px; overflow: hidden; }
.entry-card::after { position: absolute; right: -18px; bottom: -32px; color: rgba(157, 255, 196, .09); content: "✦"; font-size: 160px; line-height: 1; }
.entry-number { color: var(--mint); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.entry-text { position: relative; z-index: 1; margin: 17px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(21px, 2.4vw, 31px); line-height: 1.05; }
.entry-meta { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.entry-card.winner { border-color: rgba(255, 199, 99, .65); background: linear-gradient(145deg, rgba(110, 75, 34, .94), rgba(42, 28, 51, .9)); }

.controller { width: min(540px, 100%); margin: 0 auto; }
.controller .topbar { margin-bottom: 34px; }
.controller-title { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(37px, 10vw, 61px); font-weight: 500; letter-spacing: -.06em; line-height: .93; }
.controller-copy { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.controller-card { margin-top: 22px; padding: 22px; }
.controller-prompt { margin: 15px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(27px, 8vw, 40px); font-weight: 500; letter-spacing: -.055em; line-height: 1; }
.answer-box { min-height: 134px; margin-top: 20px; resize: vertical; line-height: 1.45; }
.character-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.vote-list { display: grid; gap: 10px; margin-top: 22px; }
.vote-card { width: 100%; padding: 17px; border: 1px solid var(--line); border-radius: 15px; color: var(--paper); background: rgba(255, 255, 255, .04); cursor: pointer; text-align: left; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.vote-card:hover { border-color: var(--mint); background: rgba(157, 255, 196, .08); transform: translateY(-2px); }
.vote-label { display: block; margin-bottom: 8px; color: var(--mint); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.vote-text { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 22px; line-height: 1.08; }
.waiting { display: grid; place-items: center; min-height: 275px; padding: 28px; text-align: center; }
.waiting-mark { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 18px; border: 1px solid rgba(157, 255, 196, .6); border-radius: 50%; color: var(--mint); font-family: Georgia, serif; font-size: 31px; animation: pulse 1.7s ease-in-out infinite; }
.waiting h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 500; letter-spacing: -.05em; }
.waiting p { max-width: 290px; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.result-list { display: grid; gap: 9px; margin-top: 21px; }
.result-card { display: flex; align-items: center; gap: 13px; padding: 13px; }
.rank { display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 auto; border-radius: 50%; color: #251609; background: var(--gold); font-size: 13px; font-weight: 900; }
.result-name { overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.result-score { color: var(--mint); font-size: 13px; font-weight: 900; }
.reaction-row { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.reaction-btn { display: grid; place-items: center; width: 43px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .05); cursor: pointer; font-size: 20px; }
.reaction-btn:hover { border-color: var(--gold); transform: translateY(-2px); }
.event-note { min-height: 19px; margin: 15px 0 0; color: var(--gold); font-size: 12px; text-align: center; }

.legal-line { margin: 26px auto 0; color: rgba(182, 175, 201, .75); font-size: 11px; line-height: 1.45; text-align: center; }
.hidden { display: none !important; }

@keyframes pulse { 50% { transform: scale(1.08); box-shadow: 0 0 24px rgba(157, 255, 196, .24); } }
@media (max-width: 780px) {
  .landing, .host-grid { grid-template-columns: 1fr; }
  .landing { gap: 34px; }
  .host-hero { display: block; }
  .host-note { margin-top: 16px; }
}
@media (max-width: 560px) {
  .app-shell { width: min(100% - 24px, 540px); padding-top: 16px; }
  .topbar { margin-bottom: 30px; }
  .host-pill { display: none; }
  .landing h1 { font-size: clamp(52px, 16vw, 76px); }
  .value-list { gap: 8px; }
  .value-list strong { font-size: 14px; }
  .join-card, .control-card, .stage-card { border-radius: 20px; padding: 21px; }
  .entry-grid { grid-template-columns: 1fr; }
  .room-code { font-size: clamp(48px, 16vw, 78px); }
  .settings-row { align-items: flex-start; flex-direction: column; }
  .stage-actions .btn { width: 100%; }
}
