/* ============================================
   WhyNotBet - WarumNicht Pulse Theme
   Precise geometry, sharp highlights, confident modern tone
   ============================================ */

/* CSS Custom Properties */
:root {
  --pulse-primary: #6366f1;
  --pulse-primary-light: #818cf8;
  --pulse-secondary: #f59e0b;
  --pulse-accent: #10b981;
  --pulse-dark: #0f172a;
  --pulse-darker: #020617;
  --pulse-surface: #1e293b;
  --pulse-surface-light: #334155;
  --pulse-text: #f1f5f9;
  --pulse-text-muted: #94a3b8;
  --pulse-border: #475569;
  --pulse-gradient: linear-gradient(135deg, var(--pulse-primary) 0%, #8b5cf6 100%);
  --pulse-glow: 0 0 30px rgba(99, 102, 241, 0.4);
}

/* Keyframe Animations */
@keyframes particle-float {
  0%,
  100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-20px) translateX(10px) rotate(90deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-40px) translateX(-5px) rotate(180deg);
    opacity: 0.8;
  }
  75% {
    transform: translateY(-20px) translateX(-15px) rotate(270deg);
    opacity: 1;
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), 0 0 40px rgba(99, 102, 241, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5), 0 0 60px rgba(99, 102, 241, 0.2);
  }
}

@keyframes tilt-shift {
  0%,
  100% {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  }
  25% {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
  }
  75% {
    transform: perspective(1000px) rotateX(-2deg) rotateY(2deg);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes badge-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Particle System */
.particle-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--pulse-primary-light);
  border-radius: 50%;
  animation: particle-float 8s infinite ease-in-out;
}

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

/* Tilt Effect */
.tilt-card {
  animation: tilt-shift 6s infinite ease-in-out;
  transform-style: preserve-3d;
}

.tilt-card:hover {
  animation-play-state: paused;
  transform: perspective(1000px) rotateX(-5deg) rotateY(5deg) scale(1.02);
  transition: transform 0.3s ease;
}

/* Glow Effects */
.glow-pulse {
  animation: pulse-glow 3s infinite ease-in-out;
}

/* Gradient Animation */
.gradient-animate {
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
}

/* Slide Up Animation */
.animate-slide-up {
  animation: slide-up 0.6s ease-out forwards;
}

/* Shimmer Effect */
.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Badge Pulse */
.badge-animate {
  animation: badge-pulse 2s infinite ease-in-out;
}

/* Geometric Patterns */
.geo-pattern {
  background-image: linear-gradient(
      30deg,
      var(--pulse-surface) 12%,
      transparent 12.5%,
      transparent 87%,
      var(--pulse-surface) 87.5%,
      var(--pulse-surface)
    ),
    linear-gradient(
      150deg,
      var(--pulse-surface) 12%,
      transparent 12.5%,
      transparent 87%,
      var(--pulse-surface) 87.5%,
      var(--pulse-surface)
    ),
    linear-gradient(
      30deg,
      var(--pulse-surface) 12%,
      transparent 12.5%,
      transparent 87%,
      var(--pulse-surface) 87.5%,
      var(--pulse-surface)
    ),
    linear-gradient(
      150deg,
      var(--pulse-surface) 12%,
      transparent 12.5%,
      transparent 87%,
      var(--pulse-surface) 87.5%,
      var(--pulse-surface)
    ),
    linear-gradient(
      60deg,
      var(--pulse-surface-light) 25%,
      transparent 25.5%,
      transparent 75%,
      var(--pulse-surface-light) 75%,
      var(--pulse-surface-light)
    ),
    linear-gradient(
      60deg,
      var(--pulse-surface-light) 25%,
      transparent 25.5%,
      transparent 75%,
      var(--pulse-surface-light) 75%,
      var(--pulse-surface-light)
    );
  background-size: 5rem 8.8rem;
  background-position: 0 0, 0 0, 2.5rem 4.4rem, 2.5rem 4.4rem, 0 0, 2.5rem 4.4rem;
}

.grid-pattern {
  background-image: linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
  background-size: 3rem 3rem;
}

/* Sharp Highlight Borders */
.sharp-border {
  position: relative;
}

.sharp-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--pulse-primary), var(--pulse-secondary)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  border-radius: inherit;
  pointer-events: none;
}

/* Button Styles */
.btn-primary {
  background: var(--pulse-gradient);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--pulse-glow);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--pulse-primary);
  color: var(--pulse-primary-light);
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

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

/* Card Styles */
.card-surface {
  background: var(--pulse-surface);
  border: 1px solid var(--pulse-border);
  border-radius: 1rem;
}

.card-elevated {
  background: linear-gradient(145deg, var(--pulse-surface) 0%, var(--pulse-darker) 100%);
  border: 1px solid var(--pulse-border);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

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

/* Navigation Styles */
.nav-link {
  position: relative;
  color: var(--pulse-text-muted);
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--pulse-gradient);
  transition: width 0.3s ease;
}

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

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

/* Mobile Menu */
.burger-menu {
  background: var(--pulse-dark);
  border: 1px solid var(--pulse-border);
  padding: 0.5rem;
  border-radius: 0.375rem;
}

/* Hero Section */
.hero-bg {
  position: relative;
  background: linear-gradient(180deg, var(--pulse-darker) 0%, var(--pulse-dark) 100%);
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

/* Bonus Badge */
.bonus-badge {
  background: linear-gradient(135deg, var(--pulse-dark) 0%, var(--pulse-surface) 100%);
  border: 2px solid var(--pulse-primary);
  border-radius: 1.5rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.bonus-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
  animation: shimmer 3s infinite;
}

/* Game Card */
.game-card {
  background: var(--pulse-surface);
  border: 1px solid var(--pulse-border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
  flex-shrink: 0;
  width: 10rem;
}

.game-card:hover {
  border-color: var(--pulse-primary);
  transform: translateY(-4px);
  box-shadow: var(--pulse-glow);
}

/* Step Badge */
.step-badge {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--pulse-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  box-shadow: var(--pulse-glow);
}

/* Provider Cloud */
.provider-tag {
  background: var(--pulse-surface);
  border: 1px solid var(--pulse-border);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  color: var(--pulse-text-muted);
  transition: all 0.3s ease;
}

.provider-tag:hover {
  border-color: var(--pulse-primary);
  color: var(--pulse-text);
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--pulse-border);
}

.faq-question {
  padding: 1.25rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--pulse-text);
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: var(--pulse-primary-light);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  color: var(--pulse-text-muted);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

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

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

/* Promo Card */
.promo-card {
  background: linear-gradient(145deg, var(--pulse-surface) 0%, var(--pulse-darker) 100%);
  border: 1px solid var(--pulse-border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.promo-card:hover {
  border-color: var(--pulse-primary);
  transform: translateY(-4px);
}

/* Footer */
.footer-section {
  background: var(--pulse-darker);
  border-top: 1px solid var(--pulse-border);
}

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

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

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

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

/* ============================================
   PROSE STYLING FOR MARKDOWN CONTENT
   ============================================ */

.prose {
  color: var(--pulse-text);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 75ch;
  margin-left: auto;
  margin-right: auto;
}

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

/* Headings */
.prose h2 {
  color: var(--pulse-text);
  font-size: 1.75em;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2.5em;
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--pulse-primary);
  position: relative;
}

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

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

.prose h4 {
  color: var(--pulse-text-muted);
  font-size: 1.125em;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

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

.prose p:first-of-type {
  font-size: 1.125em;
  color: var(--pulse-text);
}

/* Links */
.prose a {
  color: var(--pulse-primary-light);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

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

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

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

.prose ul li::before {
  content: "";
  position: absolute;
  left: -1em;
  top: 0.6em;
  width: 0.375em;
  height: 0.375em;
  background: var(--pulse-primary);
  border-radius: 50%;
}

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

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

.prose ol li::before {
  content: counter(ol-counter) ".";
  position: absolute;
  left: -1.5em;
  color: var(--pulse-primary-light);
  font-weight: 600;
}

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

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

.prose thead {
  background: var(--pulse-surface);
}

.prose th {
  color: var(--pulse-text);
  font-weight: 600;
  text-align: left;
  padding: 1em 1.25em;
  border-bottom: 2px solid var(--pulse-primary);
}

.prose td {
  padding: 1em 1.25em;
  border-bottom: 1px solid var(--pulse-border);
  color: var(--pulse-text-muted);
}

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

.prose tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

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

/* Blockquotes */
.prose blockquote {
  border-left: 4px solid var(--pulse-primary);
  padding: 1em 1.5em;
  margin: 2em 0;
  background: var(--pulse-surface);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--pulse-text);
}

.prose blockquote p {
  margin: 0;
  color: var(--pulse-text);
}

/* Code */
.prose code {
  background: var(--pulse-surface);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: var(--pulse-secondary);
}

.prose pre {
  background: var(--pulse-surface);
  padding: 1.25em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2em 0;
  border: 1px solid var(--pulse-border);
}

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

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2em auto;
  display: block;
  border: 1px solid var(--pulse-border);
}

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

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

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

/* Definition Lists */
.prose dl {
  margin: 1.5em 0;
}

.prose dt {
  color: var(--pulse-text);
  font-weight: 600;
  margin-top: 1em;
}

.prose dd {
  color: var(--pulse-text-muted);
  padding-left: 1.5em;
  margin-top: 0.25em;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .prose {
    font-size: 0.9375rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

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

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

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

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

/* Dark/Light Text Contrast Utilities */
.text-on-dark {
  color: var(--pulse-text);
}

.text-muted-on-dark {
  color: var(--pulse-text-muted);
}

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

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--pulse-primary);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--pulse-primary);
  color: white;
}
