@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&display=swap");

@font-face {
  font-family: "Luckiest Guy";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/luckiest-guy@latest/latin-400-normal.woff2") format("woff2");
}

:root {
  --bg: #061032;
  --panel: #0d1c4d;
  --panel-2: #102a70;
  --cyan: #19ddff;
  --gold: #ffd43b;
  --orange: #ff7a00;
  --green: #28df55;
  --red: #ff4b62;
  --text: #eef7ff;
  --muted: #9ab2dd;
  --font-ui: "Baloo 2", "Segoe UI", Arial, sans-serif;
  --font-display: "Luckiest Guy", Impact, sans-serif;
  font-family: var(--font-ui);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 12%, rgba(25, 221, 255, 0.2), transparent 32%),
    linear-gradient(180deg, #050a26, #08236e 56%, #061032);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.game-app {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px 12px 92px;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(5, 10, 38, 0.22), rgba(5, 10, 38, 0.88)),
    url("portada.jpg") center top / auto 390px no-repeat,
    linear-gradient(180deg, #061032, #0a45a9 60%, #061032);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.45);
}

.game-header {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: center;
  min-height: 62px;
}

.brand-lockup {
  display: grid;
  justify-items: center;
}

.brand-lockup img {
  width: 210px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.38));
}

.brand-lockup span {
  margin-top: -5px;
  padding: 3px 12px;
  border: 1px solid rgba(255, 212, 59, 0.45);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 122, 0, 0.18);
  font-size: 0.78rem;
  font-weight: 900;
}

.header-profile-button {
  position: absolute;
  top: 8px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 212, 59, 0.42);
  border-radius: 50%;
  color: white;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.28), transparent 22%),
    linear-gradient(180deg, #fff36f, var(--orange));
  box-shadow: 0 5px 0 #9c4300, 0 0 18px rgba(255, 212, 59, 0.32);
  font-size: 1.1rem;
}

.header-profile-button.active {
  color: #2c1700;
  box-shadow: 0 4px 0 #9c4300, 0 0 26px rgba(255, 212, 59, 0.58);
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.hero-card,
.panel-card,
.referred-panel {
  border: 1px solid rgba(25, 221, 255, 0.22);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(13, 28, 77, 0.92), rgba(7, 16, 48, 0.94));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08), 0 16px 34px rgba(0, 0, 0, 0.28);
}

.hero-card {
  margin-top: 10px;
  padding: 18px 16px;
  text-align: center;
}

.eyebrow,
.section-title span {
  display: block;
  margin: 0 0 4px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-card h1 {
  margin: 0;
  font-family: var(--font-display);
  color: white;
  font-size: clamp(2.1rem, 12vw, 3.15rem);
  font-weight: 400;
  line-height: 0.92;
  text-shadow: 0 5px 0 #08236e, 0 0 18px rgba(25, 221, 255, 0.38);
}

.hero-copy {
  margin: 10px auto 0;
  max-width: 330px;
  color: #c8dcff;
  font-size: 0.94rem;
  line-height: 1.25;
}

.reveal-machine {
  position: relative;
  display: grid;
  place-items: center;
  gap: 14px;
  margin: 18px 0 15px;
}

.product-window {
  display: grid;
  place-items: center;
  width: min(100%, 302px);
  min-height: 126px;
  padding: 14px;
  border: 2px solid rgba(25, 221, 255, 0.55);
  border-radius: 22px;
  background:
    radial-gradient(circle at center, rgba(25, 221, 255, 0.22), transparent 60%),
    rgba(0, 0, 0, 0.22);
}

.product-window:has(.prize-image) {
  cursor: zoom-in;
}

.product-window.spinning {
  animation: machineShake 130ms linear infinite;
}

.product-icon {
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: white;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    linear-gradient(180deg, var(--orange), #d34b00);
  border: 5px solid var(--orange);
  font-size: 2.4rem;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.82), 0 0 24px rgba(255, 122, 0, 0.55);
}

.prize-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: white;
}

.prize-image.image-load-error,
#modalPrizeImage.image-load-error,
#viewerPrizeImage.image-load-error {
  opacity: 0;
}

.prize-image.normal {
  border-radius: 50%;
}

.product-window strong {
  display: block;
  margin-top: 8px;
  color: white;
  font-size: 1.35rem;
  line-height: 1;
}

.reveal-button {
  --progress: 0deg;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  width: 152px;
  height: 152px;
  border: 0;
  border-radius: 50%;
  color: #2c1700;
  background:
    radial-gradient(circle at 35% 25%, #fff9a8, transparent 18%),
    linear-gradient(180deg, #ffd43b, #ff7a00);
  box-shadow:
    inset 0 10px 0 rgba(255, 255, 255, 0.26),
    0 8px 0 #9c4300,
    0 0 34px rgba(255, 212, 59, 0.58);
  animation: buttonPulse 1.8s ease-in-out infinite;
}

.reveal-button.waiting-progress {
  color: white;
  background:
    radial-gradient(circle at center, #071030 0 54%, transparent 55%),
    conic-gradient(var(--green) var(--progress), rgba(255, 255, 255, 0.18) 0),
    linear-gradient(180deg, #102a70, #061032);
  box-shadow:
    inset 0 0 0 10px rgba(5, 10, 38, 0.92),
    0 0 30px rgba(40, 223, 85, 0.34);
  animation: progressGlow 1.5s ease-in-out infinite;
}

.reveal-button[disabled] {
  cursor: default;
}

.reveal-button span {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 400;
  line-height: 1;
}

.reveal-button small {
  max-width: 96px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.progress-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-copy strong,
.progress-copy span {
  display: block;
}

.progress-copy strong {
  color: white;
  font-size: 1.08rem;
}

.progress-copy span {
  color: var(--muted);
  font-size: 0.86rem;
}

.energy-segments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.energy-segments span {
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.energy-segments span.filled {
  background: linear-gradient(90deg, var(--green), var(--gold));
  box-shadow: 0 0 14px rgba(40, 223, 85, 0.58);
  animation: segmentPop 520ms ease;
}

.main-actions,
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.primary-action,
.claim-action,
.share-grid button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.16), 0 6px 13px rgba(0, 0, 0, 0.22);
}

.primary-action {
  background: linear-gradient(180deg, #19ddff, #006dff);
}

.claim-action {
  background: linear-gradient(180deg, #ffffff, #dfe8ff);
  color: #15336f;
}

.claim-action:disabled {
  opacity: 0.48;
}

.place-entry-button {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px solid rgba(255, 212, 59, 0.45);
  border-radius: 14px;
  color: var(--gold);
  background: rgba(255, 212, 59, 0.1);
  font-weight: 900;
}

.panel-card,
.referred-panel {
  margin-top: 12px;
  padding: 15px;
}

.section-title h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 1.34rem;
}

.link-box {
  display: grid;
  grid-template-columns: 32px 1fr 42px;
  align-items: center;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(25, 221, 255, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.copy-inline-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: linear-gradient(180deg, #ffb22f, #ff6b00);
}

.link-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  font-weight: 900;
}

.share-grid {
  grid-template-columns: repeat(3, 1fr);
}

.wa { background: linear-gradient(180deg, #27df51, #0fa432); }
.fb { background: linear-gradient(180deg, #1877f2, #0b45bd); }
.copy { background: linear-gradient(180deg, #ffb22f, #ff6b00); }

.referral-status h3 {
  margin: 14px 0 8px;
  color: white;
}

.referral-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 12px;
}

.referral-summary div {
  min-height: 64px;
  padding: 10px;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
}

.referral-summary strong,
.referral-summary span {
  display: block;
}

.referral-summary strong {
  color: var(--gold);
  font-size: 1.6rem;
  line-height: 1;
}

.referral-summary span {
  color: var(--muted);
  font-size: 0.78rem;
}

#referralList,
.level-road,
.mission-list {
  display: grid;
  gap: 8px;
}

.status-row,
.level-card,
.mission-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border-radius: 15px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.status-row i,
.level-icon,
.mission-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(25, 221, 255, 0.16);
  color: var(--cyan);
  font-size: 1.25rem;
}

.status-row strong,
.status-row span,
.level-card strong,
.level-card span,
.mission-row strong,
.mission-row span {
  display: block;
}

.status-row span,
.level-card span,
.mission-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.status-pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
}

.mission-row.muted-mission {
  opacity: 0.72;
}

.mission-row.mission-feature {
  grid-template-columns: 42px 1fr auto;
  border: 1px solid rgba(25, 221, 255, 0.32);
  background:
    radial-gradient(circle at 16% 30%, rgba(25, 221, 255, 0.14), transparent 40%),
    rgba(255, 255, 255, 0.08);
}

.mission-row.mission-feature.pending {
  border-color: rgba(255, 212, 59, 0.58);
}

.mission-row.mission-feature.completed {
  border-color: rgba(40, 223, 85, 0.62);
  background: linear-gradient(180deg, rgba(40, 223, 85, 0.16), rgba(255, 255, 255, 0.08));
}

.mission-row.mission-feature.review {
  border-color: rgba(255, 122, 0, 0.62);
}

.mission-actions {
  display: grid;
  justify-items: end;
}

.mission-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: linear-gradient(180deg, #19ddff, #006dff);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.16), 0 5px 12px rgba(0, 0, 0, 0.2);
}

.mission-actions button:disabled {
  opacity: 0.48;
  cursor: default;
  filter: grayscale(0.35);
}

.place-page {
  background:
    radial-gradient(circle at 78% 10%, rgba(255, 212, 59, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(13, 28, 77, 0.94), rgba(7, 16, 48, 0.96));
}

.place-photo {
  position: relative;
  overflow: hidden;
  min-height: 238px;
  border: 2px solid rgba(25, 221, 255, 0.42);
  border-radius: 22px;
  background: #061032;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  cursor: zoom-in;
}

.place-photo::after {
  content: "\f00e";
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: white;
  background: rgba(6, 16, 50, 0.68);
  font-family: "Font Awesome 7 Free";
  font-weight: 900;
  box-shadow: 0 0 16px rgba(25, 221, 255, 0.28);
}

.place-photo img {
  display: block;
  width: 100%;
  height: 258px;
  object-fit: cover;
}

.place-photo div {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(6, 16, 50, 0.24), rgba(6, 16, 50, 0.9));
  backdrop-filter: blur(4px);
}

.place-photo strong,
.place-photo span {
  display: block;
}

.place-photo strong {
  color: white;
  font-size: 1.24rem;
  line-height: 1;
}

.place-photo span {
  color: #c8dcff;
  line-height: 1.16;
}

.place-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.place-info-grid article {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 5px;
  min-height: 104px;
  padding: 10px 7px;
  border-radius: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
}

.place-info-grid i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  color: #2c1700;
  background: linear-gradient(180deg, #fff36f, var(--orange));
}

.place-info-grid strong,
.place-info-grid span {
  display: block;
}

.place-info-grid strong {
  color: white;
  line-height: 1;
}

.place-info-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.05;
}

.maps-button {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 12px;
  border-radius: 15px;
  color: #2c1700;
  text-decoration: none;
  background: linear-gradient(180deg, #fff36f, var(--orange));
  font-weight: 900;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.22), 0 7px 0 #9c4300, 0 0 18px rgba(255, 212, 59, 0.24);
}

.claim-steps {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.claim-steps h3 {
  margin: 0 0 2px;
  color: white;
  font-size: 1.2rem;
}

.claim-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.claim-step b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #2c1700;
  background: linear-gradient(180deg, #fff36f, var(--orange));
}

.claim-step span {
  color: #d7e6ff;
  line-height: 1.12;
}

.tiktok-proof {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}

.compact-title h2 {
  margin-bottom: 0;
  font-size: 1.18rem;
}

.tiktok-open-button {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  color: white;
  text-decoration: none;
  background: linear-gradient(180deg, #19ddff, #006dff);
  font-weight: 900;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.16), 0 6px 13px rgba(0, 0, 0, 0.22);
}

.tiktok-proof .tiktok-embed {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  overflow: hidden;
  border-radius: 18px;
}

.level-card.active {
  border: 1px solid rgba(255, 212, 59, 0.48);
}

.level-card.complete {
  border: 1px solid rgba(40, 223, 85, 0.58);
  background: linear-gradient(180deg, rgba(40, 223, 85, 0.16), rgba(255, 255, 255, 0.08));
}

.level-page {
  position: relative;
  min-height: calc(100vh - 116px);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 12%, rgba(255, 212, 59, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 34%, rgba(25, 221, 255, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 24% 64%, rgba(255, 255, 255, 0.75) 0 1px, transparent 2px),
    radial-gradient(circle at 80% 8%, rgba(255, 212, 59, 0.18), transparent 34%),
    radial-gradient(circle at 14% 20%, rgba(25, 221, 255, 0.2), transparent 36%),
    linear-gradient(165deg, rgba(18, 20, 96, 0.98), rgba(7, 16, 48, 0.96) 52%, rgba(8, 35, 110, 0.98));
  overflow: hidden;
}

.level-page::before {
  content: "";
  position: absolute;
  left: -20px;
  right: -20px;
  bottom: -2px;
  height: 62px;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 50% 0, rgba(25, 221, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(9, 18, 61, 0.82), rgba(3, 9, 32, 0.98));
  pointer-events: none;
}

.level-page-title h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 0.95;
  text-shadow: 0 4px 0 #08236e;
}

.level-summary-card {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid rgba(255, 212, 59, 0.4);
  border-radius: 18px;
  background:
    radial-gradient(circle at right, rgba(255, 212, 59, 0.22), transparent 44%),
    rgba(255, 255, 255, 0.08);
}

.level-summary-card span,
.level-summary-card strong,
.level-summary-card small {
  display: block;
}

.level-summary-card span {
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.level-summary-card strong {
  color: white;
  font-size: 1.28rem;
  line-height: 1;
}

.level-summary-card small {
  color: #c8dcff;
  line-height: 1.15;
}

.level-summary-card b {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: #2c1700;
  background: linear-gradient(180deg, #fff36f, var(--orange));
  box-shadow: 0 5px 0 #9c4300, 0 0 20px rgba(255, 212, 59, 0.32);
}

.level-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
  padding: 10px 0 28px;
}

.level-map::before {
  content: "";
  position: absolute;
  inset: 18px 44px 54px 44px;
  border: 3px dotted rgba(255, 255, 255, 0.42);
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 46% 54% 42% 58%;
  transform: rotate(-8deg);
  pointer-events: none;
}

.level-node {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
}

.level-node-button {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-height: 180px;
  padding: 8px 6px 12px;
  border: 0;
  color: white;
  text-align: center;
  background: transparent;
}

.planet-badge {
  position: absolute;
  top: 4px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: white;
  background: linear-gradient(180deg, #fff36f, var(--orange));
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(255, 212, 59, 0.5);
}

.planet-orbit {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-top: 12px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.12), transparent 54%),
    conic-gradient(from 120deg, rgba(25, 221, 255, 0.28), transparent 28%, rgba(255, 212, 59, 0.3), transparent 66%, rgba(25, 221, 255, 0.28));
  box-shadow: 0 0 26px rgba(25, 221, 255, 0.2);
}

.level-node .level-icon {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: white;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.7), transparent 14%),
    radial-gradient(circle at 72% 72%, rgba(0, 0, 0, 0.24), transparent 28%),
    linear-gradient(145deg, #19ddff, #6f37ff 48%, #16206f);
  box-shadow: inset -10px -12px 18px rgba(0, 0, 0, 0.25), inset 8px 8px 14px rgba(255, 255, 255, 0.16), 0 0 28px rgba(25, 221, 255, 0.42);
  font-size: 1.8rem;
}

.planet-2 .level-icon {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.65), transparent 14%),
    linear-gradient(145deg, #8b51ff, #281060 48%, #100828);
}

.planet-3 .level-icon {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.68), transparent 14%),
    radial-gradient(circle at 64% 64%, rgba(255, 212, 59, 0.22), transparent 25%),
    linear-gradient(145deg, #ff4b62, #ff7a00 52%, #671700);
}

.planet-4 .level-icon {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.7), transparent 14%),
    linear-gradient(145deg, #28df55, #0f9e9e 48%, #064057);
}

.planet-5 .level-icon {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.7), transparent 14%),
    linear-gradient(145deg, #ffd43b, #ff7a00 50%, #662900);
}

.planet-6 .level-icon {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.7), transparent 14%),
    linear-gradient(145deg, #19ddff, #006dff 48%, #061032);
}

.level-node-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  padding: 8px 8px 9px;
  border: 1px solid rgba(25, 221, 255, 0.22);
  border-radius: 16px;
  background: rgba(3, 9, 32, 0.58);
  backdrop-filter: blur(2px);
}

.level-node-copy strong,
.level-node-copy span,
.level-node-copy small {
  display: block;
}

.level-node-copy strong {
  font-size: 1.02rem;
  line-height: 1;
}

.level-node-copy span {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.05;
}

.level-node-copy small {
  color: #c8dcff;
  font-size: 0.7rem;
  line-height: 1.05;
}

.level-stars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  margin-top: 5px;
}

.level-stars i {
  color: rgba(255, 255, 255, 0.26);
  font-size: 0.72rem;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.08));
}

.level-stars i.filled {
  color: var(--gold);
  filter: drop-shadow(0 0 7px rgba(255, 212, 59, 0.7));
}

.level-progress-line {
  width: calc(100% - 16px);
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.level-progress-line span {
  display: block;
  width: var(--level-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--orange));
  box-shadow: 0 0 12px rgba(255, 212, 59, 0.38);
}

.level-node.active {
  border-color: rgba(255, 212, 59, 0.72);
  box-shadow: 0 0 22px rgba(255, 212, 59, 0.16);
}

.level-node.active .level-icon {
  animation: planetPulse 1.7s ease-in-out infinite;
}

.level-node.complete {
  border-color: rgba(40, 223, 85, 0.72);
}

.level-node.complete .level-icon {
  box-shadow: inset -10px -12px 18px rgba(0, 0, 0, 0.2), inset 8px 8px 14px rgba(255, 255, 255, 0.18), 0 0 30px rgba(40, 223, 85, 0.58);
}

.level-node.locked {
  opacity: 0.68;
  filter: grayscale(0.25);
}

.profile-grid {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
}

.profile-grid img {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  object-fit: cover;
  border: 2px solid rgba(25, 221, 255, 0.6);
}

.profile-grid strong,
.profile-grid span,
.profile-grid small {
  display: block;
}

.profile-grid strong {
  color: white;
  font-size: 1.22rem;
}

.profile-grid span,
.profile-grid small {
  color: var(--muted);
}

.profile-link-button,
.login-link-button {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  color: #15336f;
  background: linear-gradient(180deg, #ffffff, #dfe8ff);
  font-weight: 900;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.3), 0 6px 13px rgba(0, 0, 0, 0.22);
}

.login-link-button {
  margin-top: 4px;
  color: white;
  background: linear-gradient(180deg, #19ddff, #006dff);
}

.profile-link-button:disabled,
.login-link-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.profile-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.profile-form label {
  display: grid;
  gap: 5px;
  color: #d7e6ff;
  font-size: 0.82rem;
  font-weight: 900;
}

.profile-phone-row {
  display: grid;
  grid-template-columns: minmax(82px, 0.38fr) 1fr;
  gap: 9px;
}

.profile-form input,
.alias-field,
.password-field {
  min-width: 0;
  min-height: 46px;
  border: 1px solid rgba(25, 221, 255, 0.42);
  border-radius: 14px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.profile-form input {
  width: 100%;
  padding: 0 12px;
  outline: 0;
}

.profile-form input::placeholder {
  color: rgba(199, 220, 255, 0.54);
}

.profile-form input:focus,
.alias-field:focus-within,
.password-field:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 212, 59, 0.14);
}

.alias-field,
.password-field {
  display: grid;
  align-items: center;
  overflow: hidden;
}

.alias-field {
  grid-template-columns: auto 1fr;
}

.alias-field span {
  padding-left: 12px;
  color: var(--gold);
  font-size: 1.05rem;
}

.alias-field input,
.password-field input {
  border: 0;
  background: transparent;
}

.password-field {
  grid-template-columns: 1fr 46px;
}

.password-field button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-right: 2px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.profile-note {
  display: block;
  color: var(--muted);
  line-height: 1.2;
}

.game-captcha {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(255, 212, 59, 0.34);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 212, 59, 0.18), transparent 58%),
    rgba(255, 255, 255, 0.06);
}

.game-captcha strong {
  color: white;
  font-size: 0.98rem;
  line-height: 1.05;
  text-align: center;
}

.captcha-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.captcha-options button {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 64px;
  border: 1px solid rgba(25, 221, 255, 0.35);
  border-radius: 14px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.captcha-options button.selected {
  border-color: var(--gold);
  color: #2c1700;
  background: linear-gradient(180deg, #fff36f, var(--orange));
  box-shadow: 0 0 18px rgba(255, 212, 59, 0.28);
}

.captcha-options i {
  font-size: 1.32rem;
}

.captcha-options span {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.62rem;
  line-height: 1;
  text-overflow: ellipsis;
}

.captcha-refresh {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(25, 221, 255, 0.18);
  font-weight: 900;
}

.login-form {
  margin-top: 18px;
}

.mini-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-divider::before,
.mini-divider::after {
  content: "";
  height: 1px;
  background: rgba(255, 212, 59, 0.28);
}

.referred-panel strong,
.referred-panel p {
  display: block;
  margin: 0 0 8px;
}

.referred-panel p {
  color: var(--muted);
  line-height: 1.25;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  width: min(100%, 430px);
  min-height: 74px;
  padding: 8px 9px max(6px, env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #102a70, #061032);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.38);
  transform: translateX(-50%);
}

.bottom-nav button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  font-size: 1.2rem;
  font-weight: 900;
}

.bottom-nav button.active {
  color: white;
}

.bottom-nav span {
  max-width: 76px;
  font-size: 0.58rem;
  line-height: 1.05;
}

.center-tab {
  position: relative;
  top: -19px;
  align-content: center !important;
  justify-items: center !important;
  gap: 2px !important;
  width: 68px;
  height: 68px;
  margin: 0 auto;
  border-radius: 50% !important;
  color: white !important;
  background: linear-gradient(180deg, var(--gold), var(--orange)) !important;
  box-shadow: 0 6px 0 #9c4300, 0 0 22px rgba(255, 122, 0, 0.65) !important;
}

.center-tab i {
  line-height: 1;
}

.center-tab span {
  line-height: 1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 60;
  width: min(360px, calc(100% - 28px));
  padding: 12px 14px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(180deg, #102a70, #061032);
  opacity: 0;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
  text-align: center;
  font-weight: 900;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  overflow: hidden;
}

.prize-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 7, 25, 0.74);
  opacity: 0;
  transition: opacity 180ms ease;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: end center;
  padding: 16px 14px max(16px, env(safe-area-inset-bottom));
  background: rgba(2, 7, 25, 0.82);
  opacity: 0;
  transition: opacity 160ms ease;
}

.level-complete-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 7, 25, 0.78);
  opacity: 0;
  transition: opacity 160ms ease;
}

.level-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: end center;
  padding: 16px 14px max(16px, env(safe-area-inset-bottom));
  background: rgba(2, 7, 25, 0.78);
  opacity: 0;
  transition: opacity 160ms ease;
}

.level-complete-modal.show {
  opacity: 1;
}

.level-detail-modal.show {
  opacity: 1;
}

.level-complete-modal[hidden] {
  display: none;
}

.level-detail-modal[hidden] {
  display: none;
}

.level-complete-card {
  position: relative;
  width: min(100%, 390px);
  padding: 22px 18px 18px;
  border: 2px solid rgba(255, 212, 59, 0.62);
  border-radius: 26px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 212, 59, 0.3), transparent 40%),
    linear-gradient(180deg, #102a70, #061032);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 34px rgba(255, 212, 59, 0.24);
}

.level-detail-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(100%, 410px);
  padding: 18px;
  border: 2px solid rgba(25, 221, 255, 0.52);
  border-radius: 24px;
  background:
    radial-gradient(circle at 84% 0, rgba(255, 212, 59, 0.2), transparent 42%),
    linear-gradient(180deg, #102a70, #061032);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  transform: translateY(18px);
  transition: transform 160ms ease;
}

.level-detail-modal.show .level-detail-card {
  transform: translateY(0);
}

.level-detail-hero {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  padding-right: 42px;
}

.level-detail-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 22px;
  color: white;
  background: linear-gradient(180deg, #fff36f, var(--orange));
  font-size: 1.9rem;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.2), 0 7px 0 #9c4300;
}

.level-detail-hero span {
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.level-detail-hero h2 {
  margin: 0;
  color: white;
  font-size: 1.55rem;
  line-height: 1;
}

.level-detail-hero p {
  margin: 2px 0 0;
  color: var(--gold);
  font-weight: 900;
  line-height: 1.05;
}

.level-detail-progress {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.level-detail-progress strong {
  color: white;
  line-height: 1.05;
}

.level-detail-progress div {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.level-detail-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--orange));
  transition: width 220ms ease;
}

.level-detail-rules {
  display: grid;
  gap: 8px;
}

.level-rule-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: start;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.level-rule-row i {
  margin-top: 2px;
  color: var(--green);
}

.level-rule-row span {
  color: #d7e6ff;
  font-size: 0.9rem;
  line-height: 1.14;
}

.level-detail-action {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  color: #2c1700;
  background: linear-gradient(180deg, #fff36f, var(--orange));
  font-weight: 900;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.24), 0 7px 0 #9c4300;
}

.level-detail-action:disabled {
  opacity: 0.52;
  cursor: default;
  filter: grayscale(0.4);
}

.level-complete-card > i {
  color: var(--gold);
  font-size: 3rem;
  filter: drop-shadow(0 0 16px rgba(255, 212, 59, 0.58));
}

.level-complete-card h2 {
  margin: 10px 34px 8px;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 0.96;
  text-shadow: 0 4px 0 #08236e;
}

.level-complete-card p {
  margin: 0 auto 14px;
  max-width: 310px;
  color: #c8dcff;
  line-height: 1.22;
}

.level-complete-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.level-complete-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  background: linear-gradient(180deg, #19ddff, #006dff);
}

.level-complete-actions button:first-child {
  color: #2c1700;
  background: linear-gradient(180deg, #fff36f, var(--orange));
}

.image-viewer.show {
  opacity: 1;
}

.image-viewer[hidden] {
  display: none;
}

.image-viewer-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(100%, 410px);
  max-height: calc(100vh - 32px);
  padding: 18px;
  border: 2px solid rgba(25, 221, 255, 0.5);
  border-radius: 24px;
  background: linear-gradient(180deg, #102a70, #061032);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
  transform: translateY(16px);
  transition: transform 160ms ease;
}

.image-viewer.show .image-viewer-card {
  transform: translateY(0);
}

#viewerPrizeName {
  display: block;
  padding-right: 46px;
  color: var(--gold);
  font-size: 1.35rem;
  line-height: 1.05;
}

.viewer-stage {
  display: grid;
  place-items: center;
  min-height: 300px;
  max-height: min(58vh, 520px);
  overflow: auto;
  border-radius: 20px;
  background: white;
  touch-action: pan-x pan-y;
}

.viewer-stage img {
  width: min(100%, 360px);
  max-height: 52vh;
  object-fit: contain;
  transform-origin: center;
  transition: transform 120ms ease;
}

.viewer-actions {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  gap: 10px;
}

.viewer-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 900;
}

#zoomResetButton {
  color: #2c1700;
  background: linear-gradient(180deg, #fff36f, var(--orange));
}

.prize-modal.show {
  opacity: 1;
}

.prize-modal[hidden] {
  display: none;
}

.prize-modal-card {
  position: relative;
  width: min(100%, 390px);
  padding: 18px;
  border: 2px solid rgba(25, 221, 255, 0.48);
  border-radius: 26px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(25, 221, 255, 0.28), transparent 42%),
    linear-gradient(180deg, #102a70, #061032);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.46), inset 0 2px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(10px) scale(0.97);
  transition: transform 180ms ease;
}

.prize-modal.show .prize-modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.prize-modal-card h2 {
  margin: 0 32px 14px;
  font-family: var(--font-display);
  color: white;
  font-size: 2.15rem;
  font-weight: 400;
  line-height: 0.96;
  text-shadow: 0 4px 0 #08236e, 0 0 16px rgba(25, 221, 255, 0.4);
}

.modal-prize-stage {
  display: grid;
  place-items: center;
  width: min(100%, 270px);
  aspect-ratio: 1 / 1;
  margin: 0 auto 12px;
  padding: 16px;
  border: 3px solid rgba(255, 212, 59, 0.75);
  border-radius: 26px;
  background:
    radial-gradient(circle at center, rgba(255, 212, 59, 0.35), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  box-shadow: 0 0 34px rgba(255, 212, 59, 0.28);
}

.modal-prize-stage.spinning {
  animation: prizeStagePulse 180ms linear infinite;
}

.modal-prize-stage img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: contain;
  background: white;
}

.attempt-counter {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  margin: -4px 0 12px;
  padding: 3px 14px;
  border: 1px solid rgba(255, 212, 59, 0.5);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 122, 0, 0.16);
  font-size: 0.82rem;
  font-weight: 900;
}

#modalPrizeName {
  display: block;
  color: var(--gold);
  font-size: 1.45rem;
  line-height: 1.05;
}

#modalPrizeHint {
  margin: 8px auto 0;
  max-width: 280px;
  color: #c8dcff;
  line-height: 1.22;
}

.keep-prize-button {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: 0;
  border-radius: 16px;
  color: #2c1700;
  background: linear-gradient(180deg, #fff36f, var(--orange));
  font-weight: 900;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.24), 0 8px 0 #9c4300, 0 0 22px rgba(255, 212, 59, 0.32);
}

.retry-prize-button {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border: 0;
  border-radius: 16px;
  color: white;
  background: linear-gradient(180deg, #19ddff, #006dff);
  font-weight: 900;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.18), 0 7px 0 #043fa0, 0 0 18px rgba(25, 221, 255, 0.28);
}

.keep-prize-button[hidden],
.retry-prize-button[hidden] {
  display: none;
}

.spark {
  position: absolute;
  left: 50%;
  top: 42%;
  color: var(--gold);
  font-size: 1.25rem;
  animation: floatSpark 900ms ease-out forwards;
  filter: drop-shadow(0 0 10px rgba(255, 212, 59, 0.75));
}

@keyframes buttonPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

@keyframes machineShake {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(2px); }
}

@keyframes progressGlow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(40, 223, 85, 0.34)); }
  50% { transform: scale(1.025); filter: drop-shadow(0 0 18px rgba(40, 223, 85, 0.62)); }
}

@keyframes prizeStagePulse {
  0%, 100% { transform: translateX(0) scale(1); }
  50% { transform: translateX(3px) scale(1.015); }
}

@keyframes segmentPop {
  0% { transform: scaleX(0.55); }
  65% { transform: scaleX(1.08); }
  100% { transform: scaleX(1); }
}

@keyframes planetPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(255, 212, 59, 0.38)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 18px rgba(255, 212, 59, 0.72)); }
}

@keyframes floatSpark {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.4); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), var(--y)) scale(1.1) rotate(var(--r)); }
}

@media (max-width: 380px) {
  .game-app {
    padding-left: 9px;
    padding-right: 9px;
  }

  .reveal-button {
    width: 132px;
    height: 132px;
  }

  .main-actions {
    grid-template-columns: 1fr;
  }

  .level-map {
    gap: 14px 10px;
  }

  .level-node-button {
    min-height: 172px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .planet-orbit {
    width: 100px;
    height: 100px;
  }

  .level-node .level-icon {
    width: 74px;
    height: 74px;
  }

  .level-node-copy strong {
    font-size: 0.92rem;
  }

  .level-node-copy span {
    font-size: 0.78rem;
  }

  .level-detail-card {
    padding: 16px 14px;
  }
}
