/* PestaDuel! 🎪 Carnival skin for the Self-Enroll pages (live, host, join, play, win, admin).
   Those pages are built on space.css; this remaps its tokens to the Pesta Ria fun-fair palette and
   gives the shared components the chunky fairground look. Active only on <html data-theme="carnival">. */

:root[data-theme="carnival"] {
  --void: #1a0f3d;
  --deep: #2b1660;
  --deep-2: #3a1d78;
  --panel: rgba(52, 26, 108, .74);
  --panel-solid: #2e1766;
  --line: rgba(255, 244, 220, .2);
  --line-strong: rgba(255, 201, 60, .55);
  --text: #fff4dc;
  --muted: #d6c6f0;
  --cyan: #ffc93c;      /* gold takes the lead accent */
  --magenta: #ff5d8f;
  --violet: #8f5bff;
  --lime: #2ec4b6;
  --amber: #ff9f1c;
  --red: #e63946;
  --green: #5bd16b;
  --radius: 20px;
  --font-display: 'Lilita One', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html[data-theme="carnival"] body {
  background:
    radial-gradient(ellipse at 20% 120%, rgba(255, 93, 143, .35), transparent 55%),
    radial-gradient(ellipse at 85% 110%, rgba(255, 201, 60, .25), transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(230, 57, 70, .25), transparent 60%),
    linear-gradient(180deg, var(--void) 0%, var(--deep) 100%);
  background-attachment: fixed;
}
/* Big-top stripe along the top edge of every page. */
html[data-theme="carnival"] body::before {
  content: ''; position: fixed; left: 0; right: 0; top: 0; height: 7px; z-index: 60; pointer-events: none;
  background: repeating-linear-gradient(90deg, #e63946 0 28px, #fff4dc 28px 56px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

html[data-theme="carnival"] h1,
html[data-theme="carnival"] h2,
html[data-theme="carnival"] h3,
html[data-theme="carnival"] .display { letter-spacing: .01em; font-weight: 400; }

/* Marquee wordmark: gold letters with a red sign-board edge. */
html[data-theme="carnival"] .logo {
  font-weight: 400; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff6c9 0%, #ffc93c 55%, #f29e02 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #b5212e) drop-shadow(0 6px 0 rgba(0, 0, 0, .3)) drop-shadow(0 0 18px rgba(255, 201, 60, .4));
}
html[data-theme="carnival"] .logo .duel,
html[data-theme="carnival"] .logo .bang { color: #ff5d8f; -webkit-text-fill-color: #ff5d8f; }

html[data-theme="carnival"] .panel {
  border: 2px solid var(--line);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 18px 40px rgba(0, 0, 0, .3);
}

/* Chunky fairground buttons. */
html[data-theme="carnival"] .btn {
  --c: var(--accent);
  --c-deep: color-mix(in srgb, var(--c) 70%, #000);
  border: 0; border-radius: 14px; text-transform: none; letter-spacing: .02em;
  font: 400 17px/1 var(--font-display); color: #2a1846;
  box-shadow: 0 5px 0 var(--c-deep), 0 8px 14px rgba(0, 0, 0, .3);
}
html[data-theme="carnival"] .btn:hover { transform: none; filter: brightness(1.07); box-shadow: 0 5px 0 var(--c-deep), 0 8px 14px rgba(0, 0, 0, .3); }
html[data-theme="carnival"] .btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--c-deep), 0 3px 6px rgba(0, 0, 0, .3); }
html[data-theme="carnival"] .btn.ghost { background: rgba(255, 255, 255, .1); color: var(--text); box-shadow: inset 0 0 0 2px rgba(255, 244, 220, .35); }
html[data-theme="carnival"] .btn.ghost:active { transform: translateY(2px); }
html[data-theme="carnival"] .btn.small { font-size: 14px; border-radius: 10px; }
html[data-theme="carnival"] .btn.big { font-size: 22px; border-radius: 16px; }
html[data-theme="carnival"] .btn.magenta,
html[data-theme="carnival"] .btn.danger { color: #fff4dc; }

/* Cream ticket-style fields, as in the Pesta Ria games. */
html[data-theme="carnival"] input:not([type=checkbox]):not([type=radio]):not([type=range]),
html[data-theme="carnival"] select,
html[data-theme="carnival"] textarea {
  color: #2a1846; background: #fff4dc; border: 3px solid transparent; font-weight: 700;
}
html[data-theme="carnival"] input:focus,
html[data-theme="carnival"] select:focus,
html[data-theme="carnival"] textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(255, 201, 60, .25); }
html[data-theme="carnival"] select option { background: #fff4dc; color: #2a1846; }

html[data-theme="carnival"] .chip { font-family: var(--font-body); font-weight: 900; letter-spacing: .04em; border-width: 2px; }
html[data-theme="carnival"] .toast { border-width: 2px; box-shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 0 30px rgba(255, 201, 60, .3); }
html[data-theme="carnival"] :focus-visible { outline-color: var(--cyan); }

/* ---- Host screen ---- */
html[data-theme="carnival"] .topbar {
  background: linear-gradient(180deg, rgba(43, 22, 96, .96), rgba(43, 22, 96, .8));
  border-bottom: 3px solid rgba(255, 201, 60, .45);
}
html[data-theme="carnival"] .qr-frame { box-shadow: 0 0 0 4px var(--cyan), 0 0 0 9px #e63946, 0 0 50px rgba(255, 201, 60, .4); }
html[data-theme="carnival"] .room-code { color: #fff4dc; text-shadow: 0 4px 0 #b5212e, 0 0 26px rgba(255, 201, 60, .5); }
html[data-theme="carnival"] .count,
html[data-theme="carnival"] .blocked { background: rgba(26, 15, 61, .7); }
html[data-theme="carnival"] .drawer,
html[data-theme="carnival"] .plan-dlg { background: rgba(43, 22, 96, .97); }
html[data-theme="carnival"] .tabs button[aria-selected="true"] { color: #2a1846; }
html[data-theme="carnival"] .pchip { background: color-mix(in srgb, var(--pc) 18%, rgba(43, 22, 96, .85)); }

/* ---- Phone controller ---- */
html[data-theme="carnival"] .go,
html[data-theme="carnival"] .choice { color: #2a1846; }
html[data-theme="carnival"] .go { box-shadow: 0 10px 0 color-mix(in srgb, var(--c) 55%, #000), 0 0 0 10px color-mix(in srgb, var(--c) 20%, transparent), 0 0 50px color-mix(in srgb, var(--c) 40%, transparent); }
html[data-theme="carnival"] .go.down { transform: translateY(6px) scale(.97); box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 55%, #000), 0 0 70px var(--c); }
html[data-theme="carnival"] .choice { border-radius: 18px; box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 50%, #000); }
html[data-theme="carnival"] .qr-hint { background: rgba(43, 22, 96, .85); }
