/* ============================================
   BINGO BONGO POP FR - Custom CSS
   Animations, Keyframes & Prose Styling
   ============================================ */

/* CSS Custom Properties */
:root {
  --color-primary: #ff6b35;
  --color-secondary: #f7c948;
  --color-accent: #4ecdc4;
  --color-pop-pink: #ff85a2;
  --color-pop-purple: #a855f7;
  --color-dark: #1a1a2e;
  --color-light: #fefefe;
  --color-muted: #6b7280;
  --radius-soft: 1.5rem;
  --radius-round: 9999px;
}

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

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

/* Marquee Animation */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-flex;
  animation: marquee 25s linear infinite;
}

.marquee-content:hover {
  animation-play-state: paused;
}

/* Particle Float Animation */
@keyframes particle-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.7;
  }
  25% {
    transform: translateY(-1.5rem) rotate(90deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-0.5rem) rotate(180deg);
    opacity: 0.8;
  }
  75% {
    transform: translateY(-2rem) rotate(270deg);
    opacity: 0.9;
  }
}

.particle {
  position: absolute;
  pointer-events: none;
  animation: particle-float 4s ease-in-out infinite;
}

.particle:nth-child(1) { animation-delay: 0s; }
.particle:nth-child(2) { animation-delay: 0.5s; }
.particle:nth-child(3) { animation-delay: 1s; }
.particle:nth-child(4) { animation-delay: 1.5s; }
.particle:nth-child(5) { animation-delay: 2s; }
.particle:nth-child(6) { animation-delay: 2.5s; }

/* Bounce Animation */
@keyframes bounce-soft {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.625rem);
  }
}

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

/* Pulse Glow */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 1.25rem rgba(255, 107, 53, 0.4);
  }
  50% {
    box-shadow: 0 0 2.5rem rgba(255, 107, 53, 0.8);
  }
}

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

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

/* Pop Scale */
@keyframes pop-scale {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pop-hover:hover {
  animation: pop-scale 0.3s ease-out;
}

/* Confetti Fall */
@keyframes confetti-fall {
  0% {
    transform: translateY(-100%) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.confetti {
  position: fixed;
  top: 0;
  pointer-events: none;
  animation: confetti-fall 5s linear infinite;
}

/* ============================================
   COMPONENT OVERRIDES
   ============================================ */

/* Mobile Menu Background */
.mobile-menu {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  backdrop-filter: blur(0.625rem);
}

/* Game Cards */
.game-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: var(--radius-soft);
}

.game-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 1.25rem 2.5rem rgba(255, 107, 53, 0.2);
}

/* CTA Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #ff8c5a 100%);
  border-radius: var(--radius-round);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-secondary {
  background: transparent;
  border: 0.125rem solid var(--color-secondary);
  border-radius: var(--radius-round);
  color: var(--color-secondary);
  transition: all 0.3s ease;
}

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

/* Bonus Badge */
.bonus-badge {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #ffd970 100%);
  border-radius: var(--radius-soft);
  box-shadow: 0 0.625rem 2.5rem rgba(247, 201, 72, 0.4);
}

/* Step Cards */
.step-card {
  position: relative;
  border-radius: var(--radius-soft);
  overflow: hidden;
}

.step-number {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

/* Promo Cards */
.promo-card {
  border-radius: var(--radius-soft);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.promo-card:hover {
  transform: scale(1.02);
}

/* FAQ Accordion */
.faq-item {
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-question {
  cursor: pointer;
  transition: background 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

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

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

/* ============================================
   PROSE STYLING - Markdown Content
   ============================================ */

.prose {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #e5e7eb;
  max-width: 100%;
}

/* Prose Headings */
.prose h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--color-secondary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.1875rem solid var(--color-primary);
  line-height: 1.3;
}

.prose h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.prose h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: 600;
  color: var(--color-pop-pink);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Prose Paragraphs */
.prose p {
  margin-bottom: 1.25rem;
  color: #d1d5db;
}

.prose p a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 0.1875rem;
  transition: color 0.2s ease;
}

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

/* Prose Lists */
.prose ul,
.prose ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

.prose ul {
  list-style-type: none;
}

.prose ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.625rem;
  color: #d1d5db;
}

.prose ul li::before {
  content: '🎯';
  position: absolute;
  left: 0;
  font-size: 0.875rem;
}

.prose ol {
  list-style-type: decimal;
  list-style-position: outside;
}

.prose ol li {
  margin-bottom: 0.625rem;
  padding-left: 0.5rem;
  color: #d1d5db;
}

.prose ol li::marker {
  color: var(--color-primary);
  font-weight: 700;
}

/* Prose Tables */
.prose .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  background: rgba(26, 26, 46, 0.6);
}

.prose table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose thead {
  background: linear-gradient(135deg, var(--color-primary) 0%, #ff8c5a 100%);
}

.prose th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

.prose td {
  padding: 0.875rem 1rem;
  border-bottom: 0.0625rem solid rgba(255,255,255,0.1);
  color: #e5e7eb;
}

.prose tbody tr:hover {
  background: rgba(255, 107, 53, 0.1);
}

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

/* Prose Blockquotes */
.prose blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 0.25rem solid var(--color-secondary);
  background: linear-gradient(135deg, rgba(247, 201, 72, 0.1) 0%, rgba(255, 107, 53, 0.05) 100%);
  border-radius: 0 1rem 1rem 0;
  font-style: italic;
  color: #e5e7eb;
}

.prose blockquote p {
  margin: 0;
}

/* Prose Strong & Emphasis */
.prose strong {
  color: var(--color-secondary);
  font-weight: 600;
}

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

/* Prose Code */
.prose code {
  background: rgba(168, 85, 247, 0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875em;
  color: var(--color-pop-pink);
}

.prose pre {
  background: rgba(26, 26, 46, 0.8);
  padding: 1.25rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* Prose Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-soft);
  margin: 1.5rem auto;
  display: block;
  box-shadow: 0 0.625rem 2.5rem rgba(0,0,0,0.3);
}

/* Prose Horizontal Rule */
.prose hr {
  border: none;
  height: 0.125rem;
  background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-secondary), var(--color-accent), transparent);
  margin: 2.5rem 0;
}

/* ============================================
   SVG PATTERNS & DECORATIVE SHAPES
   ============================================ */

.pattern-dots {
  background-image: radial-gradient(circle, var(--color-primary) 0.0625rem, transparent 0.0625rem);
  background-size: 1.25rem 1.25rem;
}

.pattern-waves {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 0.625rem,
    rgba(255, 107, 53, 0.05) 0.625rem,
    rgba(255, 107, 53, 0.05) 1.25rem
  );
}

/* Blob Shapes */
.blob-shape {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

/* Circle Decorations */
.circle-deco {
  border-radius: 50%;
  position: absolute;
  pointer-events: none;
}

/* ============================================
   UTILITY OVERRIDES
   ============================================ */

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 0.5rem;
  height: 0.5rem;
}

::-webkit-scrollbar-track {
  background: var(--color-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-round);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

/* Selection */
::selection {
  background: var(--color-primary);
  color: white;
}

/* Focus States */
*:focus-visible {
  outline: 0.125rem solid var(--color-accent);
  outline-offset: 0.125rem;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -2.5rem;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 100;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 48rem) {
  .prose {
    font-size: 1rem;
  }
  
  .prose h2 {
    margin-top: 2rem;
  }
  
  .prose h3 {
    margin-top: 1.5rem;
  }
  
  .prose ul li,
  .prose ol li {
    margin-bottom: 0.5rem;
  }
  
  .prose blockquote {
    padding: 1rem;
    margin: 1rem 0;
  }
}

@media (max-width: 30rem) {
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose th,
  .prose td {
    padding: 0.625rem 0.75rem;
  }
}
