/**
 * The Puzzle Architect - Homepage Styles
 * All classes prefixed with index-
 * Enhanced with animations and visual polish
 */

/* ============================================================================
   CSS CUSTOM PROPERTIES
   ============================================================================ */

:root {
  --index-primary: #0052CC;
  --index-primary-dark: #003d99;
  --index-primary-light: #1a6dff;
  --index-accent: #FFD700;
  --index-accent-glow: rgba(255, 215, 0, 0.4);
  --index-glass-bg: rgba(255, 255, 255, 0.1);
  --index-glass-border: rgba(255, 255, 255, 0.2);
  --index-shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
  --index-shadow-lift: 0 20px 40px rgba(0, 0, 0, 0.15);
  --index-shadow-glow: 0 0 30px var(--index-accent-glow);
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.index-hero {
  background: linear-gradient(135deg, #0052CC 0%, #1a3a6e 50%, #003d99 100%);
  background-size: 400% 400%;
  animation: index-gradient-shift 15s ease infinite;
  color: #fff;
  padding: 120px 20px;
  text-align: center;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Animated gradient background */
@keyframes index-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Floating Sudoku numbers container */
.index-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.03) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(255,215,0,0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Floating numbers background */
.index-hero-floating {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.index-floating-number {
  position: absolute;
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.06);
  animation: index-float 20s infinite ease-in-out;
  user-select: none;
}

.index-floating-number:nth-child(1) { left: 5%; top: 10%; animation-delay: 0s; }
.index-floating-number:nth-child(2) { left: 15%; top: 60%; animation-delay: -3s; font-size: 3rem; }
.index-floating-number:nth-child(3) { left: 25%; top: 30%; animation-delay: -6s; font-size: 5rem; }
.index-floating-number:nth-child(4) { left: 40%; top: 80%; animation-delay: -9s; }
.index-floating-number:nth-child(5) { left: 55%; top: 15%; animation-delay: -12s; font-size: 3.5rem; }
.index-floating-number:nth-child(6) { left: 70%; top: 50%; animation-delay: -15s; font-size: 4.5rem; }
.index-floating-number:nth-child(7) { left: 85%; top: 25%; animation-delay: -18s; }
.index-floating-number:nth-child(8) { left: 90%; top: 70%; animation-delay: -2s; font-size: 3rem; }
.index-floating-number:nth-child(9) { left: 50%; top: 45%; animation-delay: -7s; font-size: 6rem; }

@keyframes index-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.06;
  }
  25% {
    transform: translateY(-30px) rotate(5deg);
    opacity: 0.08;
  }
  50% {
    transform: translateY(-15px) rotate(-3deg);
    opacity: 0.04;
  }
  75% {
    transform: translateY(-40px) rotate(2deg);
    opacity: 0.07;
  }
}

.index-hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.index-hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 25px;
  line-height: 1.15;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: index-hero-fade-in 1s ease forwards 0.2s;
}

.index-hero-title span {
  display: inline-block;
  background: linear-gradient(135deg, #fff 0%, #FFD700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.index-hero-subtitle {
  font-size: 1.4rem;
  margin-bottom: 45px;
  opacity: 0;
  line-height: 1.7;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: index-hero-fade-in 1s ease forwards 0.4s;
}

@keyframes index-hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.index-hero-cta {
  display: flex;
  gap: 25px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: index-hero-fade-in 1s ease forwards 0.6s;
}

.index-cta-button {
  padding: 18px 40px;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.index-cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.index-cta-button:hover::before {
  left: 100%;
}

.index-cta-primary {
  background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
  color: var(--index-primary-dark);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.index-cta-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 30px rgba(255, 215, 0, 0.5);
}

.index-cta-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.index-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.15);
}

/* ============================================================================
   SECTION STYLES
   ============================================================================ */

.index-section-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--index-primary);
  margin-bottom: 15px;
  text-align: center;
  position: relative;
}

.index-section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--index-primary) 0%, var(--index-accent) 100%);
  margin: 20px auto 0;
  border-radius: 2px;
}

.index-section-subtitle {
  font-size: 1.25rem;
  color: #666;
  text-align: center;
  margin-bottom: 60px;
}

section {
  padding: 100px 20px;
}

/* Scroll Animation Classes */
.index-animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.index-animate-on-scroll.index-visible {
  opacity: 1;
  transform: translateY(0);
}

.index-animate-delay-1 { transition-delay: 0.1s; }
.index-animate-delay-2 { transition-delay: 0.2s; }
.index-animate-delay-3 { transition-delay: 0.3s; }
.index-animate-delay-4 { transition-delay: 0.4s; }
.index-animate-delay-5 { transition-delay: 0.5s; }
.index-animate-delay-6 { transition-delay: 0.6s; }

/* ============================================================================
   FEATURED BOOKS SECTION
   ============================================================================ */

.index-featured {
  background: #fff;
}

.index-featured-container {
  max-width: 1400px;
  margin: 0 auto;
}

.index-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.index-book-card {
  background: #fff;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 82, 204, 0.08);
  position: relative;
}

.index-book-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--index-primary), var(--index-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.index-book-card:hover::before {
  transform: scaleX(1);
}

.index-book-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 82, 204, 0.15);
}

.index-book-card-coming {
  opacity: 0.8;
}

.index-book-cover-wrapper {
  position: relative;
  background: #f5f5f5;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.index-book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.index-book-cover-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  border-radius: 12px;
}

.index-book-cover-placeholder.medium {
  background: linear-gradient(135deg, #3d9140 0%, #5cb85c 100%);
}

.index-book-cover-placeholder.hard {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.index-book-cover-placeholder.expert {
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
}

.index-book-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
  color: var(--index-primary-dark);
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 25px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  animation: index-badge-pulse 2s ease-in-out infinite;
}

@keyframes index-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.index-book-coming-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: white;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.index-book-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0052CC;
  padding: 20px 20px 5px;
}

.index-book-subtitle {
  font-size: 0.95rem;
  color: #666;
  padding: 0 20px;
}

.index-book-count {
  font-size: 1.1rem;
  color: #0052CC;
  font-weight: 600;
  padding: 10px 20px 0;
}

.index-book-description {
  font-size: 0.95rem;
  color: #555;
  padding: 15px 20px;
  flex-grow: 1;
  line-height: 1.6;
}

.index-book-cta {
  background: linear-gradient(135deg, var(--index-primary) 0%, var(--index-primary-dark) 100%);
  color: #fff;
  padding: 16px 20px;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.index-book-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.index-book-cta:hover::before {
  left: 100%;
}

.index-book-cta:hover {
  background: linear-gradient(135deg, var(--index-primary-light) 0%, var(--index-primary) 100%);
}

.index-book-cta-disabled {
  background: linear-gradient(135deg, #bbb 0%, #999 100%);
  cursor: not-allowed;
}

.index-book-cta-disabled:hover {
  background: linear-gradient(135deg, #bbb 0%, #999 100%);
}

.index-book-cta-disabled::before {
  display: none;
}

.index-featured-cta {
  text-align: center;
}

.index-view-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--index-primary);
  text-decoration: none;
  padding: 18px 35px;
  border: 2px solid var(--index-primary);
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.index-view-all::after {
  content: '→';
  transition: transform 0.3s ease;
}

.index-view-all:hover {
  background: var(--index-primary);
  color: #fff;
  transform: translateX(5px);
  box-shadow: 0 10px 30px rgba(0, 82, 204, 0.3);
}

.index-view-all:hover::after {
  transform: translateX(5px);
}

/* ============================================================================
   DAILY PUZZLE TEASER SECTION
   ============================================================================ */

.index-puzzle-teaser {
  background: linear-gradient(180deg, #f0f4ff 0%, #e8f0ff 50%, #dbe7ff 100%);
  position: relative;
  overflow: hidden;
}

.index-puzzle-teaser::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 82, 204, 0.05) 0%, transparent 70%);
  top: -250px;
  right: -250px;
  border-radius: 50%;
}

.index-puzzle-teaser::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
  bottom: -200px;
  left: -200px;
  border-radius: 50%;
}

.index-puzzle-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.index-puzzle-content h2 {
  color: #0052CC;
}

.index-puzzle-description {
  font-size: 1.1rem;
  color: #555;
  margin: 20px 0 30px;
  line-height: 1.8;
}

.index-puzzle-preview {
  background: #fff;
  padding: 35px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 82, 204, 0.12);
  position: relative;
  z-index: 1;
}

.index-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.index-mini-grid.index-9x9 {
  grid-template-columns: repeat(9, 1fr) !important;
  gap: 4px !important;
}

.index-mini-grid.index-9x9 .index-grid-cell {
  padding: 6px !important;
  min-height: 30px !important;
  font-size: 0.9rem !important;
}

.index-mini-grid.index-9x9 .index-grid-cell.empty::before {
  font-size: 0.8rem !important;
}

/* 3x3 box borders - right side of columns 3 and 6 */
.index-mini-grid.index-9x9 .index-grid-cell:nth-child(9n+3),
.index-mini-grid.index-9x9 .index-grid-cell:nth-child(9n+6) {
  border-right: 3px solid var(--index-primary) !important;
}

/* 3x3 box borders - bottom of rows 3 and 6 */
.index-mini-grid.index-9x9 .index-grid-cell:nth-child(n+19):nth-child(-n+27),
.index-mini-grid.index-9x9 .index-grid-cell:nth-child(n+46):nth-child(-n+54) {
  border-bottom: 3px solid var(--index-primary) !important;
}

.index-grid-cell {
  background: linear-gradient(145deg, #f8f9ff, #eef2ff);
  border: 2px solid #dde5ff;
  padding: 20px;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--index-primary);
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all 0.3s ease;
  animation: index-cell-appear 0.5s ease backwards;
}

.index-grid-cell:nth-child(1) { animation-delay: 0.1s; }
.index-grid-cell:nth-child(2) { animation-delay: 0.15s; }
.index-grid-cell:nth-child(3) { animation-delay: 0.2s; }
.index-grid-cell:nth-child(4) { animation-delay: 0.25s; }
.index-grid-cell:nth-child(5) { animation-delay: 0.3s; }
.index-grid-cell:nth-child(6) { animation-delay: 0.35s; }
.index-grid-cell:nth-child(7) { animation-delay: 0.4s; }
.index-grid-cell:nth-child(8) { animation-delay: 0.45s; }
.index-grid-cell:nth-child(9) { animation-delay: 0.5s; }

@keyframes index-cell-appear {
  from {
    opacity: 0;
    transform: scale(0.8) rotateY(20deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotateY(0);
  }
}

.index-grid-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(0, 82, 204, 0.15);
  border-color: var(--index-primary);
}

.index-grid-cell.empty {
  color: #c5d0e6;
  font-size: 0.75rem;
  background: linear-gradient(145deg, #fff, #f8faff);
}

.index-grid-cell.empty::before {
  content: '?';
  font-size: 1.5rem;
  animation: index-question-pulse 2s ease-in-out infinite;
}

@keyframes index-question-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

@keyframes index-number-pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================================================
   FEATURES SECTION
   ============================================================================ */

.index-features {
  background: #fff;
}

.index-features-container {
  max-width: 1400px;
  margin: 0 auto;
}

.index-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.index-feature-card {
  text-align: center;
  padding: 40px 30px;
  background: #fff;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.index-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 82, 204, 0.03) 0%, rgba(255, 215, 0, 0.03) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.index-feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 82, 204, 0.1);
}

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

.index-feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef4ff 0%, #e0ebff 100%);
  border-radius: 20px;
  font-size: 2rem;
  color: var(--index-primary);
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.index-feature-card:hover .index-feature-icon {
  background: linear-gradient(135deg, var(--index-primary) 0%, var(--index-primary-dark) 100%);
  color: #fff;
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 30px rgba(0, 82, 204, 0.3);
}

.index-feature-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.index-feature-description {
  font-size: 1rem;
  color: #666;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ============================================================================
   STATISTICS SECTION
   ============================================================================ */

.index-stats {
  background: linear-gradient(135deg, #0052CC 0%, #1a3a6e 50%, #003d99 100%);
  background-size: 400% 400%;
  animation: index-gradient-shift 15s ease infinite;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.index-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,215,0,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.index-stats-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.index-stats h2 {
  color: #fff;
}

.index-stats .index-section-title::after {
  background: linear-gradient(135deg, #fff 0%, var(--index-accent) 100%);
}

.index-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 50px;
  margin-top: 60px;
}

.index-stat-item {
  text-align: center;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
}

.index-stat-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

.index-stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  display: block;
  background: linear-gradient(135deg, #FFD700 0%, #FFF 50%, #FFD700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: index-stat-shimmer 3s ease-in-out infinite;
  background-size: 200% 100%;
}

@keyframes index-stat-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.index-stat-label {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 500;
}

/* ============================================================================
   LEARN SECTION
   ============================================================================ */

.index-learn {
  background: linear-gradient(180deg, #fff 0%, #f0f4ff 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.index-learn::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 82, 204, 0.04) 0%, transparent 70%);
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
}

.index-learn-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.index-learn-description {
  font-size: 1.15rem;
  color: #555;
  margin: 25px 0 40px;
  line-height: 1.8;
}

.index-learn .index-cta-secondary {
  background: #0052CC;
  color: #fff;
  border: 2px solid #0052CC;
}

.index-learn .index-cta-secondary:hover {
  background: #003d99;
  border-color: #003d99;
}

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

@media (max-width: 1024px) {
  .index-hero-title {
    font-size: 2.5rem;
  }

  .index-hero-subtitle {
    font-size: 1.1rem;
  }

  .index-section-title {
    font-size: 2rem;
  }

  .index-puzzle-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  section {
    padding: 50px 15px;
  }

  .index-hero {
    padding: 80px 15px;
    min-height: 400px;
  }

  .index-hero-title {
    font-size: 2rem;
  }

  .index-hero-subtitle {
    font-size: 1rem;
  }

  .index-hero-cta {
    flex-direction: column;
    gap: 10px;
  }

  .index-cta-button {
    width: 100%;
  }

  .index-section-title {
    font-size: 1.8rem;
  }

  .index-section-subtitle {
    margin-bottom: 30px;
  }

  .index-books-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .index-puzzle-container {
    gap: 30px;
  }

  .index-features-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .index-feature-card {
    padding: 20px;
  }

  .index-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .index-stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  section {
    padding: 40px 10px;
  }

  .index-hero {
    padding: 60px 10px;
  }

  .index-hero-title {
    font-size: 1.5rem;
  }

  .index-hero-subtitle {
    font-size: 0.9rem;
  }

  .index-section-title {
    font-size: 1.3rem;
  }

  .index-stat-number {
    font-size: 1.8rem;
  }

  .index-stat-label {
    font-size: 0.85rem;
  }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

/* ============================================================================
   ENHANCED ANIMATIONS
   ============================================================================ */

/* Staggered card animations handled by scroll observer in JS */

/* Floating animation for decorative elements */
@keyframes index-gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Pulse animation for interactive elements */
@keyframes index-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 82, 204, 0.4); }
  50% { box-shadow: 0 0 0 15px rgba(0, 82, 204, 0); }
}

.index-cta-primary:focus {
  animation: index-pulse 1.5s ease-in-out infinite;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .index-hero {
    background-size: 100% 100%;
  }
  
  .index-animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}
