:root {
  color-scheme: dark;
  --bg: #160f08;
  --panel: rgba(45, 27, 10, 0.78);
  --panel-strong: rgba(86, 48, 12, 0.9);
  --text: #fff8e7;
  --muted: #f7d794;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-dark: #92400e;
  --danger: #ef4444;
  --green: #22c55e;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(251, 191, 36, 0.24), transparent 34rem),
    radial-gradient(circle at 80% 15%, rgba(239, 68, 68, 0.14), transparent 28rem),
    radial-gradient(circle at 50% 100%, rgba(217, 119, 6, 0.18), transparent 32rem),
    linear-gradient(135deg, #120a04 0%, #301806 45%, #160f08 100%);
  overflow-x: hidden;
}

body.cutscene-open {
  overflow: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.cutscene {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(251, 191, 36, 0.36), transparent 20rem),
    radial-gradient(circle at 86% 24%, rgba(124, 58, 237, 0.28), transparent 22rem),
    rgba(18, 10, 4, 0.88);
  backdrop-filter: blur(18px);
}

.cutscene[hidden] {
  display: none;
}

.cutscene-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.bubble {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(86px, 13vw, 150px);
  height: clamp(86px, 13vw, 150px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 38% 62% 47% 53% / 48% 36% 64% 52%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  font-size: clamp(2.5rem, 7vw, 5rem);
  animation: floaty 5s ease-in-out infinite;
}

.bubble-one {
  left: 7%;
  top: 13%;
  rotate: -16deg;
}

.bubble-two {
  right: 10%;
  top: 18%;
  animation-delay: -1.5s;
  rotate: 12deg;
}

.bubble-three {
  right: 17%;
  bottom: 12%;
  animation-delay: -2.6s;
  rotate: -8deg;
}

.cutscene-card {
  position: relative;
  width: min(720px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: clamp(28px, 5vw, 48px);
  padding: clamp(28px, 6vw, 58px);
  background:
    linear-gradient(145deg, rgba(78, 35, 10, 0.92), rgba(20, 12, 7, 0.96)),
    rgba(0, 0, 0, 0.42);
  box-shadow:
    0 36px 100px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  text-align: center;
  animation: cutscene-pop 520ms cubic-bezier(.2, .9, .2, 1);
}

.cutscene-card::before {
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(251, 191, 36, 0.34);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.locked-cutscene {
  background:
    linear-gradient(145deg, rgba(64, 18, 18, 0.94), rgba(20, 12, 7, 0.97)),
    rgba(0, 0, 0, 0.5);
}

.locked-cutscene .cutscene-kicker {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.cutscene-kicker {
  display: inline-flex;
  margin: 0 0 18px;
  border-radius: 999px;
  padding: 8px 14px;
  color: #2b1605;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cutscene-card h1 {
  margin: 0;
  font-family: "Black Han Sans", Inter, sans-serif;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.95;
  text-shadow: 0 7px 0 rgba(0, 0, 0, 0.26);
}

.cutscene-card p:not(.cutscene-kicker) {
  max-width: 58ch;
  margin: 20px auto 0;
  color: #ffe7bd;
  font-size: 1.08rem;
  line-height: 1.7;
}

.cutscene-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 26px 0;
}

.cutscene-steps span {
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  padding: 10px 13px;
  background: rgba(251, 191, 36, 0.12);
  color: #ffe8b8;
  font-weight: 900;
}

.cutscene-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

@keyframes floaty {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-18px) scale(1.04);
  }
}

@keyframes cutscene-pop {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 38%);
  content: "";
  opacity: 0.55;
  pointer-events: none;
}

.event-closed-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(239, 68, 68, 0.32);
  border-radius: 999px;
  padding: 11px 14px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
  font-weight: 900;
}

.top-nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 14px 16px;
}

.brand {
  color: var(--text);
  font-weight: 900;
  font-size: 1.1rem;
  text-decoration: none;
}

.auth-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.button.discord {
  background: linear-gradient(135deg, #5865f2, #7c3aed);
  box-shadow: 0 14px 32px rgba(88, 101, 242, 0.28);
}

.button.admin-link {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 14px 32px rgba(34, 197, 94, 0.24);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 6px 14px 6px 7px;
  background: rgba(0, 0, 0, 0.22);
  font-weight: 800;
}

.user-pill img,
.avatar-fallback {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: rgba(245, 158, 11, 0.22);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  min-height: 520px;
  padding: clamp(26px, 5vw, 60px);
  overflow: hidden;
}

.hero::after {
  position: absolute;
  right: clamp(18px, 4vw, 52px);
  bottom: clamp(18px, 4vw, 42px);
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(251, 191, 36, 0.13);
  color: #ffe7bd;
  content: "Tagesversuch aktiv · 45 Sekunden Ruhm";
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber-light);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 0.95;
}

h1 {
  max-width: 780px;
  font-family: "Black Han Sans", Impact, sans-serif;
  font-size: clamp(4rem, 10vw, 8.8rem);
  letter-spacing: -0.06em;
  text-transform: uppercase;
  text-shadow: 0 10px 0 rgba(146, 64, 14, 0.75);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.lead {
  max-width: 650px;
  margin: 24px 0 0;
  color: #ffe7b4;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.65;
}

.hero-actions,
.game-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero-actions {
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button.primary {
  background: linear-gradient(135deg, var(--amber-light), var(--amber), #ea580c);
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.34);
}

.button.ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.beer-stage {
  position: relative;
  min-height: 520px;
  filter: drop-shadow(0 30px 70px rgba(251, 191, 36, 0.16));
}

.sun {
  position: absolute;
  top: 14px;
  right: 48px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7ad, #fbbf24 55%, rgba(245, 158, 11, 0.12) 70%);
  filter: blur(0.2px);
}

.keg {
  position: absolute;
  right: 80px;
  bottom: 70px;
  width: 240px;
  height: 300px;
  border: 14px solid #78350f;
  border-radius: 50px;
  background: linear-gradient(90deg, #92400e, #f59e0b 42%, #7c2d12);
  transform: rotate(-8deg);
}

.keg span {
  position: absolute;
  inset: 26px;
  border: 8px solid rgba(255, 248, 231, 0.18);
  border-radius: 38px;
}

.mug {
  position: absolute;
  width: 122px;
  height: 150px;
  border: 7px solid rgba(255, 255, 255, 0.8);
  border-radius: 0 0 26px 26px;
  background: rgba(255, 255, 255, 0.15);
}

.hero-mug {
  right: 16px;
  bottom: 50px;
  transform: rotate(8deg);
}

.foam {
  position: absolute;
  top: -25px;
  left: -8px;
  right: -8px;
  height: 42px;
  border-radius: 999px;
  background: #fff8e7;
  box-shadow: 20px -8px 0 4px #fff8e7, 52px -4px 0 8px #fff8e7;
}

.beer {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 110px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(#fbbf24, #d97706);
}

.handle {
  position: absolute;
  top: 34px;
  right: -45px;
  width: 48px;
  height: 70px;
  border: 8px solid rgba(255, 255, 255, 0.76);
  border-left: 0;
  border-radius: 0 999px 999px 0;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  margin-top: 22px;
}

.admin-panel {
  display: grid;
  gap: 20px;
  margin-top: 22px;
  padding: clamp(20px, 3vw, 30px);
}

.admin-panel[hidden] {
  display: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.admin-tile {
  min-height: 136px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.admin-tile:hover {
  background: rgba(251, 191, 36, 0.14);
  transform: translateY(-2px);
}

.danger-tile {
  border-color: rgba(239, 68, 68, 0.34);
  background: rgba(239, 68, 68, 0.12);
}

.admin-tile strong,
.admin-tile span {
  display: block;
}

.admin-tile strong {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.admin-tile span,
.admin-output {
  color: #f6d8a5;
  line-height: 1.5;
}

.admin-output {
  min-height: 24px;
  margin: 0;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.dashboard-box {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.2);
}

.dashboard-box h3 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.data-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  color: #f6d8a5;
}

.data-row {
  display: grid;
  gap: 4px;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.data-row strong {
  color: var(--text);
}

.data-row span,
.data-row small {
  color: #f6d8a5;
}

.player-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.mini-button {
  border: 0;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--text);
  background: rgba(34, 197, 94, 0.26);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
}

.danger-mini {
  background: rgba(239, 68, 68, 0.32);
}

.cheater-mini {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.42), rgba(250, 204, 21, 0.34));
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.16);
}

.game-card,
.side-card {
  padding: clamp(20px, 3vw, 30px);
}

.game-topbar {
  justify-content: space-between;
  margin-bottom: 18px;
}

.login-gate {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(88, 101, 242, 0.34);
  border-radius: 22px;
  padding: 18px;
  background: rgba(88, 101, 242, 0.14);
}

.login-gate[hidden] {
  display: none;
}

.login-gate strong,
.login-gate span {
  display: block;
}

.login-gate strong {
  font-size: 1.2rem;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.hud div,
.score-box {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 14px 16px;
  background:
    linear-gradient(145deg, rgba(251, 191, 36, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hud span,
.score-box span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hud strong,
.score-box strong {
  display: block;
  margin-top: 3px;
  font-size: 2rem;
}

.game-area {
  position: relative;
  height: min(58vh, 560px);
  min-height: 390px;
  border: 2px solid rgba(251, 191, 36, 0.32);
  border-radius: 26px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 60%),
    #1f1308;
  overflow: hidden;
  outline: none;
}

.game-area::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(251, 191, 36, 0.12), transparent 14rem),
    radial-gradient(circle at 82% 78%, rgba(245, 158, 11, 0.12), transparent 16rem);
  content: "";
  pointer-events: none;
}

.message {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(420px, calc(100% - 34px));
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.45);
  text-align: center;
  transform: translate(-50%, -50%);
}

.message strong,
.message span {
  display: block;
}

.message strong {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.mini-status {
  margin-top: 10px;
  color: var(--amber-light);
  font-weight: 800;
}

.target {
  position: absolute;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 2.4rem;
  cursor: pointer;
  animation: pop 720ms ease both;
  touch-action: manipulation;
}

.target.good {
  box-shadow: 0 0 36px rgba(245, 158, 11, 0.42);
}

.target.bonus {
  background: rgba(251, 191, 36, 0.2);
  box-shadow: 0 0 46px rgba(251, 191, 36, 0.72);
}

.target.bad {
  box-shadow: 0 0 36px rgba(59, 130, 246, 0.36);
}

.target.cat {
  box-shadow: 0 0 36px rgba(239, 68, 68, 0.42);
}

.float-score {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  font-weight: 900;
  animation: floatScore 760ms ease forwards;
}

.float-score.positive {
  color: var(--green);
}

.float-score.negative {
  color: var(--danger);
}

.rules {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 22px 0;
  list-style: none;
}

.rules li {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffe7b4;
}

.note {
  color: #f6d8a5;
  line-height: 1.6;
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(0.45) rotate(-12deg);
  }
  18% {
    opacity: 1;
    transform: scale(1.12) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes floatScore {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-48px) scale(1.3);
  }
}

@media (max-width: 900px) {
  .hero,
  .game-layout,
  .admin-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .beer-stage {
    min-height: 340px;
  }

  .game-area {
    height: 520px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 9px;
  }

  .hero,
  .game-card,
  .side-card {
    border-radius: 22px;
  }

  .hud {
    grid-template-columns: 1fr;
  }

  .top-nav,
  .auth-box {
    align-items: stretch;
    flex-direction: column;
  }

  .top-nav .button,
  .auth-box .button,
  .user-pill {
    width: 100%;
  }

  .target {
    width: 66px;
    height: 66px;
    font-size: 2rem;
  }
}
