/* =============================================================
   PuzzlePop ตะลุยด่าน — Game Landing Page Styles
   Mobile-only design (max-width: 480px centered)
   ============================================================= */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Primary Palette */
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  
  /* Accent Colors */
  --accent-pink: #ec4899;
  --accent-orange: #f97316;
  --accent-yellow: #fbbf24;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  
  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #7c3aed 0%, #ec4899 50%, #f97316 100%);
  --gradient-cta: linear-gradient(135deg, #f97316 0%, #ec4899 50%, #7c3aed 100%);
  --gradient-card: linear-gradient(180deg, rgba(124, 58, 237, 0.08) 0%, rgba(236, 72, 153, 0.05) 100%);
  --gradient-dark: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
  
  /* Neutrals */
  --bg-main: #0f0a1e;
  --bg-card: #1a1438;
  --bg-card-hover: #231c4d;
  --text-primary: #ffffff;
  --text-secondary: #c4b5fd;
  --text-muted: #8b7fc7;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(124, 58, 237, 0.15);
  --shadow-md: 0 4px 16px rgba(124, 58, 237, 0.2);
  --shadow-lg: 0 8px 32px rgba(124, 58, 237, 0.3);
  --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.4);
  
  /* Spacing */
  --container-padding: 16px;
  --section-gap: 40px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans Thai', 'Outfit', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ── Animated Background Particles ── */
.bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-particles .particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float-particle linear infinite;
}

.bg-particles .particle:nth-child(1) {
  width: 6px; height: 6px;
  background: var(--accent-pink);
  left: 10%; top: 20%;
  animation-duration: 8s;
  animation-delay: 0s;
}
.bg-particles .particle:nth-child(2) {
  width: 4px; height: 4px;
  background: var(--accent-orange);
  left: 30%; top: 60%;
  animation-duration: 12s;
  animation-delay: -2s;
}
.bg-particles .particle:nth-child(3) {
  width: 8px; height: 8px;
  background: var(--primary-light);
  left: 70%; top: 40%;
  animation-duration: 10s;
  animation-delay: -4s;
}
.bg-particles .particle:nth-child(4) {
  width: 5px; height: 5px;
  background: var(--accent-cyan);
  left: 85%; top: 15%;
  animation-duration: 9s;
  animation-delay: -1s;
}
.bg-particles .particle:nth-child(5) {
  width: 3px; height: 3px;
  background: var(--accent-yellow);
  left: 50%; top: 80%;
  animation-duration: 11s;
  animation-delay: -3s;
}
.bg-particles .particle:nth-child(6) {
  width: 7px; height: 7px;
  background: var(--accent-green);
  left: 20%; top: 90%;
  animation-duration: 14s;
  animation-delay: -5s;
}

@keyframes float-particle {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
  }
  25% {
    transform: translateY(-30px) translateX(15px) scale(1.2);
  }
  50% {
    transform: translateY(-15px) translateX(-10px) scale(0.8);
  }
  75% {
    transform: translateY(-40px) translateX(20px) scale(1.1);
  }
}

/* ── Top Bar ── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--container-padding);
  background: rgba(26, 20, 56, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.top-bar .logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-hero);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.top-bar .logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 16px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.top-bar .btn-login {
  padding: 6px 16px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: var(--radius-full);
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.top-bar .btn-login:hover {
  background: rgba(124, 58, 237, 0.4);
}

/* ── Hero Section ── */
.hero {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.hero-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-banner .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 10, 30, 0) 30%, rgba(15, 10, 30, 0.8) 70%, rgba(15, 10, 30, 1) 100%);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 var(--container-padding) 24px;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-orange);
  margin-bottom: 12px;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 4px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 10px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: var(--radius-md);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.hero-stat .stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-yellow);
}

.hero-stat .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── CTA Button ── */
.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: var(--gradient-cta);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.btn-cta:active {
  transform: scale(0.97);
}

.btn-cta-icon {
  font-size: 20px;
}

/* ── Section Base ── */
.section {
  padding: var(--section-gap) var(--container-padding);
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 24px;
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-pink);
  margin-bottom: 8px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
}

.section-title span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Feature Cards ── */
.features-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(124, 58, 237, 0.15);
  transition: var(--transition-normal);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.feature-icon.purple { background: rgba(124, 58, 237, 0.2); }
.feature-icon.pink { background: rgba(236, 72, 153, 0.2); }
.feature-icon.orange { background: rgba(249, 115, 22, 0.2); }
.feature-icon.cyan { background: rgba(6, 182, 212, 0.2); }

.feature-info h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.feature-info p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── Screenshot Gallery ── */
.screenshots-container {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}

.screenshots-container::-webkit-scrollbar {
  display: none;
}

.screenshots-track {
  display: flex;
  gap: 12px;
  padding: 0 var(--container-padding);
}

.screenshot-card {
  flex-shrink: 0;
  width: 260px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(124, 58, 237, 0.2);
  scroll-snap-align: center;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.screenshot-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-glow);
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.screenshots-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.screenshots-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.3);
  transition: var(--transition-fast);
}

.screenshots-dots .dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

/* ── How to Play Steps ── */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.steps-container::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 52px;
  bottom: 52px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent-pink), var(--accent-orange));
  border-radius: 1px;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(124, 58, 237, 0.15);
  position: relative;
  z-index: 1;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.step-number.s1 { background: var(--primary); }
.step-number.s2 { background: var(--accent-pink); }
.step-number.s3 { background: var(--accent-orange); }

.step-info h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.step-info p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── Reviews Section ── */
.reviews-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-card {
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.review-meta {
  flex: 1;
}

.review-name {
  font-size: 14px;
  font-weight: 600;
}

.review-stars {
  color: var(--accent-yellow);
  font-size: 12px;
  letter-spacing: 2px;
}

.review-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Countdown Timer ── */
.countdown-section {
  text-align: center;
  padding: 24px var(--container-padding);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(236, 72, 153, 0.1) 100%);
  border-top: 1px solid rgba(124, 58, 237, 0.2);
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.countdown-label {
  font-size: 13px;
  color: var(--accent-pink);
  font-weight: 600;
  margin-bottom: 12px;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  min-width: 56px;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.countdown-box .number {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-yellow);
}

.countdown-box .label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.countdown-separator {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-muted);
  padding-bottom: 16px;
}

/* ── Rating Summary ── */
.rating-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.rating-big {
  font-family: 'Outfit', sans-serif;
  font-size: 48px;
  font-weight: 900;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rating-details {
  display: flex;
  flex-direction: column;
}

.rating-stars-big {
  font-size: 18px;
  color: var(--accent-yellow);
  letter-spacing: 2px;
}

.rating-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Sticky Bottom CTA ── */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 12px var(--container-padding);
  background: rgba(15, 10, 30, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(124, 58, 237, 0.2);
  z-index: 200;
  transition: var(--transition-normal);
}

.sticky-cta.hidden {
  transform: translateX(-50%) translateY(100%);
}

.sticky-cta .btn-cta {
  font-size: 15px;
  padding: 12px 20px;
}

/* ── Footer ── */
.footer {
  padding: 32px var(--container-padding);
  padding-bottom: 80px;
  text-align: center;
  border-top: 1px solid rgba(124, 58, 237, 0.1);
}

.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.footer-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-light);
}

/* ── Scroll Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* ── Utility ── */
.text-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Promo Banner Strip ── */
.promo-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px var(--container-padding);
  background: var(--gradient-hero);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  animation: promo-pulse 3s ease-in-out infinite;
}

@keyframes promo-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* ── Download Badges ── */
.download-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.badge-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 11px;
  transition: var(--transition-fast);
}

.badge-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.badge-btn .badge-icon {
  font-size: 20px;
}

.badge-btn .badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.badge-btn .badge-text .small {
  font-size: 9px;
  opacity: 0.7;
}

.badge-btn .badge-text .name {
  font-weight: 700;
  font-size: 13px;
}
