/* ================================================
   go4casino - Momentum Dash Arena Alpine Theme
   Custom CSS: Animations, Overrides & Prose
   ================================================ */

:root {
  --color-primary: #1e3a5f;
  --color-secondary: #2d5a87;
  --color-accent: #4ecdc4;
  --color-accent-hover: #3db8b0;
  --color-gold: #d4af37;
  --color-gold-light: #f4d03f;
  --color-surface: #0f1923;
  --color-surface-light: #162635;
  --color-text: #e8eef4;
  --color-text-muted: #94a3b8;
  --color-border: rgba(78, 205, 196, 0.2);
  --color-success: #22c55e;
  --color-warning: #f59e0b;
}

/* ================================================
   Keyframe Animations
   ================================================ */

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

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

@keyframes particle-float {
  0%,
  100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-1.5rem) translateX(0.5rem) scale(1.1);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-2.5rem) translateX(-0.5rem) scale(0.9);
    opacity: 0.4;
  }
  75% {
    transform: translateY(-1rem) translateX(1rem) scale(1.05);
    opacity: 0.7;
  }
}

@keyframes particle-drift {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.5;
  }
  33% {
    transform: translate(1rem, -2rem) rotate(120deg);
    opacity: 0.8;
  }
  66% {
    transform: translate(-0.5rem, -3rem) rotate(240deg);
    opacity: 0.3;
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 1rem rgba(78, 205, 196, 0.3);
  }
  50% {
    box-shadow: 0 0 2rem rgba(78, 205, 196, 0.5), 0 0 3rem rgba(78, 205, 196, 0.2);
  }
}

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

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

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

/* ================================================
   Animation Utility Classes
   ================================================ */

.animate-marquee {
  animation: marquee 25s linear infinite;
}

.animate-marquee-reverse {
  animation: marquee-reverse 25s linear infinite;
}

.animate-particle {
  animation: particle-float 8s ease-in-out infinite;
}

.animate-particle-drift {
  animation: particle-drift 12s ease-in-out infinite;
}

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

.animate-slide-up {
  animation: slide-up 0.6s ease-out forwards;
}

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

.animation-delay-100 {
  animation-delay: 0.1s;
}
.animation-delay-200 {
  animation-delay: 0.2s;
}
.animation-delay-300 {
  animation-delay: 0.3s;
}
.animation-delay-500 {
  animation-delay: 0.5s;
}
.animation-delay-700 {
  animation-delay: 0.7s;
}
.animation-delay-1000 {
  animation-delay: 1s;
}

/* ================================================
   Component Overrides
   ================================================ */

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  width: 0;
  height: 0.125rem;
  background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
  transition: width 0.3s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 100%);
  transition: all 0.3s ease;
  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%;
}

.btn-primary:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.5rem rgba(78, 205, 196, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 0.125rem solid var(--color-accent);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: var(--color-surface);
}

.card-game {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(145deg, var(--color-surface-light), var(--color-surface));
}

.card-game:hover {
  transform: translateY(-0.5rem) scale(1.02);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.4), 0 0 1rem rgba(78, 205, 196, 0.2);
}

.bonus-badge {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 50%, var(--color-gold) 100%);
  background-size: 200% 200%;
  animation: diagonal-sweep 4s ease infinite, badge-bounce 2s ease-in-out infinite;
}

.step-badge {
  background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
  box-shadow: 0 0.25rem 1rem rgba(78, 205, 196, 0.4);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.payment-table {
  border-collapse: separate;
  border-spacing: 0;
}

.payment-table th,
.payment-table td {
  border-bottom: 0.0625rem solid var(--color-border);
}

.faq-item {
  border-left: 0.1875rem solid transparent;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-left-color: var(--color-accent);
  background: rgba(78, 205, 196, 0.05);
}

.particle {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
}

.diagonal-pattern {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 0.625rem,
    rgba(78, 205, 196, 0.03) 0.625rem,
    rgba(78, 205, 196, 0.03) 1.25rem
  );
}

.alpine-border {
  position: relative;
}

.alpine-border::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.1875rem;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-accent) 20%,
    var(--color-gold) 50%,
    var(--color-accent) 80%,
    transparent 100%
  );
}

/* ================================================
   Prose Styling for Markdown Content
   ================================================ */

.prose {
  color: var(--color-text);
  line-height: 1.75;
  max-width: 100%;
}

.prose h2 {
  color: var(--color-text);
  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-border);
  position: relative;
}

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

.prose h3 {
  color: var(--color-text);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.75em;
  padding-left: 1em;
  border-left: 0.1875rem solid var(--color-accent);
}

.prose h4 {
  color: var(--color-accent);
  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-muted);
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
}

.prose a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 0.0625rem solid transparent;
  transition: all 0.3s ease;
}

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

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

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

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

.prose ul {
  list-style: none;
}

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

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.625em;
  width: 0.5em;
  height: 0.5em;
  background: linear-gradient(135deg, var(--color-accent), var(--color-gold));
  border-radius: 0.125rem;
  transform: rotate(45deg);
}

.prose ol {
  list-style: none;
  counter-reset: prose-counter;
}

.prose ol li {
  position: relative;
  padding-left: 2.5em;
  margin-bottom: 0.75em;
  color: var(--color-text-muted);
  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-accent), var(--color-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875em;
  font-weight: 700;
  color: var(--color-surface);
}

.prose blockquote {
  margin: 2em 0;
  padding: 1.5em 2em;
  background: linear-gradient(135deg, var(--color-surface-light), rgba(78, 205, 196, 0.05));
  border-left: 0.25rem solid var(--color-accent);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--color-text);
}

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

.prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2em 0;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.prose thead {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.prose th {
  padding: 1em 1.25em;
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.prose th:first-child {
  border-radius: 0.5rem 0 0 0;
}

.prose th:last-child {
  border-radius: 0 0.5rem 0 0;
}

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

.prose tbody tr {
  background: var(--color-surface-light);
  transition: background 0.3s ease;
}

.prose tbody tr:nth-child(even) {
  background: var(--color-surface);
}

.prose tbody tr:hover {
  background: rgba(78, 205, 196, 0.08);
}

.prose tbody tr:last-child td:first-child {
  border-radius: 0 0 0 0.5rem;
}

.prose tbody tr:last-child td:last-child {
  border-radius: 0 0 0.5rem 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2em 0;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.3);
}

.prose hr {
  border: none;
  height: 0.0625rem;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: 3em 0;
}

.prose code {
  background: var(--color-surface-light);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  color: var(--color-accent);
}

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

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

/* ================================================
   Responsive Adjustments
   ================================================ */

@media (max-width: 64rem) {
  .prose h2 {
    margin-top: 2em;
  }

  .prose h3 {
    margin-top: 1.5em;
  }

  .prose blockquote {
    padding: 1em 1.25em;
  }
}

@media (max-width: 48rem) {
  .prose {
    line-height: 1.65;
  }

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

  .prose ol li {
    padding-left: 2em;
  }

  .prose ol li::before {
    width: 1.5em;
    height: 1.5em;
    font-size: 0.75em;
  }

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

/* ================================================
   Scrollbar Styling
   ================================================ */

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

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

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

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

/* ================================================
   Focus States for Accessibility
   ================================================ */

a:focus-visible,
button:focus-visible {
  outline: 0.125rem solid var(--color-accent);
  outline-offset: 0.125rem;
}

/* ================================================
   Utility Overrides
   ================================================ */

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

.bg-alpine-gradient {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-primary) 100%);
}

.border-alpine {
  border-color: var(--color-border);
}

.shadow-alpine {
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.3), 0 0 1rem rgba(78, 205, 196, 0.1);
}
