/* ========================================
   WhyNotBet Casino - Custom Styles
   WhyNot Velocity Theme
   ======================================== */

/* ----------------------------------------
   CSS Variables
   ---------------------------------------- */
:root {
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-secondary: #22d3ee;
  --color-accent: #f472b6;
  --color-dark: #0f172a;
  --color-dark-light: #1e293b;
  --color-dark-card: #1e293b;
  --color-light: #f8fafc;
  --color-light-muted: #cbd5e1;
}

/* ----------------------------------------
   Base Styles
   ---------------------------------------- */
html {
  overflow-x: clip;
  overflow-y: auto;
}

body {
  overflow-x: clip;
}

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

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

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

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

/* Hide scrollbar for horizontal scroll areas */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ----------------------------------------
   Animations - Marquee
   ---------------------------------------- */
.marquee-container {
  overflow: hidden;
  width: 100%;
}

.marquee-track {
  display: flex;
  animation: marquee 40s linear infinite;
}

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

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

/* ----------------------------------------
   Animations - Particles
   ---------------------------------------- */
.particle-float {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat 15s ease-in-out infinite;
}

.particle-float.particle-1 {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-primary);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  opacity: 0.6;
}

.particle-float.particle-2 {
  width: 0.375rem;
  height: 0.375rem;
  background: var(--color-secondary);
  top: 40%;
  right: 15%;
  animation-delay: -3s;
  opacity: 0.5;
}

.particle-float.particle-3 {
  width: 0.625rem;
  height: 0.625rem;
  background: var(--color-accent);
  bottom: 30%;
  left: 20%;
  animation-delay: -6s;
  opacity: 0.4;
}

.particle-float.particle-4 {
  width: 0.25rem;
  height: 0.25rem;
  background: var(--color-primary);
  top: 60%;
  right: 25%;
  animation-delay: -9s;
  opacity: 0.5;
}

.particle-float.particle-5 {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-secondary);
  bottom: 20%;
  right: 10%;
  animation-delay: -12s;
  opacity: 0.3;
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(1.25rem, -1.875rem) rotate(90deg);
  }
  50% {
    transform: translate(-0.625rem, 1.25rem) rotate(180deg);
  }
  75% {
    transform: translate(0.9375rem, 0.625rem) rotate(270deg);
  }
}

/* Footer Particles */
.particles-container .particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  animation: particleRise 20s ease-in-out infinite;
}

.particles-container .particle-1 {
  width: 0.25rem;
  height: 0.25rem;
  background: var(--color-primary);
  bottom: 0;
  left: 10%;
  animation-delay: 0s;
}

.particles-container .particle-2 {
  width: 0.375rem;
  height: 0.375rem;
  background: var(--color-secondary);
  bottom: 0;
  left: 50%;
  animation-delay: -5s;
}

.particles-container .particle-3 {
  width: 0.25rem;
  height: 0.25rem;
  background: var(--color-accent);
  bottom: 0;
  right: 20%;
  animation-delay: -10s;
}

@keyframes particleRise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100vh) scale(0.5);
    opacity: 0;
  }
}

/* ----------------------------------------
   Animations - Pulse
   ---------------------------------------- */
.animate-pulse-slow {
  animation: pulseSlow 3s ease-in-out infinite;
}

@keyframes pulseSlow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* ----------------------------------------
   Table Responsive Wrapper
   ---------------------------------------- */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

/* ----------------------------------------
   Prose Styling for Markdown Content
   ---------------------------------------- */
.prose {
  color: var(--color-light-muted);
  max-width: 100%;
  line-height: 1.75;
}

/* Headings */
.prose h2 {
  color: var(--color-light);
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(99, 102, 241, 0.3);
  line-height: 1.3;
}

.prose h3 {
  color: var(--color-light);
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

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

/* Paragraphs */
.prose p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.prose p:first-of-type {
  font-size: 1.125rem;
}

/* Links */
.prose a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

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

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

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

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

.prose li {
  margin-bottom: 0.625rem;
  padding-left: 0.5rem;
  line-height: 1.7;
}

.prose li::marker {
  color: var(--color-primary);
}

.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

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

.prose thead {
  background: var(--color-dark);
  border-bottom: 2px solid var(--color-primary);
}

.prose th {
  color: var(--color-light);
  font-weight: 600;
  text-align: left;
  padding: 0.875rem 1rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

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

.prose tbody tr {
  background: var(--color-dark-card);
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.prose tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Ensure table responsiveness in prose */
.prose .table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.prose .table-responsive table {
  margin: 0;
  border-radius: 0;
}

/* Blockquotes */
.prose blockquote {
  border-left: 4px solid var(--color-primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(34, 211, 238, 0.05));
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: italic;
}

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

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

/* Code */
.prose code {
  background: var(--color-dark);
  color: var(--color-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875em;
  font-family: "Fira Code", monospace;
}

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

.prose pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 2rem auto;
  display: block;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

/* First letter styling */
.prose > p:first-of-type::first-letter {
  float: left;
  font-size: 3.5rem;
  line-height: 1;
  font-weight: 700;
  color: var(--color-primary);
  margin-right: 0.75rem;
  margin-top: 0.25rem;
}

/* ----------------------------------------
   FAQ Styles
   ---------------------------------------- */
.faq-item.active .faq-content {
  display: block;
}

.faq-item.active .faq-toggle i {
  transform: rotate(45deg);
}

/* ----------------------------------------
   Game Card Hover Effects
   ---------------------------------------- */
.game-card {
  transition: transform 0.3s ease;
}

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

/* ----------------------------------------
   Responsive Adjustments
   ---------------------------------------- */
@media (max-width: 768px) {
  .prose h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }

  .prose h3 {
    font-size: 1.25rem;
  }

  .prose > p:first-of-type::first-letter {
    font-size: 2.75rem;
  }

  .prose blockquote {
    padding: 1rem;
  }

  .prose th,
  .prose td {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .prose {
    font-size: 0.9375rem;
  }

  .prose p:first-of-type {
    font-size: 1rem;
  }

  .prose > p:first-of-type::first-letter {
    font-size: 2.25rem;
    margin-right: 0.5rem;
  }
}

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

.glow-primary {
  box-shadow: 0 0 2rem rgba(99, 102, 241, 0.3);
}

.glow-secondary {
  box-shadow: 0 0 2rem rgba(34, 211, 238, 0.3);
}

/* ----------------------------------------
   Print Styles
   ---------------------------------------- */
@media print {
  .prose {
    color: #000;
  }

  .prose a {
    color: #000;
    text-decoration: underline;
  }

  .prose h2,
  .prose h3,
  .prose h4 {
    color: #000;
  }
}
