/* ========================================
   Candicab Casino - Custom Styles
   Theme: Sweet Motion North
   ======================================== */

/* CSS Custom Properties */
:root {
  --color-primary: #E85D04;
  --color-secondary: #F48C06;
  --color-accent: #FAA307;
  --color-warm: #FFBA08;
  --color-dark: #1A1A2E;
  --color-darker: #0F0F1A;
  --color-light: #FFF8F0;
  --color-muted: #2D2D44;
}

/* Global Overflow Control */
html,
body {
  overflow-x: clip;
  overflow-y: auto;
}

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

/* Particle Float Animation */
@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-20px) translateX(10px) scale(1.1);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-40px) translateX(-5px) scale(0.9);
    opacity: 0.5;
  }
  75% {
    transform: translateY(-20px) translateX(-15px) scale(1.05);
    opacity: 0.7;
  }
}

/* Parallax Drift Animation */
@keyframes parallaxDrift {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(15px, -10px) rotate(2deg);
  }
  66% {
    transform: translate(-10px, 5px) rotate(-1deg);
  }
}

/* Glow Pulse Animation */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(232, 93, 4, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(244, 140, 6, 0.5), 0 0 60px rgba(250, 163, 7, 0.3);
  }
}

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

/* Bounce Gentle Animation */
@keyframes bounceGentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Spin Slow Animation */
@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

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

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

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

.animate-parallax {
  animation: parallaxDrift 12s ease-in-out infinite;
}

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

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

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

.animate-spin-slow {
  animation: spinSlow 20s linear infinite;
}

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

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

/* Animation Delays */
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-800 { animation-delay: 0.8s; }
.animation-delay-1000 { animation-delay: 1s; }

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

.hero-gradient {
  background: linear-gradient(135deg, var(--color-darker) 0%, var(--color-dark) 50%, rgba(232, 93, 4, 0.1) 100%);
}

.hero-particles .particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--color-warm);
  border-radius: 50%;
  opacity: 0.5;
  animation: particleFloat 6s ease-in-out infinite;
}

.hero-particles .particle:nth-child(2) { animation-delay: -1s; left: 20%; top: 30%; }
.hero-particles .particle:nth-child(3) { animation-delay: -2s; left: 70%; top: 20%; }
.hero-particles .particle:nth-child(4) { animation-delay: -3s; left: 40%; top: 60%; }
.hero-particles .particle:nth-child(5) { animation-delay: -4s; left: 80%; top: 70%; }
.hero-particles .particle:nth-child(6) { animation-delay: -5s; left: 10%; top: 80%; }

/* ========================================
   Button Styles
   ======================================== */

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-warm) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(232, 93, 4, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-primary);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

/* ========================================
   Card Styles
   ======================================== */

.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-card {
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 15, 26, 0.9) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.game-card:hover::before {
  opacity: 1;
}

.game-card .card-content {
  position: relative;
  z-index: 2;
}

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

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

.table-responsive table {
  min-width: 100%;
}

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

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

/* Headings */
.prose h2 {
  color: var(--color-light);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-top: 2.5em;
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--color-primary);
  position: relative;
}

.prose h2::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 4rem;
  height: 2px;
  background: var(--color-warm);
}

.prose h3 {
  color: var(--color-light);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  margin-top: 2em;
  margin-bottom: 0.75em;
}

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

/* Paragraphs */
.prose p {
  color: rgba(255, 248, 240, 0.85);
  margin-bottom: 1.25em;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.prose p:first-of-type {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--color-light);
}

/* Links */
.prose a {
  color: var(--color-warm);
  text-decoration: underline;
  text-decoration-color: var(--color-primary);
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.prose a:hover {
  color: var(--color-primary);
  text-decoration-color: var(--color-warm);
}

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

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

.prose ul li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.75em;
  color: rgba(255, 248, 240, 0.85);
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-warm));
  border-radius: 2px;
  transform: rotate(45deg);
}

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

.prose ol li {
  position: relative;
  padding-left: 2.5em;
  margin-bottom: 0.75em;
  color: rgba(255, 248, 240, 0.85);
  counter-increment: item;
}

.prose ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75em;
  height: 1.75em;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85em;
  color: var(--color-light);
}

/* Tables */
.prose .table-responsive {
  overflow-x: auto;
  margin: 1.5em 0;
  border-radius: 0.75rem;
  background: var(--color-dark);
  border: 1px solid var(--color-muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.prose thead {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

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

.prose td {
  padding: 1em 1.25em;
  border-top: 1px solid var(--color-muted);
  color: rgba(255, 248, 240, 0.85);
}

.prose tbody tr {
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background: rgba(232, 93, 4, 0.1);
}

/* Blockquotes */
.prose blockquote {
  margin: 1.5em 0;
  padding: 1.25em 1.5em;
  background: linear-gradient(135deg, rgba(232, 93, 4, 0.1), rgba(244, 140, 6, 0.05));
  border-left: 4px solid var(--color-primary);
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: italic;
  color: rgba(255, 248, 240, 0.9);
}

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

/* Code */
.prose code {
  background: var(--color-muted);
  padding: 0.2em 0.5em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  color: var(--color-warm);
}

.prose pre {
  background: var(--color-dark);
  padding: 1.25em;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid var(--color-muted);
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: var(--color-light);
}

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

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

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

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

/* ========================================
   Decorative Elements
   ======================================== */

.svg-pattern {
  position: absolute;
  pointer-events: none;
  opacity: 0.1;
}

.gradient-blob {
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
  filter: blur(60px);
  opacity: 0.3;
}

/* ========================================
   Game Slider/Carousel
   ======================================== */

.game-slider {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) var(--color-dark);
}

.game-slider::-webkit-scrollbar {
  height: 8px;
}

.game-slider::-webkit-scrollbar-track {
  background: var(--color-dark);
  border-radius: 4px;
}

.game-slider::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
}

.game-slider > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

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

.faq-item {
  border-bottom: 1px solid var(--color-muted);
}

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

.faq-question:hover {
  color: var(--color-warm);
}

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

.faq-item.active .faq-answer {
  max-height: 500px;
}

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

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

/* ========================================
   Media Queries for Fine-Tuning
   ======================================== */

@media (max-width: 768px) {
  .prose h2 {
    margin-top: 2em;
  }
  
  .prose ul li,
  .prose ol li {
    padding-left: 1.25em;
  }
  
  .prose ol li::before {
    width: 1.5em;
    height: 1.5em;
    font-size: 0.75em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-particle,
  .animate-parallax,
  .animate-glow,
  .animate-shimmer,
  .animate-bounce-gentle,
  .animate-spin-slow,
  .animate-fade-in-up,
  .animate-scale-in {
    animation: none;
  }
  
  .card-hover:hover {
    transform: none;
  }
}
