/* ===================================
   BOMB SUDOKU - Main Stylesheet
   =================================== */

/* CSS Variables */
:root {
  /* Colors */
  --primary: #FF6B35;
  --primary-dark: #E85A24;
  --primary-light: #FF8F66;
  --secondary: #1A1A2E;
  --accent: #FFD700;
  --accent-glow: rgba(255, 107, 53, 0.5);
  
  /* Neutrals */
  --white: #FFFFFF;
  --off-white: #F8F9FA;
  --gray-100: #E9ECEF;
  --gray-200: #DEE2E6;
  --gray-300: #CED4DA;
  --gray-400: #ADB5BD;
  --gray-500: #6C757D;
  --gray-600: #495057;
  --gray-700: #343A40;
  --gray-800: #212529;
  --black: #0D0D0D;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #FF8F66 100%);
  --gradient-dark: linear-gradient(180deg, #1A1A2E 0%, #0D0D0D 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.15) 0%, transparent 70%);
  
  /* Typography */
  --font-display: 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Borders */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 40px rgba(255, 107, 53, 0.4);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ===================================
   NAVIGATION
   =================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--white);
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.nav-cta {
  padding: var(--space-sm) var(--space-lg);
  background: var(--gradient-primary);
  color: var(--white);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--secondary);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    var(--gradient-glow),
    linear-gradient(180deg, #1A1A2E 0%, #0D0D0D 100%);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 40%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-2%, 2%) rotate(1deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4xl) var(--space-lg);
}

.hero-text {
  color: var(--white);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.hero-title .highlight {
  color: var(--primary);
  text-shadow: 0 0 40px rgba(255, 107, 53, 0.5);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--gray-300);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary);
}

.hero-stats {
  display: flex;
  gap: var(--space-2xl);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-screenshot {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: float-slow 6s ease-in-out infinite;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* ===================================
   FEATURES SECTION
   =================================== */
.features {
  padding: var(--space-4xl) 0;
  background: var(--off-white);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  text-align: center;
  color: var(--secondary);
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.125rem;
  text-align: center;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.feature-card {
  background: var(--white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid var(--gray-100);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ===================================
   SCREENSHOTS SECTION
   =================================== */
.screenshots {
  padding: var(--space-4xl) 0;
  background: var(--white);
}

.screenshots-carousel {
  display: flex;
  gap: var(--space-xl);
  overflow-x: auto;
  padding: var(--space-md);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.screenshot {
  flex: 0 0 auto;
  width: 280px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  scroll-snap-align: center;
  transition: transform var(--transition-base);
}

.screenshot:hover {
  transform: scale(1.05);
}

/* ===================================
   HOW TO PLAY SECTION
   =================================== */
.how-to-play {
  padding: var(--space-4xl) 0;
  background: var(--secondary);
}

.how-to-play .section-title,
.how-to-play .section-subtitle {
  color: var(--white);
}

.how-to-play .section-subtitle {
  color: var(--gray-400);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  max-width: 600px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.05);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
}

.step:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.step-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--space-xs);
}

.step-content p {
  color: var(--gray-300);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ===================================
   TESTIMONIALS SECTION
   =================================== */
.testimonials {
  padding: var(--space-4xl) 0;
  background: var(--off-white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.testimonial-card {
  background: var(--white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.stars {
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: var(--space-md);
  font-style: italic;
}

.testimonial-author {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ===================================
   DOWNLOAD SECTION
   =================================== */
.download-section {
  padding: var(--space-4xl) 0;
  background: 
    var(--gradient-glow),
    linear-gradient(180deg, var(--secondary) 0%, var(--black) 100%);
}

.download-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.download-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-md);
}

.download-content p {
  font-size: 1.125rem;
  color: var(--gray-300);
  margin-bottom: var(--space-2xl);
}

.download-buttons {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.download-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  background: var(--white);
  color: var(--gray-800);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.download-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.download-btn svg {
  flex-shrink: 0;
}

.download-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.download-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.download-platform {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.download-btn.google-play {
  background: var(--black);
  color: var(--white);
}

.download-info {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
  padding: var(--space-2xl) 0;
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.footer-brand p {
  color: var(--gray-400);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--gray-300);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

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

.footer-copyright {
  color: var(--gray-600);
  font-size: 0.8125rem;
}

/* ===================================
   PRIVACY PAGE
   =================================== */
.privacy-page {
  background: var(--off-white);
}

.privacy-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: var(--space-md) 0;
}

.nav-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--primary);
}

.privacy-header {
  padding: var(--space-3xl) 0;
  background: var(--secondary);
  text-align: center;
}

.privacy-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.last-updated {
  color: var(--gray-400);
  font-size: 0.875rem;
}

.privacy-content {
  padding: var(--space-3xl) 0;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--space-3xl);
  max-width: 1000px;
  margin: 0 auto;
}

.toc {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.toc h2 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: var(--space-md);
}

.toc ul {
  list-style: none;
}

.toc li {
  margin-bottom: var(--space-sm);
}

.toc a {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-600);
  padding: var(--space-xs) 0;
  border-left: 2px solid transparent;
  padding-left: var(--space-md);
  transition: all var(--transition-fast);
}

.toc a:hover {
  color: var(--primary);
  border-left-color: var(--primary);
}

.policy-section {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--gray-200);
}

.policy-section:last-child {
  border-bottom: none;
}

.policy-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: var(--space-md);
}

.policy-section h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.policy-section p {
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.policy-section ul {
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.policy-section li {
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.policy-section a {
  color: var(--primary);
  text-decoration: underline;
}

.policy-section a:hover {
  color: var(--primary-dark);
}

.contact-info {
  background: var(--gray-100);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
}

.contact-info p {
  margin-bottom: var(--space-xs);
}

.privacy-footer {
  background: var(--gray-800);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet - 768px to 1024px */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 100px;
  }
  
  .hero-description {
    max-width: none;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-visual {
    order: -1;
  }
  
  .hero-screenshot {
    max-width: 300px;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .toc {
    position: static;
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
  }
  
  .toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
  
  .toc li {
    margin-bottom: 0;
  }
  
  .toc a {
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    border-left-width: 1px;
  }
  
  .toc a:hover {
    border-color: var(--primary);
    background: rgba(255, 107, 53, 0.05);
  }
}

/* Mobile - up to 767px */
@media (max-width: 767px) {
  .nav {
    padding: var(--space-sm) var(--space-md);
  }
  
  .nav-brand span {
    display: none;
  }
  
  .hero-content {
    padding: 80px var(--space-md) var(--space-2xl);
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    justify-content: center;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .screenshots-carousel {
    padding: var(--space-md) var(--space-lg);
  }
  
  .screenshot {
    width: 260px;
  }
  
  .download-buttons {
    flex-direction: column;
  }
  
  .download-btn {
    justify-content: center;
  }
  
  .download-info {
    flex-direction: column;
    gap: var(--space-xs);
  }
  
  .footer-links {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .policy-section h2 {
    font-size: 1.25rem;
  }
  
  .policy-section h3 {
    font-size: 1rem;
  }
}

/* Small Mobile - up to 375px */
@media (max-width: 375px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero-screenshot {
    max-width: 250px;
  }
  
  .feature-card,
  .testimonial-card {
    padding: var(--space-lg);
  }
  
  .step {
    padding: var(--space-lg);
  }
  
  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

/* ===================================
   UTILITIES
   =================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
