/* ================================================
   MafiaCasino - Noir Prestige Portal North Theme
   Custom CSS: Keyframes, Animations & Prose Styling
   ================================================ */

/* --- CSS Custom Properties --- */
:root {
  --noir-950: #0a0a0b;
  --noir-900: #121214;
  --noir-800: #1a1a1e;
  --noir-700: #252529;
  --noir-600: #35353b;
  --gold-500: #d4a843;
  --gold-400: #e8c468;
  --gold-300: #f5d98a;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --crimson-600: #b91c1c;
  --crimson-500: #dc2626;
  --cream-100: #fefce8;
  --cream-200: #fef3c7;
}

/* --- Keyframe Animations --- */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.625rem);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 1.25rem rgba(212, 168, 67, 0.3), 0 0 2.5rem rgba(212, 168, 67, 0.2);
  }
  50% {
    box-shadow: 0 0 1.875rem rgba(212, 168, 67, 0.5), 0 0 3.75rem rgba(212, 168, 67, 0.3);
  }
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes particle-drift {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(3.125rem) scale(0.5);
    opacity: 0;
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

/* --- Animation Utility Classes --- */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

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

.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.3), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

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

.animate-particle {
  animation: particle-drift 8s linear infinite;
}

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

.animate-rotate-slow {
  animation: rotate-slow 20s linear infinite;
}

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

/* --- Parallax System --- */
.parallax-container {
  perspective: 62.5rem;
  overflow: hidden;
}

.parallax-layer-back {
  transform: translateZ(-18.75rem) scale(1.3);
}

.parallax-layer-mid {
  transform: translateZ(-6.25rem) scale(1.1);
}

.parallax-layer-front {
  transform: translateZ(0);
}

/* --- Particle System --- */
.particle {
  position: absolute;
  width: 0.25rem;
  height: 0.25rem;
  background: var(--gold-400);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0.375rem var(--gold-500);
}

.particle:nth-child(odd) {
  width: 0.1875rem;
  height: 0.1875rem;
  animation-duration: 10s;
}

.particle:nth-child(3n) {
  background: var(--amber-400);
  animation-delay: 2s;
}

.particle:nth-child(5n) {
  animation-delay: 4s;
  animation-duration: 12s;
}

/* --- Glow Effects --- */
.glow-gold {
  box-shadow: 0 0 1.25rem rgba(212, 168, 67, 0.4), 0 0 2.5rem rgba(212, 168, 67, 0.2), inset 0 0.0625rem 0
    rgba(255, 255, 255, 0.1);
}

.glow-gold-strong {
  box-shadow: 0 0 1.875rem rgba(212, 168, 67, 0.6), 0 0 3.75rem rgba(212, 168, 67, 0.3), 0 0 5rem
    rgba(212, 168, 67, 0.15);
}

.text-glow-gold {
  text-shadow: 0 0 0.625rem rgba(212, 168, 67, 0.5), 0 0 1.25rem rgba(212, 168, 67, 0.3);
}

/* --- Button Styles --- */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--amber-500) 100%);
  color: var(--noir-950);
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--amber-400) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.5rem rgba(212, 168, 67, 0.4);
}

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

.btn-secondary {
  background: transparent;
  border: 0.125rem solid var(--gold-500);
  color: var(--gold-400);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(212, 168, 67, 0.1);
  border-color: var(--gold-400);
  box-shadow: 0 0 1.25rem rgba(212, 168, 67, 0.3);
}

/* --- Card Styles --- */
.card-noir {
  background: linear-gradient(145deg, var(--noir-800) 0%, var(--noir-900) 100%);
  border: 0.0625rem solid rgba(212, 168, 67, 0.15);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.card-noir:hover {
  border-color: rgba(212, 168, 67, 0.4);
  transform: translateY(-0.25rem);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.4), 0 0 1.25rem rgba(212, 168, 67, 0.15);
}

/* --- Table Responsive Wrapper --- */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  border: 0.0625rem solid rgba(212, 168, 67, 0.2);
}

/* --- Prose Styling for Markdown Content --- */
.prose {
  color: var(--cream-200);
  line-height: 1.75;
  max-width: 100%;
}

.prose h2 {
  color: var(--gold-400);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.125rem solid rgba(212, 168, 67, 0.3);
  text-shadow: 0 0 0.625rem rgba(212, 168, 67, 0.3);
}

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

.prose h4 {
  color: var(--cream-100);
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose p {
  margin-bottom: 1.25rem;
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
}

.prose a {
  color: var(--gold-400);
  text-decoration: underline;
  text-underline-offset: 0.1875rem;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: var(--gold-300);
  text-shadow: 0 0 0.5rem rgba(212, 168, 67, 0.4);
}

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

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

.prose blockquote {
  border-left: 0.25rem solid var(--gold-500);
  background: rgba(212, 168, 67, 0.08);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--cream-200);
}

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

.prose ul {
  list-style: none;
  padding-left: 0;
  margin: 1.25rem 0;
}

.prose ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.625rem;
}

.prose ul li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--gold-500);
  font-size: 0.625rem;
  top: 0.5rem;
}

.prose ol {
  list-style: none;
  padding-left: 0;
  margin: 1.25rem 0;
  counter-reset: prose-counter;
}

.prose ol li {
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: 0.75rem;
  counter-increment: prose-counter;
}

.prose ol li::before {
  content: counter(prose-counter);
  position: absolute;
  left: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: linear-gradient(135deg, var(--gold-500), var(--amber-500));
  color: var(--noir-950);
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0.125rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.875rem, 1.8vw, 1rem);
}

.prose thead {
  background: linear-gradient(135deg, var(--noir-700) 0%, var(--noir-800) 100%);
}

.prose th {
  color: var(--gold-400);
  font-weight: 600;
  text-align: left;
  padding: 0.875rem 1rem;
  border-bottom: 0.125rem solid var(--gold-500);
  white-space: nowrap;
}

.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 0.0625rem solid rgba(212, 168, 67, 0.15);
  color: var(--cream-200);
}

.prose tbody tr {
  background: var(--noir-900);
  transition: background 0.2s ease;
}

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

.prose tbody tr:hover {
  background: rgba(212, 168, 67, 0.1);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  border: 0.0625rem solid rgba(212, 168, 67, 0.2);
}

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

.prose code {
  background: var(--noir-700);
  color: var(--gold-300);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.prose pre {
  background: var(--noir-800);
  border: 0.0625rem solid rgba(212, 168, 67, 0.2);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

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

/* --- Navigation Styles --- */
.nav-link {
  color: var(--cream-200);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 0.125rem;
  background: var(--gold-500);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

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

/* --- Burger Menu --- */
.burger-menu {
  background: var(--noir-900);
  border: 0.0625rem solid rgba(212, 168, 67, 0.3);
  padding: 0.5rem;
  border-radius: 0.375rem;
}

.burger-line {
  width: 1.5rem;
  height: 0.125rem;
  background: var(--gold-400);
  transition: all 0.3s ease;
}

/* --- Hero Section --- */
.hero-gradient {
  background: radial-gradient(ellipse at center top, rgba(212, 168, 67, 0.15) 0%, transparent 50%),
    linear-gradient(180deg, var(--noir-900) 0%, var(--noir-950) 100%);
}

/* --- Badge Styles --- */
.bonus-badge {
  background: linear-gradient(145deg, var(--noir-700) 0%, var(--noir-800) 100%);
  border: 0.125rem solid var(--gold-500);
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
}

.bonus-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(212, 168, 67, 0.1) 50%, transparent 60%);
  animation: shimmer 3s linear infinite;
}

/* --- Step Badges --- */
.step-badge {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--amber-500) 100%);
  color: var(--noir-950);
  font-weight: 800;
  font-size: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 1.25rem rgba(212, 168, 67, 0.5);
}

/* --- Game Cards --- */
.game-card {
  background: linear-gradient(145deg, var(--noir-800) 0%, var(--noir-900) 100%);
  border: 0.0625rem solid rgba(212, 168, 67, 0.2);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
  flex: 0 0 auto;
  width: 16rem;
}

.game-card:hover {
  border-color: var(--gold-500);
  transform: translateY(-0.375rem) scale(1.02);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.4), 0 0 1.5rem rgba(212, 168, 67, 0.2);
}

.game-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

/* --- Section Dividers --- */
.section-divider {
  height: 0.0625rem;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  margin: 0 auto;
  max-width: 50%;
}

/* --- Footer Styles --- */
.footer-link {
  color: var(--cream-200);
  opacity: 0.7;
  transition: all 0.2s ease;
}

.footer-link:hover {
  opacity: 1;
  color: var(--gold-400);
}

/* --- 18+ Badge --- */
.age-badge {
  width: 2.5rem;
  height: 2.5rem;
  border: 0.125rem solid var(--crimson-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--crimson-500);
  font-weight: 800;
  font-size: 0.75rem;
}

/* --- FAQ Accordion --- */
.faq-item {
  border: 0.0625rem solid rgba(212, 168, 67, 0.2);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--noir-800);
}

.faq-question {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--cream-100);
  font-weight: 500;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: rgba(212, 168, 67, 0.1);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--cream-200);
}

.faq-item.active .faq-answer {
  max-height: 31.25rem;
  padding: 0 1.25rem 1rem;
}

.faq-icon {
  transition: transform 0.3s ease;
  color: var(--gold-500);
}

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

/* --- Promo Cards --- */
.promo-card {
  background: linear-gradient(145deg, var(--noir-800) 0%, var(--noir-900) 100%);
  border: 0.0625rem solid rgba(212, 168, 67, 0.25);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.promo-card:hover {
  border-color: var(--gold-500);
  box-shadow: 0 0 1.5rem rgba(212, 168, 67, 0.2);
}

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

::-webkit-scrollbar-track {
  background: var(--noir-900);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-400);
}

/* --- Mobile Menu Overlay --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 11, 0.98);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-size: 1.5rem;
  color: var(--cream-100);
  font-weight: 600;
  transition: color 0.2s ease;
}

.mobile-menu a:hover {
  color: var(--gold-400);
}

/* --- Utility Classes --- */
.bg-noir-950 {
  background-color: var(--noir-950);
}
.bg-noir-900 {
  background-color: var(--noir-900);
}
.bg-noir-800 {
  background-color: var(--noir-800);
}
.text-gold-400 {
  color: var(--gold-400);
}
.text-gold-500 {
  color: var(--gold-500);
}
.text-cream-100 {
  color: var(--cream-100);
}
.text-cream-200 {
  color: var(--cream-200);
}
.border-gold {
  border-color: var(--gold-500);
}

/* --- Print Styles --- */
@media print {
  .prose {
    color: #000;
  }
  .prose h2,
  .prose h3,
  .prose h4 {
    color: #000;
  }
  .prose a {
    color: #000;
    text-decoration: underline;
  }
}
