:root {
  --bg-space: #030508;
  --bg-card: rgba(13, 17, 23, 0.75);
  --bg-card-hover: rgba(22, 28, 38, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.6);
  
  --primary: #ff2e4c;
  --primary-hover: #e02440;
  --primary-glow: rgba(255, 46, 76, 0.4);
  --accent-violet: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-gold: #fbbf24;
  
  --text-hi: #f8fafc;
  --text-mid: #94a3b8;
  --text-muted: #64748b;
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 46, 76, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-glow: 0 8px 32px -4px rgba(255, 46, 76, 0.35);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
}

/* ── Base reset additions */
body {
  background-color: var(--bg-space);
  color: var(--text-hi);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', sans-serif;
}

/* ── Keyframe Animations ────────────────────────────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

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

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.8; transform: scale(1.06); }
}

@keyframes floatPulse {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes filmGrain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-1%, -1%); }
  30% { transform: translate(1%, 1%); }
  50% { transform: translate(-1%, 1%); }
  70% { transform: translate(1%, -1%); }
  90% { transform: translate(0, 1%); }
}

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

/* ── Animation Utility Classes ──────────────────────────────────────────────── */

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

.animate-slideUp {
  animation: slideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-zoomIn {
  animation: zoomIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.animate-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
}

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

/* ── Noise / Film Grain Layer ────────────────────────────────────────────────── */
.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  animation: filmGrain 0.5s steps(3) infinite;
}

/* ── Ambient Radial Mesh Background ─────────────────────────────────────────── */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 46, 76, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 60%, rgba(139, 92, 246, 0.09) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(251, 191, 36, 0.05) 0%, transparent 40%);
}

/* ── Glow Utilities ─────────────────────────────────────────────────────────── */
.glow-text {
  background: linear-gradient(135deg, #ffffff 30%, #ff2e4c 70%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(255, 46, 76, 0.3);
}

.glow-text-secondary {
  background: linear-gradient(135deg, #ffffff 30%, #8b5cf6 70%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Glassmorphism Utilities ────────────────────────────────────────────────── */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px -10px rgba(255, 46, 76, 0.25);
}

/* ── Rank Badge (bookmark-style ribbon) ─────────────────────────────────────── */
.badge-rank {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 32px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
  background: linear-gradient(135deg, #ff2e4c 0%, #b91c1c 100%);
  box-shadow: 0 4px 12px rgba(255, 46, 76, 0.5);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
}

/* ── Horizontal Scroll Row ───────────────────────────────────────────────────── */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ── Custom Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar        { width: 7px; height: 7px; }
::-webkit-scrollbar-track  { background: #030508; }
::-webkit-scrollbar-thumb  { background: rgba(255, 255, 255, 0.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Responsive Page Content Offset ─────────────────────────────────────────── */
.page-content {
  padding-left: 0;
}

@media (max-width: 640px) {
  button, a {
    min-height: 36px;
  }
  body {
    overflow-x: hidden;
  }
}

