/* Random Task Generator — camp, stage-ready theme. Shares the Full House Realness /
   Queen Central Vote palette + core components across landing / control / display. */
:root {
  --bg: #160a2b;
  --bg2: #0d0620;
  --panel: #241041;
  --panel2: #2f1553;
  --line: #40206a;
  --text: #f5e9ff;
  --muted: #b79fd6;
  --pink: #ff2d95;
  --pink2: #ff5db1;
  --gold: #ffd24a;
  --mint: #2ee6a6;
  --purple: #b06bff;
  --danger: #ff5a7a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 50% -12%, #3a1a6b 0%, rgba(58,26,107,0) 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--pink2); }
h1, h2, h3 { font-family: "Chonburi", "Bowlby One SC", system-ui, serif; font-weight: 400; }

/* Brand lockup */
.brand { line-height: 1.05; }
.brand .t1 { font-size: 26px; }
.brand .t1 .accent { color: var(--pink); }
.brand .t2 { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

/* LIVE badge */
.live { display: inline-flex; align-items: center; gap: 7px; background: var(--pink); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .08em; padding: 5px 11px; border-radius: 999px; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.badge-soft { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }

/* Buttons */
.btn { border: 1px solid var(--line); background: var(--panel2); color: var(--text); padding: 11px 16px; border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 15px; }
.btn:hover { border-color: var(--pink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--pink2), var(--pink)); border-color: transparent; color: #fff; }
.btn.gold { background: linear-gradient(180deg, #ffe07a, var(--gold)); border-color: transparent; color: #4a2c00; }
.btn.mint { background: var(--mint); border-color: transparent; color: #04351f; }
.btn.danger { background: transparent; border-color: #6b2740; color: var(--danger); }
.btn:active { transform: translateY(1px); }

/* Big call-to-action button */
.gen-btn { width: 100%; border: none; border-radius: 999px; padding: 16px; cursor: pointer; font-family: "Chonburi", serif; font-size: 21px; letter-spacing: .04em; color: #fff; background: linear-gradient(180deg, var(--pink2), var(--pink)); box-shadow: 0 10px 30px rgba(255,45,149,.5); }
.gen-btn:active { transform: translateY(2px); }
.gen-btn:disabled { opacity: .5; box-shadow: none; cursor: not-allowed; }

/* Center forms (landing) */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.sheet { width: 480px; max-width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; color: var(--muted); font-size: 13px; }
input, select, textarea { background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 12px; font: inherit; font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pink); }
.err { color: var(--danger); font-size: 14px; min-height: 18px; }
.hint { color: var(--muted); font-size: 13px; }

/* URL result rows (landing) */
.urls { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.urlrow { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.urlrow .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.urlrow .v { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.urlrow .v code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.urlrow .v a { flex: 0 0 auto; }

/* Shared panels + heads */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/* ============ CONTROL (control.html) ============ */
.wrap { max-width: 900px; margin: 0 auto; padding: 16px; }

/* Rating-band chooser */
.bands { display: flex; flex-wrap: wrap; gap: 10px; }
.band { display: flex; flex-direction: column; gap: 2px; text-align: left; min-width: 132px; flex: 1; background: var(--panel2); border: 2px solid var(--line); color: var(--text); border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .12s ease; }
.band:hover { border-color: var(--pink); }
.band .b-key { font-family: "Chonburi", serif; font-size: 22px; }
.band .b-desc { font-size: 12px; color: var(--muted); }
.band.on { border-color: var(--pink); background: rgba(255,45,149,.18); transform: translateY(-1px); }
.band.on .b-desc { color: var(--pink2); }

/* Venue + toggle rows */
.row-line { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-line label.k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.venue-sel { flex: 1; min-width: 220px; }
.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; font-weight: 700; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track { width: 54px; height: 30px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); position: relative; transition: background .18s ease, border-color .18s ease; flex: 0 0 auto; }
.toggle .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .18s ease, background .18s ease; }
.toggle input:checked + .track { background: linear-gradient(180deg, var(--pink2), var(--pink)); border-color: transparent; }
.toggle input:checked + .track::after { transform: translateX(24px); background: #fff; }
.toggle input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(255,45,149,.4); }

.controls-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }

/* Current-task preview on the control board */
.now { display: flex; align-items: center; gap: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-height: 64px; }
.now .now-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.now .now-text { font-weight: 800; font-size: 18px; }
.now .rtag { font-family: "Chonburi", serif; font-size: 14px; color: var(--gold); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; flex: 0 0 auto; }

textarea#custom { width: 100%; resize: vertical; min-height: 64px; }

/* ============ DISPLAY (display.html) ============ */
.dwrap { position: relative; height: 100vh; display: flex; flex-direction: column; padding: 2.5vmin 4vmin; overflow: hidden; }
.dhead { display: flex; align-items: center; justify-content: space-between; gap: 2vmin; flex: 0 0 auto; z-index: 3; }
.dhead .title { font-family: "Chonburi", serif; font-size: 5vmin; }
.dhead .title .accent { color: var(--pink); }
.dhead .right { display: flex; align-items: center; gap: 2vmin; font-size: 2.6vmin; color: var(--muted); }
.live-xl { font-size: 2.4vmin; padding: 0.8vmin 1.6vmin; }

.dbody { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vmin; z-index: 2; }
.dcap { font-size: 3vmin; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.rband { font-family: "Chonburi", serif; font-size: 3.4vmin; color: #4a2c00; background: linear-gradient(180deg, #ffe07a, var(--gold)); padding: 0.6vmin 2.4vmin; border-radius: 999px; box-shadow: 0 0 4vmin rgba(255,210,74,.4); }
.rband.custom { color: #04351f; background: linear-gradient(180deg, #7bffcf, var(--mint)); box-shadow: 0 0 4vmin rgba(46,230,166,.4); }
.dtask {
  font-family: "Chonburi", serif; font-size: 10vmin; line-height: 1.06; text-align: center; max-width: 88vw;
  color: #fff; text-shadow: 0 0 6vmin rgba(255,45,149,.35), 0 0.4vmin 0 rgba(0,0,0,.25);
  background: linear-gradient(90deg, #fff 0%, #ffd7f0 45%, #d9c2ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.dtask.small { font-size: 7vmin; }
/* Pop-in each time a new task lands. */
@keyframes taskPop { 0% { opacity: 0; transform: scale(.7) rotate(-2deg); } 60% { transform: scale(1.06) rotate(1deg); } 100% { opacity: 1; transform: none; } }
.pop { animation: taskPop .55s cubic-bezier(.2,1.4,.4,1); }
.dtitle-lg { font-family: "Chonburi", serif; font-size: 8vmin; text-align: center; }
.dtitle-lg .accent { color: var(--pink); }
.dsub { font-size: 3vmin; color: var(--muted); }

/* Floating emoji layer — lively motion around the task without clutter. */
.emoji-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.emoji { position: absolute; bottom: -12vmin; font-size: 6vmin; will-change: transform, opacity; animation: floatUp linear forwards; opacity: 0; }
@keyframes floatUp {
  0% { transform: translateY(0) rotate(0deg) scale(.8); opacity: 0; }
  12% { opacity: .95; }
  85% { opacity: .95; }
  100% { transform: translateY(-118vh) rotate(var(--spin, 40deg)) scale(1.1); opacity: 0; }
}
/* Slow drifting sparkle backdrop so an idle screen still feels alive. */
.dwrap::before { content: ""; position: absolute; inset: -20%; z-index: 0; background: radial-gradient(3px 3px at 20% 30%, rgba(255,210,74,.6), transparent), radial-gradient(3px 3px at 70% 60%, rgba(255,45,149,.6), transparent), radial-gradient(2px 2px at 45% 80%, rgba(46,230,166,.6), transparent), radial-gradient(2px 2px at 85% 25%, rgba(176,107,255,.6), transparent); background-size: 60% 60%; animation: drift 22s linear infinite; opacity: .5; }
@keyframes drift { 0% { transform: translate(0,0); } 100% { transform: translate(4%, 3%); } }

/* Venue logo — polished bottom-left position, never over the task text. */
.venue-logo { position: fixed; left: 3vmin; bottom: 3vmin; z-index: 4; display: flex; align-items: center; gap: 1.4vmin; background: rgba(13,6,32,.55); border: 1px solid var(--line); border-radius: 2vmin; padding: 1.2vmin 2vmin; backdrop-filter: blur(6px); transition: opacity .3s ease, transform .3s ease; }
.venue-logo[hidden] { display: none; }
.venue-logo img { height: 7vmin; max-width: 34vmin; object-fit: contain; }
.venue-logo .vcap { font-size: 1.5vmin; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.locked-full { height: 100vh; display: grid; place-items: center; text-align: center; }
