@import url("https://fonts.googleapis.com/css2?family=Bangers&family=Inter:wght@500;800;900&display=swap");

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: white;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.35), transparent 28%),
    linear-gradient(135deg, #ff7b00, #ffd000 55%, #ff9f1c);
  overflow: hidden;
}

.game-shell {
  width: min(1100px, 96vw);
  height: 96vh;
  margin: 2vh auto;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 12px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

h1 {
  margin: 0;
  font-family: "Bangers", cursive;
  font-size: clamp(48px, 8vw, 104px);
  letter-spacing: 2px;
  color: white;
  text-shadow:
    5px 5px 0 #000,
    9px 9px 0 #ff006e,
    13px 13px 0 #3a86ff;
}

.tagline {
  margin: 0;
  font-weight: 900;
  color: #1f1300;
}

.score-board {
  min-width: 260px;
  padding: 12px 18px;
  border: 5px solid #000;
  background: white;
  color: #000;
  box-shadow: 8px 8px 0 #000;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 18px;
  transform: rotate(1deg);
}

.score-board strong {
  font-family: "Bangers", cursive;
  font-size: 28px;
  color: #ff006e;
  line-height: 1.05;
  text-align: right;
}

.mode-panel,
.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: 4px solid #000;
  background: white;
  color: #000;
  font-family: "Bangers", cursive;
  font-size: 26px;
  padding: 8px 22px;
  cursor: pointer;
  box-shadow: 5px 5px 0 #000;
  transition: transform 0.12s, background 0.12s;
}

button:hover {
  transform: translate(-2px, -2px);
  background: #3a86ff;
  color: white;
}

button.active {
  background: #ff006e;
  color: white;
}

.game-area {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border: 7px solid #000;
  background:
    linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25)),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.18) 0 18px,
      transparent 18px 36px
    );
  box-shadow: 12px 12px 0 #000;
  overflow: hidden;
}

.lane {
  position: relative;
  border-left: 4px solid rgba(0, 0, 0, 0.45);
  border-right: 4px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.16);
  touch-action: manipulation;
}

.lane.tap-flash {
  background: rgba(58, 134, 255, 0.38);
}

.target {
  position: absolute;
  bottom: 24px;
  left: 50%;
  width: 72px;
  height: 72px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border: 5px solid #000;
  border-radius: 12px;
  background: #fff;
  color: #000;
  font-size: 42px;
  font-weight: 900;
  box-shadow: 5px 5px 0 #000;
}

.note {
  position: absolute;
  top: -90px;
  left: 50%;
  width: 76px;
  height: 76px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border: 5px solid #000;
  border-radius: 14px;
  background: #ff006e;
  color: white;
  font-size: 44px;
  font-weight: 900;
  box-shadow: 6px 6px 0 #000;
}

.note.good {
  background: #06d6a0;
}

.note.bad {
  background: #ef233c;
}

.message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Bangers", cursive;
  font-size: clamp(42px, 8vw, 92px);
  text-align: center;
  color: white;
  text-shadow: 6px 6px 0 #000, 10px 10px 0 #ff006e;
  pointer-events: none;
}

.judgement {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) rotate(-2deg);
  font-family: "Bangers", cursive;
  font-size: clamp(44px, 9vw, 105px);
  color: white;
  text-shadow:
    5px 5px 0 #000,
    9px 9px 0 #ff006e,
    13px 13px 0 #3a86ff;
  pointer-events: none;
  opacity: 0;
  z-index: 20;
}

.judgement.show {
  animation: judgementPop 0.45s ease-out;
}

@keyframes judgementPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-6deg);
  }

  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.16) rotate(2deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -68%) scale(1) rotate(-2deg);
  }
}

.hit-flash {
  animation: flash 0.18s;
}

@keyframes flash {
  50% {
    background: #06d6a0;
    transform: translateX(-50%) scale(1.12);
  }
}

.credit {
  margin: -4px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.75);
  letter-spacing: 0.4px;
}

.egg-btn {
  position: fixed;
  top: 14px;
  left: 14px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  display: none;
  z-index: 999;
}

.egg-btn:hover {
  transform: scale(1.15) rotate(-8deg);
  background: transparent;
}

.egg-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  clip-path: ellipse(42% 49% at 50% 50%);
}

.rickroll-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  display: none;
  z-index: 99999;
}

.rickroll-overlay.show {
  display: block;
}

.rickroll-overlay img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  display: block;
}

@media (max-width: 700px) {
  body {
    overflow: auto;
  }

  .game-shell {
    height: 100vh;
    margin: 0 auto;
    padding: 8px 0;
    gap: 8px;
  }

  .top-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  h1 {
    font-size: 48px;
  }

  .tagline {
    font-size: 13px;
  }

  .score-board {
    width: 100%;
    min-width: 0;
    padding: 8px 12px;
  }

  .score-board strong {
    font-size: 22px;
  }

  .target,
  .note {
    width: 56px;
    height: 56px;
    font-size: 32px;
  }

  button {
    font-size: 22px;
    padding: 7px 16px;
  }

  .message {
    font-size: 42px;
  }
}