/* ================================================
   FIRIXSLOT - Firix Ignite Flow Theme
   Custom CSS: Keyframes, Animations & Prose Styling
   ================================================ */

/* ------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------ */
:root {
  --fire-primary: #ff6b35;
  --fire-secondary: #f7931e;
  --fire-glow: #ff4500;
  --ember-dark: #1a0a0a;
  --ember-mid: #2d1810;
  --ember-light: #3d2218;
  --ash-dark: #0d0d0d;
  --ash-mid: #1a1a1a;
  --smoke-light: #f5f0eb;
  --smoke-mid: #d9d0c7;
  --gold-accent: #ffd700;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------------------------------------------
   Keyframe Animations
   ------------------------------------------------ */

/* Tilt Animation */
@keyframes tilt {
  0%, 100% {
    transform: rotate(-1deg);
  }
  50% {
    transform: rotate(1deg);
  }
}

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

/* Controlled Glow Pulse */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 1.25rem rgba(255, 107, 53, 0.3);
  }
  50% {
    box-shadow: 0 0 2rem rgba(255, 107, 53, 0.5);
  }
}

/* Ember Float */
@keyframes ember-float {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-0.625rem) scale(1.1);
    opacity: 1;
  }
}

/* Smooth Fade In */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

.animate-fade-in {
  animation: fade-in 0.6s var(--transition-smooth) forwards;
}

.animate-shimmer {
  background: linear-gradient(
    90deg,
    var(--fire-primary) 0%,
    var(--gold-accent) 50%,
    var(--fire-primary) 100%
  );
  background-size: 200% auto;
  animation: fire-shimmer 3s linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
}

/* ------------------------------------------------
   Component Overrides
   ------------------------------------------------ */

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

/* Global overflow control */
html, body {
  overflow-x: clip;
  overflow-y: auto;
}

/* CTA Button Styles */
.btn-primary {
  background: linear-gradient(135deg, var(--fire-primary) 0%, var(--fire-secondary) 100%);
  transition: all 0.3s var(--transition-smooth);
  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 var(--transition-smooth);
}

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

.btn-primary:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.5rem rgba(255, 107, 53, 0.4);
}

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

.btn-secondary:hover {
  background: var(--fire-primary);
  color: var(--ash-dark);
  transform: translateY(-0.125rem);
}

/* Bonus Badge */
.bonus-badge {
  background: linear-gradient(145deg, var(--ember-mid) 0%, var(--ember-dark) 100%);
  border: 0.125rem solid var(--fire-primary);
  position: relative;
}

.bonus-badge::after {
  content: '';
  position: absolute;
  inset: -0.125rem;
  border-radius: inherit;
  padding: 0.125rem;
  background: linear-gradient(135deg, var(--fire-primary), var(--gold-accent), var(--fire-primary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Game Card Styles */
.game-card {
  transition: all 0.4s var(--transition-smooth);
  background: linear-gradient(180deg, var(--ember-mid) 0%, var(--ash-mid) 100%);
}

.game-card:hover {
  transform: translateY(-0.5rem) scale(1.02);
  box-shadow: 0 1rem 2.5rem rgba(255, 107, 53, 0.25);
}

/* Step Badge */
.step-badge {
  background: linear-gradient(135deg, var(--fire-primary) 0%, var(--fire-secondary) 100%);
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  border-radius: 50%;
  color: var(--ash-dark);
  box-shadow: 0 0.25rem 1rem rgba(255, 107, 53, 0.4);
}

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

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

/* Nav Mobile Menu */
.mobile-menu {
  background: var(--ash-dark);
  backdrop-filter: blur(0.625rem);
}

/* Promo Card */
.promo-card {
  background: linear-gradient(160deg, var(--ember-mid) 0%, var(--ash-mid) 100%);
  border: 0.0625rem solid rgba(255, 107, 53, 0.2);
  transition: all 0.3s var(--transition-smooth);
}

.promo-card:hover {
  border-color: var(--fire-primary);
  box-shadow: 0 0.5rem 2rem rgba(255, 107, 53, 0.2);
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 0.0625rem solid rgba(255, 107, 53, 0.2);
}

.faq-question {
  transition: color 0.3s var(--transition-smooth);
}

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

/* ------------------------------------------------
   Prose Styling for Markdown Content
   ------------------------------------------------ */
.prose {
  color: var(--smoke-light);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 100%;
}

/* Prose Headings */
.prose h2 {
  color: var(--smoke-light);
  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(--fire-primary);
  position: relative;
}

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

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

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

/* Prose Paragraphs */
.prose p {
  margin-bottom: 1.5em;
  color: var(--smoke-mid);
}

.prose p:first-of-type {
  font-size: 1.1em;
  color: var(--smoke-light);
}

/* Prose Links */
.prose a {
  color: var(--fire-primary);
  text-decoration: underline;
  text-decoration-color: rgba(255, 107, 53, 0.4);
  text-underline-offset: 0.25em;
  transition: all 0.2s var(--transition-smooth);
}

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

/* Prose Lists */
.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(--smoke-mid);
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.5em;
  height: 0.5em;
  background: linear-gradient(135deg, var(--fire-primary), var(--fire-secondary));
  border-radius: 50%;
}

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

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

.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(--fire-primary), var(--fire-secondary));
  color: var(--ash-dark);
  font-weight: 700;
  font-size: 0.85em;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Prose Tables */
.prose .table-responsive {
  margin: 2em 0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

.prose thead {
  background: linear-gradient(135deg, var(--ember-mid) 0%, var(--ember-dark) 100%);
}

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

.prose td {
  padding: 1em 1.25em;
  border-bottom: 0.0625rem solid rgba(255, 107, 53, 0.15);
  color: var(--smoke-mid);
}

.prose tbody tr {
  background: var(--ash-mid);
  transition: background 0.2s var(--transition-smooth);
}

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

.prose tbody tr:hover {
  background: var(--ember-mid);
}

/* Prose Blockquotes */
.prose blockquote {
  margin: 2em 0;
  padding: 1.5em 2em;
  background: linear-gradient(135deg, var(--ember-mid) 0%, var(--ember-dark) 100%);
  border-left: 0.25rem solid var(--fire-primary);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--smoke-light);
  position: relative;
}

.prose blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  font-size: 4rem;
  color: var(--fire-primary);
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

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

/* Prose Code */
.prose code {
  background: var(--ember-dark);
  color: var(--fire-secondary);
  padding: 0.2em 0.5em;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.prose pre {
  background: var(--ash-dark);
  padding: 1.5em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2em 0;
  border: 0.0625rem solid rgba(255, 107, 53, 0.2);
}

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

/* Prose Images */
.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 */
.prose hr {
  border: none;
  height: 0.125rem;
  background: linear-gradient(90deg, transparent, var(--fire-primary), transparent);
  margin: 3em 0;
}

/* Prose Strong & Em */
.prose strong {
  color: var(--smoke-light);
  font-weight: 700;
}

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

/* ------------------------------------------------
   Responsive Adjustments
   ------------------------------------------------ */
@media (max-width: 64rem) {
  .prose {
    font-size: 0.95rem;
  }
  
  .prose h2 {
    margin-top: 2em;
  }
  
  .prose th,
  .prose td {
    padding: 0.75em 1em;
  }
}

@media (max-width: 40rem) {
  .prose {
    font-size: 0.9rem;
    line-height: 1.7;
  }
  
  .prose ul li,
  .prose ol li {
    padding-left: 1.25em;
  }
  
  .prose ol li::before {
    width: 1.5em;
    height: 1.5em;
    font-size: 0.75em;
  }
  
  .prose blockquote {
    padding: 1em 1.25em;
    margin: 1.5em 0;
  }
  
  .prose blockquote::before {
    font-size: 2.5rem;
    top: -0.25rem;
    left: 0.5rem;
  }
}

/* ------------------------------------------------
   SVG Pattern Background
   ------------------------------------------------ */
.pattern-ember {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff6b35' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ------------------------------------------------
   Utility Classes
   ------------------------------------------------ */
.text-gradient-fire {
  background: linear-gradient(135deg, var(--fire-primary) 0%, var(--gold-accent) 50%, var(--fire-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.border-glow {
  box-shadow: 0 0 1rem rgba(255, 107, 53, 0.3), inset 0 0 0.5rem rgba(255, 107, 53, 0.1);
}

.glass-dark {
  background: rgba(13, 13, 13, 0.8);
  backdrop-filter: blur(0.75rem);
}
