/* Pubquiz Hollenstein – warmes Papier, rote Bühne und kleine Quizdetails. */
:root {
  --paper: #fff8ea;
  --paper-deep: #f5e8cf;
  --card: #fffdfa;
  --ink: #29242b;
  --muted-ink: #655d63;
  --red: #c81835;
  --red-deep: #8f142c;
  --yellow: #ffcf54;
  --mint: #237b75;
  --line: #d8c7b2;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
body {
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 16%, #e6a634 0 3px, transparent 4px),
    radial-gradient(circle at 96% 12%, #c81835 0 3px, transparent 4px),
    radial-gradient(circle at 93% 48%, #277c76 0 2px, transparent 3px),
    radial-gradient(circle at 13% 80%, #c81835 0 2px, transparent 3px),
    linear-gradient(125deg, #fffaf0 0%, #fff3df 100%);
}
.app-shell { max-width: 1190px; padding-bottom: 60px; }
.topbar {
  min-height: 90px;
  padding: 14px 0;
  background: none;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}
.brand-mark {
  min-width: 62px;
  height: 53px;
  border: 2px solid var(--ink);
  border-radius: 12px 12px 5px 12px;
  background: var(--red);
  color: white;
  box-shadow: 4px 4px 0 var(--yellow);
  transform: rotate(-5deg);
}
.brand-copy strong { color: var(--ink); font-size: clamp(18px, 2vw, 25px); }
.brand-copy small { color: var(--red-deep); letter-spacing: .16em; }
.connection {
  color: var(--ink);
  background: #fffdf7;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 800;
}
.connection-dot { background: var(--red); }
.connection.online .connection-dot { background: var(--mint); box-shadow: 0 0 0 3px #237b7522; }
.leave-button {
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
}
.leave-button:hover { color: white; background: var(--ink); border-color: var(--ink); }
.view { padding-top: clamp(28px, 4vw, 50px); }
h1, h2, h3 { font-family: "Trebuchet MS", "Arial Black", sans-serif; }
h1 { letter-spacing: -.055em; }
h2 { letter-spacing: -.035em; }
.eyebrow, .card-label {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}
.muted, .empty-list, .empty-state { color: var(--muted-ink); }
.error, .danger { color: var(--red-deep); }

/* Einstieg: die große Frage bildet den Blickfang, das Formular bleibt ruhig. */
.join-screen {
  position: relative;
  max-width: 720px;
  margin: clamp(14px, 6vh, 68px) auto 0;
  padding: clamp(30px, 6vw, 68px);
  isolation: isolate;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 34px 12px 34px 12px;
  box-shadow: 12px 12px 0 var(--yellow);
}
.join-screen::before {
  content: "?";
  position: absolute;
  right: clamp(20px, 5vw, 55px);
  top: 15px;
  color: #edcfb0;
  font: 900 clamp(105px, 17vw, 200px)/1 "Trebuchet MS", sans-serif;
  transform: rotate(14deg);
  z-index: 0;
  pointer-events: none;
}
.join-screen::after {
  content: "✳";
  position: absolute;
  right: 30px;
  bottom: 18px;
  color: var(--red);
  font-size: 30px;
  transform: rotate(-18deg);
  pointer-events: none;
}
.join-screen > * { position: relative; z-index: 1; }
.join-screen .eyebrow {
  display: inline-block;
  padding: 7px 11px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 6px;
  transform: rotate(-2deg);
}
.join-screen h1 {
  position: relative;
  max-width: 11ch;
  margin: 24px 0 18px;
  font-size: clamp(45px, 8vw, 78px);
  line-height: .99;
}
.join-screen > p {
  max-width: 47ch;
  color: var(--muted-ink);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5;
}
.join-form { max-width: 450px; margin-top: 32px; gap: 11px; }
.join-form label { color: var(--ink); }
.join-form input {
  background: white;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 4px 4px 0 #e9dcc8;
}
.join-form input:focus {
  border-color: var(--red);
  box-shadow: 4px 4px 0 var(--yellow);
}
.join-form .primary-button { margin-top: 10px; }

/* Bedienelemente: klare Flächen und fühlbare, kurze Bewegung. */
.primary-button, .secondary-button, .small-button, .success-button, .danger-button {
  border: 1.5px solid var(--ink);
  border-radius: 11px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.primary-button { background: var(--red); color: white; }
.primary-button:hover:not(:disabled) { background: #a8122c; }
.secondary-button, .small-button {
  background: #fffdf7;
  color: var(--ink);
}
.secondary-button:hover:not(:disabled), .small-button:hover { background: var(--yellow); }
.success-button { background: #d8f0dc; color: #14583c; }
.success-button:hover { background: #bbdfc4; }
.danger-button { background: #ffe1d9; color: var(--red-deep); }
.danger-button:hover { background: #ffc9bd; }
.primary-button:hover:not(:disabled), .secondary-button:hover:not(:disabled),
.small-button:hover, .success-button:hover:not(:disabled), .danger-button:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.primary-button:active:not(:disabled), .secondary-button:active:not(:disabled),
.small-button:active, .success-button:active:not(:disabled), .danger-button:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.primary-button:disabled, .secondary-button:disabled, .small-button:disabled,
.success-button:disabled, .danger-button:disabled { opacity: .55; box-shadow: none; }
button:focus-visible, .buzz-button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
}
.round-pill {
  color: var(--ink);
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  font-weight: 900;
}
select, input[type=search], input[type=text], input[type=number], textarea {
  background: white;
  color: var(--ink);
  border: 1.5px solid #ae9c8c;
}
select option { background: white; color: var(--ink); }
.settings-grid input[type=checkbox] { accent-color: var(--red); }
.text-button { color: var(--red-deep); }
.text-button:hover { color: var(--ink); }
.toast {
  background: var(--ink);
  color: white;
  border: 2px solid var(--yellow);
  box-shadow: 5px 5px 0 var(--red-deep);
}

/* Teamhandy: Buzzer wie ein echter Spielknopf. */
.player-heading h1, .host-heading h1 { margin-bottom: 0; }
.host-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.sound-enable { background: var(--yellow); white-space: nowrap; }
.sound-enable.ready { background: #d8f0dc; color: #14583c; }
.player-meta strong {
  color: var(--red-deep);
  font-size: 19px;
}
.player-question {
  background: #fff6d9;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--yellow);
}
.buzz-zone {
  position: relative;
  min-height: 59vh;
  gap: 23px;
}
.state-line { color: var(--ink); }
.result-line { color: var(--muted-ink); }
.buzz-button {
  width: min(72vw, 306px);
  height: min(72vw, 306px);
  border: 10px solid #fff8e8;
  outline: 3px solid var(--ink);
  background: radial-gradient(circle at 35% 27%, #f85065 0%, #da193c 52%, #9b0e28 100%);
  color: white;
  box-shadow: 0 13px 0 #7d1127, 0 16px 0 3px var(--ink), 0 33px 45px #4f253333, inset 0 6px 10px #ffffff66;
  text-shadow: 0 2px 1px #7d1127;
}
.buzz-button:not(:disabled):hover { filter: brightness(1.08); }
.buzz-button:not(:disabled):active {
  transform: translateY(10px);
  box-shadow: 0 3px 0 #7d1127, 0 6px 0 3px var(--ink), 0 16px 25px #4f253333;
}
.buzz-button:disabled {
  opacity: .76;
  filter: grayscale(.7);
  border-color: #f4eddf;
  box-shadow: 0 9px 0 #776b68, 0 12px 0 3px var(--ink), 0 20px 30px #4f253322;
}
.buzz-button.winner {
  filter: none;
  background: radial-gradient(circle at 35% 27%, #79daba, #268669 66%, #155f52);
  box-shadow: 0 9px 0 #155f52, 0 12px 0 3px var(--ink), 0 20px 30px #4f253322;
}

/* Quizleitung: Karten wie auf einem Spieltisch. */
.host-heading h1 { font-size: clamp(42px, 6vw, 68px); }
.night-bar { color: var(--ink); }
.tabs { border-bottom: 2px solid var(--ink); gap: 4px; }
.tab { color: var(--muted-ink); border-bottom-width: 4px; }
.tab:hover { color: var(--red); }
.tab.active { color: var(--red-deep); border-bottom-color: var(--red); }
.status-card, .teams-card, .share-card, .question-card, .quick-questions,
.history-card, .panel-heading, .danger-zone, .settings-grid, .buzz-order {
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 19px;
  box-shadow: 0 5px 0 #e7d9c4;
}
.status-card {
  position: relative;
  overflow: hidden;
  background: #fff1bb;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.status-card::after {
  content: "✳";
  position: absolute;
  right: 18px;
  top: -16px;
  color: #dcb858;
  font-size: 97px;
  line-height: 1;
  pointer-events: none;
}
.status-card > * { position: relative; z-index: 1; }
.status-card .card-label { color: var(--red-deep); }
.status-card p { color: #514b48; }
.status-card.live {
  background: #def2e3;
  border-color: var(--mint);
  box-shadow: 6px 6px 0 var(--mint);
}
.status-card.hit {
  background: #ffe6df;
  border-color: var(--red);
  box-shadow: 6px 6px 0 var(--red);
}
.question-card { border-left: 5px solid var(--red); }
.question-footer { color: var(--muted-ink); }
.question-footer span:last-child { color: #176c50; }
.teams-card { border-top: 5px solid var(--yellow); }
.section-title span {
  background: #fff0bf;
  color: var(--ink);
  font-weight: 800;
}
.rank-row { border-top-color: #e7d9ca; }
.rank-row:first-child { border-top: 0; }
.rank-index { color: var(--red); font-weight: 900; }
.rank-row strong { color: var(--red-deep); }
.teams-card .rank-row:first-child {
  margin: 0 -9px;
  padding: 13px 9px;
  background: #fff0bc;
  border-radius: 9px;
}
.buzz-order { border-left: 5px solid var(--red); }
.buzz-order li { border-top-color: #e7d9ca; }
.buzz-order li.active-buzz { color: var(--red-deep); }
.history-list li { color: var(--ink); border-top-color: #e7d9ca; }
.history-list time { color: var(--muted-ink); }
.share-card { background: #edf5ed; }
.share-card p { color: var(--muted-ink); }
.url-box, .join-code-display { color: var(--red-deep) !important; }
.qr-code {
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--yellow);
}
.question-item, .management-row {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line);
  box-shadow: 0 3px 0 #e9dece;
}
.question-item p { color: var(--muted-ink); }
.question-item .row .danger { color: var(--red-deep); }
.management-row input[type=color] { background: white; border-color: var(--ink); }
.danger-zone { border-left: 5px solid var(--red); }
dialog {
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 9px 9px 0 var(--yellow), 0 30px 100px #20131966;
}
.icon-button { color: var(--ink); }

/* Beamer: dunkle Bühne, helle Schrift und weit sichtbare Ergebnisflächen. */
body.projector {
  color: white;
  background: radial-gradient(circle at 15% -15%, #82263c 0%, transparent 35%), #211923;
}
body.projector .screen-head { color: #fff6e7; }
.screen-brand { border-radius: 6px; transform: rotate(-4deg); }
.screen-question {
  background: #fff8e9;
  color: var(--ink);
  border: 4px solid var(--yellow);
  box-shadow: 10px 10px 0 var(--red);
}
.screen-question .eyebrow { color: var(--red-deep); }
.screen-answer { color: #176c50; font-weight: 900; }
.screen-winner { background: var(--yellow); color: var(--ink); border-radius: 9px; }
.screen-rank { background: #382531; border: 2px solid #a55d6c; color: white; }
.screen-rank .rank-row { border-top-color: #ffffff38; }
.screen-rank .rank-index, .screen-rank .rank-row strong { color: var(--yellow); }
.screen-status { color: #fff2df; }
.screen-status.live { color: var(--yellow); }

@media (max-width: 760px) {
  .topbar { min-height: 76px; padding: 10px 0; }
  .brand-mark { min-width: 50px; height: 43px; }
  .brand-copy small { letter-spacing: .08em; }
  .join-screen { margin-right: 9px; padding: 30px 25px 35px; box-shadow: 8px 8px 0 var(--yellow); }
  .join-screen h1 { font-size: clamp(43px, 11vw, 65px); }
  .host-actions .primary-button { grid-column: 1 / -1; }
  .host-heading-actions { justify-content: flex-start; }
  .tabs { margin-left: -20px; margin-right: -20px; }
}
@media (max-width: 430px) {
  .connection { padding: 8px; }
  .header-actions { gap: 7px; }
  .brand-copy strong { font-size: 15px; }
  .join-screen::before { opacity: .45; right: 6px; }
  .join-screen::after { display: none; }
  .join-screen { margin-left: 0; }
  .host-actions .primary-button { grid-column: 1; }
  .buzz-zone { min-height: 54vh; }
}
@media (prefers-reduced-motion: reduce) {
  .primary-button, .secondary-button, .small-button, .success-button, .danger-button { transition: none; }
}
