/* ============================================
   FIRIXSLOT - Custom CSS
   Firix Ignite Core Theme
   ============================================ */

/* CSS Custom Properties */
:root {
  --firix-primary: #ff4d00;
  --firix-secondary: #ff8c00;
  --firix-accent: #ffd700;
  --firix-dark: #0d0d0d;
  --firix-darker: #050505;
  --firix-light: #f5f5f5;
  --firix-gray: #2a2a2a;
  --firix-gray-light: #3d3d3d;
  --firix-text: #e8e8e8;
  --firix-text-muted: #a0a0a0;
  --firix-gradient: linear-gradient(135deg, var(--firix-primary) 0%, var(--firix-secondary) 50%, var(--firix-accent) 100%);
  --firix-gradient-dark: linear-gradient(180deg, var(--firix-darker) 0%, var(--firix-dark) 100%);
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes particle-float {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-20px) translateX(10px) scale(1.1);
    opacity: 1;
  }
  50% {
    transform: translateY(-40px) translateX(-5px) scale(0.9);
    opacity: 0.8;
  }
  75% {
    transform: translateY(-20px) translateX(-10px) scale(1.05);
    opacity: 0.9;
  }
}

@keyframes particle-rise {
  0% {
    transform: translateY(100%) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

@keyframes tilt-shake {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-2deg);
  }
  75% {
    transform: rotate(2deg);
  }
}

@keyframes ignite-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 77, 0, 0.4), 0 0 40px rgba(255, 77, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 77, 0, 0.6), 0 0 60px rgba(255, 77, 0, 0.3);
  }
}

@keyframes streak-slide {
  0% {
    transform: translateX(-100%) skewX(-20deg);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: translateX(200%) skewX(-20deg);
    opacity: 0;
  }
}

@keyframes wave-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes glow-breathe {
  0%, 100% {
    filter: brightness(1) drop-shadow(0 0 10px rgba(255, 77, 0, 0.5));
  }
  50% {
    filter: brightness(1.2) drop-shadow(0 0 20px rgba(255, 140, 0, 0.7));
  }
}

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

@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ============================================
   ANIMATION UTILITY CLASSES
   ============================================ */

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

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

.animate-tilt {
  animation: tilt-shake 4s ease-in-out infinite;
}

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

.animate-streak {
  animation: streak-slide 3s ease-in-out infinite;
}

.animate-wave {
  background-size: 200% 200%;
  animation: wave-flow 8s ease infinite;
}

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

.animate-card-tilt {
  animation: card-tilt 6s ease-in-out infinite;
}

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

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

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

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--firix-accent);
  border-radius: 50%;
  animation: particle-rise 8s linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 7s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1s; animation-duration: 9s; }
.particle:nth-child(3) { left: 30%; animation-delay: 2s; animation-duration: 6s; }
.particle:nth-child(4) { left: 40%; animation-delay: 0.5s; animation-duration: 8s; }
.particle:nth-child(5) { left: 50%; animation-delay: 1.5s; animation-duration: 10s; }
.particle:nth-child(6) { left: 60%; animation-delay: 2.5s; animation-duration: 7s; }
.particle:nth-child(7) { left: 70%; animation-delay: 0.3s; animation-duration: 9s; }
.particle:nth-child(8) { left: 80%; animation-delay: 1.8s; animation-duration: 6s; }
.particle:nth-child(9) { left: 90%; animation-delay: 3s; animation-duration: 8s; }
.particle:nth-child(10) { left: 15%; animation-delay: 2.2s; animation-duration: 11s; }

/* Light Streak Effect */
.light-streak {
  position: absolute;
  width: 150px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--firix-accent), transparent);
  animation: streak-slide 4s ease-in-out infinite;
}

.light-streak:nth-child(1) { top: 20%; animation-delay: 0s; }
.light-streak:nth-child(2) { top: 40%; animation-delay: 1.5s; }
.light-streak:nth-child(3) { top: 60%; animation-delay: 3s; }

/* ============================================
   COMPONENT OVERRIDES
   ============================================ */

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

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

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

/* Buttons */
.btn-primary {
  background: var(--firix-gradient);
  border: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 77, 0, 0.4);
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--firix-primary);
  color: var(--firix-light);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--firix-primary);
  box-shadow: 0 0 20px rgba(255, 77, 0, 0.3);
}

/* Cards */
.game-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
}

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(255, 77, 0, 0.2);
}

.promo-card {
  background: linear-gradient(145deg, var(--firix-gray) 0%, var(--firix-dark) 100%);
  border: 1px solid var(--firix-gray-light);
  transition: all 0.4s ease;
}

.promo-card:hover {
  border-color: var(--firix-primary);
  box-shadow: 0 0 30px rgba(255, 77, 0, 0.15);
}

/* Bonus Badge */
.bonus-badge {
  background: var(--firix-gradient);
  position: relative;
  overflow: hidden;
}

.bonus-badge::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--firix-dark);
  border-radius: inherit;
  z-index: 0;
}

.bonus-badge > * {
  position: relative;
  z-index: 1;
}

/* Step Badges */
.step-badge {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--firix-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

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

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--firix-gray);
  border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--firix-primary);
  border-radius: 3px;
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--firix-gray-light);
  transition: background-color 0.3s ease;
}

.faq-item:hover {
  background-color: rgba(255, 77, 0, 0.05);
}

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

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

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

.prose {
  color: var(--firix-text);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 100%;
}

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

/* Headings */
.prose h2 {
  color: var(--firix-light);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2.5em;
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--firix-primary);
  position: relative;
}

.prose h2::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--firix-accent);
}

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

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

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

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

/* Links */
.prose a {
  color: var(--firix-secondary);
  text-decoration: underline;
  text-decoration-color: rgba(255, 140, 0, 0.4);
  text-underline-offset: 3px;
  transition: all 0.3s ease;
}

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

/* Lists */
.prose ul,
.prose ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.prose ul {
  list-style: none;
}

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

.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  background: var(--firix-gradient);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 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(--firix-text);
}

.prose ol li::before {
  content: counter(prose-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75em;
  height: 1.75em;
  background: var(--firix-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85em;
  color: var(--firix-dark);
}

/* Tables */
.prose .table-responsive {
  margin: 2em 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--firix-gray-light);
}

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

.prose thead {
  background: var(--firix-gradient);
}

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

.prose tbody tr {
  border-bottom: 1px solid var(--firix-gray-light);
  transition: background-color 0.3s ease;
}

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

.prose tbody tr:nth-child(even) {
  background: rgba(255, 77, 0, 0.03);
}

.prose tbody tr:hover {
  background: rgba(255, 77, 0, 0.08);
}

.prose td {
  padding: 1em 1.25em;
  color: var(--firix-text);
}

/* Blockquotes */
.prose blockquote {
  margin: 2em 0;
  padding: 1.5em 2em;
  background: linear-gradient(135deg, rgba(255, 77, 0, 0.1) 0%, rgba(255, 140, 0, 0.05) 100%);
  border-left: 4px solid var(--firix-primary);
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: italic;
  color: var(--firix-light);
}

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

.prose blockquote p:first-of-type {
  font-size: 1em;
}

/* Code */
.prose code {
  background: var(--firix-gray);
  padding: 0.2em 0.5em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  color: var(--firix-accent);
}

.prose pre {
  background: var(--firix-darker);
  padding: 1.5em;
  border-radius: 0.75rem;
  overflow-x: auto;
  border: 1px solid var(--firix-gray-light);
}

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

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

/* Horizontal Rule */
.prose hr {
  border: none;
  height: 2px;
  background: var(--firix-gradient);
  margin: 3em 0;
  opacity: 0.5;
}

/* Strong and Emphasis */
.prose strong {
  color: var(--firix-light);
  font-weight: 700;
}

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

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1024px) {
  .prose {
    font-size: 0.95rem;
  }
  
  .prose th,
  .prose td {
    padding: 0.75em 1em;
  }
}

@media (max-width: 640px) {
  .prose {
    font-size: 0.9rem;
    line-height: 1.7;
  }
  
  .prose h2 {
    margin-top: 2em;
  }
  
  .prose h3 {
    margin-top: 1.5em;
  }
  
  .prose blockquote {
    padding: 1em 1.25em;
    margin: 1.5em 0;
  }
  
  .prose ul li,
  .prose ol li {
    margin-bottom: 0.5em;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-gradient {
  background: var(--firix-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-firix-gradient {
  background: var(--firix-gradient);
}

.border-firix {
  border-color: var(--firix-primary);
}

.glow-firix {
  box-shadow: 0 0 30px rgba(255, 77, 0, 0.3);
}

/* Angular Clip Paths */
.clip-angular {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), 0 100%);
}

.clip-angular-reverse {
  clip-path: polygon(0 30px, 100% 0, 100% 100%, 0 100%);
}

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

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