/* Musikquiz webapp theme — quizmitbenny visual language.
   Shared by all moderator/admin pages (admin, setup, songs, features,
   login, unlock). Served at /webstatic/theme.css. */

:root {
  --bg: #05060f;
  --bg2: #0b0f24;
  --card: rgba(22, 28, 58, 0.72);
  --card2: rgba(35, 43, 88, 0.65);
  --accent: #4f7cff;
  --gold: #ffbe3c;
  --green: #2ee56f;
  --red: #ff4d5e;
  --text: #eef1ff;
  --muted: #7d86ad;
  --radius: 18px;
  --font: "Montserrat", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scrollbar-gutter: stable; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
}

/* animated spotlights + vignette, fixed behind everything */
body::before {
  content: "";
  position: fixed; inset: -40%;
  background:
    conic-gradient(from 0deg at 30% 0%, transparent 0deg, rgba(79,124,255,.09) 20deg, transparent 45deg),
    conic-gradient(from 180deg at 70% 0%, transparent 0deg, rgba(255,190,60,.07) 20deg, transparent 45deg),
    radial-gradient(60% 50% at 50% 0%, rgba(56,70,180,.35), transparent 70%),
    var(--bg);
  animation: spotSway 26s ease-in-out infinite alternate;
  z-index: -2;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,.55) 100%);
  z-index: -1;
  pointer-events: none;
}
@keyframes spotSway {
  from { transform: rotate(-4deg) scale(1.05); }
  to   { transform: rotate(4deg) scale(1.12); }
}

a { color: var(--accent); }
h1, h2, h3 { font-weight: 700; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

button {
  border: none;
  border-radius: 12px;
  padding: 0.55em 1.2em;
  background: var(--card2);
  color: var(--text);
  font-family: var(--font);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .15s;
}
button:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(79,124,255,.25); }
button:active { transform: translateY(0) scale(.98); }
button.primary { background: linear-gradient(135deg, #4f7cff, #7a4fff); box-shadow: 0 4px 22px rgba(79,124,255,.4); }
button.primary:hover { box-shadow: 0 6px 28px rgba(79,124,255,.6); }
button.danger { background: linear-gradient(135deg, #571f26, #3a1418); }
button.danger:hover { box-shadow: 0 4px 18px rgba(255,77,94,.35); }
button.warn { background: linear-gradient(135deg, #57431f, #3a2c14); }
button.warn:hover { box-shadow: 0 4px 18px rgba(255,180,60,.35); }
button.ok { background: linear-gradient(135deg, #17803f, #0e5c2d); }
button.ok:hover { box-shadow: 0 4px 18px rgba(46,229,111,.35); }
button.warn { background: linear-gradient(135deg, #8a6210, #6e4c0c); }
button.warn:hover { box-shadow: 0 4px 18px rgba(255,190,60,.35); }
button.sm { padding: .4em .9em; font-size: .78em; }
button.lg { padding: .85em 1.6em; font-size: 1.02em; }
.songbtnrow { margin-top: 16px; }
button:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
/* legacy class aliases used by the older admin pages */
button.bad { background: linear-gradient(135deg, #571f26, #3a1418); }
button.bad:hover { box-shadow: 0 4px 18px rgba(255,77,94,.35); }
button.grey { background: var(--card2); }

input, select, textarea {
  font: inherit;
  background: rgba(11,15,36,.8);
  border: 1px solid #2c3568;
  border-radius: 10px;
  color: var(--text);
  padding: 0.5em 0.75em;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,124,255,.2);
}
label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: .9em; }
input[type="checkbox"] { width: auto; margin-right: 6px; }

nav.topnav {
  display: flex; gap: 20px; padding: 14px 24px;
  background: rgba(11,15,36,.75); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(120,135,200,.15); margin-bottom: 14px;
  align-items: center;
}
nav.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; letter-spacing: .03em; }
nav.topnav a.active, nav.topnav a:hover { color: var(--gold); }
nav.topnav .brand {
  font-weight: 800; letter-spacing: .3em; color: var(--gold);
  text-transform: uppercase; text-shadow: 0 0 24px rgba(255,190,60,.5);
  margin-right: 10px;
}
nav.topnav .spacer { flex: 1; }

.admin-wrap { max-width: 1400px; margin: 0 auto; padding: 20px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 980px) { .admin-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--card);
  border: 1px solid rgba(120,135,200,.18);
  border-radius: var(--radius);
  padding: 18px 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 34px rgba(0,0,0,.35);
}
.panel h2 {
  font-size: .95em; color: var(--gold); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: .14em;
}
.panel.full { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { margin-bottom: 0; }
.panel-head-btns { display: flex; gap: 8px; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.btnrow-label {
  color: var(--muted); font-size: .85em; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; margin-right: 2px;
}

.statusline { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; background: #555; }
.dot.ok { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.off { background: var(--red); box-shadow: 0 0 10px var(--red); }
.badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: .78em; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; background: var(--card2);
  border: 1px solid rgba(120,135,200,.3);
}
.badge.active { background: linear-gradient(135deg, #4f7cff, #7a4fff); border-color: transparent; }

table.list { width: 100%; border-collapse: collapse; margin-top: 10px; }
table.list td, table.list th {
  padding: 7px 10px; border-bottom: 1px solid rgba(120,135,200,.15);
  text-align: left; font-size: .95em;
}
table.list th { color: var(--muted); font-size: .78em; text-transform: uppercase; letter-spacing: .1em; }
table.list tr:hover td { background: rgba(79,124,255,.08); }

.seat-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block;
  background: var(--seat, #888); border: 1px solid rgba(255,255,255,.35); vertical-align: -2px; }

.login-box {
  max-width: 380px; margin: 16vh auto; background: var(--card);
  border: 1px solid rgba(120,135,200,.2); padding: 34px;
  border-radius: var(--radius); text-align: center;
  backdrop-filter: blur(12px); box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.login-box h1 {
  font-weight: 800; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); text-shadow: 0 0 24px rgba(255,190,60,.5);
}
.login-box input { width: 100%; margin: 8px 0; }
.login-box button { width: 100%; margin-top: 10px; }
.login-box .error { color: var(--red); margin-top: 10px; font-size: .9em; }

.sound-toggle { position: fixed; right: 16px; bottom: 14px; font-size: .85em; opacity: .6; z-index: 50; }
.sound-toggle:hover { opacity: 1; }

/* ---- generic helpers shared by setup/songs/features pages ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.extra-card { cursor: pointer; text-align: center; padding: 2rem 1rem; transition: transform .15s; }
.extra-card:hover { transform: translateY(-2px); }
.extra-card .big { font-size: 2.4rem; margin-bottom: .5rem; }
.extra-card h3 { margin: 0; }
.extra-card p { color: var(--muted); font-size: .85rem; margin: .4rem 0 0; }
.row { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.prow { display: flex; gap: .4rem; align-items: center; margin-bottom: .35rem; }
.prow input { flex: 1; }
.roundhead { margin: .9rem 0 .3rem; font-size: .72rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold, #f5c548); }
.roundhead:first-child { margin-top: 0; }

/* song-limit progress bar (moderator, like quizmitbenny's qProgress) */
.qp-bar { height: 10px; border-radius: 999px;
  background: rgba(11,15,36,.8); border: 1px solid rgba(120,135,200,.25);
  overflow: hidden; margin: 8px 0 0; }
.qp-fill { height: 100%; width: 0;
  background: linear-gradient(90deg, #4f7cff, #7a4fff); transition: width .4s ease; }
.qp-fill.full { background: linear-gradient(90deg, #ffbe3c, #ff8c1a); }
.qp-label { font-size: .82em; margin-top: 4px; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; align-items: center; }
.dim { color: var(--muted); font-size: .8rem; }
#msg { color: var(--green); min-height: 1.2em; }
.err { color: var(--red); }
.special { color: var(--gold); font-weight: bold; }
.msgrow.inactive td { opacity: .45; }
#bingoYears { font-size: .8rem; word-spacing: .4rem; }

dialog {
  background: var(--card); color: var(--text);
  border: 1px solid rgba(120,135,200,.25); border-radius: var(--radius);
  padding: 22px 24px; max-width: 640px; width: 95%;
  backdrop-filter: blur(12px); box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
dialog::backdrop { background: rgba(5,8,20,.72); backdrop-filter: blur(7px); }
dialog h2 { font-size: .95em; color: var(--gold); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: .14em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .8rem; }
.form-grid label { font-size: .8rem; color: var(--muted); display: block; }
.form-grid input, .form-grid select { width: 100%; }
.full { grid-column: 1 / -1; }

/* ---- settings cards + modal overlays (quizmitbenny einstellungen) ---- */
.settings-wrap { max-width: 1100px; margin: 0 auto; padding: 20px; }
.fn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fn-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 20px; min-height: 92px; text-align: left;
  background: var(--card); border: 1px solid rgba(120,135,200,.18);
  border-radius: var(--radius); box-shadow: 0 10px 34px rgba(0,0,0,.35);
  cursor: pointer; font-family: inherit; color: var(--text);
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.fn-card:hover {
  transform: translateY(-3px); border-color: rgba(255,190,60,.5);
  box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 22px rgba(255,190,60,.12);
}
.fn-title { font-size: 1.05em; font-weight: 700; color: var(--gold); letter-spacing: .04em; }
.fn-desc { font-size: .78em; color: var(--muted); line-height: 1.35; }
.fn-sub { font-size: .85em; color: var(--text); line-height: 1.4; }
.fn-sub .seat-dot { width: 12px; height: 12px; margin-right: 4px; }

.swatch-wrap { position: relative; }
.swatch-cur, .swatch-opt {
  width: 1.5rem; height: 1.5rem; border-radius: 6px; padding: 0;
  border: 1px solid rgba(255,255,255,.3); background: var(--seat);
  cursor: pointer;
}
.swatch-menu {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0;
  display: grid; grid-template-columns: repeat(5, 1.5rem); gap: 7px;
  background: var(--bg2); border: 1px solid rgba(120,135,200,.35);
  border-radius: 10px; padding: .55rem;
  box-shadow: 0 10px 28px rgba(0,0,0,.55);
}
.swatch-opt:hover { outline: 2px solid var(--gold); }
input[type="color"] {
  width: 64px; height: 34px; padding: 2px; cursor: pointer;
  background: var(--card2); border: 1px solid rgba(120,135,200,.3);
  border-radius: 10px;
}

.modal-overlay {
  position: fixed; inset: 0; background: rgba(5,8,20,.72);
  backdrop-filter: blur(7px); display: flex;
  align-items: center; justify-content: center; z-index: 100; padding: 3vh 3vw;
}
.modal {
  position: relative;
  background: var(--card); border: 1px solid rgba(120,135,200,.25);
  border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0,0,0,.6);
  padding: 22px 24px; width: min(560px, 100%); max-height: 88vh;
  overflow-y: auto; animation: modalIn .22s cubic-bezier(.2,.9,.3,1.1) both;
}
.modal.wide { width: min(920px, 100%); }
.modalClose {
  position: absolute; top: 12px; right: 14px; cursor: pointer;
  color: var(--muted); font-size: 1.15em; padding: 4px 8px;
  border-radius: 8px; line-height: 1; user-select: none;
}
.modalClose:hover { color: var(--text); background: rgba(120,135,200,.15); }
.modal h2 { font-size: .95em; color: var(--gold); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: .14em; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(120,135,200,.15);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.modal label { display: block; margin: .5rem 0 .2rem; color: var(--muted); font-size: .85rem; }
