:root {
  color-scheme: dark;
  --ink: #fff9ef;
  --muted: #d8cbed;
  --gold: #ffc329;
  --cyan: #24dce8;
  --pink: #ff52d9;
  --purple-deep: #09031f;
  --purple-surface: rgba(30, 14, 72, 0.65);
  --purple-border: rgba(186, 89, 255, 0.35);
  font-family: "Trebuchet MS", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 5%, rgba(138, 56, 235, 0.35), transparent 35rem),
    radial-gradient(circle at 10% 85%, rgba(10, 145, 195, 0.28), transparent 32rem),
    radial-gradient(circle at 50% 50%, rgba(255, 82, 217, 0.08), transparent 40rem),
    linear-gradient(160deg, #07021b 0%, #11052f 52%, #020b26 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Background floating doodle particles */
body::before {
  content: "✦  ✎  ◌  ★  〰  ✦  ?  ✎  ★  〰";
  position: fixed;
  inset: 0;
  overflow: hidden;
  color: rgba(143, 72, 255, 0.08);
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 2.2;
  letter-spacing: 0.55em;
  transform: rotate(-10deg) scale(1.15);
  pointer-events: none;
  z-index: 0;
  animation: bgFloat 35s linear infinite alternate;
}

@keyframes bgFloat {
  0% { transform: rotate(-10deg) translateY(0) scale(1.15); }
  100% { transform: rotate(-8deg) translateY(-25px) scale(1.2); }
}

/* Ambient glow orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  animation: orbDrift 14s ease-in-out infinite alternate;
}
.orb-1 {
  width: 28rem;
  height: 28rem;
  background: rgba(168, 85, 247, 0.22);
  top: -5rem;
  left: 20%;
}
.orb-2 {
  width: 22rem;
  height: 22rem;
  background: rgba(36, 220, 232, 0.16);
  top: 40%;
  right: -5rem;
  animation-delay: -5s;
}
.orb-3 {
  width: 26rem;
  height: 26rem;
  background: rgba(255, 82, 217, 0.14);
  bottom: -4rem;
  left: -4rem;
  animation-delay: -8s;
}

@keyframes orbDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 40px) scale(1.12); }
}

/* ========================================================= */
/* LANDING PAGE LAYOUT                                      */
/* ========================================================= */

.landing-shell {
  position: relative;
  z-index: 1;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navigation Header */
.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0 2rem;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.95rem 0.4rem 0.5rem;
  background: rgba(35, 16, 85, 0.7);
  border: 1px solid rgba(194, 120, 255, 0.4);
  border-radius: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.header-logo {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #fff, #ffd573);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-store-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, rgba(36, 220, 232, 0.25), rgba(168, 85, 247, 0.3));
  border: 1px solid rgba(36, 220, 232, 0.55);
  border-radius: 1.5rem;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-store-link:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(36, 220, 232, 0.45), rgba(168, 85, 247, 0.5));
  box-shadow: 0 6px 20px rgba(36, 220, 232, 0.35);
}

/* Landing Hero Section */
.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 0.5rem;
}

/* Animated Mascot */
.mascot-wrapper {
  position: relative;
  width: clamp(8rem, 28vw, 11.5rem);
  aspect-ratio: 1;
  margin: 0 auto 1.25rem;
}

.mascot-halo {
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 195, 41, 0.32) 0%, rgba(168, 85, 247, 0.25) 50%, transparent 70%);
  filter: blur(16px);
  animation: pulseGlow 4s ease-in-out infinite alternate;
}

.hero-mascot {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55));
  animation: floatMascot 4.5s ease-in-out infinite alternate;
}

@keyframes floatMascot {
  0% { transform: translateY(0px) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
  100% { transform: translateY(0px) rotate(-1deg); }
}

@keyframes pulseGlow {
  0% { transform: scale(0.92); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

/* Badge Pill */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 1rem;
  background: rgba(36, 220, 232, 0.12);
  border: 1px solid rgba(36, 220, 232, 0.4);
  border-radius: 2rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 10px #00e676;
  animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* Headline */
.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
}

.hero-title span {
  display: block;
}

.gradient-text {
  background: linear-gradient(135deg, #ffd34e 10%, #ff52d9 55%, #24dce8 95%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: gradientFlow 6s ease infinite alternate;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.hero-subtitle {
  max-width: 34rem;
  margin: 0 auto 1.75rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.55;
  font-weight: 500;
}

/* ========================================================= */
/* REDIRECT COUNTDOWN BOX                                    */
/* ========================================================= */

.redirect-box {
  width: min(100%, 28rem);
  margin: 0 auto 1.5rem;
  padding: 0.95rem 1.2rem;
  background: rgba(18, 9, 44, 0.85);
  border: 1px solid rgba(255, 195, 41, 0.45);
  border-radius: 1.2rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s ease;
}

.redirect-box.paused {
  border-color: rgba(216, 203, 237, 0.35);
}

.redirect-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.redirect-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 700;
}

.redirect-icon {
  font-size: 1.15rem;
  animation: rocketBob 1.5s ease-in-out infinite alternate;
}

@keyframes rocketBob {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

.redirect-text strong {
  color: var(--gold);
  font-size: 1.15rem;
}

.pause-btn {
  min-height: unset;
  width: auto;
  margin: 0;
  padding: 0.35rem 0.85rem;
  border-radius: 0.65rem;
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pause-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffc329, #ff52d9, #24dce8);
  border-radius: 4px;
}

@keyframes countdownFill {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ========================================================= */
/* PLAY STORE CTA BUTTON                                     */
/* ========================================================= */

.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 20rem);
  margin-bottom: 3.5rem;
}

.playstore-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: 100%;
  min-height: 4rem;
  padding: 0.8rem 1.6rem;
  background: linear-gradient(150deg, #18093d, #08031a);
  border: 2px solid rgba(36, 220, 232, 0.7);
  border-radius: 1.25rem;
  text-decoration: none;
  box-shadow: 0 0 25px rgba(36, 220, 232, 0.25), 0 12px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.playstore-btn:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #ffd44e;
  box-shadow: 0 0 35px rgba(255, 212, 78, 0.4), 0 16px 36px rgba(0, 0, 0, 0.6);
}

.play-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.play-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.play-text .subtext {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.play-text .maintext {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
}

/* ========================================================= */
/* FEATURES GRID                                             */
/* ========================================================= */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
  width: 100%;
  margin-bottom: 3.5rem;
}

.feature-card {
  padding: 1.75rem 1.4rem;
  background: var(--purple-surface);
  border: 1px solid var(--purple-border);
  border-radius: 1.5rem;
  backdrop-filter: blur(16px);
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 195, 41, 0.6);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 195, 41, 0.15);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 1rem;
  font-size: 1.7rem;
  margin-bottom: 1rem;
}

.feature-icon-wrap[data-color="gold"] {
  background: rgba(255, 195, 41, 0.15);
  border: 1px solid rgba(255, 195, 41, 0.4);
}
.feature-icon-wrap[data-color="cyan"] {
  background: rgba(36, 220, 232, 0.15);
  border: 1px solid rgba(36, 220, 232, 0.4);
}
.feature-icon-wrap[data-color="pink"] {
  background: rgba(255, 82, 217, 0.15);
  border: 1px solid rgba(255, 82, 217, 0.4);
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ========================================================= */
/* STEPS SECTION                                             */
/* ========================================================= */

.steps-section {
  width: 100%;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 900;
  margin: 0 0 1.75rem;
  color: #fff;
}

.steps-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.step-card {
  flex: 1;
  min-width: 12rem;
  padding: 1.4rem 1.2rem;
  background: rgba(18, 9, 44, 0.6);
  border: 1px solid rgba(186, 89, 255, 0.25);
  border-radius: 1.25rem;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease;
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: rgba(36, 220, 232, 0.5);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd34e, #ff9f08);
  color: #2b1200;
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
  box-shadow: 0 4px 12px rgba(255, 195, 41, 0.35);
}

.step-card h4 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 800;
}

.step-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.step-connector {
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 195, 41, 0.6), rgba(36, 220, 232, 0.6));
}

@media (max-width: 650px) {
  .step-connector { display: none; }
  .step-card { min-width: 100%; }
}

/* ========================================================= */
/* FOOTER                                                    */
/* ========================================================= */

.landing-footer {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #9ceef2;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-links span {
  color: #745d9b;
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: #8c7ba8;
}

/* ========================================================= */
/* CHALLENGE VIEW STYLES                                     */
/* ========================================================= */

.challenge-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  z-index: 1;
}

.card {
  width: min(100%, 31rem);
  padding: clamp(1.35rem, 5vw, 2.4rem);
  border: 2px solid rgba(186, 89, 255, 0.78);
  border-radius: 2rem;
  background: linear-gradient(150deg, rgba(40, 18, 96, 0.97), rgba(12, 8, 48, 0.98));
  box-shadow: 0 0 0 5px rgba(92, 22, 207, 0.15), 0 28px 85px rgba(0, 0, 0, 0.55), inset 0 1px rgba(255,255,255,0.14);
  text-align: center;
  animation: cardEnter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cardEnter {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.brand-mascot {
  display: block;
  width: clamp(7.5rem, 32vw, 10.5rem);
  aspect-ratio: 1;
  object-fit: contain;
  margin: -1.2rem auto -0.35rem;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.4));
  animation: floatMascot 4.5s ease-in-out infinite alternate;
}

.eyebrow, .label {
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  font-weight: 900;
}

.eyebrow {
  margin: 0;
  color: #d99aff;
}

.card h1 {
  margin: 0.3rem 0 0.65rem;
  font-size: clamp(2.45rem, 10vw, 4rem);
  line-height: 0.95;
  text-shadow: 0 5px 0 #251150;
}

.card h1 span {
  display: block;
  color: var(--gold);
}

.card .intro {
  margin: 0 auto 1.25rem;
  max-width: 26rem;
  color: var(--muted);
  line-height: 1.5;
}

.code-panel {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(77, 224, 235, 0.45);
  border-radius: 1.15rem;
  background: rgba(4, 15, 55, 0.62);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.card .label {
  margin: 0 0 0.3rem;
  color: var(--cyan);
}

#challenge-code {
  display: block;
  color: var(--gold);
  font: 900 clamp(1.9rem, 8vw, 2.75rem) ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-shadow: 0 3px 0 #7b3b00;
}

.card a, .card button {
  min-height: 3.25rem;
  width: 100%;
  margin-top: 0.65rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  font: 900 1rem "Trebuchet MS", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card .primary {
  border: 2px solid #ffd865;
  color: #301600;
  background: linear-gradient(#ffd94a, #ff9f08);
  box-shadow: 0 5px 0 #b14c00, 0 0 25px rgba(255, 188, 25, 0.28);
}

.card .primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #b14c00, 0 0 35px rgba(255, 188, 25, 0.45);
}

.card .secondary {
  border: 1px solid #39e5ef;
  color: #f7ffff;
  background: linear-gradient(135deg, #087d91, #07526e);
  box-shadow: 0 4px 0 #02303e;
}

.card .secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #02303e, 0 0 20px rgba(57, 229, 239, 0.3);
}

.card button {
  border: 1px solid rgba(194, 143, 255, 0.42);
  color: #e6cfff;
  background: rgba(90, 31, 159, 0.28);
}

.card button:hover {
  background: rgba(90, 31, 159, 0.48);
}

.card .help {
  margin: 1rem 0 0;
  color: #bcaed6;
  font-size: 0.84rem;
}

.card .legal-links {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin: 1rem 0 0;
  font-size: 0.8rem;
}

.card .legal-links a {
  display: inline;
  min-height: 0;
  width: auto;
  margin: 0;
  color: #9ceef2;
  font: 700 0.8rem system-ui;
}

.card .legal-links span {
  color: #745d9b;
}

@media (max-width: 380px) {
  .challenge-shell { padding: 0.6rem; }
  .card { border-radius: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
