*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #0a1f3d;
  --title-outline: #163a6b;
  --gold: #ffd54a;
  --gold-deep: #e8a800;
  --green-ribbon: #1f5c28;
  --green-badge-top: #4caf50;
  --green-badge-mid: #2e8b3a;
  --green-badge-bot: #1b6b28;
  --btn-green-top: #5ebd5e;
  --btn-green-bot: #2d7a32;
  --btn-blue-top: #6eb0e0;
  --btn-blue-bot: #3a7fb5;
  --font-display: "Fredoka One", "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: #fff;
  background: var(--navy);
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg,
      rgba(6, 28, 58, 0.25) 0%,
      rgba(6, 28, 58, 0.05) 35%,
      rgba(6, 28, 58, 0.35) 100%),
    url("../assets/bg-dna.png") center / cover no-repeat;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 2.75rem;
}

/* ===== Header ===== */
.site-header {
  padding: 0.85rem 0.85rem 0;
  display: flex;
  justify-content: center;
}

.site-header__inner {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 1.1rem 0.35rem 0.6rem;
  background: rgba(180, 220, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-header__logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.site-header__name {
  font-weight: 800;
  font-size: 1.15rem;
  color: #0c2847;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* ===== Hero ===== */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.2rem 1.25rem 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 0.85rem;
}

.title-svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.title-svg--gold {
  height: auto;
  max-height: 72px;
  margin-bottom: -0.35rem;
}

.title-svg--webar {
  height: auto;
  max-height: 130px;
}

.title-svg__gold {
  fill: var(--gold);
  stroke: var(--title-outline);
  stroke-width: 4;
  paint-order: stroke fill;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 32px;
  letter-spacing: 1.5px;
}

.title-svg__webar-stroke {
  fill: none;
  stroke: var(--title-outline);
  stroke-width: 16;
  stroke-linejoin: round;
  stroke-linecap: round;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 82px;
  letter-spacing: 4px;
}

.title-svg__webar-fill {
  fill: #ffffff;
  stroke: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 82px;
  letter-spacing: 4px;
}

.title-webar-wrap {
  position: relative;
  width: 100%;
  margin-top: -0.4rem;
}

/* Yellow 4-point stars */
.star {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--gold);
  clip-path: polygon(50% 0%,
      61% 35%,
      98% 35%,
      68% 57%,
      79% 91%,
      50% 70%,
      21% 91%,
      32% 57%,
      2% 35%,
      39% 35%);
  filter: drop-shadow(0 0 5px rgba(255, 213, 74, 0.95));
  z-index: 2;
  pointer-events: none;
}

.star--tl {
  left: 6%;
  top: 18%;
  width: 18px;
  height: 18px;
}

.star--bl {
  left: 10%;
  top: 52%;
  width: 13px;
  height: 13px;
}

.star--tr {
  right: 6%;
  top: 20%;
  width: 20px;
  height: 20px;
}

/* ===== Ribbon Spanduk (Grafis Alami, Bukan Tombol) ===== */
.ribbon-wrap {
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.95rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

.ribbon-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.ribbon-text {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 21.5px;
  fill: #ffffff;
  letter-spacing: 0.35px;
}

.hero__tagline {
  font-weight: 800;
  font-size: clamp(0.95rem, 3.8vw, 1.1rem);
  margin-bottom: 2.1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

/* ===== Buttons ===== */
.actions {
  width: min(100%, 300px);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.12rem;
  color: #fff;
  text-decoration: none;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow:
    0 5px 0 rgba(0, 0, 0, 0.22),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.22),
    0 5px 10px rgba(0, 0, 0, 0.22);
}

.btn--green {
  background: linear-gradient(180deg,
      #6bc56b 0%,
      var(--btn-green-top) 28%,
      #3d9340 70%,
      var(--btn-green-bot) 100%);
}

.btn--blue {
  background: linear-gradient(180deg,
      #8ec4ea 0%,
      var(--btn-blue-top) 28%,
      #4a92c4 70%,
      var(--btn-blue-bot) 100%);
}

.ico-play {
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #ffe14a;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.ico-gear {
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

/* Desktop: keep phone-like column centered over full DNA bg */
@media (min-width: 480px) {
  .page:not(.page--select) {
    max-width: 480px;
  }

  .site-header {
    padding-top: 0.75rem;
  }

  .hero {
    padding-top: 2.8rem;
  }
}

/* ===== Halaman Pilih Jenis Sel ===== */
.page--select {
  max-width: 920px;
  padding: 1.5rem 1rem 2rem;
}

.select-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  min-height: calc(100vh - 3.5rem);
}

.select-ribbon {
  position: relative;
  width: min(100%, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  z-index: 1;
}

.select-ribbon__tail {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 52px;
  background: linear-gradient(180deg, #2f7a38 0%, #174a1e 100%);
  transform: translateY(-50%);
  z-index: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
}

.select-ribbon__tail--left {
  left: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 100%, 36% 50%, 0 0);
}

.select-ribbon__tail--right {
  right: 0;
  clip-path: polygon(0 0, 100% 0, 64% 50%, 100% 100%, 0 100%);
}

.select-ribbon__label {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  padding: 0.85rem 1.35rem;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(0.95rem, 3.2vw, 1.2rem);
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(180deg, #3d8f45 0%, #2a6b32 45%, #1a4f22 100%);
  border: 2px solid rgba(180, 230, 160, 0.55);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    0 5px 14px rgba(0, 0, 0, 0.3);
}

.cell-choice {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 780px;
  flex-wrap: wrap;
}

.cell-card {
  flex: 1 1 280px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  background: #f2f2f2;
  border-radius: 18px;
  border: 4px solid transparent;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cell-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.cell-card:active {
  transform: translateY(0);
}

.cell-card--hewan {
  border-color: #3b82f6;
}

.cell-card--tumbuhan {
  border-color: #22c55e;
}

.cell-card__image-wrap {
  background: #fff;
  padding: 0.85rem 0.85rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cell-card__image {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
}

.cell-card__body {
  padding: 0.65rem 1rem 1.1rem;
}

.cell-card__title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.cell-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  color: #fff;
}

.cell-card__icon--hewan {
  background: #3b82f6;
}

.cell-card__icon--tumbuhan {
  background: #22c55e;
}

.cell-card__name {
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.2;
}

.cell-card--hewan .cell-card__name,
.cell-card--hewan .cell-card__desc {
  color: #2563eb;
}

.cell-card--tumbuhan .cell-card__name,
.cell-card--tumbuhan .cell-card__desc {
  color: #16a34a;
}

.cell-card__desc {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.35;
  padding-left: 0.1rem;
}

.cell-or {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 3;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(180deg, #4caf50 0%, #2e7d32 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.btn--back {
  width: min(100%, 280px);
  margin-top: 0.35rem;
}

.ico-back {
  display: block;
  flex-shrink: 0;
}

@media (max-width: 680px) {
  .cell-choice {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .cell-card {
    width: 100%;
    max-width: 340px;
  }

  .cell-or {
    position: static;
    transform: none;
    margin: -0.15rem 0;
  }

  .select-main {
    gap: 1.35rem;
    justify-content: flex-start;
    padding-top: 0.75rem;
  }
}