/* -------------------------------
   Global resets & variables
---------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Poetsen One", sans-serif;
  color: #194855;
  overflow: hidden;
}

/* -------------------------------
   Game Layout
---------------------------------- */

.game {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
}

/* Header (Sky area) */

.game-header {
  height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center; /* centers h1 perfectly */
  background: linear-gradient(to bottom, #bde8ff, #8fd2ff);
  font-family: "Poetsen One", sans-serif;
  overflow: hidden; /* optional: avoids content overflow on resize */
}

.game-header h1 {
  position: absolute;
  text-align: center;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%); /* perfectly center */
  margin: 0;
  font-size: 6rem;
  letter-spacing: 2px;
  z-index: 2; /* above the scenery image */
}

.action-btn {
  position: absolute;
  right: 24px; /* give some breathing room */
  top: 24px;
  z-index: 3; /* above everything */
  background: #e1272c;
  color: #fff;
  font-family: "Poetsen One", sans-serif;
  line-height: 40px;
  border: 2px solid #bc171c;
  box-shadow: 0 0 0 4px #fff;
  padding: 10px 40px;
  font-size: 2.5rem;
  border-radius: 1.2rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.action-btn:hover {
  box-shadow: 0 0 0 2px #fff;
  background: #ca1c21;
}

/* Pond section (bottom) */
.pond {
  position: relative;
  height: 55vh;
  width: 100%;
  background: linear-gradient(180deg, #4ce0ee 0%, #05b6fb 100%);
  overflow: hidden;
}

.bubbles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0.45; /* subtle overlay */
  z-index: 2; /* above water, below fish */
}

.fish {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 200px;
  height: auto%;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1; /* ✅ visible by default */
  pointer-events: auto; /* can be clicked */
  user-select: none;
  -webkit-user-drag: none;
  z-index: 3;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

@keyframes fly-out {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-150px) rotate(90deg) scale(1);
    opacity: 0;
  }
}

.fish.caught {
  animation: fly-out 0.5s ease forwards;
}

.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.hidden {
  opacity: 0;
  pointer-events: none;
}

.game-header {
  position: relative;
  height: 45vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 5vw;
  background: linear-gradient(180deg, #96dbf4 0%, #fff 100%);
}

.game-header .scenery {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
  z-index: 1;
}

/* HUD over the pond (top-left) */
.hud {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  gap: 24px;
  z-index: 4; /* above bubbles & fish */
}

.fish-small {
  width: 40px;
  height: auto;
}

/* pill look for each item */
.hud .timer,
.hud .score {
  display: flex;
  color: #0582af;
  align-items: center;
  font-size: 2rem;
  gap: 8px;
  padding: 8px 20px;
  background: #e8f9ff;
  border: 4px solid #0582af;
  border-radius: 1.2rem;
  font-weight: 700;
}
