/* 
   CUTE COLOR SORT - OFFICIAL LANDING PAGE
   Premium, Cute, Modern, Gaming, Colorful Soft UI Stylesheet
*/

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   DESIGN VARIABLES & THEMES
   ========================================================================== */
:root {
  /* Day Theme (Default) */
  --primary: #FFCC00;       /* Bright Yellow */
  --primary-rgb: 255, 204, 0;
  --secondary: #9C27B0;     /* Royal Purple */
  --secondary-rgb: 156, 39, 176;
  --accent-pink: #FF4081;   /* Pastel Pink */
  --accent-orange: #FF5722; /* Playful Orange */
  --accent-green: #4CAF50;  /* Fresh Green */
  --accent-blue: #00BCD4;   /* Sky Blue */
  
  --bg-color: #F0F9FF;
  --bg-gradient: linear-gradient(135deg, #FFEBEF 0%, #FFF5E4 30%, #E0F2FE 70%, #E8F5E9 100%);
  --blob-1: rgba(255, 158, 170, 0.4);
  --blob-2: rgba(185, 243, 252, 0.5);
  --blob-3: rgba(254, 243, 199, 0.5);
  
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(255, 255, 255, 0.6);
  --card-shadow: 0 12px 32px rgba(156, 39, 176, 0.08), inset 0 2px 4px rgba(255, 255, 255, 0.5);
  --text-main: #2C184D;     /* Deep Plum */
  --text-muted: #5E5274;
  --border-color: rgba(156, 39, 176, 0.1);
  --tube-bg: rgba(255, 255, 255, 0.3);
  --tube-border: rgba(255, 255, 255, 0.6);
  --tube-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

body.dark-theme {
  /* Cosmic Night Theme */
  --bg-color: #0F0926;
  --bg-gradient: linear-gradient(135deg, #0C051F 0%, #170E35 40%, #2A124D 70%, #451B54 100%);
  --blob-1: rgba(156, 39, 176, 0.3);
  --blob-2: rgba(0, 188, 212, 0.2);
  --blob-3: rgba(255, 64, 129, 0.25);
  
  --card-bg: rgba(30, 20, 60, 0.65);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.05);
  --text-main: #F3F1FA;
  --text-muted: #A39DB5;
  --border-color: rgba(255, 255, 255, 0.08);
  --tube-bg: rgba(255, 255, 255, 0.05);
  --tube-border: rgba(255, 255, 255, 0.15);
  --tube-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   BASE STYLES & RESET
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
  position: relative;
  min-height: 100vh;
}

h1, h2, h3, h4, .font-fredoka {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ==========================================================================
   CUSTOM SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: rgba(var(--secondary-rgb), 0.05);
}
::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 10px;
  border: 2px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-pink);
}

/* ==========================================================================
   SCROLL PROGRESS BAR
   ========================================================================== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--accent-pink), var(--secondary));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-gradient);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-character {
  width: 100px;
  height: 100px;
  animation: preloaderBounce 1.2s infinite ease-in-out;
}

.preloader-text {
  margin-top: 24px;
  font-size: 1.5rem;
  color: var(--secondary);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preloader-bar-container {
  width: 200px;
  height: 10px;
  background: rgba(var(--secondary-rgb), 0.1);
  border-radius: 10px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(var(--secondary-rgb), 0.15);
}

.preloader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-pink));
  border-radius: 10px;
  transition: width 0.1s linear;
}

/* ==========================================================================
   GLOWING BACKGROUND BLOBS
   ========================================================================== */
.bg-blobs {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: blobFloat 20s infinite ease-in-out alternate;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background-color: var(--blob-1);
  top: -100px;
  right: -50px;
  animation-duration: 25s;
}

.blob-2 {
  width: 450px;
  height: 450px;
  background-color: var(--blob-2);
  top: 40%;
  left: -150px;
  animation-duration: 18s;
  animation-delay: -5s;
}

.blob-3 {
  width: 600px;
  height: 600px;
  background-color: var(--blob-3);
  bottom: -100px;
  right: -100px;
  animation-duration: 30s;
  animation-delay: -10s;
}

/* ==========================================================================
   STICKY NAVIGATION HEADER
   ========================================================================== */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  padding: 16px 0;
  transition: all 0.3s ease;
}

.header-nav.sticky {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--card-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
  animation: logoShake 4s infinite ease-in-out;
}

.logo-text {
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(156, 39, 176, 0.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--secondary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Day/Night Theme Button */
.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.1) rotate(15deg);
  background: var(--primary);
  color: #2C184D;
}

/* Premium Download Button */
.btn-nav-download {
  padding: 10px 20px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, #FFB300 100%);
  color: #2C184D;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(255, 204, 0, 0.4), inset 0 2px 4px rgba(255,255,255,0.4);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-nav-download:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 204, 0, 0.5);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.mobile-nav-toggle span {
  display: block;
  width: 20px;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-nav-toggle.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.mobile-nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.mobile-nav-toggle.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 160px 0 100px 0;
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(var(--secondary-rgb), 0.1);
  border: 1px solid rgba(var(--secondary-rgb), 0.15);
  border-radius: 50px;
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 24px;
  animation: pulseGlow 2s infinite alternate;
}

.hero-title {
  font-size: 4.2rem;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 20px;
  position: relative;
}

.hero-title span {
  display: block;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* BUTTON SYSTEMS */
.btn-primary {
  padding: 16px 36px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, #FFA000 100%);
  color: #2C184D;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 10px 25px rgba(255, 204, 0, 0.4), inset 0 2px 4px rgba(255,255,255,0.5);
  border: 2px solid rgba(255,255,255,0.4);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 15px 30px rgba(255, 204, 0, 0.5);
}

.btn-secondary {
  padding: 16px 36px;
  border-radius: 50px;
  background: var(--card-bg);
  color: var(--text-main);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: var(--card-shadow);
  border: 2px solid var(--card-border);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-secondary:hover {
  transform: translateY(-4px) scale(1.03);
  background: rgba(var(--secondary-rgb), 0.05);
}

/* HERO VISUAL COLUMN */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-device-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.device-mockup.landscape {
  width: 100%;
  background: #111;
  border-radius: 32px;
  padding: 10px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
  border: 4px solid #333;
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  animation: mainFloat 6s infinite ease-in-out;
}

.device-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
}

.screenshot-slides {
  display: flex;
  width: 400%; /* 4 slides */
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.screenshot-img {
  width: 25%; /* 1/4 of container width */
  height: 100%;
  object-fit: cover;
}

.device-home-bar {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  z-index: 10;
}

.hero-glow {
  position: absolute;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.3) 0%, rgba(var(--secondary-rgb), 0.05) 50%, transparent 70%);
  animation: heroGlowPulse 4s infinite alternate;
  z-index: 1;
}

/* Floating particle shapes */
.floating-shape {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.08));
}

.shape-1 {
  width: 55px;
  height: 55px;
  top: 10%;
  left: -5%;
  animation: floatingBounce 5s infinite ease-in-out;
}
.shape-2 {
  width: 45px;
  height: 45px;
  bottom: 15%;
  right: -5%;
  animation: floatingBounce 7s infinite ease-in-out -2s;
}
.shape-3 {
  width: 35px;
  height: 35px;
  top: 40%;
  right: -10%;
  animation: floatingRotate 12s infinite linear;
}
.shape-4 {
  width: 40px;
  height: 40px;
  bottom: 5%;
  left: 10%;
  animation: floatingBounce 6s infinite ease-in-out -4s;
}

/* ==========================================================================
   SECTIONS GENERAL STYLING
   ========================================================================== */
.section-wrapper {
  padding: 100px 0;
  position: relative;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(var(--secondary-rgb), 0.1);
  color: var(--secondary);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.section-title {
  font-size: 2.8rem;
  color: var(--text-main);
  text-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 16px auto 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   FEATURES SECTION
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 28px;
  padding: 32px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 1;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--accent-pink));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(156, 39, 176, 0.12);
  border-color: rgba(var(--secondary-rgb), 0.25);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
}

/* Distinctive card colored categories */
.feat-cyan { background: rgba(0, 188, 212, 0.12); color: #00BCD4; }
.feat-purple { background: rgba(156, 39, 176, 0.12); color: #9C27B0; }
.feat-pink { background: rgba(255, 64, 129, 0.12); color: #FF4081; }
.feat-orange { background: rgba(255, 87, 34, 0.12); color: #FF5722; }
.feat-yellow { background: rgba(255, 204, 0, 0.15); color: #FFB300; }
.feat-green { background: rgba(76, 175, 80, 0.12); color: #4CAF50; }

.feature-icon {
  width: 32px;
  height: 32px;
  stroke-width: 2.2;
}

.feature-card h3 {
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   GAMEPLAY MINI-GAME SECTION
   ========================================================================== */
.gameplay-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: center;
}

/* Interactive Timeline Guide */
.timeline-guide {
  position: relative;
  padding-left: 20px;
}

.timeline-step {
  position: relative;
  padding-left: 45px;
  padding-bottom: 36px;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  width: 2px;
  height: calc(100% - 16px);
  background: var(--border-color);
  z-index: 1;
}

.timeline-step:last-child::before {
  display: none;
}

.step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-step.active .step-num {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.timeline-step h4 {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.timeline-step p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Playable Sorting Puzzle Arena */
.mini-game-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 32px;
  padding: 30px;
  position: relative;
  text-align: center;
}

.mini-game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.mini-game-title {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
}

.mini-game-title svg {
  width: 24px;
  height: 24px;
}

.mini-game-actions {
  display: flex;
  gap: 12px;
}

.btn-game-reset {
  padding: 8px 16px;
  background: rgba(var(--secondary-rgb), 0.1);
  color: var(--secondary);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-game-reset:hover {
  background: var(--secondary);
  color: #fff;
  transform: scale(1.05);
}

/* Puzzle Tubes Container */
.puzzle-tubes-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 40px 10px;
  min-height: 240px;
  position: relative;
}

.glass-tube {
  width: 68px;
  height: 180px;
  background: var(--tube-bg);
  border: 3px solid var(--tube-border);
  border-bottom-left-radius: 34px;
  border-bottom-right-radius: 34px;
  border-top: none;
  box-shadow: var(--tube-shadow), inset 0 0 15px rgba(255, 255, 255, 0.4);
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  padding-bottom: 12px;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.glass-tube::before {
  /* Inner glass reflections */
  content: '';
  position: absolute;
  top: 10px;
  left: 6px;
  width: 4px;
  height: 70%;
  background: rgba(255,255,255,0.3);
  border-radius: 10px;
  pointer-events: none;
}

.glass-tube:hover {
  transform: translateY(-5px);
  background: rgba(var(--secondary-rgb), 0.05);
}

.glass-tube.selected {
  border-color: var(--secondary);
  box-shadow: var(--tube-shadow), 0 0 15px rgba(156, 39, 176, 0.25);
  transform: translateY(-8px);
}

/* Character Block Items */
.char-block {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1), inset 0 2px 4px rgba(255,255,255,0.4);
}

.char-block svg {
  width: 100%;
  height: 100%;
}

/* Animation state when selected / floating upward */
.char-block.selected-up {
  transform: translateY(-30px);
  animation: charFloatAnim 1.5s infinite ease-in-out alternate;
}

/* Game Info Bar */
.game-instructions-footer {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 15px;
}

/* Level Win Modal Overlays */
.game-victory-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 24, 77, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.game-victory-overlay.show {
  opacity: 1;
  visibility: visible;
}

.victory-box {
  transform: scale(0.7);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
}

.game-victory-overlay.show .victory-box {
  transform: scale(1);
}

.victory-icon {
  width: 90px;
  height: 90px;
  animation: mainFloat 4s infinite ease-in-out;
  margin-bottom: 20px;
}

.victory-title {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 12px;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.victory-desc {
  font-size: 1rem;
  margin-bottom: 24px;
  opacity: 0.9;
}

/* Virtual Confetti elements */
.confetti-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  animation: confettiFall 3s infinite linear;
}

/* ==========================================================================
   SCREENSHOTS CAROUSEL
   ========================================================================== */
.carousel-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Smartphone Mockup */
.phone-mockup-wrapper {
  position: relative;
  width: 320px;
  height: 650px;
  background: #111;
  border: 12px solid #2a2a2a;
  border-radius: 46px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25), inset 0 2px 4px rgba(255,255,255,0.1);
  overflow: hidden;
  z-index: 10;
}

.phone-speaker {
  width: 60px;
  height: 6px;
  background: #444;
  border-radius: 10px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #EBF8FF;
  overflow: hidden;
  display: flex;
}

.carousel-slides {
  display: flex;
  width: 300%; /* 3 slides */
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.carousel-slide {
  width: 33.33333%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
}

/* Screen Slide 1: Menu Screen Mockup */
.mock-screen-menu {
  background: linear-gradient(135deg, #FF9EAA 0%, #FFD0D0 50%, #B9F3FC 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 20px 20px;
}

.mock-menu-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 15px;
}

.mock-star-counter {
  background: rgba(255,255,255,0.7);
  padding: 4px 12px;
  border-radius: 20px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--secondary);
}

.mock-logo-title {
  font-size: 1.8rem;
  text-align: center;
  color: var(--secondary);
  text-shadow: 0 2px 4px rgba(255,255,255,0.8);
  margin-top: 30px;
  line-height: 1.1;
}

.mock-logo-mascot {
  width: 95px;
  height: 95px;
  margin: 20px 0;
  animation: mainFloat 3s infinite ease-in-out;
}

.mock-menu-btn-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 85%;
}

.mock-menu-btn {
  padding: 10px;
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.4);
}

.mock-btn-play { background: #FFCC00; color: #2C184D; }
.mock-btn-levels { background: #4ADE80; color: #1E4620; }
.mock-btn-achieve { background: #60A5FA; color: #1E293B; }

/* Screen Slide 2: Levels Select Screen Mockup */
.mock-screen-levels {
  background: linear-gradient(135deg, #FFF 0%, #E0F2FE 100%);
  padding: 40px 16px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mock-levels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 25px;
}

.mock-level-dot {
  aspect-ratio: 1;
  background: #FFF;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.8rem;
  color: #64748B;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.mock-level-dot.completed {
  background: #FEF08A;
  border-color: #FACC15;
  color: #854D0E;
}

.mock-level-dot.active {
  background: #4ADE80;
  border-color: #22C55E;
  color: #FFF;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(34, 197, 94, 0.25);
}

.mock-level-stars {
  font-size: 0.55rem;
  color: #FBBF24;
}

/* Screen Slide 3: Live Gameplay Mockup */
.mock-screen-gameplay {
  background: #FCFBF7;
  padding: 40px 14px 20px 14px;
  display: flex;
  flex-direction: column;
}

.mock-gameplay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 8px;
}

.mock-level-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  color: var(--secondary);
}

.mock-gameplay-tubes {
  display: flex;
  justify-content: space-around;
  margin-top: 40px;
  gap: 6px;
}

.mock-tube {
  width: 38px;
  height: 120px;
  background: rgba(0,0,0,0.03);
  border: 1.5px solid #CBD5E1;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  border-top: none;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  padding-bottom: 6px;
  gap: 4px;
}

.mock-char {
  width: 26px;
  height: 26px;
  border-radius: 5px;
}

.m-yellow { background: #FFD000; }
.m-purple { background: #A78BFA; }
.m-green { background: #4ADE80; }

/* Slider Controls */
.carousel-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 30px;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.carousel-btn:hover {
  background: var(--secondary);
  color: #fff;
  transform: scale(1.1);
}

.carousel-dots {
  display: flex;
  gap: 10px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(var(--secondary-rgb), 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--secondary);
  width: 24px;
  border-radius: 10px;
}

/* ==========================================================================
   WHY PLAY (STATISTICS) SECTION
   ========================================================================== */
.stats-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 28px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(156, 39, 176, 0.1);
}

.stat-num {
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.stat-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   DOWNLOAD PROMO SECTION
   ========================================================================== */
.download-promo-card {
  background: linear-gradient(135deg, var(--secondary) 0%, #5E1675 100%);
  border-radius: 36px;
  padding: 60px;
  color: #FFF;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(94, 22, 117, 0.3);
}

.download-promo-card::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,204,0,0.15) 0%, transparent 70%);
  top: -100px;
  right: -50px;
}

.download-promo-text h2 {
  font-size: 2.8rem;
  margin-bottom: 16px;
  color: var(--primary);
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.download-promo-text p {
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 30px;
}

.download-store-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-gp-large {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  background: #000;
  color: #fff;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.15);
  font-family: 'Poppins', sans-serif;
  text-align: left;
  transition: all 0.3s;
  align-self: flex-start;
}

.btn-gp-large:hover {
  background: #111;
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-gp-large svg {
  width: 32px;
  height: 32px;
}

.btn-gp-sub {
  font-size: 0.75rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-gp-main {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
}

.package-info {
  font-family: monospace;
  font-size: 0.8rem;
  opacity: 0.6;
}

.download-promo-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.download-promo-img {
  width: 80%;
  max-width: 280px;
  animation: mainFloat 5s infinite ease-in-out;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.3));
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */
.faq-accordion-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(var(--secondary-rgb), 0.2);
}

.faq-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.faq-header h3 {
  font-size: 1.15rem;
  color: var(--text-main);
  font-weight: 600;
  padding-right: 20px;
}

.faq-toggle-icon {
  width: 24px;
  height: 24px;
  color: var(--secondary);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
}

.faq-item.open .faq-toggle-icon {
  transform: rotate(180deg);
  color: var(--accent-pink);
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.faq-content {
  padding: 0 24px 24px 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-wrapper {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 30px 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-meta-pkg {
  font-size: 0.8rem;
  font-family: monospace;
  color: var(--text-muted);
  opacity: 0.7;
}

.footer-links-col h4 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: all 0.2s;
  display: inline-block;
}

.footer-link:hover {
  color: var(--secondary);
  transform: translateX(4px);
}

.footer-social-col h4 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 24px;
}

.footer-social-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.social-btn:hover {
  transform: scale(1.1) translateY(-2px);
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
#btn-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: #2C184D;
  border: 2px solid rgba(255,255,255,0.4);
  box-shadow: 0 8px 24px rgba(255, 204, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) translateY(10px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#btn-back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

#btn-back-to-top:hover {
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(156, 39, 176, 0.3);
  transform: scale(1.1) translateY(-3px);
}

#btn-back-to-top svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}

/* ==========================================================================
   KEYFRAMES ANIMATIONS
   ========================================================================== */
@keyframes preloaderBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(0.95); }
}

@keyframes mainFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes logoShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -60px) scale(1.15); }
  100% { transform: translate(-20px, 40px) scale(0.95); }
}

@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(156,39,176,0); }
  100% { transform: scale(1.03); box-shadow: 0 0 15px rgba(156,39,176,0.15); }
}

@keyframes heroGlowPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.1); opacity: 1; }
}

@keyframes charFloatAnim {
  0% { transform: translateY(-20px) rotate(0); }
  100% { transform: translateY(-32px) rotate(2deg); }
}

@keyframes floatingBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(8deg); }
}

@keyframes floatingRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes confettiFall {
  0% { transform: translateY(-50px) rotate(0); opacity: 1; }
  100% { transform: translateY(200px) rotate(360deg); opacity: 0; }
}

/* ==========================================================================
   BUTTON RIPPLE EFFECT
   ========================================================================== */
.ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  animation: rippleEffect 0.6s linear;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ==========================================================================
   REVEAL ON SCROLL CLASSES
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  html {
    font-size: 15px;
  }
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 50px;
  }
  .hero-subtitle {
    margin: 0 auto 36px auto;
  }
  .hero-buttons {
    justify-content: center;
  }
  .gameplay-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .download-promo-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .download-store-row {
    align-items: center;
  }
  .btn-gp-large {
    align-self: center;
  }
  .stats-bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background: var(--bg-gradient);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 100px 24px 40px 24px;
    gap: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: top 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
    z-index: 98;
    border-bottom: 2px solid var(--border-color);
  }
  
  .nav-links.open {
    top: 0;
  }
  
  .mobile-nav-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: 3.2rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .stats-bento {
    grid-template-columns: 1fr;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-buttons {
    flex-direction: column;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .nav-actions {
    gap: 8px;
  }
  .btn-nav-download {
    display: none; /* Hide on small mobile to save space */
  }
}
