/* ============================================
   SpinJam Casino - Britwave Jam Pulse Theme
   Electric Red & Blue High-Energy Arcade
   ============================================ */

:root {
  --electric-red: #ff0050;
  --neon-red: #e6003d;
  --electric-blue: #00d4ff;
  --deep-blue: #0099ff;
  --dark-bg: #0a0a14;
  --darker-bg: #050508;
  --pulse-glow: rgba(255, 0, 80, 0.6);
  --blue-glow: rgba(0, 212, 255, 0.6);
}

/* Global smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Keyframe Animations */
@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 20px var(--pulse-glow), 0 0 40px var(--pulse-glow);
  }
  50% {
    box-shadow: 0 0 30px var(--pulse-glow), 0 0 60px var(--pulse-glow), 0 0 80px var(--pulse-glow);
  }
}

@keyframes blueGlow {
  0%,
  100% {
    box-shadow: 0 0 20px var(--blue-glow), 0 0 40px var(--blue-glow);
  }
  50% {
    box-shadow: 0 0 30px var(--blue-glow), 0 0 60px var(--blue-glow), 0 0 80px var(--blue-glow);
  }
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.9) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(180deg);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(0.5);
    opacity: 0;
  }
}

@keyframes parallaxFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes reelSpin {
  0% {
    transform: rotateX(0deg);
  }
  100% {
    transform: rotateX(360deg);
  }
}

@keyframes electricPulse {
  0%,
  100% {
    border-color: var(--electric-red);
    box-shadow: 0 0 10px var(--electric-red);
  }
  50% {
    border-color: var(--electric-blue);
    box-shadow: 0 0 20px var(--electric-blue);
  }
}

@keyframes neonFlicker {
  0%,
  100% {
    opacity: 1;
  }
  2%,
  8%,
  18% {
    opacity: 0.8;
  }
  4%,
  10% {
    opacity: 1;
  }
  6% {
    opacity: 0.6;
  }
}

/* Particle Effect */
.particle-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: floatUp 8s linear infinite;
}

.particle:nth-child(odd) {
  background: var(--electric-red);
  box-shadow: 0 0 10px var(--electric-red);
}

.particle:nth-child(even) {
  background: var(--electric-blue);
  box-shadow: 0 0 10px var(--electric-blue);
}

.particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 6s;
}
.particle:nth-child(2) {
  left: 20%;
  animation-delay: 1s;
  animation-duration: 8s;
}
.particle:nth-child(3) {
  left: 30%;
  animation-delay: 2s;
  animation-duration: 7s;
}
.particle:nth-child(4) {
  left: 40%;
  animation-delay: 0.5s;
  animation-duration: 9s;
}
.particle:nth-child(5) {
  left: 50%;
  animation-delay: 1.5s;
  animation-duration: 6.5s;
}
.particle:nth-child(6) {
  left: 60%;
  animation-delay: 2.5s;
  animation-duration: 7.5s;
}
.particle:nth-child(7) {
  left: 70%;
  animation-delay: 3s;
  animation-duration: 8.5s;
}
.particle:nth-child(8) {
  left: 80%;
  animation-delay: 1s;
  animation-duration: 9.5s;
}
.particle:nth-child(9) {
  left: 90%;
  animation-delay: 2s;
  animation-duration: 7s;
}
.particle:nth-child(10) {
  left: 15%;
  animation-delay: 0.8s;
  animation-duration: 8.2s;
}

/* Pulse & Glow Classes */
.pulse-red {
  animation: pulseGlow 2s ease-in-out infinite;
}

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

.electric-border {
  animation: electricPulse 3s linear infinite;
}

.neon-text-red {
  color: var(--electric-red);
  text-shadow: 0 0 10px var(--electric-red), 0 0 20px var(--electric-red), 0 0 30px var(--neon-red);
}

.neon-text-blue {
  color: var(--electric-blue);
  text-shadow: 0 0 10px var(--electric-blue), 0 0 20px var(--electric-blue), 0 0 30px var(--deep-blue);
}

.sparkle-icon {
  animation: sparkle 2s ease-in-out infinite;
}

.parallax-float {
  animation: parallaxFloat 6s ease-in-out infinite;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

/* Mirrored Reel Frame Effect */
.reel-frame {
  position: relative;
  background: linear-gradient(145deg, rgba(255, 0, 80, 0.1), rgba(0, 212, 255, 0.1));
  border: 2px solid;
  border-image: linear-gradient(45deg, var(--electric-red), var(--electric-blue)) 1;
  overflow: hidden;
}

.reel-frame::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 0, 80, 0.3) 50%, transparent 70%);
  animation: reelSpin 4s linear infinite;
}

/* Scatter Orb */
.scatter-orb {
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--electric-red), var(--electric-blue));
  box-shadow: 0 0 20px var(--electric-red), 0 0 40px var(--electric-blue);
  animation: pulseGlow 2s ease-in-out infinite, parallaxFloat 6s ease-in-out infinite;
}

/* Prose Styling for Readability */
.prose {
  max-width: 75ch;
  line-height: 1.75;
  color: #e5e5f0;
  font-size: 1.0625rem;
}

.prose p {
  margin-bottom: 1.5em;
  line-height: 1.8;
}

.prose h2 {
  margin-top: 2.5em;
  margin-bottom: 1em;
  font-size: 2em;
  font-weight: 700;
  line-height: 1.25;
  color: var(--electric-red);
  text-shadow: 0 0 15px var(--pulse-glow);
  letter-spacing: -0.02em;
  border-bottom: 2px solid rgba(255, 0, 80, 0.3);
  padding-bottom: 0.5em;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose h3 {
  margin-top: 2em;
  margin-bottom: 0.875em;
  font-size: 1.5em;
  font-weight: 600;
  line-height: 1.35;
  color: var(--electric-blue);
  text-shadow: 0 0 10px var(--blue-glow);
  letter-spacing: -0.01em;
}

.prose ul,
.prose ol {
  margin-bottom: 1.5em;
  padding-left: 2em;
  line-height: 1.8;
}

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

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

.prose li {
  margin-bottom: 0.75em;
  padding-left: 0.5em;
}

.prose li::marker {
  color: var(--electric-blue);
  font-weight: 600;
}

.prose strong {
  color: var(--electric-red);
  font-weight: 600;
}

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

.prose a {
  color: var(--electric-blue);
  text-decoration: underline;
  text-decoration-color: rgba(0, 212, 255, 0.4);
  text-underline-offset: 0.2em;
  transition: all 0.3s ease;
}

.prose a:hover {
  color: var(--electric-red);
  text-decoration-color: var(--electric-red);
  text-shadow: 0 0 10px var(--pulse-glow);
}

.prose blockquote {
  margin: 2em 0;
  padding: 1.25em 1.5em;
  border-left: 4px solid var(--electric-blue);
  background: rgba(0, 212, 255, 0.05);
  font-style: italic;
  color: #c5c5d8;
}

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

.prose code {
  background: rgba(255, 0, 80, 0.1);
  color: var(--electric-red);
  padding: 0.2em 0.4em;
  border-radius: 0.25em;
  font-size: 0.9em;
  font-family: "Courier New", monospace;
}

.prose pre {
  background: rgba(10, 10, 20, 0.8);
  border: 1px solid rgba(255, 0, 80, 0.2);
  border-radius: 0.5em;
  padding: 1.25em;
  overflow-x: auto;
  margin: 1.5em 0;
}

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

.prose table {
  width: 100%;
  max-width: 100%;
  margin: 2em 0;
  border-collapse: collapse;
  font-size: 0.9375em;
  overflow-x: auto;
  display: block;
}

.prose thead {
  border-bottom: 2px solid rgba(255, 0, 80, 0.4);
}

.prose th {
  padding: 1em 0.875em;
  text-align: left;
  background: rgba(255, 0, 80, 0.15);
  color: var(--electric-red);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875em;
  letter-spacing: 0.05em;
}

.prose td {
  padding: 0.875em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #d5d5e5;
}

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

.prose tbody tr:hover {
  background: rgba(0, 212, 255, 0.08);
}

.prose tr:nth-child(even) {
  background: rgba(0, 212, 255, 0.03);
}

.prose hr {
  margin: 3em 0;
  border: 0;
  border-top: 2px solid rgba(255, 0, 80, 0.2);
  background: linear-gradient(to right, transparent, rgba(255, 0, 80, 0.4), rgba(0, 212, 255, 0.4), transparent);
  height: 2px;
}

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5em 0;
  border-radius: 0.5em;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.table-responsive::-webkit-scrollbar {
  height: 0.625em;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(10, 10, 20, 0.5);
  border-radius: 0.5em;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--electric-red), var(--electric-blue));
  border-radius: 0.5em;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, var(--neon-red), var(--deep-blue));
}

/* Prose Layout Improvements */
.prose-container {
  max-width: 85ch;
  margin-left: auto;
  margin-right: auto;
  padding: 2.5% 4%;
}

/* First Paragraph Styling */
.prose > p:first-of-type {
  font-size: 1.125em;
  line-height: 1.7;
  color: #f0f0f8;
}

/* Last Paragraph Spacing */
.prose > p:last-of-type {
  margin-bottom: 0;
}

/* Nested List Styling */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

/* Figure and Image Styling */
.prose figure {
  margin: 2em 0;
}

.prose figcaption {
  margin-top: 0.75em;
  text-align: center;
  font-size: 0.875em;
  color: #a5a5b8;
  font-style: italic;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5em;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

/* Responsive Typography */
@media (max-width: 768px) {
  .prose {
    font-size: 1rem;
    line-height: 1.7;
  }

  .prose h2 {
    font-size: 1.75em;
    margin-top: 2em;
  }

  .prose h3 {
    font-size: 1.375em;
    margin-top: 1.75em;
  }

  .prose table {
    font-size: 0.875em;
  }

  .prose th,
  .prose td {
    padding: 0.625em 0.5em;
  }

  .prose ul,
  .prose ol {
    padding-left: 1.5em;
  }

  .prose-container {
    padding: 4% 5%;
  }
}

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

  .prose h2 {
    font-size: 1.5em;
  }

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

/* Print Styles for Better Readability */
@media print {
  .prose {
    color: #000;
    font-size: 12pt;
  }

  .prose h2,
  .prose h3 {
    color: #000;
    text-shadow: none;
  }

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

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

/* Button Enhancements */
.btn-primary {
  background: linear-gradient(135deg, var(--electric-red), var(--neon-red));
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--neon-red), var(--electric-red));
  box-shadow: 0 0 20px var(--pulse-glow), 0 0 40px var(--pulse-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--electric-blue), var(--deep-blue));
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--deep-blue), var(--electric-blue));
  box-shadow: 0 0 20px var(--blue-glow), 0 0 40px var(--blue-glow);
  transform: translateY(-2px);
}

/* Arcade Pattern Background */
.arcade-pattern {
  background-color: var(--dark-bg);
  background-image: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 35px,
      rgba(255, 0, 80, 0.03) 35px,
      rgba(255, 0, 80, 0.03) 70px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 35px,
      rgba(0, 212, 255, 0.03) 35px,
      rgba(0, 212, 255, 0.03) 70px
    );
}

/* Neon Flicker Effect */
.neon-flicker {
  animation: neonFlicker 5s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .prose {
    font-size: 0.95rem;
  }

  .prose h2 {
    font-size: 1.5em;
  }

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