/* ================================================
   WINBETZ CASINO - HYPERLINE THEME
   Custom CSS: Animations, Keyframes, Prose Styling
   ================================================ */

/* -------------------- CSS Variables -------------------- */
:root {
  --wz-dark: #0a0a12;
  --wz-darker: #050508;
  --wz-primary: #00e5ff;
  --wz-secondary: #ff3d71;
  --wz-accent: #ffd93d;
  --wz-surface: #12121f;
  --wz-muted: #8892b0;
  --wz-light: #e6f1ff;
}

/* -------------------- Base Overrides -------------------- */
html {
  overflow-x: clip;
  overflow-y: auto;
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
}

/* -------------------- Hyperline Animations -------------------- */
@keyframes hyperline-flow {
  0% {
    stroke-dashoffset: 1000;
    opacity: 0;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes hyperline-flow-delayed {
  0%,
  30% {
    stroke-dashoffset: 1000;
    opacity: 0;
  }
  60% {
    opacity: 0.4;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

.hyperline-animate {
  stroke-dasharray: 1000;
  animation: hyperline-flow 8s linear infinite;
}

.hyperline-animate-delayed {
  stroke-dasharray: 1000;
  animation: hyperline-flow-delayed 10s linear infinite;
}

/* -------------------- Pulse Glow Animation -------------------- */
@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.02);
  }
}

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

/* -------------------- Bounce Slow Animation -------------------- */
@keyframes bounce-slow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.375rem);
  }
}

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

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

.marquee-container {
  overflow: hidden;
  width: 100%;
}

.marquee-track {
  display: flex;
  animation: marquee 30s linear infinite;
  width: max-content;
}

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

/* -------------------- Mobile Menu Hamburger -------------------- */
#mobile-menu-btn.menu-open .hamburger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(0.3125rem, 0.3125rem);
}

#mobile-menu-btn.menu-open .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn.menu-open .hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(0.375rem, -0.375rem);
}

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

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

/* -------------------- Prose Styling -------------------- */
.prose {
  color: var(--wz-muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 100%;
}

/* Headings */
.prose h2 {
  color: var(--wz-light);
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.125rem solid rgba(0, 229, 255, 0.2);
  line-height: 1.3;
}

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

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

/* Paragraphs */
.prose p {
  margin-bottom: 1.25rem;
  color: var(--wz-muted);
}

.prose p:first-of-type {
  font-size: 1.125rem;
  color: var(--wz-light);
  opacity: 0.9;
}

/* Links */
.prose a {
  color: var(--wz-primary);
  text-decoration: none;
  border-bottom: 0.0625rem solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

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

/* 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.5rem;
  color: var(--wz-muted);
  padding-left: 0.5rem;
}

.prose li::marker {
  color: var(--wz-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: 1.5rem;
  font-size: 0.875rem;
}

.prose thead {
  background: rgba(0, 229, 255, 0.1);
}

.prose th {
  color: var(--wz-light);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 0.125rem solid rgba(0, 229, 255, 0.3);
}

.prose td {
  color: var(--wz-muted);
  padding: 0.75rem 1rem;
  border-bottom: 0.0625rem solid rgba(0, 229, 255, 0.1);
}

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

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

/* Table Wrapper for Responsiveness */
.prose .table-responsive,
.prose div:has(> table) {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  border: 0.0625rem solid rgba(0, 229, 255, 0.2);
  background: rgba(10, 10, 18, 0.5);
}

.prose .table-responsive table,
.prose div:has(> table) table {
  margin: 0;
  min-width: 31.25rem;
}

/* Blockquotes */
.prose blockquote {
  border-left: 0.25rem solid var(--wz-primary);
  background: rgba(0, 229, 255, 0.05);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
}

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

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

/* Code */
.prose code {
  background: rgba(0, 229, 255, 0.1);
  color: var(--wz-primary);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "Monaco", "Consolas", monospace;
}

.prose pre {
  background: var(--wz-darker);
  border: 0.0625rem solid rgba(0, 229, 255, 0.2);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

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

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  border: 0.0625rem solid rgba(0, 229, 255, 0.2);
}

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

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

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

/* First Letter Styling for Articles */
.prose > p:first-of-type::first-letter {
  font-size: 3rem;
  font-weight: 700;
  color: var(--wz-primary);
  float: left;
  line-height: 1;
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}

/* -------------------- Button Styles -------------------- */
.btn-primary {
  position: relative;
  overflow: hidden;
}

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

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

/* -------------------- Navigation Link Underline Effect -------------------- */
.nav-link {
  position: relative;
}

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

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

/* -------------------- Game Card Hover Effects -------------------- */
.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0.75rem;
  z-index: 1;
  pointer-events: none;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--wz-accent);
}

/* -------------------- Selection Styling -------------------- */
::selection {
  background: var(--wz-primary);
  color: var(--wz-dark);
}

/* -------------------- Focus States for Accessibility -------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0.125rem solid var(--wz-primary);
  outline-offset: 0.125rem;
}

/* -------------------- Responsive Adjustments -------------------- */
@media (max-width: 48rem) {
  .prose h2 {
    font-size: 1.5rem;
  }

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

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

  .prose th,
  .prose td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}

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

  .prose h2 {
    font-size: 1.375rem;
    margin-top: 2rem;
  }

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

  .prose ul,
  .prose ol {
    padding-left: 1.25rem;
  }

  .prose blockquote {
    padding: 0.75rem 1rem;
  }
}
