@import url('https://fonts.googleapis.com/css2?family=Lilita+One&display=swap');
* {
  box-sizing: border-box;
}

:root {
  --ink: #28566d;
  --muted: #7894a3;
  --line: rgba(91, 153, 181, 0.18);
  --sea-1: #eefcff;
  --sea-2: #e3f7fb;
  --sea-3: #f9fdff;
  --button: rgba(255, 255, 255, 0.86);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  background:
  radial-gradient(
    circle at 12% 8%,
    rgba(255, 244, 194, 0.72) 0%,
    rgba(255, 244, 194, 0) 28%
  ),
  radial-gradient(
    circle at 88% 18%,
    rgba(191, 240, 255, 0.85) 0%,
    rgba(191, 240, 255, 0) 34%
  ),
  linear-gradient(
    180deg,
    #e9fbff 0%,
    #d9f6fb 45%,
    #eefcff 100%
  );
  color: var(--ink);
}

button {
  font: inherit;
}

.app {
  width: min(94vw, 470px);
  margin: 0 auto;
  padding: 20px 0 42px;
}

.topbar {

  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 12px;
}
 .brand h1 {
  margin: 0;
font-family: "Cooper Black", "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
font-size: 34px;
line-height: 1;
font-weight: 900;
letter-spacing: -1.8px;
white-space: nowrap;
transform: none;

 background: linear-gradient(
  90deg,
  #0796d8 0%,
  #0f8fd8 38%,
  #2563eb 68%,
  #7c3aed 86%,
  #c23fd1 100%
);

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
-webkit-text-stroke: 1px rgba(255, 255, 255, 0.96);

  filter:
    drop-shadow(0 2px 0 rgba(255, 255, 255, 0.95))
    drop-shadow(0 5px 7px rgba(57, 138, 211, 0.22));
}
 .logo-ocean {
  display: inline-block;
  transform: none;
  vertical-align: baseline;
}

.logo-2048 {
  display: inline-block;
  margin-left: 4px;
transform: none;
  vertical-align: baseline;
}
.brand p {
  margin: 5px 0 0;
  font-size: 10px;
  letter-spacing: 2.2px;
  color: #5f8fa3;
  font-weight: 600;
}

.scores {
  display: flex;
  gap: 7px;
}

.score-box {
  min-width: 78px;
  padding: 9px 12px;
  text-align: center;

  background: linear-gradient(
    180deg,
    rgba(255, 253, 246, 0.96) 0%,
    rgba(255, 255, 255, 0.88) 100%
  );

  border: 1px solid rgba(114, 190, 220, 0.20);
  border-radius: 22px;

  box-shadow:
    0 5px 14px rgba(54, 151, 190, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.score-box span {
  display: block;
  font-size: 10px;
  color: #1596c7;
  font-weight: 700;
}
.score-box strong {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  color: #0d4f9e;
  font-weight: 800;
}

.mission-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;

  margin-bottom: 12px;
  padding: 12px 16px;

  background: linear-gradient(
    180deg,
    rgba(255, 253, 248, 0.97) 0%,
    rgba(255, 255, 255, 0.90) 100%
  );

  border: 1px solid rgba(118, 193, 221, 0.22);
  border-radius: 24px;

  box-shadow:
    0 5px 14px rgba(45, 145, 190, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
 

.mission-card strong {
  display: block;
  margin-top: 2px;
  font-family: "Cooper Black", "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #174f8a;
}

.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 1.4px;
 color: #d98278;
  font-weight: 800;
}

.rescue-count {
  flex: 0 0 auto;
  padding: 8px 13px;

  border-radius: 999px;

  background: linear-gradient(
    180deg,
    #eef5ff 0%,
    #ddd8ff 100%
  );

  border: 1px solid rgba(150, 145, 230, 0.22);

  color: #174f8a;
  font-size: 12px;
  font-weight: 800;

  box-shadow:
  0 4px 12px rgba(95, 125, 200, 0.14),
  inset 0 2px 0 rgba(255, 255, 255, 0.95);
}

.game-area {
  padding: 9px;
  border-radius: 28px;
  background: linear-gradient(
    180deg,
    rgba(191, 235, 246, 0.50),
    rgba(232, 249, 253, 0.78)
  );
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 9px;

  background:
    linear-gradient(
      180deg,
      rgba(216, 242, 250, 0.48),
      rgba(156, 213, 235, 0.26)
    );

  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    0 10px 28px rgba(32, 105, 155, 0.15);

  backdrop-filter: blur(8px);

  touch-action: none;
  user-select: none;
}


.cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
  linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.90),
    rgba(176, 220, 238, 0.72)
  );

border: 2px solid rgba(76, 150, 184, 0.42);

box-shadow:
  inset 0 1px 0 rgba(255, 255, 255, 0.95),
  0 3px 8px rgba(43, 111, 151, 0.16);

  overflow: hidden;
}
.cell:nth-child(1),
.cell:nth-child(6),
.cell:nth-child(9),
.cell:nth-child(15) {
  background: linear-gradient(
    145deg,
    rgba(243, 255, 251, 0.98),
    rgba(198, 245, 230, 0.82)
  );
}

.cell:nth-child(2),
.cell:nth-child(5),
.cell:nth-child(8),
.cell:nth-child(10),
.cell:nth-child(14) {
  background: linear-gradient(
    145deg,
    rgba(250, 247, 255, 0.98),
    rgba(220, 211, 255, 0.82)
  );
}

.cell:nth-child(3),
.cell:nth-child(11),
.cell:nth-child(13) {
  background: linear-gradient(
    145deg,
    rgba(255, 251, 239, 0.98),
    rgba(255, 226, 165, 0.78)
  );
}

.cell:nth-child(4),
.cell:nth-child(7),
.cell:nth-child(12),
.cell:nth-child(16) {
  background: linear-gradient(
    145deg,
    rgba(244, 252, 255, 0.98),
    rgba(189, 232, 255, 0.82)
  );
}
.cell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  background:
    radial-gradient(
      circle at 18% 16%,
      rgba(255, 255, 255, 0.78) 0 5%,
      transparent 6%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18),
      transparent 45%
    );

  opacity: 0.75;
}
.cell.rescue-target {
  cursor: pointer;
  outline: 3px solid rgba(85, 196, 228, 0.75);
  background: rgba(218, 250, 255, 0.78);
}

.creature {
  width: 98%;
  height: 98%;
  object-fit: contain;
  display: block;
}
.creature[src*="clownfish"] {
  width: 108%;
  height: 108%;
}
.creature[src*="shell"] {
  width: 94%;
  height: 94%;
}
.ultimate-creature {
  width: 100%;
  height: 100%;
}
.fallback {
  font-size: 34px;
  color: #8eb8c8;
  font-weight: bold;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 11px;
}

.buttons button {
  min-height: 50px;
  padding: 9px 8px;

  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 22px;

  color: #164f87;
  font-size: 14px;
  font-weight: 700;

  box-shadow:
    0 5px 12px rgba(55, 135, 180, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);

  cursor: pointer;
}
#undoBtn {
  background: linear-gradient(
    180deg,
    #fff8d9 0%,
    #ffe69a 100%
  );
  color: #87551f;
}

#rescueBtn {
  background: linear-gradient(
    180deg,
    #f7eaff 0%,
    #e7c8ff 100%
  );
  color: #4c4c9d;
}

#newGameBtn {
  background: linear-gradient(
    180deg,
    #e4fff5 0%,
    #baf4df 100%
  );
  color: #175a70;
}
.buttons button.active {
  background: #d9f7ff;
  border-color: rgba(62, 172, 208, 0.5);
}

.buttons button:active {
  transform: scale(0.98);
}

#message {
  min-height: 21px;
  margin: 9px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
 color: #2d708e;
}
.combo-message {
  min-height: 24px;
  margin-top: 4px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: #2d708e;
  animation: comboPop 0.35s ease-out;
}
@keyframes comboPop {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }

  70% {
    opacity: 1;
    transform: scale(1.12);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.collection {
  margin-top: 16px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.collection h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #176f94;
}

.section-heading span {
  max-width: 210px;
  text-align: right;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: #8aa5b2;
}

#collection {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.collection-count {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 10px 14px;
  margin-bottom: 6px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #356f82;
  background: rgba(255, 255, 255, 0.65);
}
.collection-progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  overflow: hidden;

  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(91, 165, 193, 0.22);
  box-shadow:
    inset 0 1px 2px rgba(45, 115, 150, 0.10);
}

.collection-progress-fill {
  height: 100%;
  border-radius: inherit;

  background: linear-gradient(
    90deg,
    #8ee8f5,
    #5fc9e8,
    #74bdf4
  );

  transition: width 0.35s ease;
}
.friend {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 4px;
  border-radius: 16px;

  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.78),
    rgba(220, 244, 250, 0.42)
  );

  border: 1px solid rgba(91, 165, 193, 0.22);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 3px 8px rgba(45, 115, 150, 0.08);

  overflow: hidden;
}

.friend img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.friend.locked {
  opacity: 0.34;
  filter: grayscale(1) brightness(1.08);
  transform: scale(0.94);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(40, 82, 101, 0.22);
  backdrop-filter: blur(7px);
  animation: discoveryFadeIn 0.25s ease-out;
}

.hidden {
  display: none;
}

.modal {
  width: min(92vw, 360px);
  padding: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  box-shadow: 0 20px 60px rgba(45, 100, 125, 0.18);
  animation: discoveryPopIn 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.modal-art {
  width: 150px;
  height: 150px;
  margin: 0 auto 4px;
  display: grid;
  place-items: center;
  animation: discoveryArtFloat 0.55s ease-out;
}

.modal-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal h2 {
  margin: 5px 0 6px;
  font-size: 27px;
  color: #2d708e;
}

.modal p {
  margin: 0 0 13px;
  font-size: 13px;
  line-height: 1.45;
  color: #6d8d9e;
}

.modal button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  background: #78c9e0;
  color: white;
  font-weight: bold;
  cursor: pointer;
}
@keyframes discoveryFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes discoveryPopIn {
  from {
    opacity: 0;
    transform: scale(0.82) translateY(18px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes discoveryArtFloat {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(14px);
  }

  70% {
    transform: scale(1.08) translateY(-4px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@media (max-width: 480px) {
  .app {
    width: 95vw;
    padding-top: 13px;
  }

  .brand h1 {
  font-size: 24px;
  white-space: nowrap;
}

  .score-box {
    min-width: 68px;
    padding-inline: 7px;
  }

  .board {
    gap: 6px;
    padding: 6px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading span {
    max-width: none;
    text-align: left;
  }
}
/* ===== FINAL 65536 UNLOCK ===== */

.final-unlock { animation: oceanDarken 0.7s ease-out both;
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at center,
      rgba(158, 231, 255, 0.30),
      rgba(38, 78, 120, 0.42) 42%,
      rgba(12, 31, 54, 0.72) 100%);
  backdrop-filter: blur(8px);
}

.final-unlock.hidden {
  display: none;
}

.final-card {animation: finalCardReveal 0.8s ease-out 0.65s both;
  position: relative;
  width: min(92vw, 430px);
  padding: 28px 24px 24px;
  overflow: hidden;
  text-align: center;
  border-radius: 32px;
  background:
    linear-gradient(
      180deg,
      rgba(245, 253, 255, 0.97),
      rgba(226, 244, 255, 0.94)
    );
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 24px 70px rgba(12, 52, 82, 0.34),
    inset 0 0 35px rgba(125, 221, 255, 0.22);
}

.final-glow {
  position: absolute;
  width: 290px;
  height: 290px;
  left: 50%;
  top: 125px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      rgba(255, 242, 177, 0.75) 0%,
      rgba(117, 218, 255, 0.35) 38%,
      rgba(184, 164, 255, 0.16) 60%,
      transparent 74%
    );
  filter: blur(8px);
  animation: finalGlow 2.4s ease-in-out infinite;
}

.final-dragon {
  position: relative;
  z-index: 2;
  width: 92%;
  max-height: 310px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
  animation: dragonReveal 1.4s cubic-bezier(.18,.9,.25,1.15);
  filter: drop-shadow(0 16px 20px rgba(37, 115, 167, 0.22));
}

.final-small {
  position: relative;
  z-index: 2;
  margin: 4px 0 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #6999ad;
}

.final-card h2 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 36px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -1.8px;

  white-space: nowrap;

  margin: 8px -20px 14px;

  background: linear-gradient(
    90deg,
    #173b9b 0%,
    #087fc9 43%,
    #326bd0 68%,
    #6740c8 100%
  );

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  text-align: center;
}
.final-card h2::after {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 28px;
  color: #286b8d;
}

.final-message {
  position: relative;
  z-index: 2;
  margin: 9px 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #6b8795;
}

#continueExploring {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 17px;
  font-size: 15px;
  font-weight: 800;
  color: white;
  cursor: pointer;
  background:
    linear-gradient(
      135deg,
      #55b7d8,
      #5185c8
    );
  box-shadow: 0 10px 24px rgba(57, 128, 174, 0.25);
}

#continueExploring:active {
  transform: scale(.98);
}

@keyframes dragonReveal {
  0% {
    opacity: 0;
    transform: scale(.45) translateY(45px);
    filter: blur(10px);
  }

  55% {
    opacity: 1;
    transform: scale(1.07) translateY(-8px);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes finalGlow {
  0%, 100% {
    transform: translate(-50%, -50%) scale(.92);
    opacity: .6;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 1;
  }
}
@keyframes oceanDarken {
  0% {
    background: rgba(12, 31, 54, 0);
    backdrop-filter: blur(0px);
  }

  100% {
    background: rgba(12, 31, 54, 0.76);
    backdrop-filter: blur(8px);
  }
}

@keyframes finalCardReveal {
  0% {
    opacity: 0;
    transform: scale(0.82) translateY(25px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.final-unlock .final-card {
  opacity: 0;
  transform: scale(0.82) translateY(25px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.final-unlock.reveal .final-card {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.final-particle {
  position: absolute;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
}

.final-unlock.reveal .final-particle {
  opacity: 1;
}

/* stars */
.star {
  color: #ffe9a8;
  font-size: 28px;
  text-shadow:
    0 0 10px rgba(255, 238, 170, 0.9),
    0 0 20px rgba(105, 205, 255, 0.55);
  animation: starFloat 2.6s ease-in-out infinite;
}

.star-1 {
  left: 22%;
  top: 27%;
  animation-delay: 0s;
}

.star-2 {
  right: 20%;
  top: 32%;
  animation-delay: .45s;
}

.star-3 {
  left: 28%;
  bottom: 22%;
  animation-delay: .9s;
}

/* bubbles */
.bubble {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(220, 248, 255, 0.95);
  background:
    radial-gradient(
      circle at 30% 25%,
      rgba(255,255,255,.95),
      rgba(142,225,255,.35) 35%,
      rgba(187,154,255,.22) 65%,
      transparent 75%
    );
  box-shadow: 0 0 14px rgba(120, 220, 255, .45);
  animation: bubbleRise 3.4s ease-in-out infinite;
}

.bubble-1 {
  left: 18%;
  bottom: 18%;
}

.bubble-2 {
  right: 17%;
  bottom: 26%;
  width: 17px;
  height: 17px;
  animation-delay: .8s;
}

.bubble-3 {
  right: 27%;
  top: 19%;
  width: 13px;
  height: 13px;
  animation-delay: 1.4s;
}

@keyframes starFloat {
  0%, 100% {
    transform: translateY(0) scale(.8) rotate(0deg);
    opacity: .45;
  }

  50% {
    transform: translateY(-18px) scale(1.25) rotate(20deg);
    opacity: 1;
  }
}

@keyframes bubbleRise {
  0% {
    transform: translateY(18px) scale(.75);
    opacity: 0;
  }

  25% {
    opacity: .9;
  }

  100% {
    transform: translateY(-80px) scale(1.1);
    opacity: 0;
  }
}
.final-unlock::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background:
    radial-gradient(circle at 18% 28%,
      rgba(255, 235, 155, .95) 0 2px,
      transparent 4px),

    radial-gradient(circle at 78% 24%,
      rgba(176, 231, 255, .95) 0 3px,
      transparent 5px),

    radial-gradient(circle at 25% 72%,
      rgba(255, 255, 255, .9) 0 2px,
      transparent 4px),

    radial-gradient(circle at 82% 68%,
      rgba(194, 171, 255, .9) 0 3px,
      transparent 6px),

    radial-gradient(circle at 66% 38%,
      rgba(255, 231, 151, .9) 0 2px,
      transparent 4px),

    radial-gradient(circle at 34% 40%,
      rgba(160, 226, 255, .9) 0 2px,
      transparent 5px);

  opacity: 0;
  animation: secretSparkles 2.2s ease-in-out 0.7s infinite;
}

@keyframes secretSparkles {
  0%, 100% {
    opacity: .25;
    transform: scale(.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}
/* ===== SECRET OCEAN TYPOGRAPHY ===== */

.final-small {
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
}




/* Description stays clean */
.final-message {
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

/* Elegant button text */
#continueExploring {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .3px;
}
/* ===== SECRET OCEAN TYPOGRAPHY ===== */

.final-small {
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* Main rare-character name */
.final-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -1px;
  margin: 8px 0 10px;

  background: linear-gradient(
    90deg,
    #164c9b,
    #168bd1,
    #5944c6
  );

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Description stays clean */
.final-message {
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

/* Elegant button text */
#continueExploring {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .3px;
}
/* ===== FINAL REFERENCE CARD STYLE ===== */

.final-small {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4.2px;
  text-transform: uppercase;
  color: #276f98;
  margin: 8px 0 10px;
  position: relative;
}

.final-small::before,
.final-small::after {
  content: "✦";
  color: #d8aa49;
  font-size: 10px;
  margin: 0 10px;
}

/* Main fantasy title */
.final-card h2 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 38px;
  line-height: 0.9;
  font-weight: 600;
  font-style: normal;
  letter-spacing: -1.5px;
  margin: 8px 0 14px;
white-space: nowrap;
  background: linear-gradient(
    90deg,
    #173e91 0%,
    #127fd0 42%,
    #3a77d5 65%,
    #7042c6 100%
  );

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  text-shadow:
    0 2px 10px rgba(90, 128, 210, 0.08);
}

/* Decorative mark below title */
.final-card h2::after {
  content: "✦";
  display: block;
  font-family: Georgia, serif;
  font-size: 10px;
  color: #d8aa49;
  margin-top: 13px;
}

/* Description */
.final-message {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
  color: #496a86;
  margin: 6px 0 20px;
}


.final-message::before,
.final-message::after {
  content: "⌁";
  color: #4387bc;
  font-size: 16px;
  margin: 0 7px;
}

/* Premium button */
#continueExploring {
  position: relative;
  width: 100%;
  min-height: 58px;
  border-radius: 30px;

 border: 2px solid #e8c76f;
color: #ffffff;

box-shadow:
  0 0 0 1px rgba(255,255,255,0.55) inset,
  0 7px 20px rgba(25,93,160,0.28),
  0 0 16px rgba(225,189,98,0.18);
  background:
    linear-gradient(
      110deg,
      #119ac9 0%,
      #1685d6 50%,
      #5148db 100%
    );

  color: white;

  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 23px;
  font-weight: 600;

  box-shadow:
    0 0 0 2px rgba(255,255,255,.85) inset,
    0 5px 15px rgba(25, 93, 160, .25),
    0 0 18px rgba(225, 189, 98, .2);
}

#continueExploring::before {
  content: "✦";
  margin-right: 12px;
  color: #ffe2a0;
}

#continueExploring::after {
  content: "✦";
  margin-left: 12px;
  color: #ffe2a0;
}

#continueExploring:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 2px rgba(255,255,255,.9) inset,
    0 7px 20px rgba(25, 93, 160, .32),
    0 0 22px rgba(225, 189, 98, .3);
}
/* ===== FINAL TITLE POLISH ===== */

#finalUnlock .final-card h2 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 40px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -1.3px;
  white-space: nowrap;

  margin: 10px -10px 16px;
  text-align: center;

  background: linear-gradient(
  90deg,
  #0b3f91 0%,
  #006fc4 38%,
  #2454c5 68%,
  #5428b8 100%
);

-webkit-background-clip: text;
background-clip: text;
color: transparent;

text-shadow:
  0 1px 0 rgba(255, 255, 255, 0.35),
  0 2px 4px rgba(20, 60, 130, 0.20);

-webkit-text-stroke: 0;
}

/* 金色装饰线 */
#finalUnlock .final-card h2::before,
#finalUnlock .final-card h2::after {
  content: "✦";
  display: inline-block;
  vertical-align: middle;
  color: #d8aa49;
  font-size: 10px;
  margin: 0 10px;
  background: none;
  -webkit-text-fill-color: #d8aa49;
}
/* ===== HOME SCREEN ===== */

.home-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(82, 190, 230, 0.30),
      rgba(17, 65, 105, 0.88) 48%,
      rgba(7, 28, 52, 0.97) 100%
    );
}

.home-card {
  position: relative;
  width: min(92vw, 430px);

  text-align: center;
padding: 0;

  border-radius: 34px;

  background:
    linear-gradient(
      180deg,
      rgba(246, 253, 255, 0.96),
      rgba(221, 244, 252, 0.94)
    );

  border: 1px solid rgba(255, 255, 255, 0.9);

  box-shadow:
    0 22px 60px rgba(0, 25, 55, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.home-kicker {
  margin: 0 0 6px;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;

  color: #4e91ad;
}

.home-card h1 {
  margin: 0;

  font-size: 36px;
  line-height: 1;

  color: #176d91;
}

.home-subtitle {
  margin: 10px 0 12px;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;

  color: #7899a8;
}

.home-mascot {
  display: block;

  width: 100%;
max-width: 430px;
height: auto;

  margin: 2px auto 6px;

  object-fit: contain;
}

.play-btn {
  width: 100%;
  min-height: 58px;

  border-radius: 30px;
  border: 2px solid #e8c76f;

  background:
    linear-gradient(
      110deg,
      #0ca5d4 0%,
      #176bd8 55%,
      #6735dc 100%
    );

  color: white;

  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;

  cursor: pointer;

  box-shadow:
    0 8px 22px rgba(20, 92, 170, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.play-btn:active {
  transform: scale(0.98);
}
.cover-hotspot {
  position: absolute;
  background: transparent;
  border: 0;
  color: transparent;
  box-shadow: none;
  z-index: 10;
font-size: 20px !important;
 background: transparent !important;
 min-height: 0 !important;
padding: 0 !important;
border-radius: 0 !important;
opacity: 0.001;
appearance: none !important;
-webkit-appearance: none !important;
outline: none !important;
filter: none !important;
}
.play-hotspot {
 
  left: 14%;
top: 68%;
width: 72%;
height: 9%;
opacity: 1 !important;
color: white !important;
font-weight: 700 !important;
}
.home-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
 
  margin-top: 12px;
}

.home-links button {
  min-height: 46px;

  border-radius: 18px;
  border: 1px solid rgba(79, 151, 184, 0.22);

  background: rgba(255, 255, 255, 0.68);

  color: #356f89;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;
}
.collection-hotspot {
  left: 12%;
  top: 74%;
  width: 36%;
  height: 14%;
background: transparent;
z-index: 20;
}
.daily-hotspot {
  left: 52%;
  top: 74%;
  width: 36%;
  height: 14%;
  background: transparent;
  z-index: 20;
}
/* Daily Quest modal must stay above home screen */
#dailyQuestModal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

#dailyQuestModal.hidden {
  display: none;
}
#dailyQuestReward:not(.hidden) {
  animation: questRewardPop 1.2s ease-out;
}

@keyframes questRewardPop {
  0% {
    opacity: 0;
    transform: scale(0.75);
  }

  60% {
    transform: scale(1.08);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}
 #dailyQuestModal .modal {
  width: min(88vw, 420px);
  padding: 30px 26px 26px;
  border-radius: 30px;

  background:
    linear-gradient(
      160deg,
      rgba(245, 253, 255, 0.97),
      rgba(222, 244, 255, 0.96)
    );

  border: 2px solid rgba(255, 255, 255, 0.9);

  box-shadow:
    0 24px 60px rgba(0, 55, 110, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 1);

  text-align: center;
} 
  
.collection-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  margin: 12px 0 8px;
border: 2px solid rgba(255, 255, 255, 0.8);
box-shadow:
  0 7px 18px rgba(52, 120, 190, 0.25),
  inset 0 2px 2px rgba(255, 255, 255, 0.45);
  border-radius: 999px;
background: linear-gradient(135deg, #32d5e7, #4c8cff, #b65cff);
color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;


}
@media (max-width: 480px) {
  .collection-back {
   width: 42%;
   display: flex;
margin-left: auto;
margin-right: auto;
    margin-top: 14px;
  }
}
.collection {
  display: none;
}
.quest-progress-bar {
  width: 100%;
  height: 16px;
  margin: 12px 0 18px;
  border-radius: 999px;
  overflow: hidden;

  background: rgba(120, 185, 220, 0.22);
  box-shadow:
    inset 0 2px 6px rgba(20, 80, 130, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.75);
}

.quest-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;

  background: linear-gradient(
    90deg,
    #19d7e8 0%,
    #3f83ff 48%,
    #b45cff 75%,
    #ff69c9 100%
  );

  box-shadow: 0 0 14px rgba(95, 157, 255, 0.65);
  transition: width 0.8s ease;
}
.quest-card {
  position: relative;
  width: min(92vw, 620px);
  padding: 34px 30px 28px;
  border-radius: 34px;

  background:
    linear-gradient(
      180deg,
      rgba(52, 190, 255, 0.96),
      rgba(29, 137, 230, 0.96)
    );

  border: 3px solid rgba(255, 255, 255, 0.78);

  box-shadow:
    0 24px 60px rgba(0, 67, 140, 0.38),
    inset 0 2px 0 rgba(255, 255, 255, 0.75);

  color: white;
  text-align: center;
  overflow: hidden;
}
.quest-dolphin {
  width: 150px;
  height: 150px;
  object-fit: contain;
  flex-shrink: 0;
}

.quest-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
#dailyQuestModal .quest-card {
  position: relative;
  width: min(92vw, 620px);
  padding: 42px 30px 30px;
  border-radius: 34px;

  background: linear-gradient(
    180deg,
    #35c9ff 0%,
    #208ee8 55%,
    #176acb 100%
  );

  border: 3px solid rgba(255, 255, 255, 0.85);

  box-shadow:
    0 25px 60px rgba(0, 65, 140, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);

  color: white;
  overflow: hidden;
}

#dailyQuestModal .quest-close {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 48px;
  height: 48px;
  min-height: 0;
  padding: 0;

  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);

  background: linear-gradient(135deg, #63dcff, #347cff);
  color: white;

  font-size: 24px;
  font-weight: 800;
  line-height: 1;

  box-shadow:
    0 6px 14px rgba(0, 76, 170, 0.3),
    inset 0 2px 2px rgba(255,255,255,0.45);
}

#dailyQuestModal .quest-title-board {
  display: inline-block;
  margin: 0 auto 18px;
  padding: 10px 28px;

  border-radius: 22px;

  background: linear-gradient(180deg, #ffe4a8, #eeb968);
  border: 2px solid rgba(255,255,255,0.7);

  color: #92521f;
  font-size: 24px;
  font-weight: 800;

  box-shadow: 0 7px 16px rgba(91, 54, 12, 0.18);
}
#dailyQuestModal .quest-hero {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 18px;
  margin: 8px 0 20px;
  text-align: left;
}

#dailyQuestModal .quest-hero h2 {
  margin: 0 0 8px;
  color: white;
  font-size: 40px;
  line-height: 1.05;
  text-shadow: 0 4px 10px rgba(0, 74, 150, 0.28);
}

#dailyQuestModal .quest-subtitle {
  margin: 0;
  color: rgba(255,255,255,0.92);
  font-size: 18px;
  font-weight: 700;
}

#dailyQuestModal .quest-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 6px 10px;
  color: white;
  font-size: 18px;
  font-weight: 800;
}
.daily-quest-complete-image {
  display: none;
}

#dailyQuestModal .quest-card.show-complete-image {
  padding: 0;
 width: min(88vw, 620px);
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

#dailyQuestModal .quest-card.show-complete-image
> *:not(.daily-quest-complete-image):not(.complete-close-hotspot):not(.complete-awesome-hotspot) {
  display: none !important;
}
#dailyQuestModal .quest-card.show-complete-image .daily-quest-complete-image {
  max-height: 88vh;
object-fit: contain;
display: block !important;
  width: 100%;
  height: auto;
  border-radius: 28px;
}#dailyQuestModal .complete-close-hotspot {
  position: absolute;
  top: 5%;
  right: 7%;
  width: 12%;
  height: 12%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 20;
}

#dailyQuestModal .complete-awesome-hotspot {
  position: absolute;
  left: 27%;
  bottom: 10%;
  width: 46%;
  height: 11%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 20;
}
#dailyQuestModal .complete-close-hotspot {
  position: absolute;
  top: 5%;
  right: 7%;
  width: 12%;
  height: 12%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 20;
}

#dailyQuestModal .complete-awesome-hotspot {
  position: absolute;
  left: 27%;
  bottom: 10%;
  width: 46%;
  height: 11%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 20;
}


#dailyQuestModal .quest-card:not(.show-complete-image) {
  padding: 0;
  width: min(88vw, 620px);
  background: transparent;
  border: none;
  box-shadow: none;
overflow: visible;
}

#dailyQuestModal .quest-card:not(.show-complete-image)
> *:not(.daily-quest-progress-image):not(.live-quest-progress):not(.complete-close-hotspot):not(.complete-awesome-hotspot) {
  display: none !important;
}

#dailyQuestModal .quest-card:not(.show-complete-image) .daily-quest-progress-image {
  display: block !important;
  width: 100%;
  height: auto;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 28px;
}
#dailyQuestModal .live-quest-progress {
  position: absolute;
  left: 22%;
top: 43.5%;
width: 49.5%;
  z-index: 30;
  pointer-events: none;
}

#dailyQuestModal .live-quest-progress-text {
  position: absolute;
  right: -11%;
  top: -32px;

  color: #0a5fb8;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
font-size: 27px;
font-weight: 900;
letter-spacing: -1.5px;

transform: scaleX(0.80) scaleY(1.12);
transform-origin: right center;

 -webkit-text-stroke: 1.4px rgba(255, 255, 255, 0.95);

  text-shadow:
    0 2px 0 #ffffff,
    0 3px 0 #0b4f9c,
    0 4px 8px rgba(0, 65, 135, 0.28);
  
}


 #dailyQuestModal .live-quest-slots {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  width: 100%;
}

#dailyQuestModal .live-quest-slot {
  height: 18px;
border-radius: 6px;
  background: transparent;
}


#dailyQuestModal .live-quest-slot.filled {

  background: linear-gradient(
    180deg,
    #65edff 0%,
    #10c8ef 45%,
    #039bd5 100%
  );

  box-shadow:
    inset 0 2px 3px rgba(255,255,255,0.8),
    0 0 10px rgba(52,220,255,0.9);
}
    */
  #dailyQuestModal .live-quest-progress {
  position: absolute;
  left: 21.5%;
  top: 43.8%;
  width: 59%;
  z-index: 30;
  pointer-events: none;
}
#dailyQuestModal .live-quest-progress-text {
  display: none;
  position: absolute;
  right: -7%;
  top: -30px;

  color: #0a5fb8;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -1.5px;

  transform: scaleX(0.80) scaleY(1.12);
  transform-origin: right center;

  -webkit-text-stroke: 1.4px rgba(255,255,255,0.95);

  text-shadow:
    0 2px 0 #ffffff,
    0 3px 0 #0b4f9c,
    0 4px 8px rgba(0,65,135,0.28);
}

#dailyQuestModal .live-quest-slots {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  width: 100%;
}

#dailyQuestModal .live-quest-slot {
  height: 34px;
  border-radius: 11px;

  background: rgba(255,255,255,0.16);
  border: 2px solid rgba(255,255,255,0.9);

  box-shadow:
    inset 0 2px 3px rgba(255,255,255,0.35),
    0 2px 5px rgba(0,90,150,0.18);
}

#dailyQuestModal .live-quest-slot.filled {
  background: linear-gradient(
    180deg,
    #6cecff 0%,
    #24cdec 50%,
    #079dce 100%
  );

  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.8),
    0 0 10px rgba(63,220,255,0.75);
}
/* New Game confirmation */
#newGameConfirm .modal {
  width: min(86vw, 430px);
  padding: 30px 28px 26px;
  text-align: center;

  border-radius: 30px;
  border: 3px solid rgba(255,255,255,0.9);

  background:
    linear-gradient(
      180deg,
      rgba(40,205,245,0.96) 0%,
      rgba(22,151,225,0.97) 55%,
      rgba(13,105,195,0.98) 100%
    );

  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.5),
    0 18px 45px rgba(0,65,130,0.35);
}

#newGameConfirm .modal h2 {
  margin: 0 0 10px;

  color: white;
  font-size: 27px;
  font-weight: 900;

  text-shadow:
    0 3px 0 #075eae,
    0 5px 10px rgba(0,55,120,0.25);
}

#newGameConfirm .modal p {
  margin: 0 0 24px;

  color: rgba(255,255,255,0.95);
  font-size: 17px;
  font-weight: 700;
}

#confirmNewGameBtn,
#cancelNewGameBtn {
  width: 100%;
  padding: 13px 18px;
  margin-top: 10px;

  border-radius: 18px;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}

#confirmNewGameBtn {
  color: #744000;

  border: 2px solid #ffe985;

  background:
    linear-gradient(
      180deg,
      #fff27a 0%,
      #ffc83d 55%,
      #f5a91b 100%
    );

  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.7),
    0 5px 12px rgba(89,60,0,0.2);
}

#cancelNewGameBtn {
  color: #07569e;

  border: 2px solid rgba(255,255,255,0.9);

  background: rgba(255,255,255,0.88);
}

#confirmNewGameBtn:hover,
#cancelNewGameBtn:hover {
  transform: translateY(-2px);
}

#confirmNewGameBtn:active,
#cancelNewGameBtn:active {
  transform: translateY(1px);
}
/* Rescue Bubble selectable animals */
.cell.rescue-target {
  cursor: pointer;
  position: relative;

  animation: rescuePulse 1.15s ease-in-out infinite;

  box-shadow:
    0 0 0 3px rgba(255,255,255,0.85),
    0 0 18px rgba(80,220,255,0.95),
    0 0 32px rgba(80,180,255,0.55);

  border-radius: 22px;
}

.cell.rescue-target::after {
  content: "";
  position: absolute;
  inset: 5px;

  border: 2px solid rgba(255,255,255,0.75);
  border-radius: 50%;

  pointer-events: none;

  animation: bubbleFloat 1.15s ease-in-out infinite;
}

@keyframes rescuePulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.06);
    filter: brightness(1.15);
  }
}

@keyframes bubbleFloat {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}
/* =========================
   OCEAN FULL - GAME OVER
   ========================= */

#gameOverModal .modal {
  position: relative;
  overflow: hidden;

  width: min(88vw, 520px);
  padding: 34px 34px 30px;
  text-align: center;

  border-radius: 36px;
  border: 3px solid rgba(255,255,255,0.92);

  background:
    radial-gradient(circle at 15% 12%,
      rgba(255,255,255,0.55) 0 3px,
      transparent 4px),
    radial-gradient(circle at 88% 25%,
      rgba(255,255,255,0.45) 0 5px,
      transparent 6px),
    linear-gradient(
      180deg,
      #bff5ff 0%,
      #8ce8f8 38%,
      #5fcde9 72%,
      #dffbff 100%
    );

  box-shadow:
    inset 0 4px 0 rgba(255,255,255,0.6),
    0 22px 55px rgba(0,74,140,0.35);
}

/* little ocean glow */
#gameOverModal .modal::before {
  content: "🫧";
  position: absolute;
  top: 18px;
  left: 22px;

  font-size: 34px;
  opacity: 0.7;
  transform: rotate(-12deg);
}

#gameOverModal .modal::after {
  content: "🫧";
  position: absolute;
  right: 22px;
  bottom: 18px;

  font-size: 28px;
  opacity: 0.55;
}

/* VOYAGE ENDED */
#gameOverModal .eyebrow {
  display: inline-block;

  margin-bottom: 8px;
  padding: 7px 18px;

  border-radius: 18px;

  color: #075d9f;
  background: rgba(255,255,255,0.72);

  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;

  box-shadow:
    0 3px 10px rgba(0,90,150,0.12);
}

/* OCEAN FULL */
#gameOverModal h2 {
  margin: 6px 0 18px;

  color: #11aeea;

  font-family:
    "Arial Rounded MT Bold",
    "Trebuchet MS",
    sans-serif;

  font-size: 54px;
  font-weight: 900;
  letter-spacing: -3px;

  transform: scaleX(1.08) scaleY(1.04);

  -webkit-text-stroke: 3px #ffffff;

  text-shadow:
    0 3px 0 #e9fbff,
    0 6px 0 #1788d3,
    0 9px 0 #0969bd,
    0 13px 18px rgba(0, 79, 160, 0.28);
}
 
/* SCORE AREA */
#gameOverModal .game-over-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;

  margin: 18px 0;
}

#gameOverModal .game-over-stat {
  padding: 15px 10px;

  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 22px;

  background: rgba(255,255,255,0.55);

  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.8),
    0 6px 14px rgba(0,108,170,0.12);
}

#gameOverModal .game-over-stat span {
  display: block;

  color: #0876b5;
  font-size: 14px;
  font-weight: 800;
}

#gameOverModal .game-over-stat strong {
  display: block;
  margin-top: 2px;

  color: #07569e;

  font-family:
    "Arial Rounded MT Bold",
    "Trebuchet MS",
    sans-serif;

  font-size: 30px;
  font-weight: 900;
}

/* MESSAGE */
#gameOverModal .modal > p {
  margin: 12px auto 20px;
  max-width: 390px;

  color: #075a92;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

/* BUTTON AREA */
#gameOverModal .game-over-actions {
  display: grid;
  gap: 11px;
}

#gameOverModal #playAgainBtn,
#gameOverModal #gameOverHomeBtn {
  width: 100%;
  padding: 14px 18px;

  border-radius: 22px;

  font-family:
    "Arial Rounded MT Bold",
    "Trebuchet MS",
    sans-serif;

  font-size: 18px;
  font-weight: 900;

  cursor: pointer;
}

/* PLAY AGAIN */
#gameOverModal #playAgainBtn {
  color: white;

  border: 2px solid rgba(255,255,255,0.9);

  background:
    linear-gradient(
      180deg,
      #3ee5fa 0%,
      #12bfe8 52%,
      #079fd7 100%
    );

  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.45),
    0 7px 15px rgba(0,108,180,0.25);
}

/* BACK HOME */
#gameOverModal #gameOverHomeBtn {
  color: #6543b8;

  border: 2px solid rgba(255,255,255,0.9);

  background:
    linear-gradient(
      180deg,
      #f4efff 0%,
      #ddd1ff 100%
    );

  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.7),
    0 6px 12px rgba(87,62,160,0.16);
}

#gameOverModal #playAgainBtn:hover,
#gameOverModal #gameOverHomeBtn:hover {
  transform: translateY(-2px) scale(1.01);
}

#gameOverModal #playAgainBtn:active,
#gameOverModal #gameOverHomeBtn:active {
  transform: translateY(1px);
}
/* Game Over ocean decorations */

#gameOverModal .game-over-whale {
  position: absolute;
  width: 95px;
top: -8px;
left: 6px;
  z-index: 2;

  transform: rotate(-8deg);
  filter: drop-shadow(0 7px 8px rgba(0, 85, 150, 0.22));
  pointer-events: none;
}

#gameOverModal .game-over-coral {
  position: absolute;
  left: 12px;
  bottom: 8px;

  font-size: 46px;
  line-height: 1;

  transform: rotate(-8deg);
  pointer-events: none;
  opacity: 0.45;
}

#gameOverModal .game-over-seaweed {
  position: absolute;
  right: 12px;
  bottom: 10px;

  font-size: 46px;
  line-height: 1;

  transform: rotate(8deg);
  pointer-events: none;
  opacity: 0.45;
}

/* Keep real content above decorations */
#gameOverModal .eyebrow,
#gameOverModal h2,
#gameOverModal .game-over-stats,
#gameOverModal p,
#gameOverModal .game-over-actions {
  position: relative;
  z-index: 3;
}
/* Game Over image template */

#gameOverModal .game-over-image-card {
  position: relative;
  width: min(88vw, 590px);
  margin-top: -40px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

#gameOverModal .game-over-screen-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
}
/* =================================
   LIVE ELEMENTS OVER GAME OVER IMAGE
   ================================= */

/* Hide the old modal text/layout */
#gameOverModal .game-over-image-card > .eyebrow,
#gameOverModal .game-over-image-card > h2,
#gameOverModal .game-over-image-card > p {
  display: none;
}

/* Stats container becomes invisible positioning layer */
#gameOverModal .game-over-stats {
  position: absolute;
  inset: 0;
  margin: 0;
  display: block;
  z-index: 5;
  pointer-events: none;
}

/* Hide the old score labels */
#gameOverModal .game-over-stat span {
  display: none;
}

/* Remove old score-card styling */
#gameOverModal .game-over-stat {
  position: static;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* Real FINAL SCORE number */
#gameOverModal #gameOverScore {
position: absolute;

  left: 30.5%;
  top: 51.5%;

  width: 19%;
  text-align: center;

padding: 0;

background: transparent;
border-radius: 0;

  color: #07569e;

  font-family:
    "Arial Rounded MT Bold",
    "Trebuchet MS",
    sans-serif;

font-size: clamp(16px, 1.8vw, 24px);
  font-weight: 900;
}

/* Real BEST SCORE number */
#gameOverModal #gameOverBest {
  position: absolute;

  left: 60.5%;
  top: 51.5%;

  width: 19%;
  text-align: center;

 padding: 0;
background: transparent;
border-radius: 0;

  color: #07569e;

  font-family:
    "Arial Rounded MT Bold",
    "Trebuchet MS",
    sans-serif;

font-size: clamp(16px, 1.8vw, 24px);
  font-weight: 900;
}

/* Button container fills the image */
#gameOverModal .game-over-actions {
  position: absolute;
  inset: 0;

  display: block;
  z-index: 10;
}

/* Turn real buttons into invisible clickable hotspots */
#gameOverModal #playAgainBtn,
#gameOverModal #gameOverHomeBtn {
  position: absolute;

  padding: 0;
  margin: 0;

  border: 0;
  border-radius: 40px;

  background: transparent;
  box-shadow: none;

  color: transparent;
  font-size: 0;

  cursor: pointer;
}

/* Play Again hotspot */
#gameOverModal #playAgainBtn {
  left: 22%;
  top: 67.7%;
  width: 57%;
  height: 9.3%;
}

/* Back Home hotspot */
#gameOverModal #gameOverHomeBtn {
  left: 25%;
  top: 78%;
  width: 51%;
  height: 8%;
}

/* subtle feedback without changing artwork */
#gameOverModal #playAgainBtn:hover,
#gameOverModal #gameOverHomeBtn:hover {
  background: rgba(255,255,255,0.08);
  transform: none;
}
@media (orientation: landscape) and (max-height: 500px) {
  .app {
    padding-top: 12px;
  }
}
@media (max-width: 480px) {
  .modal-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  #discoveryModal .modal,
#discoveryModal .modal-art {
  animation: none;
}
  }
  
  #gameOverModal #gameOverScore,
#gameOverModal #gameOverBest {
   background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  
}
#gameOverModal .game-over-stat {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}
}
#milestoneContinueBtn {
  font-size: 15px;
}
#milestoneImage img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 24px;
}
#milestoneContinueBtn {
  background: transparent;
  color: transparent;
  border: none;
  box-shadow: none;
}
#milestoneModal .modal {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border: none;
}
#milestoneImage {
  width: min(72vw, 360px);
}

#milestoneImage img {
  width: 100%;
}