/* ========================================
   CushySlot - Custom CSS
   Animation, Overrides & Prose Styling
======================================== */

/* CSS Custom Properties */
:root {
  --cushy-primary: #6B46C1;
  --cushy-primary-light: #9F7AEA;
  --cushy-primary-dark: #553C9A;
  --cushy-secondary: #38B2AC;
  --cushy-secondary-light: #4FD1C5;
  --cushy-accent: #F6AD55;
  --cushy-accent-dark: #DD6B20;
  --cushy-bg-dark: #1A1A2E;
  --cushy-bg-darker: #0F0F1A;
  --cushy-bg-card: #252542;
  --cushy-text-light: #F7FAFC;
  --cushy-text-muted: #A0AEC0;
  --cushy-text-dark: #2D3748;
  --cushy-border: #4A5568;
  --cushy-success: #48BB78;
  --cushy-warning: #ECC94B;
}

/* Global Overflow Control */
html {
  overflow-x: clip;
  overflow-y: auto;
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
}

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

/* Tilt Animation */
@keyframes tilt {
  0%, 100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

@keyframes tiltHover {
  0% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-3deg) scale(1.02);
  }
  75% {
    transform: rotate(3deg) scale(1.02);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

/* Particle Float Animation */
@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-1.25rem) translateX(0.625rem) rotate(90deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-1.875rem) translateX(-0.625rem) rotate(180deg);
    opacity: 0.8;
  }
  75% {
    transform: translateY(-0.625rem) translateX(0.9375rem) rotate(270deg);
    opacity: 1;
  }
}

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

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

/* Pulse Glow */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0.3125rem rgba(107, 70, 193, 0.4);
  }
  50% {
    box-shadow: 0 0 1.25rem rgba(107, 70, 193, 0.8), 0 0 2.5rem rgba(159, 122, 234, 0.4);
  }
}

/* Bounce Subtle */
@keyframes bounceSoft {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.5rem);
  }
}

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.875rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.animate-tilt {
  animation: tilt 4s ease-in-out infinite;
}

.animate-tilt-hover:hover {
  animation: tiltHover 0.6s ease-in-out;
}

.animate-particle {
  animation: particleFloat 6s ease-in-out infinite;
}

.animate-particle-drift {
  animation: particleDrift 15s linear infinite;
}

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

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

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

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

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

/* Staggered Animation Delays */
.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-500 { animation-delay: 0.5s; }
.animation-delay-700 { animation-delay: 0.7s; }
.animation-delay-1000 { animation-delay: 1s; }

/* ========================================
   Particle System
======================================== */

.particle-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.particle-sm {
  width: 0.375rem;
  height: 0.375rem;
}

.particle-md {
  width: 0.625rem;
  height: 0.625rem;
}

.particle-lg {
  width: 0.875rem;
  height: 0.875rem;
}

.particle-purple {
  background: var(--cushy-primary-light);
  box-shadow: 0 0 0.625rem var(--cushy-primary);
}

.particle-teal {
  background: var(--cushy-secondary-light);
  box-shadow: 0 0 0.625rem var(--cushy-secondary);
}

.particle-gold {
  background: var(--cushy-accent);
  box-shadow: 0 0 0.625rem var(--cushy-accent-dark);
}

/* ========================================
   Component Overrides
======================================== */

/* Navigation */
.nav-sticky {
  backdrop-filter: blur(0.75rem);
  -webkit-backdrop-filter: blur(0.75rem);
}

.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: var(--cushy-secondary);
  transition: width 0.3s ease;
}

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

/* Mobile Menu */
.mobile-menu {
  background: var(--cushy-bg-darker);
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--cushy-primary) 0%, var(--cushy-primary-dark) 100%);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.625rem 1.5625rem rgba(107, 70, 193, 0.4);
}

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

.btn-secondary:hover {
  background: var(--cushy-secondary);
  color: var(--cushy-bg-dark);
  transform: translateY(-0.125rem);
}

/* Cards */
.game-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-card:hover {
  transform: translateY(-0.5rem) rotate(1deg);
}

.promo-card {
  background: linear-gradient(145deg, var(--cushy-bg-card) 0%, var(--cushy-bg-dark) 100%);
  border: 0.0625rem solid rgba(107, 70, 193, 0.2);
  transition: all 0.3s ease;
}

.promo-card:hover {
  border-color: var(--cushy-primary);
  box-shadow: 0 0.5rem 2rem rgba(107, 70, 193, 0.2);
}

/* Bonus Badge */
.bonus-badge {
  background: linear-gradient(135deg, var(--cushy-bg-card) 0%, rgba(107, 70, 193, 0.2) 100%);
  border: 0.125rem solid var(--cushy-primary);
  box-shadow: 0 0 1.875rem rgba(107, 70, 193, 0.3);
}

/* Step Badges */
.step-badge {
  background: linear-gradient(135deg, var(--cushy-primary) 0%, var(--cushy-secondary) 100%);
  box-shadow: 0 0.25rem 0.9375rem rgba(107, 70, 193, 0.4);
}

/* ========================================
   Table Responsive Wrapper
======================================== */

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

.table-responsive::-webkit-scrollbar {
  height: 0.5rem;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--cushy-bg-darker);
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--cushy-primary);
  border-radius: 0.25rem;
}

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

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

.prose > * + * {
  margin-top: 1.5em;
}

/* Headings */
.prose h2 {
  color: var(--cushy-text-light);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2.5em;
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 0.125rem solid var(--cushy-primary);
  position: relative;
}

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

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

.prose h4 {
  color: var(--cushy-secondary-light);
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* Paragraphs */
.prose p {
  color: var(--cushy-text-muted);
  margin-bottom: 1.25em;
  text-align: left;
}

.prose p:first-of-type {
  font-size: 1.1em;
  color: var(--cushy-text-light);
}

/* Links */
.prose a {
  color: var(--cushy-secondary);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25em;
  transition: all 0.3s ease;
}

.prose a:hover {
  color: var(--cushy-secondary-light);
  text-decoration-color: var(--cushy-secondary);
}

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

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

/* Lists */
.prose ul,
.prose ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.prose ul {
  list-style: none;
}

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

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

.prose ol {
  list-style: none;
  counter-reset: prose-counter;
}

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

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

/* Nested Lists */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9375rem;
}

.prose thead {
  background: var(--cushy-primary);
}

.prose th {
  color: var(--cushy-text-light);
  font-weight: 600;
  padding: 0.875em 1em;
  text-align: left;
  white-space: nowrap;
}

.prose tbody tr {
  border-bottom: 0.0625rem solid var(--cushy-border);
  transition: background 0.2s ease;
}

.prose tbody tr:nth-child(even) {
  background: rgba(107, 70, 193, 0.05);
}

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

.prose td {
  color: var(--cushy-text-muted);
  padding: 0.875em 1em;
  vertical-align: top;
}

.prose td:first-child {
  color: var(--cushy-text-light);
  font-weight: 500;
}

/* Blockquotes */
.prose blockquote {
  border-left: 0.25rem solid var(--cushy-secondary);
  background: rgba(56, 178, 172, 0.1);
  padding: 1.25em 1.5em;
  margin: 1.5em 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

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

.prose blockquote p:last-child {
  margin-bottom: 0;
}

/* Code */
.prose code {
  background: var(--cushy-bg-card);
  color: var(--cushy-secondary-light);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Fira Code', monospace;
}

.prose pre {
  background: var(--cushy-bg-darker);
  padding: 1.25em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5em 0;
}

.prose pre code {
  background: transparent;
  padding: 0;
  font-size: 0.875rem;
}

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

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

/* Figure Captions */
.prose figcaption {
  color: var(--cushy-text-muted);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 0.75em;
  font-style: italic;
}

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

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

.bg-pattern {
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(107, 70, 193, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(56, 178, 172, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(246, 173, 85, 0.05) 0%, transparent 50%);
}

.glass-effect {
  background: rgba(26, 26, 46, 0.8);
  backdrop-filter: blur(0.75rem);
  -webkit-backdrop-filter: blur(0.75rem);
  border: 0.0625rem solid rgba(107, 70, 193, 0.2);
}

/* SVG Pattern Background */
.svg-pattern-bg {
  background-color: var(--cushy-bg-darker);
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236B46C1' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Focus States for Accessibility */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 0.1875rem rgba(107, 70, 193, 0.5);
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media (max-width: 768px) {
  .prose {
    font-size: 0.9375rem;
  }
  
  .prose h2 {
    margin-top: 2em;
  }
  
  .prose ul li,
  .prose ol li {
    padding-left: 1.25em;
  }
  
  .prose table {
    font-size: 0.875rem;
  }
  
  .prose th,
  .prose td {
    padding: 0.625em 0.75em;
  }
}

/* ========================================
   FAQ Accordion Styling
======================================== */

.faq-item {
  border: 0.0625rem solid var(--cushy-border);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--cushy-primary);
}

.faq-question {
  background: var(--cushy-bg-card);
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: rgba(107, 70, 193, 0.1);
}

.faq-answer {
  background: var(--cushy-bg-darker);
  padding: 1rem 1.25rem;
  color: var(--cushy-text-muted);
  line-height: 1.6;
}

/* ========================================
   Payment Table Specific
======================================== */

.payment-table td {
  vertical-align: middle;
}

.payment-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cushy-bg-card);
  border-radius: 0.5rem;
}
