/* FuturGame - Custom Styles */
/* Palette: Violet/Orange (#4) | Fonts: Poppins/Source Sans Pro (#4) */
/* Theme: Dark Immersive Gaming */

/* ============================================
   BASE & TYPOGRAPHY
   ============================================ */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  background-color: #0a0a0f;
  color: #e5e7eb;
}

h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.3;
}

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

/* Floating animation for cards */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

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

/* Slow pulse for glowing elements */
@keyframes pulse-slow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.animate-pulse-slow {
  animation: pulse-slow 4s ease-in-out infinite;
}

/* Gradient shift animation */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* Fade in up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scale in */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scaleIn {
  animation: scaleIn 0.5s ease-out forwards;
}

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

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

/* Glow pulse */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3), 0 0 40px rgba(124, 58, 237, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.5), 0 0 60px rgba(124, 58, 237, 0.2);
  }
}

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

/* Animation delays */
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-500 { animation-delay: 0.5s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-700 { animation-delay: 0.7s; }
.animation-delay-1000 { animation-delay: 1s; }
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-3000 { animation-delay: 3s; }
.animation-delay-4000 { animation-delay: 4s; }

/* ============================================
   GRID BACKGROUND
   ============================================ */

.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ============================================
   GLASSMORPHISM
   ============================================ */

.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-dark {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   PROSE STYLING (ARTICLES) — PREMIUM EDITION
   ============================================ */

.prose {
  color: #d1d5db;
  font-size: 1.125rem;
  line-height: 1.8;
}

/* Headings with gradient accent */
.prose h2 {
  position: relative;
  font-size: 1.875rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.prose h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #7c3aed, #f97316);
  border-radius: 2px;
}

.prose h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: #e5e7eb;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(124, 58, 237, 0.4);
}

.prose h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #c4b5fd;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

/* Paragraphs */
.prose p {
  margin-bottom: 1.5rem;
}

.prose > p:first-of-type {
  font-size: 1.25rem;
  color: #e5e7eb;
  line-height: 1.75;
}

/* Links with animated underline */
.prose a {
  color: #a78bfa;
  text-decoration: none;
  font-weight: 500;
  background: linear-gradient(90deg, #7c3aed, #f97316);
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease, color 0.2s;
  padding-bottom: 2px;
}

.prose a:hover {
  color: #c4b5fd;
  background-size: 100% 2px;
}

.prose strong {
  color: #ffffff;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(249, 115, 22, 0.15));
  padding: 0.1em 0.3em;
  border-radius: 0.25rem;
}

/* Lists with custom markers */
.prose ul, .prose ol {
  margin: 1.75rem 0;
  padding-left: 0;
}

.prose li {
  margin-bottom: 0.75rem;
  padding-left: 2rem;
  position: relative;
}

.prose ul li {
  list-style-type: none;
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #7c3aed, #f97316);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}

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

.prose ol li {
  list-style-type: none;
  counter-increment: list-counter;
}

.prose ol li::before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.5rem;
  height: 1.5rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(249, 115, 22, 0.3));
  color: #c4b5fd;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Premium Blockquote */
.prose blockquote {
  position: relative;
  border: none;
  margin: 2rem 0;
  padding: 1.5rem 1.5rem 1.5rem 4rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(249, 115, 22, 0.05));
  border-radius: 1rem;
  font-style: normal;
  color: #e5e7eb;
  border-left: none;
  overflow: hidden;
}

.prose blockquote::before {
  content: '"';
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  font-size: 4rem;
  font-family: Georgia, serif;
  color: #7c3aed;
  opacity: 0.5;
  line-height: 1;
}

.prose blockquote::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #7c3aed, #f97316);
}

.prose blockquote p {
  margin-bottom: 0;
  font-size: 1.125rem;
}

/* Code blocks */
.prose pre {
  position: relative;
  background: linear-gradient(135deg, #1a1a24, #12121a);
  color: #e5e7eb;
  padding: 1.5rem;
  border-radius: 1rem;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.prose pre::before {
  content: '';
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 12px;
  height: 12px;
  background: #ff5f56;
  border-radius: 50%;
  box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27ca40;
}

.prose code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.875rem;
}

.prose :not(pre) > code {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(124, 58, 237, 0.15));
  color: #c4b5fd;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.9em;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

/* Images with caption support */
.prose img {
  border-radius: 1rem;
  margin: 2rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prose img:hover {
  transform: scale(1.01);
  box-shadow: 0 15px 50px rgba(124, 58, 237, 0.2);
}

.prose figure {
  margin: 2rem 0;
}

.prose figcaption {
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
  margin-top: 0.75rem;
  font-style: italic;
}

/* Premium Tables */
.prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.prose th {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(124, 58, 237, 0.2));
  font-weight: 600;
  color: #ffffff;
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 2px solid rgba(124, 58, 237, 0.3);
}

.prose td {
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.prose tr:hover td {
  background: rgba(124, 58, 237, 0.1);
}

/* Horizontal rule */
.prose hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.5), rgba(249, 115, 22, 0.5), transparent);
  margin: 3rem 0;
  border-radius: 1px;
}

/* First letter drop cap */
.prose > p:first-of-type::first-letter {
  float: left;
  font-size: 4rem;
  line-height: 0.8;
  font-weight: 700;
  margin-right: 0.75rem;
  margin-top: 0.1rem;
  background: linear-gradient(135deg, #7c3aed, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Poppins', sans-serif;
}

/* Callout boxes */
.prose .callout,
.prose .note,
.prose .warning,
.prose .tip {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  border: 1px solid;
}

.prose .callout::before,
.prose .note::before,
.prose .warning::before,
.prose .tip::before {
  position: absolute;
  left: 1rem;
  top: 1.25rem;
  font-size: 1.25rem;
}

.prose .note {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}
.prose .note::before { content: 'ℹ️'; }

.prose .warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}
.prose .warning::before { content: '⚠️'; }

.prose .tip {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}
.prose .tip::before { content: '💡'; }

/* ============================================
   UTILITIES
   ============================================ */

/* Line Clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(135deg, #7c3aed, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Selection */
::selection {
  background: rgba(124, 58, 237, 0.4);
  color: #fff;
}

/* Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
  background: #2d2d3a;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3d3d4a;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #2d2d3a #0a0a0f;
}

/* ============================================
   ASPECT RATIO FALLBACK
   ============================================ */

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

@supports not (aspect-ratio: 16 / 9) {
  .aspect-video {
    position: relative;
    padding-bottom: 56.25%;
  }
  .aspect-video > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

/* ============================================
   CARD HOVER EFFECTS
   ============================================ */

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.15);
}

.card-glow {
  position: relative;
}

.card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, #7c3aed, #f97316);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

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

/* ============================================
   BUTTON STYLES
   ============================================ */

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.btn-gradient {
  background: linear-gradient(135deg, #7c3aed, #f97316);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.3s;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

/* ============================================
   INPUT STYLES
   ============================================ */

.input-dark {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  transition: all 0.3s;
}

.input-dark:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(124, 58, 237, 0.5);
  outline: none;
}

.input-dark::placeholder {
  color: #6b7280;
}

/* ============================================
   BADGE STYLES
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-violet {
  background: rgba(124, 58, 237, 0.2);
  color: #c4b5fd;
}

.badge-orange {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.2);
  color: #67e8f9;
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.badge-rose {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
  .prose h2 {
    font-size: 1.5rem;
  }

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

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  header, footer, nav, .no-print {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .prose {
    max-width: none;
    color: black;
  }

  .prose h2, .prose h3 {
    color: black;
  }

  a {
    color: inherit;
    text-decoration: underline;
  }
}

/* ============================================
   LOADING STATES
   ============================================ */

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   TAG CLOUD
   ============================================ */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: #9ca3af;
  transition: all 0.3s;
}

.tag:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.3);
  color: #c4b5fd;
}

/* ============================================
   CATEGORY COLORS
   ============================================ */

.category-actualites { --category-color: #f97316; }
.category-tests { --category-color: #06b6d4; }
.category-guides { --category-color: #10b981; }
.category-esport { --category-color: #f43f5e; }
