@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --bg-body: #070406;
  --bg-header: #0d0609;
  --bg-sidebar: #070406;
  --bg-card: #12080b;
  --bg-card-hover: #1c0d12;
  --bg-input: #12080b;
  --bg-badge-dark: rgba(92, 25, 34, 0.4);
  
  --accent: #e05a68;
  --accent-hover: #ea707c;
  --accent-glow: rgba(224, 90, 104, 0.45);
  
  --accent-orange: #c93f52;
  --accent-orange-light: #e05a68;
  --accent-orange-dark: #5c1922;
  --accent-orange-gradient: linear-gradient(135deg, #5c1922 0%, #8c2432 50%, #c93f52 100%);
  
  --accent-green: #00c853;
  --accent-green-hover: #00e676;
  
  --accent-gold: #ff7582;
  --accent-gold-bg: rgba(224, 90, 104, 0.12);
  
  --accent-blue-telegram: #0088cc;
  
  --text-primary: #ffffff;
  --text-secondary: #e2c0c5;
  --text-muted: #9e737a;
  
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --border: #2e1217;
  --border-hover: #4a1c24;
  --border-subtle: #240e12;
  --border-card: #33141a;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: #000000 !important;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  background-color: #000000 !important;
  background: #000000 !important;
}

body {
  background: #000000 !important;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
}

@keyframes breathe {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.8;
    filter: drop-shadow(0 0 15px rgba(224, 90, 104, 0.35));
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
    filter: drop-shadow(0 0 35px rgba(224, 90, 104, 0.75));
  }
}

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

/* Custom Scrollbar */
::-webkit-scrollbar { width: 4px; height: 0px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201, 63, 82, 0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(224, 90, 104, 0.75); }

/* Masquer les scrollbars horizontales pour les catégories et carrousels */
.scrollbar-hide::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.scrollbar-hide {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* ── Rendu vidéo 60fps max — GPU compositing forcé ── */
video {
  /* Layer GPU dédié → le navigateur n'a pas à recalculer la mise en page */
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Désactive l'antialiasing de sous-pixel qui ajoute du lag */
  image-rendering: auto;
}

/* Scroll GPU-composited pour les Shorts */
.shorts-scroll {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  transform: translateZ(0);
}

/* ═══════════════════════════════════════════
   FUTURISTIC DESIGN SYSTEM — NEON / GLASS
═══════════════════════════════════════════ */

/* Glass morphism */
.glass {
  background: rgba(14, 8, 10, 0.8);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(224, 90, 104, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

.glass-card {
  background: rgba(14, 8, 10, 0.65);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(224, 90, 104, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  border-color: rgba(224, 90, 104, 0.5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(224, 90, 104, 0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}

.bottom-nav-glass {
  background: rgba(18, 8, 11, 0.9);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-top: 1px solid rgba(224, 90, 104, 0.15);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-text-fill-color: transparent;
  color: var(--text-primary);
  background-clip: text;
}

/* Gold gradient */
.gold-text {
  background: linear-gradient(135deg, #f59e0b, #fbbf24, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 60px var(--accent-glow); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-fade-in { animation: fadeIn 0.5s ease-out; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* Button base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%) !important;
  color: #000000 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

.btn-gold {
  background: linear-gradient(135deg, #c93f52 0%, #e05a68 100%) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 0 20px rgba(224, 90, 104, 0.4);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(224, 90, 104, 0.6);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s ease;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Input */
.input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  width: 100%;
  transition: border-color 0.2s;
  outline: none;
  font-family: 'Inter', sans-serif;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input::placeholder { color: var(--text-muted); }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-premium {
  background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(249,115,22,0.2));
  border: 1px solid rgba(245,158,11,0.4);
  color: #fbbf24;
}
.badge-free {
  background: rgba(224, 90, 104, 0.15);
  border: 1px solid rgba(224, 90, 104, 0.3);
  color: #e05a68;
}

/* Premium lock overlay */
.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  gap: 0.75rem;
}

/* Video grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Thumbnail */
.thumbnail-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: var(--bg-secondary);
}
.thumbnail-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .thumbnail-wrap img {
  transform: scale(1.05);
}

/* Stats counter */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}
.stat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
}
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
}

/* Mobile UI & Ergonomics Improvements */
@media (max-width: 768px) {
  .video-container { padding: 0 !important; }
  .mobile-touch-target { min-height: 44px; min-width: 44px; }
  body { font-size: 15px; }
  .grid-cols-2 { gap: 0.75rem; }
  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.25rem !important; }
}

/* Touch manipulation to eliminate 300ms mobile tap delay */
button, a, input, select, textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.pb-safe {
  padding-bottom: env(safe-area-inset-bottom, 0.75rem);
}

.pt-safe {
  padding-top: env(safe-area-inset-top, 0.75rem);
}
