* {
  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; }
