/* ============================================
   WINBETZ - Betz Velocity Theme
   Fast streaks, geometric pace, forward energy
   ============================================ */

/* CSS Custom Properties */
:root {
  --color-primary: #00ff88;
  --color-primary-dark: #00cc6a;
  --color-secondary: #ff6b35;
  --color-accent: #00d4ff;
  --color-dark: #0a0e17;
  --color-darker: #060911;
  --color-surface: #111827;
  --color-surface-light: #1f2937;
  --color-text: #e5e7eb;
  --color-text-muted: #9ca3af;
  --color-warning: #fbbf24;
  --velocity-fast: 0.2s;
  --velocity-medium: 0.4s;
  --velocity-slow: 0.6s;
}

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

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

/* Tilt Animation */
@keyframes tilt {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-2deg) scale(1.02);
  }
  75% {
    transform: rotate(2deg) scale(1.02);
  }
}

/* Particle Float */
@keyframes particleFloat {
  0%,
  100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-1.5rem) translateX(0.5rem) scale(1.1);
    opacity: 1;
  }
  50% {
    transform: translateY(-0.5rem) translateX(-0.5rem) scale(0.9);
    opacity: 0.8;
  }
  75% {
    transform: translateY(-2rem) translateX(0.25rem) scale(1.05);
    opacity: 0.7;
  }
}

/* Velocity Streak */
@keyframes velocityStreak {
  0% {
    transform: translateX(-100%) skewX(-15deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(200%) skewX(-15deg);
    opacity: 0;
  }
}

/* Pulse Glow */
@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 1.25rem rgba(0, 255, 136, 0.3);
  }
  50% {
    box-shadow: 0 0 2.5rem rgba(0, 255, 136, 0.6);
  }
}

/* Geometric Spin */
@keyframes geoSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Forward Drive */
@keyframes forwardDrive {
  0% {
    transform: translateX(-0.25rem);
  }
  100% {
    transform: translateX(0.25rem);
  }
}

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

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

/* ============================================
   ANIMATION UTILITY CLASSES
   ============================================ */

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

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

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

.animate-particle-delay-1 {
  animation: particleFloat 4s ease-in-out infinite 0.5s;
}

.animate-particle-delay-2 {
  animation: particleFloat 4s ease-in-out infinite 1s;
}

.animate-particle-delay-3 {
  animation: particleFloat 4s ease-in-out infinite 1.5s;
}

.animate-velocity-streak {
  animation: velocityStreak 2s linear infinite;
}

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

.animate-geo-spin {
  animation: geoSpin 20s linear infinite;
}

.animate-forward {
  animation: forwardDrive 0.5s ease-in-out infinite alternate;
}

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

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

/* ============================================
   GEOMETRIC PATTERNS (SVG/CSS)
   ============================================ */

.geo-pattern {
  background-image: linear-gradient(
      30deg,
      var(--color-surface) 12%,
      transparent 12.5%,
      transparent 87%,
      var(--color-surface) 87.5%,
      var(--color-surface)
    ),
    linear-gradient(
      150deg,
      var(--color-surface) 12%,
      transparent 12.5%,
      transparent 87%,
      var(--color-surface) 87.5%,
      var(--color-surface)
    ),
    linear-gradient(
      30deg,
      var(--color-surface) 12%,
      transparent 12.5%,
      transparent 87%,
      var(--color-surface) 87.5%,
      var(--color-surface)
    ),
    linear-gradient(
      150deg,
      var(--color-surface) 12%,
      transparent 12.5%,
      transparent 87%,
      var(--color-surface) 87.5%,
      var(--color-surface)
    ),
    linear-gradient(
      60deg,
      var(--color-surface-light) 25%,
      transparent 25.5%,
      transparent 75%,
      var(--color-surface-light) 75%,
      var(--color-surface-light)
    ),
    linear-gradient(
      60deg,
      var(--color-surface-light) 25%,
      transparent 25.5%,
      transparent 75%,
      var(--color-surface-light) 75%,
      var(--color-surface-light)
    );
  background-size: 5rem 8.75rem;
  background-position: 0 0, 0 0, 2.5rem 4.375rem, 2.5rem 4.375rem, 0 0, 2.5rem 4.375rem;
}

.velocity-lines {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 0.625rem,
    rgba(0, 255, 136, 0.03) 0.625rem,
    rgba(0, 255, 136, 0.03) 1.25rem
  );
}

.streak-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 255, 136, 0.05) 50%, transparent 100%);
  animation: velocityStreak 3s linear infinite;
  pointer-events: none;
}

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

/* Primary CTA Button */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-darker);
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  transition: all var(--velocity-fast) ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left var(--velocity-medium) ease;
}

.btn-primary:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.625rem 1.875rem rgba(0, 255, 136, 0.4);
}

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

/* Secondary CTA Button */
.btn-secondary {
  background: transparent;
  border: 0.125rem solid var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  transition: all var(--velocity-fast) ease;
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-darker);
  box-shadow: 0 0 1.25rem rgba(0, 255, 136, 0.3);
}

/* Card Styles */
.card-velocity {
  background: var(--color-surface);
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  transition: all var(--velocity-fast) ease;
  position: relative;
  overflow: hidden;
}

.card-velocity::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.1875rem;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: scaleX(0);
  transition: transform var(--velocity-medium) ease;
}

.card-velocity:hover {
  transform: translateY(-0.25rem);
  border-color: var(--color-primary);
  box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.3);
}

.card-velocity:hover::before {
  transform: scaleX(1);
}

/* Game Card */
.game-card {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all var(--velocity-fast) ease;
}

.game-card img {
  transition: transform var(--velocity-medium) ease;
}

.game-card:hover img {
  transform: scale(1.08);
}

.game-card:hover {
  box-shadow: 0 0 1.875rem rgba(0, 255, 136, 0.3);
}

/* Bonus Badge */
.bonus-badge {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 212, 255, 0.15) 100%);
  border: 0.125rem solid var(--color-primary);
  border-radius: 1rem;
  backdrop-filter: blur(0.625rem);
}

/* Step Badge */
.step-badge {
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--color-darker);
}

/* Navigation */
.nav-link {
  position: relative;
  color: var(--color-text);
  transition: color var(--velocity-fast) ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  width: 0;
  height: 0.125rem;
  background: var(--color-primary);
  transition: width var(--velocity-fast) ease;
}

.nav-link:hover {
  color: var(--color-primary);
}

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

/* Mobile Menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform var(--velocity-medium) ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

/* 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-text);
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
}

.prose h2 {
  color: #ffffff;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 0.125rem solid var(--color-primary);
  position: relative;
}

.prose h2::before {
  content: "";
  position: absolute;
  bottom: -0.125rem;
  left: 0;
  width: 4rem;
  height: 0.25rem;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 0.125rem;
}

.prose h3 {
  color: #f3f4f6;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

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

.prose p {
  margin-bottom: 1.25em;
  color: var(--color-text);
}

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

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

.prose strong {
  color: #ffffff;
  font-weight: 600;
}

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

/* Prose Lists */
.prose ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5em;
}

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

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.625em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-primary);
  border-radius: 50%;
}

.prose ol {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5em;
  counter-reset: prose-counter;
}

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

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

/* Prose Tables */
.prose .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5em 0;
  border-radius: 0.5rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

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

.prose thead {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 212, 255, 0.2) 100%);
}

.prose th {
  padding: 1em;
  text-align: left;
  font-weight: 600;
  color: #ffffff;
  border-bottom: 0.125rem solid var(--color-primary);
  white-space: nowrap;
}

.prose td {
  padding: 1em;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.1);
  color: var(--color-text);
}

.prose tbody tr {
  transition: background var(--velocity-fast) ease;
}

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

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

/* Prose Blockquotes */
.prose blockquote {
  margin: 1.5em 0;
  padding: 1.5em;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.08) 0%, rgba(0, 212, 255, 0.08) 100%);
  border-left: 0.25rem solid var(--color-primary);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--color-text);
}

.prose blockquote p {
  margin: 0;
}

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

/* Prose Code */
.prose code {
  background: var(--color-surface-light);
  padding: 0.125em 0.375em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: var(--color-primary);
}

.prose pre {
  background: var(--color-surface);
  padding: 1.5em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

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

/* Prose Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2em 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.0625rem;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  margin: 3em 0;
}

/* ============================================
   PARTICLES CONTAINER
   ============================================ */

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 0.375rem;
  height: 0.375rem;
  background: var(--color-primary);
  border-radius: 50%;
  opacity: 0.6;
}

.particle:nth-child(1) {
  top: 10%;
  left: 5%;
}
.particle:nth-child(2) {
  top: 20%;
  left: 80%;
  animation-delay: 0.5s;
}
.particle:nth-child(3) {
  top: 60%;
  left: 15%;
  animation-delay: 1s;
}
.particle:nth-child(4) {
  top: 40%;
  left: 90%;
  animation-delay: 1.5s;
}
.particle:nth-child(5) {
  top: 80%;
  left: 50%;
  animation-delay: 2s;
}
.particle:nth-child(6) {
  top: 30%;
  left: 40%;
  animation-delay: 0.3s;
}
.particle:nth-child(7) {
  top: 70%;
  left: 70%;
  animation-delay: 0.8s;
}
.particle:nth-child(8) {
  top: 50%;
  left: 25%;
  animation-delay: 1.3s;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 0.5rem;
}

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

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

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

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.border-gradient {
  border: 0.125rem solid transparent;
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
    linear-gradient(135deg, var(--color-primary), var(--color-accent)) border-box;
}

.glow-primary {
  box-shadow: 0 0 1.875rem rgba(0, 255, 136, 0.3);
}

.glow-accent {
  box-shadow: 0 0 1.875rem rgba(0, 212, 255, 0.3);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

@media (max-width: 768px) {
  .prose {
    padding-left: 1rem;
    padding-right: 1rem;
  }

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

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

  .prose th,
  .prose td {
    padding: 0.75em;
  }
}

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

  .btn-primary,
  .btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
}
