* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #090909;
  color: #f5f5f5;
  font-family: Arial, Helvetica, sans-serif;
}

.hero {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;

  background:
    radial-gradient(circle at center, rgba(190, 0, 0, 0.35), transparent 45%),
    linear-gradient(135deg, #050505, #171717 50%, #050505);
}

.hero-overlay {
  padding: 40px 20px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.badge {
  display: inline-block;

  padding: 8px 18px;
  margin-bottom: 25px;

  border: 1px solid #e00000;
  color: #ff2020;

  letter-spacing: 5px;
  font-size: 12px;
  font-weight: bold;
}

h1 {
  margin: 0;

  font-size: clamp(55px, 12vw, 150px);
  line-height: 0.85;

  font-weight: 900;
  letter-spacing: -5px;
}

h1 span {
  color: #e00000;
}

.subtitle {
  max-width: 650px;
  margin: 35px auto;

  color: #aaa;
  font-size: 18px;
  line-height: 1.6;
}

.button {
  display: inline-block;

  padding: 15px 28px;

  border: none;
  background: #e00000;
  color: white;

  font-size: 14px;
  font-weight: bold;

  text-decoration: none;
  cursor: pointer;

  transition: 0.2s;
}

.button:hover {
  background: #ff2222;
  transform: translateY(-3px);
}

.intro {
  max-width: 800px;

  margin: auto;
  padding: 120px 25px;

  text-align: center;
}

.eyebrow {
  color: #e00000;

  font-size: 12px;
  font-weight: bold;

  letter-spacing: 4px;
}

.intro h2,
.game-section h2 {
  font-size: clamp(40px, 7vw, 75px);
  margin: 20px 0;
}

.intro p:not(.eyebrow) {
  color: #aaa;
  font-size: 18px;
  line-height: 1.8;
}


/* GAME */

.game-section {
  padding: 100px 20px;

  text-align: center;

  background:
    linear-gradient(#0c0c0c, #111);
}

.game-section > p:not(.eyebrow) {
  color: #aaa;
}

.scoreboard {
  max-width: 650px;
  margin: 40px auto 20px;

  display: grid;
  grid-template-columns: repeat(3, 1fr);


  gap: 10px;
}

.scoreboard div {
  padding: 18px;

  background: #191919;
  border: 1px solid #292929;
}

.scoreboard span {
  display: block;

  color: #777;
  font-size: 10px;
  letter-spacing: 2px;
}

.scoreboard strong {
  display: block;

  margin-top: 8px;

  color: #fff;
  font-size: 28px;
}


#game {
  position: relative;

  width: min(700px, 100%);
  height: 420px;

  margin: 20px auto 30px;

  overflow: hidden;

  border: 2px solid #292929;

  background:
    radial-gradient(circle at center, #252525, #080808);

  cursor: crosshair;
}


#target {
  position: absolute;
  width: 110px;
  height: 110px;
  cursor: pointer;
  user-select: none;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  touch-action: manipulation; 
  -webkit-tap-highlight-color: transparent;
}

#targetImage {
  width: 110px;
  height: 110px;

  object-fit: cover;
  border-radius: 50%;

  display: block;

  border: none;
 /* border: 3px solid #e00000; */

 /* box-shadow: 0 0 20px rgba(255, 0, 0, 0.5); */
 
  user-select: none;
  -webkit-user-select: none;

  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;

  pointer-events: none;
}


/* Baseballschläger */

#bat {
  position: absolute;

  width: 100px;
  height: auto;

  /*
   * Position des Schlägers relativ zum Gesicht
   */
  right: -15px;
  top: 40px;

  transform-origin: 15% 85%;
  transform: rotate(-65deg);

  opacity: 0;

  pointer-events: none;

  z-index: 10;
}


/* Schlägeranimation */

#target.bonk #bat {
  animation: batSwing 0.4s ease-out;
}

#target.bonk #targetImage {
  animation: targetHit 0.4s ease-out;
}


@keyframes batSwing {

  0% {
    opacity: 0;
    transform: rotate(-100deg);
  }

  20% {
    opacity: 1;
  }

  55% {
    opacity: 1;
    transform: rotate(15deg);
  }

  100% {
    opacity: 0;
    transform: rotate(35deg);
  }
}


@keyframes targetHit {

  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  30% {
    transform: translate(-8px, 3px) rotate(-6deg);
  }

  55% {
    transform: translate(10px, -2px) rotate(7deg);
  }

  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}



#hitMessage {
  position: absolute;

  display: none;

  color: #ff2222;

  font-size: 45px;
  font-weight: 900;

  pointer-events: none;

  transform: rotate(-12deg);
}

.quote {
  padding: 120px 20px;

  text-align: center;

  background: #e00000;
}

.quote h2 {
  margin: 0;

  font-size: clamp(35px, 8vw, 90px);
  font-weight: 900;
}

.quote span {
  font-size: 60px;
}

footer {
  padding: 40px 20px;

  text-align: center;

  color: #666;
  font-size: 12px;
}


@media (max-width: 600px) {

  h1 {
    letter-spacing: -2px;
  }

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

  #game {
    height: 350px;
  }

}

.score-form, .leaderboard {
  width: min(700px, 100%);
  margin: 30px auto;
  text-align: left;
}
.score-form[hidden] { display: none; }
.score-form label { display: block; margin: 12px 0; font-weight: bold; }
.score-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.score-form input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #555;
  background: #191919;
  color: white;
  font: inherit;
}
#scoreStatus, #leaderboardStatus { color: #aaa; }
.leaderboard h3 { color: #e00000; letter-spacing: 3px; }
.leaderboard ol { margin: 0; padding: 0; list-style: none; }
.leaderboard li {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 16px;
  border-bottom: 1px solid #333;
  overflow-wrap: anywhere;
}
.leaderboard li:nth-child(odd) { background: #191919; }


/* Fuck the Dealer: Ergänzungen; gemeinsame Spielanzeigen sind auf #game-section begrenzt. */
/* Kartenspiel */
[hidden] { display: none !important; }
#game-section { padding: 100px 20px; text-align: center; background: linear-gradient(#0c0c0c, #111); }
#game-section > p:not(.eyebrow), .muted { color: #aaa; line-height: 1.7; }
.panel { width: min(700px, 100%); margin: 30px auto; padding: 24px; border: 1px solid #292929; background: #191919; text-align: left; }
.panel label { display: block; font-weight: bold; margin-bottom: 14px; }
.panel textarea { width: 100%; padding: 14px; border: 1px solid #555; background: #090909; color: #fff; font: inherit; line-height: 1.5; resize: vertical; }
#setup-error { color: #ff5555; }
#game-section .scoreboard { width: min(700px, 100%); margin: 40px auto 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#game-section .scoreboard > div { padding: 18px 10px; background: #191919; border: 1px solid #292929; }
#game-section .scoreboard span { display: block; color: #aaa; font-size: 10px; letter-spacing: 2px; }
#game-section .scoreboard strong { display: block; margin-top: 8px; font-size: 24px; overflow-wrap: anywhere; }
.card-table { width: min(700px, 100%); margin: 20px auto 30px; padding: 30px 20px; border: 2px solid #292929; background: radial-gradient(ellipse at center, #252525, #080808); }
.playing-card { display: flex; align-items: center; justify-content: center; width: 150px; height: 210px; margin: 25px auto; border-radius: 12px; background: #f5f5f5; color: #111; border: 5px solid #fff; box-shadow: 0 12px 35px #0008; font-size: 46px; font-weight: 900; }
.card-back { background: repeating-linear-gradient(45deg, #700000, #700000 8px, #900000 8px, #900000 16px); color: white; font-size: 28px; letter-spacing: 2px; }
.card-back span { border: 1px solid #fff8; padding: 18px; }
.red-card { color: #c00000; }
#message { min-height: 3.5em; line-height: 1.7; font-size: 18px; }
.guess-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.guess-button { min-height: 54px; border: 1px solid #555; background: #191919; color: white; font: inherit; font-size: 20px; font-weight: bold; cursor: pointer; }
.guess-button:hover:not(:disabled) { border-color: #ff2222; background: #e00000; }
#game-section button:disabled { opacity: .3; cursor: default; }
:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.secondary { background: #292929; }
.totals h3 { color: #ff2020; letter-spacing: 3px; }
.totals ul { list-style: none; padding: 0; margin: 0; }
.totals li { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid #333; overflow-wrap: anywhere; }
.totals strong { white-space: nowrap; }
.rules summary { cursor: pointer; font-weight: bold; letter-spacing: 2px; }
.rules ol { padding-left: 22px; color: #bbb; line-height: 1.8; }
.rules li { margin: 10px 0; }
.rules a { color: #ff5555; }
@media (max-width: 600px) {
  #game-section { padding: 65px 16px; }
  #game-section h2 { font-size: 36px; }
  #game-section .scoreboard { grid-template-columns: 1fr; }
  #game-section .scoreboard > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  #game-section .scoreboard strong { margin-top: 0; font-size: 22px; }
  .panel { padding: 20px; }
  .guess-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-table { padding: 20px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .button:hover { transform: none; }
}
/* EHC Frauenfeld Custom Deck — eigenes Fan-Design */
.playing-card { position: relative; isolation: isolate; width: 180px; height: 252px; overflow: hidden; flex-direction: column; gap: 14px; border: 2px solid #ddd; border-radius: 14px; background: linear-gradient(145deg, #fff, #e6e6e6); }
.playing-card::before { content: ''; position: absolute; inset: 12px; border: 1px solid #1112; border-radius: 6px; z-index: -1; }
.playing-card::after { content: ''; position: absolute; width: 260px; height: 30px; background: #d00000; transform: rotate(-35deg); z-index: -1; opacity: .12; }
.card-corner { position: absolute; font-size: 22px; line-height: 1; letter-spacing: -1px; }
.card-corner.top { top: 15px; left: 13px; }
.card-corner.bottom { bottom: 15px; right: 13px; transform: rotate(180deg); }
.card-crest { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 112px; height: 132px; padding: 12px 6px 22px; clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%); background: linear-gradient(135deg, #222 0 42%, #be0000 42% 57%, #161616 57%); color: #fff; filter: drop-shadow(0 6px 8px #0006); }
.card-crest span { border: 0; padding: 0; font-size: 10px; letter-spacing: 1.5px; }
.card-crest span:first-child { font-size: 18px; letter-spacing: 5px; }
.card-crest strong { font-size: 43px; line-height: 1.3; }
.card-caption { font-size: 9px; letter-spacing: 2px; }
.card-back { background: repeating-linear-gradient(-35deg, #171717 0 12px, #202020 12px 24px); border-color: #e00000; color: #fff; }
.card-back::before { border-color: #e0000077; }
.card-back::after { opacity: 1; background: #b00000; height: 50px; }
.card-back .card-crest { background: linear-gradient(135deg, #d00000, #730000); border: 0; }
.card-back .card-crest strong { font-size: 32px; }
.card-back .card-caption { font-size: 8px; letter-spacing: 1px; }
.red-card .card-corner { color: #c00000; }
.totals li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 15px; }
.sip-numbers { display: flex; flex-direction: column; text-align: right; gap: 5px; }
.sip-numbers small { color: #aaa; font-size: 11px; }
.drink-button { padding: 11px 14px; font-size: 12px; }
.end-actions { display: flex; flex-wrap: wrap; gap: 12px; }
#end-title, #history-title { color: #ff2020; letter-spacing: 2px; }
.card-history { display: grid; gap: 8px; }
.history-row { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 4px; }
.mini-card { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 52px; border: 1px dashed #555; border-radius: 4px; color: #888; background: #111; font-size: 12px; font-weight: bold; }
.mini-card.seen { background: #f5f5f5; color: #111; border: 1px solid #fff; box-shadow: 0 2px 0 #e00000; }
.mini-card.seen.red-suit { color: #c00000; }
#revealed-count { color: #fff; font-weight: bold; }
@media (max-width: 600px) {
  .totals li { grid-template-columns: minmax(0, 1fr) auto; }
  .drink-button { grid-column: 2; }
  .mini-card { min-height: 44px; font-size: 10px; }
  .history-panel { padding: 16px 10px; }
  .history-row { gap: 2px; }
  .end-actions .button { width: 100%; }
}
/* Street-Art-Deck: Bildmotive für Rückseite, Bube, Dame, König und Ass.
   streetart-deck.png muss neben style.css liegen. */
#game-section .playing-card { width: 190px; height: 340px; border: 2px solid #0c0c0c; border-radius: 10px; background: #eee2c9; box-shadow: 0 15px 35px #000b, 0 0 0 1px #b90000; }
#game-section .playing-card::before, #game-section .playing-card::after { display: none; }
.card-art { position: absolute; inset: 0; background-image: url("streetart-deck.png"); background-repeat: no-repeat; z-index: -1; }
.art-back { background-size: 452.74% 100%; background-position: 0% 0; }
.art-jack { background-size: 520.47% 100%; background-position: 27.34% 0; }
.art-queen { background-size: 519.11% 100%; background-position: 51.16% 0; }
.art-king { background-size: 516.41% 100%; background-position: 75.11% 0; }
.art-ace { background-size: 498.24% 100%; background-position: 100% 0; }
#game-section .card-corner { display: flex; align-items: center; justify-content: center; min-width: 34px; min-height: 50px; padding: 5px 3px; max-width: 40px; background: #fff1d9; border: 1px solid #161616; color: #111; box-shadow: 2px 2px 0 #1117; font-size: 23px; font-weight: 900; line-height: 1.05; overflow-wrap: anywhere; letter-spacing: -1px; }
#game-section .card-corner.top { top: 7px; left: 7px; }
#game-section .card-corner.bottom { bottom: 7px; right: 7px; }
#game-section .red-card .card-corner { color: #b00000; }
.ace-suit { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%); font-size: 60px; line-height: 1; background: #f3e5c8; color: #111; padding: 6px 14px; border: 2px solid #111; box-shadow: 4px 4px 0 #b00000; }
.red-card .ace-suit { color: #b00000; }
#game-section .number-card { background: repeating-linear-gradient(145deg, #1111 0 1px, transparent 1px 5px), radial-gradient(ellipse at 0% 85%, #b0000066, transparent 55%), #efe0c4; border: 5px solid #191919; }
.number-brand { position: absolute; top: 72px; font-size: 10px; font-weight: 900; letter-spacing: 1px; border-top: 2px solid #111; border-bottom: 2px solid #111; padding: 5px 0; }
.card-pips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px 18px; margin-top: 20px; color: #111; font-size: 27px; line-height: 1.1; }
.red-card .card-pips { color: #b00000; }
.number-footer { position: absolute; bottom: 69px; font-size: 8px; font-weight: 900; letter-spacing: .3px; white-space: pre-line; text-align: center; }
