/* =============================================
   Bookyspin - Custom CSS
   Theme: Booky Playroom Flow
   ============================================= */

/* CSS Variables */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary: #f59e0b;
  --secondary-light: #fbbf24;
  --accent: #10b981;
  --bg-dark: #0f172a;
  --bg-medium: #1e293b;
  --bg-light: #334155;
  --bg-card: #1e293b;
  --text-light: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #1e293b;
  --gradient-start: #6366f1;
  --gradient-end: #8b5cf6;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Base Body */
body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  overflow-x: hidden;
}

/* =============================================
   Keyframe Animations
   ============================================= */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.25rem); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 1.25rem rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 2.5rem rgba(99, 102, 241, 0.8); }
}

@keyframes particle-float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes slide-in-up {
  from { opacity: 0; transform: translateY(1.875rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.5rem); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

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

/* =============================================
   Animation Classes
   ============================================= */

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-slide-up {
  animation: slide-in-up 0.6s ease-out forwards;
}

.animate-bounce-soft {
  animation: bounce-soft 2s ease-in-out infinite;
}

.animate-fade-in {
  animation: fade-in 0.8s ease-out forwards;
}

.animate-scale-in {
  animation: scale-in 0.5s ease-out forwards;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
}

/* Particle System */
.particle {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  animation: particle-float linear infinite;
}

.particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Parallax */
.parallax-layer {
  transition: transform 0.1s ease-out;
}

/* =============================================
   Navigation Styles
   ============================================= */

.nav-sticky {
  backdrop-filter: blur(0.75rem);
  background-color: rgba(15, 23, 42, 0.95);
  transition: all 0.3s ease;
}

.nav-sticky.scrolled {
  box-shadow: 0 0.25rem 1.875rem rgba(0, 0, 0, 0.3);
}

.mobile-menu {
  background-color: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(1rem);
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  width: 0;
  height: 0.125rem;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* =============================================
   Hero Section
   ============================================= */

.hero-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(30, 41, 59, 0.85) 50%,
    rgba(15, 23, 42, 0.92) 100%
  );
}

.bonus-badge {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: 1rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.bonus-badge::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shimmer 3s infinite;
}

/* =============================================
   Buttons
   ============================================= */

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-light);
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.625rem 2.5rem rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 0.125rem solid var(--secondary);
  color: var(--secondary);
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--secondary);
  color: var(--text-dark);
}

.btn-game {
  background: linear-gradient(135deg, var(--accent), #059669);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.btn-game:hover {
  transform: scale(1.05);
  box-shadow: 0 0.25rem 1rem rgba(16, 185, 129, 0.4);
}

/* =============================================
   Game Cards
   ============================================= */

.game-card {
  background: var(--bg-card);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

.game-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

.game-card img {
  transition: transform 0.3s ease;
}

.game-card:hover img {
  transform: scale(1.05);
}

/* =============================================
   Steps Section
   ============================================= */

.step-badge {
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  box-shadow: 0 0.25rem 1rem rgba(99, 102, 241, 0.4);
}

.step-card {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 0.0625rem solid rgba(255, 255, 255, 0.05);
}

.step-card:hover {
  transform: translateY(-0.25rem);
  border-color: var(--primary);
}

/* =============================================
   Tables
   ============================================= */

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

.payment-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 0.75rem;
  overflow: hidden;
}

.payment-table th,
.payment-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

.payment-table th {
  background: var(--bg-medium);
  color: var(--text-light);
  font-weight: 600;
}

.payment-table tr:hover {
  background: rgba(99, 102, 241, 0.1);
}

/* =============================================
   Review Blocks
   ============================================= */

.review-block {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 2rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.review-block:hover {
  border-color: var(--primary);
}

/* Provider Cloud */
.provider-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.provider-tag {
  background: var(--bg-light);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.provider-tag:hover {
  background: var(--primary);
  transform: scale(1.05);
}

/* =============================================
   Promo Cards
   ============================================= */

.promo-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-medium));
  border-radius: 1rem;
  padding: 2rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.promo-card:hover {
  transform: translateY(-0.5rem);
  border-color: var(--secondary);
  box-shadow: 0 1rem 2rem rgba(245, 158, 11, 0.2);
}

/* =============================================
   FAQ Section
   ============================================= */

.faq-item {
  background: var(--bg-card);
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 0.0625rem solid rgba(255, 255, 255, 0.05);
}

.faq-question {
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-light);
  font-weight: 500;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: rgba(99, 102, 241, 0.1);
}

.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  color: var(--text-muted);
}

.faq-item.active .faq-answer {
  padding: 1.25rem;
  max-height: 31.25rem;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform 0.3s ease;
}

/* =============================================
   Footer
   ============================================= */

.footer {
  background: var(--bg-medium);
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

.footer a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

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

.age-badge {
  width: 3rem;
  height: 3rem;
  background: #dc2626;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
}

/* =============================================
   SVG Patterns
   ============================================= */

.pattern-dots {
  background-image: radial-gradient(rgba(99, 102, 241, 0.15) 0.0625rem, transparent 0.0625rem);
  background-size: 1.25rem 1.25rem;
}

.pattern-grid {
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.1) 0.0625rem, transparent 0.0625rem),
    linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0.0625rem, transparent 0.0625rem);
  background-size: 3.125rem 3.125rem;
}

/* =============================================
   Prose Styling for Markdown Content
   ============================================= */

.prose {
  color: var(--text-light);
  line-height: 1.75;
  max-width: 100%;
}

.prose h2 {
  color: var(--text-light);
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 0.125rem solid var(--primary);
  position: relative;
}

.prose h2::before {
  content: '';
  position: absolute;
  bottom: -0.125rem;
  left: 0;
  width: 3.75rem;
  height: 0.125rem;
  background: var(--secondary);
}

.prose h3 {
  color: var(--text-light);
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h4 {
  color: var(--text-light);
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.prose a {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 0.125rem;
  transition: color 0.3s ease;
}

.prose a:hover {
  color: var(--secondary);
}

.prose strong {
  color: var(--text-light);
  font-weight: 600;
}

.prose em {
  color: var(--text-light);
  font-style: italic;
}

.prose ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.prose ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.625rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--primary);
  border-radius: 50%;
}

.prose ol {
  counter-reset: list-counter;
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.prose ol li {
  counter-increment: list-counter;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.prose ol li::before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--primary);
  color: var(--text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.prose blockquote {
  border-left: 0.25rem solid var(--primary);
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--text-light);
  font-style: italic;
}

.prose blockquote p {
  margin-bottom: 0;
  color: var(--text-light);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--bg-card);
  border-radius: 0.5rem;
  overflow: hidden;
}

.prose thead {
  background: var(--bg-medium);
}

.prose th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 0.125rem solid var(--primary);
}

.prose td {
  padding: 1rem;
  color: var(--text-muted);
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

.prose tr:last-child td {
  border-bottom: none;
}

.prose tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.3);
}

.prose hr {
  border: none;
  height: 0.0625rem;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  margin: 2.5rem 0;
}

.prose code {
  background: var(--bg-light);
  color: var(--secondary);
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.prose pre {
  background: var(--bg-card);
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.prose pre code {
  background: transparent;
  padding: 0;
}

/* Prose Table Responsive Wrapper */
.prose .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

/* =============================================
   Utility Classes
   ============================================= */

.text-gradient {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.border-gradient {
  border: 0.125rem solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              linear-gradient(135deg, var(--primary), var(--secondary)) border-box;
}

.glass-effect {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(0.625rem);
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

/* =============================================
   Responsive Adjustments
   ============================================= */

@media (max-width: 64rem) {
  .prose h2 {
    font-size: 1.5rem;
  }
  
  .prose h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 48rem) {
  .bonus-badge {
    padding: 1.5rem;
  }
  
  .step-card {
    padding: 1.5rem;
  }
  
  .review-block {
    padding: 1.5rem;
  }
  
  .prose h2 {
    font-size: 1.375rem;
    margin-top: 2rem;
  }
  
  .prose h3 {
    font-size: 1.125rem;
  }
  
  .prose ul li,
  .prose ol li {
    padding-left: 1.5rem;
  }
  
  .prose ol li::before {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
  }
}

/* =============================================
   Page Transitions
   ============================================= */

.page-transition {
  animation: fade-in 0.5s ease-out;
}

/* Hide scrollbar but keep functionality */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
