/* ═══════════════════════════════════════════════════════════
   RIZZ — TradingView Space Theme v4
   Ultra-premium dark space aesthetic, inspired by TradingView
   ═══════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  /* Palette — deep space + neon accents */
  --bg-0: #0a0a0f;
  --bg-1: #0d0d14;
  --bg-2: #12121c;
  --bg-3: #1a1a2e;
  --bg-4: #242440;

  --surface: rgba(18, 18, 28, 0.65);
  --surface-hover: rgba(26, 26, 46, 0.75);
  --surface-border: rgba(139, 92, 246, 0.08);
  --surface-border-hover: rgba(139, 92, 246, 0.2);

  --primary: #7c5cfc;
  --primary-light: #a78bfa;
  --primary-dim: #4c1d95;
  --primary-rgb: 124, 92, 252;

  --accent: #06d6a0;
  --accent-rgb: 6, 214, 160;
  --secondary: #f472b6;
  --secondary-rgb: 244, 114, 182;
  --cyan: #22d3ee;
  --cyan-rgb: 34, 211, 238;
  --gold: #fbbf24;
  --gold-rgb: 251, 191, 36;
  --danger: #f87171;
  --success: #34d399;
  --success-rgb: 52, 211, 153;

  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Orbitron', var(--font-body);

  /* Spacing & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

::selection { background: rgba(var(--primary-rgb), 0.3); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #fff; }

img { max-width: 100%; height: auto; }

/* ── AMBIENT BACKGROUND ── */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  filter: blur(120px);
}
body::before {
  width: 600px; height: 600px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.08), transparent 70%);
  animation: ambient-drift-1 25s ease-in-out infinite alternate;
}
body::after {
  width: 500px; height: 500px;
  bottom: -150px; right: -100px;
  background: radial-gradient(circle, rgba(var(--cyan-rgb), 0.05), transparent 70%);
  animation: ambient-drift-2 30s ease-in-out infinite alternate;
}
@keyframes ambient-drift-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 60px) scale(1.2); }
}
@keyframes ambient-drift-2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-60px, -40px) scale(1.1); }
}

/* ── PARTICLES ── */
.particles-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.particle {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  animation: particle-rise linear infinite;
  opacity: 0;
}
@keyframes particle-rise {
  0% { transform: translateY(0) translateX(0) scale(0); opacity: 0; }
  10% { opacity: 1; transform: scale(1); }
  90% { opacity: 0.6; }
  100% { transform: translateY(-110vh) translateX(calc(var(--drift, 0) * 1px)) scale(0.3); opacity: 0; }
}

/* ── STARFIELD ── */
.starfield-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.star {
  position: absolute;
  width: 2px; height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: star-twinkle ease-in-out infinite;
}
@keyframes star-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}


/* ═══════════════════════════════════════
   GLASS NAVBAR — TradingView Style
   ═══════════════════════════════════════ */
.glass-navbar {
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 12px 0;
  transition: all 0.4s var(--ease-out);
  z-index: 1000;
}
.glass-navbar.scrolled {
  background: rgba(10, 10, 15, 0.92);
  padding: 8px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  border-bottom-color: rgba(var(--primary-rgb), 0.06);
}

.brand-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff;
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.25);
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 3px;
  background: linear-gradient(135deg, var(--primary-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-navbar .nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
  position: relative;
}
.glass-navbar .nav-link:hover,
.glass-navbar .nav-link.active {
  color: #fff;
  background: rgba(var(--primary-rgb), 0.08);
}
.glass-navbar .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.navbar-toggler { color: var(--text); padding: 6px 8px; }
.nav-actions .btn-glow { font-size: 0.85rem; padding: 8px 20px; }

/* ═══════════════════════════════════════
   BUTTONS — Glow System
   ═══════════════════════════════════════ */
.btn-glow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.25);
  cursor: pointer;
}
.btn-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, #6366f1, var(--cyan));
  transition: opacity 0.35s ease;
}
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 8px 35px rgba(var(--primary-rgb), 0.4); color: #fff; }
.btn-glow:hover::before { opacity: 1; }
.btn-glow > * { position: relative; z-index: 1; }

.btn-outline-glow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 28px;
  background: transparent;
  color: var(--primary-light);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.4s var(--ease-out);
  cursor: pointer;
}
.btn-outline-glow:hover {
  background: rgba(var(--primary-rgb), 0.08);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.15);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-glass:hover, .btn-glass.active {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.2);
  color: #fff;
}

/* ═══════════════════════════════════════
   GRADIENT TEXT + BADGES
   ═══════════════════════════════════════ */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--cyan), var(--secondary));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease-in-out infinite;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.section-badge {
  display: inline-flex; align-items: center;
  padding: 6px 18px;
  background: rgba(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  border-radius: var(--radius-full);
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

.section-padding { padding: 100px 0; position: relative; z-index: 1; }

/* ═══════════════════════════════════════
   PAGE HEADER (subpages)
   ═══════════════════════════════════════ */
.page-header {
  padding: 140px 0 60px;
  text-align: center;
  position: relative;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.15), transparent);
}


/* ═══════════════════════════════════════
   HERO — Cinematic Space
   ═══════════════════════════════════════ */
.hero-section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 1;
  padding-top: 80px;
}

/* Nebula glows */
.hero-glow {
  position: absolute;
  width: 700px; height: 700px;
  top: -15%; left: -10%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.12), transparent 65%);
  filter: blur(80px);
  animation: nebula-pulse 8s ease-in-out infinite;
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute;
  width: 500px; height: 500px;
  bottom: -10%; right: -5%;
  background: radial-gradient(circle, rgba(var(--cyan-rgb), 0.08), transparent 65%);
  filter: blur(60px);
  animation: nebula-pulse 10s ease-in-out infinite 3s;
  pointer-events: none;
}
@keyframes nebula-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--primary-rgb), 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 100%);
  animation: grid-drift 20s linear infinite;
  pointer-events: none;
}
@keyframes grid-drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 22px;
  background: rgba(var(--primary-rgb), 0.06);
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  border-radius: var(--radius-full);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats {
  display: flex;
  gap: 0;
  padding: 0;
}
.hero-stat {
  padding: 16px 28px;
  position: relative;
}
.hero-stat + .hero-stat::before {
  content: '';
  position: absolute;
  left: 0; top: 20%;
  width: 1px; height: 60%;
  background: linear-gradient(transparent, rgba(var(--primary-rgb), 0.15), transparent);
}
.hero-stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* Hero visual — right side orbital */
.hero-visual {
  position: relative;
  width: 100%;
  height: 500px;
}

.floating-card {
  position: absolute;
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
  transition: all 0.5s var(--ease-out);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}
.floating-card:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: rgba(var(--primary-rgb), 0.2);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.4), 0 0 25px rgba(var(--primary-rgb), 0.1);
}
.card-1 { top: 15%; left: 5%; animation: float-card 6s ease-in-out infinite; }
.card-2 { top: 55%; right: 0; animation: float-card 7s ease-in-out infinite 1.5s; }
.card-3 { bottom: 10%; left: 10%; text-align: center; flex-direction: column; padding: 24px;
  animation: float-card 5.5s ease-in-out infinite 3s; }

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.mini-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  flex-shrink: 0;
}
.mini-name { font-weight: 700; font-size: 0.85rem; }
.mini-stat { font-size: 0.75rem; color: var(--text-dim); }

.central-orb {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100px; height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.2), transparent 70%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  color: var(--primary-light);
  z-index: 1;
}
.central-orb::before {
  content: '';
  position: absolute;
  inset: -25px;
  border-radius: 50%;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  animation: ring-expand 4s ease-in-out infinite;
}
.central-orb::after {
  content: '';
  position: absolute;
  inset: -55px;
  border-radius: 50%;
  border: 1px solid rgba(var(--primary-rgb), 0.05);
  animation: ring-expand 4s ease-in-out infinite 2s;
}
@keyframes ring-expand {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.12); opacity: 0.2; }
}

.scroll-indicator {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: scroll-bounce 2s ease-in-out infinite;
}
.mouse {
  width: 20px; height: 32px;
  border: 2px solid rgba(var(--primary-rgb), 0.3);
  border-radius: 12px;
  position: relative;
}
.wheel {
  width: 3px; height: 8px;
  background: var(--primary-light);
  border-radius: 2px;
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s ease-in-out infinite;
}
@keyframes scroll-bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }
@keyframes scroll-wheel { 0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); } 50% { opacity: 0.3; transform: translateX(-50%) translateY(8px); } }

/* ═══════════════════════════════════════
   FEATURE CARDS
   ═══════════════════════════════════════ */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: all 0.5s var(--ease-out);
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(var(--primary-rgb), 0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.feature-card:hover {
  border-color: var(--surface-border-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(var(--primary-rgb), 0.06);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #fff;
  position: relative;
  z-index: 1;
}
.feature-card h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; position: relative; z-index: 1; }
.feature-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; margin: 0; position: relative; z-index: 1; }

.gradient-bg   { background: linear-gradient(135deg, var(--primary), #6366f1); }
.gradient-bg-2 { background: linear-gradient(135deg, var(--cyan), #0ea5e9); }
.gradient-bg-3 { background: linear-gradient(135deg, var(--secondary), #f59e0b); }
.gradient-bg-4 { background: linear-gradient(135deg, #10b981, var(--accent)); }
.gradient-bg-5 { background: linear-gradient(135deg, #3b82f6, var(--primary)); }
.gradient-bg-6 { background: linear-gradient(135deg, #ec4899, #f43f5e); }

.feature-glow {
  position: absolute;
  bottom: -50%; left: 50%;
  width: 200px; height: 200px;
  transform: translateX(-50%);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  background: rgba(var(--primary-rgb), 0.15);
}
.feature-card:hover .feature-glow { opacity: 1; }

/* ═══════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════ */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.5s var(--ease-out);
}
.stat-card:hover {
  border-color: var(--surface-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.stat-icon {
  width: 50px; height: 50px;
  background: rgba(var(--primary-rgb), 0.08);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.2rem;
  color: var(--primary-light);
  transition: all 0.3s ease;
}
.stat-icon.online { color: var(--accent); background: rgba(var(--accent-rgb), 0.08); }
.stat-icon.messages { color: var(--secondary); background: rgba(var(--secondary-rgb), 0.08); }
.stat-icon.voice { color: var(--cyan); background: rgba(var(--cyan-rgb), 0.08); }

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}

.stat-pulse {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: stat-pulse-move 3s linear infinite;
}
.stat-pulse.online { background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.stat-pulse.messages { background: linear-gradient(90deg, transparent, var(--secondary), transparent); }
.stat-pulse.voice { background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
@keyframes stat-pulse-move {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ═══════════════════════════════════════
   PODIUM — Top 3
   ═══════════════════════════════════════ */
.podium-container,
.podium-main {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  min-height: 320px;
  padding: 20px 0;
}
.podium-placeholder { display: flex; flex-direction: column; align-items: center; width: 100%; }

.podium-item {
  display: flex; flex-direction: column; align-items: center;
  flex: 0 0 180px;
  text-align: center;
  position: relative;
  animation: podium-appear 0.6s var(--ease-out) backwards;
}
.podium-item.silver { animation-delay: 0.1s; }
.podium-item.gold { animation-delay: 0s; flex: 0 0 200px; }
.podium-item.bronze { animation-delay: 0.2s; }

@keyframes podium-appear {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.podium-medal { font-size: 2rem; margin-bottom: 8px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
.podium-item.gold .podium-medal { font-size: 2.4rem; animation: crown-glow 2s ease-in-out infinite; }
@keyframes crown-glow {
  0%, 100% { filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.3)); }
  50% { filter: drop-shadow(0 4px 20px rgba(251, 191, 36, 0.6)); }
}

.podium-avatar-wrap { position: relative; margin-bottom: 12px; }

.podium-avatar-ring {
  position: absolute; inset: -4px;
  border-radius: 50%;
  z-index: 0;
}
.podium-item.gold .podium-avatar-ring {
  background: conic-gradient(from 0deg, #fbbf24, #f59e0b, #fbbf24);
  animation: ring-spin 4s linear infinite;
}
.podium-item.silver .podium-avatar-ring { background: conic-gradient(from 0deg, #94a3b8, #cbd5e1, #94a3b8); }
.podium-item.bronze .podium-avatar-ring { background: conic-gradient(from 0deg, #f97316, #ea580c, #f97316); }
@keyframes ring-spin { 100% { transform: rotate(360deg); } }

.podium-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border: 3px solid var(--bg-2);
}
.podium-item.gold .podium-avatar { width: 88px; height: 88px; }

.podium-rank {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.podium-name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.podium-stat {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.podium-bar {
  width: 100%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  position: relative;
  overflow: hidden;
}
.podium-item.gold .podium-bar { height: 140px; background: linear-gradient(180deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.02)); }
.podium-item.silver .podium-bar { height: 100px; background: linear-gradient(180deg, rgba(148, 163, 184, 0.12), rgba(148, 163, 184, 0.02)); }
.podium-item.bronze .podium-bar { height: 70px; background: linear-gradient(180deg, rgba(249, 115, 22, 0.12), rgba(249, 115, 22, 0.02)); }

/* ═══════════════════════════════════════
   OWNER CARD
   ═══════════════════════════════════════ */
.owner-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.5s var(--ease-out);
}
.owner-card:hover {
  border-color: var(--surface-border-hover);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3), 0 0 40px rgba(var(--primary-rgb), 0.08);
}

.owner-avatar-ring {
  width: 120px; height: 120px;
  margin: 0 auto 20px;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--cyan), var(--secondary), var(--primary));
  animation: ring-spin 6s linear infinite;
}
.owner-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.owner-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.owner-crown {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  animation: crown-glow 2s ease-in-out infinite;
  z-index: 5;
}
.avatar-placeholder { font-size: 2rem; color: var(--text-dim); }
.owner-name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.owner-badges { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.badge-glow {
  display: inline-flex; align-items: center;
  padding: 6px 18px;
  background: rgba(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  border-radius: var(--radius-full);
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.badge-glow.secondary { color: var(--cyan); background: rgba(var(--cyan-rgb), 0.08); border-color: rgba(var(--cyan-rgb), 0.15); }
.owner-bio { color: var(--text-secondary); font-size: 0.9rem; position: relative; z-index: 1; }

/* ═══════════════════════════════════════
   CTA SECTION
   ═══════════════════════════════════════ */
.cta-section { padding: 80px 0; position: relative; z-index: 1; }
.cta-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 72px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 300px;
  background: radial-gradient(ellipse, rgba(var(--primary-rgb), 0.1), transparent);
  filter: blur(60px);
  pointer-events: none;
}
.cta-title { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; margin-bottom: 16px; }
.cta-subtitle { color: var(--text-secondary); font-size: 1.05rem; max-width: 460px; margin: 0 auto 32px; }
.cta-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ═══════════════════════════════════════
   GLASS CARDS (generic)
   ═══════════════════════════════════════ */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.4s var(--ease-out);
}
.glass-card:hover {
  border-color: var(--surface-border-hover);
}

.card-header-custom {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.card-header-custom h5 { margin: 0; font-size: 1rem; font-weight: 700; display: flex; align-items: center; }
.chart-container { height: 280px; position: relative; }

/* ═══════════════════════════════════════
   LEADERBOARD TABLE
   ═══════════════════════════════════════ */
.leaderboard-section { min-height: 100vh; padding-top: 0; }

.leaderboard-table {
  background: transparent;
}
.leaderboard-table thead th {
  background: rgba(var(--primary-rgb), 0.03);
  padding: 16px 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  border: none;
}
.leaderboard-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}
.leaderboard-table tbody tr:hover {
  background: rgba(var(--primary-rgb), 0.03);
}
.leaderboard-table td { padding: 14px 20px; border: none; vertical-align: middle; }

.lb-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 0.85rem; font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.lb-rank.top-1 { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.2); color: var(--gold); }
.lb-rank.top-2 { background: rgba(148, 163, 184, 0.1); border-color: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.lb-rank.top-3 { background: rgba(249, 115, 22, 0.1); border-color: rgba(249, 115, 22, 0.2); color: #fb923c; }

.lb-member { display: flex; align-items: center; gap: 14px; }
.lb-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.06); }
.lb-stat { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: var(--primary-light); }
.lb-bar {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  margin-top: 6px;
  max-width: 140px;
  margin-left: auto;
  overflow: hidden;
}
.lb-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 0 8px rgba(var(--primary-rgb), 0.3);
  transition: width 0.8s var(--ease-out);
}

.glass-tabs {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 3px;
}
.glass-tabs .btn-glass { border: none; border-radius: var(--radius-sm); }

/* ═══════════════════════════════════════
   MEMBERS GRID
   ═══════════════════════════════════════ */
.members-section { min-height: 100vh; padding-top: 0; }

.member-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 32px 20px 48px;
  text-align: center;
  transition: all 0.5s var(--ease-out);
  height: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.member-card:hover {
  border-color: var(--surface-border-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 30px rgba(var(--primary-rgb), 0.06);
}

.member-card-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent, var(--primary)) 10%, transparent), transparent 70%);
}
.member-card:hover .member-card-glow { opacity: 1; }

.member-avatar-container { position: relative; width: 82px; height: 82px; margin: 0 auto 18px; }

.member-avatar-ring {
  width: 82px; height: 82px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 180deg, var(--ring-color, var(--primary)), transparent 60%, var(--ring-color, var(--primary)));
  transition: all 0.5s var(--ease-out);
}
.member-card:hover .member-avatar-ring {
  box-shadow: 0 0 25px color-mix(in srgb, var(--ring-color, var(--primary)) 30%, transparent);
}

.member-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-2);
}

.member-status-dot {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 3px solid var(--bg-2);
  z-index: 2;
}

.member-info { text-align: center; }
.member-name {
  font-weight: 700; font-size: 0.95rem;
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.member-username { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 12px; }

.member-roles { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 8px; }

.member-role-pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  background: color-mix(in srgb, var(--role-color, var(--primary)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--role-color, var(--primary)) 25%, transparent);
  border-radius: var(--radius-full);
  color: var(--role-color, var(--primary-light));
  font-size: 0.65rem; font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.member-role-pill:hover { transform: translateY(-1px); }
.member-role-more { font-size: 0.65rem; color: var(--text-dim); font-weight: 600; }

.member-view-btn {
  position: absolute; bottom: 16px; right: 16px;
  width: 32px; height: 32px;
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-light); font-size: 1.2rem;
  opacity: 0; transform: translateX(8px);
  transition: all 0.4s var(--ease-out);
}
.member-card:hover .member-view-btn { opacity: 1; transform: translateX(0); }

/* ═══════════════════════════════════════
   MEMBER DETAIL MODAL
   ═══════════════════════════════════════ */
.member-modal .modal-content {
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
}
.member-modal .modal-header { border: none; padding: 0; position: relative; }

.member-modal-banner {
  height: 120px;
  background: linear-gradient(135deg, var(--primary-dim), var(--bg-3));
  position: relative;
}
.member-modal-banner::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--bg-2));
}
.member-modal .btn-close {
  position: absolute; top: 12px; right: 12px;
  z-index: 10; filter: invert(1) brightness(0.7); opacity: 0.5;
}

.member-modal-avatar-section { text-align: center; margin-top: -48px; position: relative; z-index: 5; }
.member-modal-avatar-ring {
  display: inline-block;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--cyan), var(--primary));
  animation: ring-spin 6s linear infinite;
}
.member-modal-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-2);
}

.member-modal-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  margin-top: 8px;
}
.member-modal-tag {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 24px;
}
.member-modal-status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.member-modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.member-modal-stat {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
}
.member-modal-stat-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-light);
}
.member-modal-stat-label { font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

.member-modal-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-top: 20px; margin-bottom: 10px;
}

.member-modal-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.member-modal-role {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px;
  background: color-mix(in srgb, var(--role-color, var(--primary)) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--role-color, var(--primary)) 18%, transparent);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  transition: all 0.3s ease;
}
.member-modal-role:hover { transform: translateY(-1px); }
.member-modal-role-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.member-modal-joined {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
}

/* ═══════════════════════════════════════
   DASHBOARD — TradingView Style
   ═══════════════════════════════════════ */
.dashboard-section {
  min-height: 100vh;
  padding-top: 0;
  position: relative;
  z-index: 1;
}

.dashboard-header {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.dashboard-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--secondary));
  border-radius: 3px 3px 0 0;
}

.dashboard-avatar-ring {
  width: 72px; height: 72px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--cyan), var(--primary));
  animation: ring-spin 6s linear infinite;
  flex-shrink: 0;
}
.dashboard-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-2);
}

.dash-stat-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.dash-stat-card:hover {
  border-color: var(--surface-border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.dash-stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.dash-stat-card:hover::after { opacity: 1; }

.dash-stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
  flex-shrink: 0;
}
.dash-stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
}
.dash-stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.roles-container { display: flex; flex-wrap: wrap; gap: 8px; }
.role-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.3s ease;
}
.role-badge:hover { border-color: rgba(var(--primary-rgb), 0.2); transform: translateY(-1px); }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ═══════════════════════════════════════
   SEARCH
   ═══════════════════════════════════════ */
.search-container { position: relative; }
.search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 0.9rem; z-index: 2;
}
.search-input {
  background: var(--surface) !important;
  border: 1px solid var(--surface-border) !important;
  border-radius: var(--radius-full) !important;
  padding: 14px 20px 14px 48px !important;
  color: var(--text) !important;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.search-input:focus {
  border-color: rgba(var(--primary-rgb), 0.3) !important;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.08), 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}
.search-input::placeholder { color: var(--text-dim); }

/* ═══════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════ */
.glass-pagination .page-link {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  padding: 10px 16px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}
.glass-pagination .page-link:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.2);
  color: #fff;
}
.glass-pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}
.glass-pagination .page-item.disabled .page-link { opacity: 0.25; }

/* ═══════════════════════════════════════
   SKELETON LOADING
   ═══════════════════════════════════════ */
.skeleton-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 0; }
.skeleton-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}
.skeleton-text {
  width: 70%; height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}
.skeleton-text.short { width: 45%; height: 12px; }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.online-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(var(--success-rgb), 0.5);
  animation: pulse-online 2s ease-in-out infinite;
}
@keyframes pulse-online {
  0%, 100% { box-shadow: 0 0 6px rgba(var(--success-rgb), 0.4); }
  50% { box-shadow: 0 0 16px rgba(var(--success-rgb), 0.8); }
}

/* ═══════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════ */
.empty-state { color: var(--text-dim); padding: 40px 20px; text-align: center; }
.empty-state i { font-size: 3rem; opacity: 0.3; }
.empty-state h5 { margin-top: 12px; font-weight: 600; }
.empty-state p { font-size: 0.9rem; color: var(--text-dim); }

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.footer-section {
  padding: 60px 0 30px;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.footer-heading {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-dim); font-size: 0.88rem; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--primary-light); }

.social-links { display: flex; gap: 10px; }
.social-link {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  font-size: 1rem;
  transition: all 0.3s ease;
}
.social-link:hover { background: rgba(var(--primary-rgb), 0.1); border-color: var(--primary); color: var(--primary-light); }

/* Glass dropdown */
.glass-dropdown {
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.glass-dropdown .dropdown-item {
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.glass-dropdown .dropdown-item:hover { background: rgba(var(--primary-rgb), 0.08); color: #fff; }
.glass-dropdown .dropdown-divider { border-color: rgba(255, 255, 255, 0.05); }

/* ═══════════════════════════════════════
   404 PAGE
   ═══════════════════════════════════════ */
.error-code {
  font-family: var(--font-display);
  font-size: 10rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.6;
  line-height: 1;
}

/* ═══════════════════════════════════════
   RESPONSIVE — Mobile First
   ═══════════════════════════════════════ */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(10, 10, 15, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
  .navbar-nav { gap: 2px; }
  .glass-navbar .nav-link { padding: 12px 16px; border-radius: var(--radius-sm); }
  .nav-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.04); }
  .navbar-toggler {
    color: var(--text);
    padding: 8px 10px;
    font-size: 1.3rem;
    outline: none;
    box-shadow: none;
  }
  .navbar-toggler:focus { box-shadow: none; }
}

@media (max-width: 768px) {
  /* -- Global mobile -- */
  html, body { overflow-x: hidden; -webkit-text-size-adjust: 100%; }

  /* -- AOS safety net: always show elements even if AOS CSS keeps them hidden -- */
  [data-aos] { opacity: 1 !important; transform: none !important; transition: opacity 0.2s ease, transform 0.2s ease !important; }
  [data-aos].aos-animate { opacity: 1 !important; transform: none !important; }

  /* -- Hero -- */
  .hero-section { padding-top: 70px; min-height: auto; }
  .hero-title { font-size: clamp(1.8rem, 7vw, 2.5rem); margin-bottom: 16px; }
  .hero-subtitle { font-size: 0.9rem; margin-bottom: 20px; line-height: 1.6; }
  .hero-badge { font-size: 0.7rem; padding: 6px 14px; margin-bottom: 16px; }
  .hero-actions { gap: 10px; margin-bottom: 24px; flex-direction: row; flex-wrap: nowrap; }
  .hero-actions .btn { padding: 10px 16px; font-size: 0.82rem; flex: 1; text-align: center; justify-content: center; }

  /* -- Hero stats: compact horizontal row -- */
  .hero-stats {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0;
    width: 100%;
  }
  .hero-stat { padding: 10px 12px; flex: 1; text-align: center; min-width: 0; }
  .hero-stat-number { font-size: 1.2rem; }
  .hero-stat-label { font-size: 0.58rem; letter-spacing: 0.8px; }
  .hero-stat + .hero-stat::before {
    top: 20%; left: 0; width: 1px; height: 60%;
    background: linear-gradient(transparent, rgba(var(--primary-rgb), 0.15), transparent);
  }

  /* -- Sections -- */
  .section-title { font-size: 1.6rem; }
  .section-subtitle { font-size: 0.9rem; }
  .section-padding { padding: 36px 0; }
  .section-padding .mb-5 { margin-bottom: 1.5rem !important; }
  .page-header { padding: 85px 0 24px; }
  .page-header .section-title { font-size: 1.5rem; }

  /* -- Cards: compact for 2-col grid -- */
  .feature-card { padding: 18px 14px; }
  .feature-card h4 { font-size: 0.9rem; margin-bottom: 6px; }
  .feature-card p { font-size: 0.75rem; line-height: 1.5; }
  .feature-icon { width: 40px; height: 40px; font-size: 1rem; margin-bottom: 12px; }
  .stat-card { padding: 16px 12px; }
  .stat-value { font-size: 1.4rem; }
  .stat-label { font-size: 0.62rem; letter-spacing: 0.8px; }
  .stat-icon { width: 36px; height: 36px; font-size: 0.9rem; margin-bottom: 8px; }

  /* -- Member cards: compact for 2-col (FIXED class names) -- */
  .member-card { padding: 14px 10px 12px; }
  .member-avatar-container { width: 52px; height: 52px; margin-bottom: 10px; }
  .member-avatar-ring { width: 52px; height: 52px; }
  .member-name { font-size: 0.78rem; }
  .member-username { font-size: 0.62rem; margin-bottom: 6px; }
  .member-roles { gap: 3px; margin-top: 4px; }
  .member-role-pill { padding: 2px 6px; font-size: 0.58rem; }
  .member-card-actions { display: none; }
  .member-status-dot { width: 12px; height: 12px; border-width: 2px; }

  /* -- CTA -- */
  .cta-card { padding: 30px 16px; }
  .cta-title { font-size: 1.3rem; }

  /* -- Charts -- */
  .chart-container { height: 170px; }

  /* -- Dashboard -- */
  .dashboard-header .d-flex { flex-direction: column; text-align: center; }
  .dashboard-avatar-ring { margin: 0 auto; }
  .dashboard-header .ms-4 { margin: 16px 0 0 0 !important; }
  .dash-stat-card { padding: 16px 12px; gap: 10px; }
  .dash-stat-icon { width: 38px; height: 38px; font-size: 1rem; }
  .dash-stat-value { font-size: 1.2rem; }
  .dash-stat-label { font-size: 0.65rem; }

  /* -- Members modal -- */
  .member-modal .modal-dialog { margin: 10px; }
  .member-modal .modal-content { border-radius: 16px; }
  .member-modal-stats { grid-template-columns: 1fr 1fr; }
  .member-modal-banner { height: 80px; }
  .member-modal-avatar { width: 72px; height: 72px; }
  .member-modal-name { font-size: 1.1rem; }

  /* -- Leaderboard podium: FORCE HORIZONTAL row (override everything) -- */
  #lbPodium,
  .podium-container,
  .podium-main {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: auto !important;
    padding: 10px 4px !important;
    width: 100% !important;
  }
  .podium-item { flex: 1 1 0 !important; max-width: 110px !important; min-width: 0 !important; width: auto !important; float: none !important; }
  .podium-item.gold { flex: 1.2 1 0 !important; max-width: 120px !important; }
  .podium-avatar { width: 44px !important; height: 44px !important; }
  .podium-item.gold .podium-avatar { width: 52px !important; height: 52px !important; }
  .podium-avatar-wrap { margin-bottom: 6px; }
  .podium-medal { font-size: 1.1rem; margin-bottom: 3px; }
  .podium-item.gold .podium-medal { font-size: 1.3rem; }
  .podium-rank { font-size: 0.52rem; margin-bottom: 2px; }
  .podium-name { font-size: 0.65rem; max-width: 100px; margin-bottom: 2px; }
  .podium-stat { font-size: 0.58rem; margin-bottom: 4px; }
  .podium-bar { height: 36px !important; border-radius: 6px 6px 0 0; width: 100% !important; box-sizing: border-box; }
  .podium-item.gold .podium-bar { height: 54px !important; }
  .podium-item.silver .podium-bar { height: 36px !important; }
  .podium-item.bronze .podium-bar { height: 24px !important; }

  /* -- Leaderboard table -- */
  .leaderboard-table th,
  .leaderboard-table td { padding: 10px 8px; font-size: 0.8rem; }
  .lb-avatar { width: 30px; height: 30px; }
  .lb-member { gap: 8px; }
  .lb-member small { display: none; }
  .lb-rank { width: 28px; height: 28px; font-size: 0.75rem; }
  .lb-bar { max-width: 80px; }

  /* -- Tab buttons on mobile -- */
  .glass-tabs { flex-wrap: wrap; }
  .glass-tabs .btn { font-size: 0.78rem; padding: 6px 12px; }

  /* -- Glass card -- */
  .glass-card { padding: 16px !important; }

  /* -- Owner card -- */
  .owner-card { padding: 24px 16px; }

  /* -- AI portal -- */
  .ai-portal-title { font-size: 1.3rem; }
  .ai-portal-sub { font-size: 0.8rem; }

  /* -- Hide heavy decorations on mobile -- */
  .floating-card { display: none; }
  .central-orb { display: none; }
  .hero-grid { display: none; }
  .hero-glow, .hero-glow-2 { display: none; }
  .scroll-indicator { display: none; }
  body::before, body::after { display: none; }
  .particles-bg { display: none; }
  .starfield-bg { display: none; }
  .feature-glow { display: none; }

  /* -- Footer compact -- */
  .footer-section { padding: 24px 0 16px; }
  .footer-section .row > div { text-align: center; margin-bottom: 8px; }
  .social-links { justify-content: center; }
  .footer-heading { font-size: 0.65rem; margin-bottom: 10px; }
  .footer-links a { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .hero-section { padding-top: 60px; }
  .hero-title { font-size: 1.4rem; }
  .hero-subtitle { font-size: 0.82rem; margin-bottom: 14px; }
  .hero-stat { padding: 6px 8px; }
  .hero-stat-number { font-size: 1rem; }
  .hero-stat-label { font-size: 0.5rem; }
  .btn-glow, .btn-outline-glow { padding: 10px 14px; font-size: 0.78rem; }
  /* Keep buttons horizontal on small phones (PC-like) */
  .hero-actions { flex-direction: row !important; gap: 8px !important; flex-wrap: nowrap; }
  .hero-actions .btn { width: auto; flex: 1; justify-content: center; min-width: 0; font-size: 0.75rem; padding: 9px 10px; }
  .member-modal-stats { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 1.25rem; }
  .section-subtitle { font-size: 0.8rem; }
  .section-padding { padding: 24px 0; }
  .section-padding .mb-5 { margin-bottom: 1rem !important; }
  .page-header { padding: 70px 0 16px; }
  .feature-card { padding: 14px 10px; }
  .feature-card h4 { font-size: 0.82rem; }
  .feature-card p { font-size: 0.7rem; }
  .feature-icon { width: 34px; height: 34px; font-size: 0.85rem; margin-bottom: 10px; }
  .stat-card { padding: 14px 10px; }
  .stat-value { font-size: 1.2rem; }
  .stat-label { font-size: 0.58rem; }
  .stat-icon { width: 32px; height: 32px; font-size: 0.8rem; margin-bottom: 6px; }
  .glass-tabs .btn { font-size: 0.7rem; padding: 5px 8px; }
  .navbar-collapse { padding: 14px; }

  /* -- Member cards: extra compact for small phones -- */
  .member-card { padding: 10px 6px 8px; }
  .member-avatar-container { width: 44px; height: 44px; margin-bottom: 8px; }
  .member-avatar-ring { width: 44px; height: 44px; }
  .member-name { font-size: 0.72rem; }
  .member-username { font-size: 0.58rem; margin-bottom: 4px; }
  .member-roles { display: none; }
  .member-status-dot { width: 10px; height: 10px; }

  /* -- Podium even more compact -- */
  .podium-item { max-width: 100px; }
  .podium-item.gold { max-width: 110px; }
  .podium-avatar { width: 40px; height: 40px; }
  .podium-item.gold .podium-avatar { width: 48px; height: 48px; }
  .podium-medal { font-size: 1rem; margin-bottom: 2px; }
  .podium-item.gold .podium-medal { font-size: 1.2rem; }
  .podium-name { font-size: 0.6rem; max-width: 80px; }
  .podium-stat { font-size: 0.55rem; }
  .podium-rank { font-size: 0.5rem; }

  .cta-card { padding: 24px 14px; }
  .cta-title { font-size: 1.1rem; }
  .owner-card { padding: 20px 14px; }
  .section-badge { font-size: 0.65rem; padding: 4px 12px; letter-spacing: 1px; }
}

/* ═══════════════════════════════════════
   TEXT ANIMATION UTILITIES
   ═══════════════════════════════════════ */
.text-reveal {
  overflow: hidden;
}
.text-reveal > * {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
}

/* Character split animation support */
.char-animate .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
}

/* ═══════════════════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════════════════ */

.profile-section {
  padding-top: 2rem;
  min-height: 100vh;
}

.profile-header {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.profile-banner {
  height: 140px;
  background: linear-gradient(135deg, rgba(124,92,252,0.3), rgba(34,211,238,0.1), rgba(124,92,252,0.1));
  position: relative;
}

.profile-header-content {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  padding: 0 2rem 1.5rem;
  flex-wrap: wrap;
}

.profile-avatar-area {
  margin-top: -50px;
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 0deg, var(--ring-color, var(--primary)), var(--accent), var(--ring-color, var(--primary)));
  animation: ring-spin 6s linear infinite;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-1);
}

.profile-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.profile-status-badge.online {
  color: #22c55e;
}

.profile-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.profile-identity {
  flex: 1;
  min-width: 200px;
  padding-bottom: 0.25rem;
}

.profile-display-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-username {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.profile-joined {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.profile-quick-actions {
  flex-shrink: 0;
  padding-bottom: 0.25rem;
}

/* ═══════════════════════════════════════════════════
   MEMBER CARD ACTION BUTTONS
   ═══════════════════════════════════════════════════ */

.member-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  justify-content: center;
}

.member-profile-link,
.member-discord-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all 0.25s ease;
  text-decoration: none;
}

.member-profile-link:hover {
  background: rgba(124, 92, 252, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.member-discord-link:hover {
  background: rgba(88, 101, 242, 0.15);
  border-color: #5865F2;
  color: #5865F2;
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════
   LEADERBOARD CLICKABLE ROWS
   ═══════════════════════════════════════════════════ */

.lb-row-clickable {
  cursor: pointer;
  transition: background 0.2s ease;
}

.lb-row-clickable:hover {
  background: rgba(124, 92, 252, 0.06) !important;
}

.podium-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: inherit;
}

.podium-link:hover {
  color: inherit;
}

.podium-item:hover {
  transform: translateY(-6px);
}

/* ═══════════════════════════════════════════════════
   MEMBER MODAL ACTIONS
   ═══════════════════════════════════════════════════ */

.member-modal-actions .btn {
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — PROFILE
   ═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .profile-header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem 1.5rem;
  }

  .profile-avatar-area {
    margin-top: -40px;
  }

  .profile-avatar-ring {
    width: 90px;
    height: 90px;
  }

  .profile-display-name {
    font-size: 1.4rem;
  }

  .profile-quick-actions {
    width: 100%;
  }

  .profile-quick-actions .btn {
    width: 100%;
  }

  .profile-banner {
    height: 100px;
  }
}

/* ─── Discord Embed Panel (Members Modal) ─── */
.discord-embed-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--bg-1);
  border: 1px solid rgba(124, 92, 252, 0.15);
}

.discord-embed-card {
  padding: 1rem;
  border-radius: 10px;
  background: rgba(10, 10, 15, 0.6);
  border: 1px solid rgba(124, 92, 252, 0.1);
}

.discord-embed-stat {
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(124, 92, 252, 0.06);
  border: 1px solid rgba(124, 92, 252, 0.1);
}

/* ─── Discord Widget Card (Profile Page) ─── */
.discord-widget-card {
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid rgba(124, 92, 252, 0.2);
}

.discord-widget-content .badge {
  font-size: 0.72rem;
  padding: 0.3em 0.6em;
}

#dwRoles .badge {
  background: rgba(124, 92, 252, 0.15);
  color: var(--primary);
  border: 1px solid rgba(124, 92, 252, 0.25);
}

#dwStatus {
  transition: color 0.3s ease;
}

.discord-widget-content .glass-card {
  background: rgba(10, 10, 15, 0.6);
}

/* ═══════════════════════════════════════════════════════
   Server Stats Page v6 — Premium 3D Analytics Dashboard
   Glassmorphism + 3D tilt + neon glow effects
   ═══════════════════════════════════════════════════════ */

.server-stats-section {
  padding-top: 100px;
  min-height: 100vh;
}

/* ─── HERO HEADER ─── */
.ss-hero-logo {
  position: relative;
  display: inline-block;
}
.ss-logo-ring-3d {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.ss-logo-ring-3d::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(#7c5cfc, #06d6a0, #22d3ee, #f59e0b, #7c5cfc);
  animation: ssRingSpin 3s linear infinite;
  z-index: 0;
}
.ss-logo-ring-3d::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg-0, #0a0a0f);
  z-index: 1;
}
.ss-logo-inner {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(124, 92, 252, 0.4);
}
.ss-guild-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.ss-logo-particles {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,252,0.15) 0%, transparent 70%);
  animation: ssPulseGlow 2s ease-in-out infinite alternate;
  z-index: -1;
}
@keyframes ssRingSpin { to { transform: rotate(360deg); } }
@keyframes ssPulseGlow {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.15); opacity: 0.8; }
}

.ss-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 92, 252, 0.08);
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: 24px;
  padding: 6px 18px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--primary, #7c5cfc);
  text-transform: uppercase;
}
.ss-hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: #e2e8f0;
  letter-spacing: -0.5px;
}
.ss-gradient-text {
  background: linear-gradient(135deg, #7c5cfc, #22d3ee, #06d6a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ss-hero-sub {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.ss-ist-clock-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ss-ist-clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124, 92, 252, 0.1);
  border: 1px solid rgba(124, 92, 252, 0.25);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.8rem;
  color: var(--primary, #7c5cfc);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ss-ist-tag {
  background: rgba(124, 92, 252, 0.15);
  color: var(--primary, #7c5cfc);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  vertical-align: middle;
  margin-left: 4px;
}
.ss-last-update {
  font-size: 0.7rem;
  color: #475569;
}
.ss-glow-text {
  color: #06d6a0;
  font-weight: 700;
}

/* ─── CONTROL BAR ─── */
.ss-control-bar {
  background: rgba(10, 10, 20, 0.65);
  border: 1px solid rgba(124, 92, 252, 0.12);
  border-radius: 16px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.ss-control-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ss-control-icon {
  color: var(--primary, #7c5cfc);
  font-size: 1rem;
}
.ss-control-label {
  font-weight: 700;
  font-size: 0.78rem;
  color: #e2e8f0;
  letter-spacing: 0.5px;
}
.ss-period-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.ss-pill {
  padding: 7px 18px;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 10px;
  border: 1px solid rgba(124, 92, 252, 0.12);
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.4px;
}
.ss-pill:hover {
  background: rgba(124, 92, 252, 0.1);
  color: var(--primary, #7c5cfc);
  border-color: rgba(124, 92, 252, 0.35);
  transform: translateY(-1px);
}
.ss-pill.active {
  background: linear-gradient(135deg, #7c5cfc, #6d4de6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 24px rgba(124, 92, 252, 0.5), 0 0 12px rgba(124, 92, 252, 0.3);
  transform: translateY(-1px);
}

/* Live Indicator */
.ss-live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}
.ss-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  animation: ssPulse 1.5s ease-in-out infinite;
}
@keyframes ssPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
}

/* ─── 3D GLASS COUNTER CARDS ─── */
.ss-glass-card {
  background: rgba(12, 12, 24, 0.55);
  border: 1px solid rgba(124, 92, 252, 0.1);
  border-radius: 18px;
  padding: 22px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
  cursor: default;
}
.ss-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary, #7c5cfc), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ss-glass-card:hover::before { opacity: 1; }
.ss-glass-card:hover { border-color: rgba(124, 92, 252, 0.3); }

.ss-card-3d-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(124,92,252,0.04), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

/* Glow variants */
.ss-glow-purple:hover { box-shadow: 0 8px 40px rgba(124, 92, 252, 0.2), 0 0 20px rgba(124, 92, 252, 0.08); }
.ss-glow-green:hover { box-shadow: 0 8px 40px rgba(34, 197, 94, 0.2), 0 0 20px rgba(34, 197, 94, 0.08); }
.ss-glow-cyan:hover { box-shadow: 0 8px 40px rgba(34, 211, 238, 0.2), 0 0 20px rgba(34, 211, 238, 0.08); }
.ss-glow-amber:hover { box-shadow: 0 8px 40px rgba(245, 158, 11, 0.2), 0 0 20px rgba(245, 158, 11, 0.08); }
.ss-glow-violet:hover { box-shadow: 0 8px 40px rgba(168, 85, 247, 0.2), 0 0 20px rgba(168, 85, 247, 0.08); }
.ss-glow-teal:hover { box-shadow: 0 8px 40px rgba(6, 214, 160, 0.2), 0 0 20px rgba(6, 214, 160, 0.08); }

.ss-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--icon-color), color-mix(in srgb, var(--icon-color) 70%, #000));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  margin: 0 auto 10px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--icon-color) 30%, transparent);
}
.ss-card-value {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: #e2e8f0;
  position: relative;
  z-index: 1;
}
.ss-card-value small {
  font-size: 0.45em;
  opacity: 0.55;
  font-weight: 500;
}
.ss-card-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  opacity: 0.4;
  margin-top: 5px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

/* ─── STAT SUMMARY CARDS ─── */
.ss-stat-card {
  background: rgba(12, 12, 24, 0.45);
  border: 1px solid rgba(124, 92, 252, 0.08);
  border-radius: 18px;
  padding: 24px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.ss-stat-card:hover {
  border-color: rgba(124, 92, 252, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.ss-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.ss-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  opacity: 0.4;
  font-weight: 800;
  margin-bottom: 6px;
}
.ss-stat-value {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: #e2e8f0;
}
.ss-val-green { color: #22c55e; }
.ss-val-red { color: #ef4444; }
.ss-stat-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  opacity: 0.55;
  margin-top: 4px;
}
.ss-stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--icon-bg);
  color: var(--icon-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.ss-stat-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 16px;
}
.ss-stat-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

/* ─── 3D GLASS METRIC CARDS ─── */
.ss-metric-glass {
  background: rgba(12, 12, 24, 0.45);
  border: 1px solid rgba(124, 92, 252, 0.08);
  border-radius: 20px;
  padding: 26px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.ss-metric-glass:hover {
  border-color: rgba(124, 92, 252, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.ss-metric-glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, color-mix(in srgb, var(--glow) 15%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.ss-metric-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.ss-metric-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--mc) 15%, transparent);
  color: var(--mc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.ss-metric-big {
  font-size: 2rem;
  font-weight: 900;
  color: #e2e8f0;
  line-height: 1.2;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.ss-metric-bar-wrap {
  height: 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.ss-metric-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bar-clr), color-mix(in srgb, var(--bar-clr) 60%, #fff));
  border-radius: 5px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.ss-metric-note {
  font-size: 0.7rem;
  color: #475569;
  position: relative;
  z-index: 1;
}

/* ─── CHART GLASS CARDS ─── */
.ss-chart-glass {
  background: rgba(12, 12, 24, 0.45);
  border: 1px solid rgba(124, 92, 252, 0.08);
  border-radius: 20px;
  padding: 26px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.ss-chart-glass:hover {
  border-color: rgba(124, 92, 252, 0.2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}
.ss-chart-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(124,92,252,0.6), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ss-chart-glass:hover .ss-chart-glow { opacity: 1; }

.ss-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.ss-chart-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #e2e8f0;
  margin: 0;
  display: flex;
  align-items: center;
}
.ss-chart-title i { opacity: 0.65; }
.ss-chart-sub {
  font-size: 0.7rem;
  color: #64748b;
  display: block;
  margin-top: 3px;
}
.ss-chart-body {
  position: relative;
  height: 280px;
}
.ss-chart-body.ss-chart-xl {
  height: 360px;
}

/* ─── BADGE PILLS ─── */
.ss-badge-pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}
.ss-bp-green {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #22c55e !important;
}
.ss-bp-red {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
}
.ss-bp-muted {
  background: rgba(148, 163, 184, 0.08) !important;
  color: #64748b !important;
}

/* ─── LEADERBOARDS ─── */
.ss-lb-wrap {
  padding-bottom: 10px;
}
.ss-leaderboard {
  max-height: 620px;
  overflow-y: auto;
}
.ss-leaderboard::-webkit-scrollbar { width: 4px; }
.ss-leaderboard::-webkit-scrollbar-track { background: transparent; }
.ss-leaderboard::-webkit-scrollbar-thumb {
  background: rgba(124, 92, 252, 0.2);
  border-radius: 4px;
}
.ss-lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 14px;
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}
.ss-lb-row:last-child { border-bottom: none; }
.ss-lb-row:hover {
  background: rgba(124, 92, 252, 0.08);
  color: inherit;
  transform: translateX(5px);
}
.ss-lb-rank {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary, #7c5cfc);
  min-width: 34px;
  text-align: center;
}
.ss-medal { font-size: 1.15rem; }
.ss-lb-av-wrap {
  position: relative;
  flex-shrink: 0;
}
.ss-lb-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(124, 92, 252, 0.15);
}
.ss-lb-dot {
  position: absolute;
  bottom: 0;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid rgba(10, 10, 15, 0.95);
}
.ss-lb-info { flex: 1; min-width: 0; }
.ss-lb-name {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e2e8f0;
}
.ss-lb-sub {
  font-size: 0.7rem;
  color: #475569;
}
.ss-lb-stat {
  text-align: right;
  flex-shrink: 0;
}
.ss-lb-val {
  display: block;
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--primary, #7c5cfc);
}
.ss-lb-unit {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #475569;
  font-weight: 700;
}

/* ─── HEALTH DASHBOARD ─── */
.ss-health-glass {
  background: rgba(12, 12, 24, 0.45);
  border: 1px solid rgba(124, 92, 252, 0.08);
  border-radius: 20px;
  padding: 26px;
  backdrop-filter: blur(10px);
}
.ss-kpi-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 20px 14px;
  text-align: center;
  transition: all 0.3s ease;
}
.ss-kpi-card:hover {
  background: rgba(124, 92, 252, 0.06);
  border-color: rgba(124, 92, 252, 0.18);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.ss-kpi-icon {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.ss-kpi-val {
  font-size: 1.35rem;
  font-weight: 900;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ss-kpi-lbl {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #475569;
  font-weight: 800;
  margin-top: 6px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .server-stats-section { padding-top: 80px; }
  .ss-hero-title { font-size: 1.6rem; }
  .ss-hero-sub { font-size: 0.8rem; }
  .ss-hero-badge { font-size: 0.6rem; padding: 4px 12px; }
  .ss-logo-ring-3d { width: 80px; height: 80px; }
  .ss-logo-inner { width: 64px; height: 64px; }
  .ss-control-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 10px 14px;
    gap: 10px;
  }
  .ss-period-pills { justify-content: center; flex-wrap: wrap; }
  .ss-pill { padding: 5px 12px; font-size: 0.68rem; }
  .ss-card-value { font-size: 1.3rem; }
  .ss-card-icon { width: 34px; height: 34px; font-size: 1rem; margin-bottom: 6px; }
  .ss-card-label { font-size: 0.58rem; letter-spacing: 1px; }
  .ss-glass-card { padding: 14px 10px; border-radius: 14px; }
  .ss-chart-body { height: 160px; }
  .ss-chart-body.ss-chart-xl { height: 190px; }
  .ss-chart-glass { padding: 16px; border-radius: 16px; }
  .ss-metric-big { font-size: 1.4rem; }
  .ss-metric-glass { padding: 18px; border-radius: 16px; }
  .ss-chart-head { flex-direction: column; gap: 6px; }
  .ss-chart-title { font-size: 0.85rem; }
  .ss-health-glass { padding: 16px; border-radius: 16px; }
  .ss-kpi-card { padding: 14px 10px; border-radius: 12px; }
  .ss-kpi-val { font-size: 0.95rem; }
  .ss-kpi-lbl { font-size: 0.55rem; }
  .ss-stat-card { padding: 16px; border-radius: 14px; }
  .ss-stat-value { font-size: 1.3rem; }
  .ss-stat-icon-wrap { width: 38px; height: 38px; font-size: 1rem; border-radius: 10px; }
  .ss-lb-row { padding: 8px 10px; gap: 8px; }
  .ss-lb-av { width: 32px; height: 32px; }
  .ss-lb-name { font-size: 0.8rem; }
  .ss-lb-val { font-size: 0.82rem; }
  .ss-ist-clock-wrap { gap: 8px; }
  .ss-ist-clock { font-size: 0.72rem; padding: 4px 12px; }
}

/* ═══════════════════════════════════════════════════════════
   DEEP ANALYTICS — Insight Cards & Period Summary
   3D Glass Animations & Premium Styling v5
   ═══════════════════════════════════════════════════════════ */

/* ── 3D Glass Insight Cards ── */
.glass-card-3d {
  position: relative;
  height: 100%;
  background: linear-gradient(145deg, rgba(18,18,28,0.85), rgba(12,12,20,0.95));
  border: 1px solid rgba(124,92,252,0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.4s ease, border-color 0.3s;
  transform-style: preserve-3d;
  perspective: 600px;
}

.glass-card-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(124,92,252,0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.glass-card-3d:hover {
  transform: translateY(-6px) rotateX(2deg) rotateY(-1deg);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.4),
    0 0 30px rgba(124,92,252,0.1),
    inset 0 1px 0 rgba(255,255,255,0.05);
  border-color: rgba(124,92,252,0.25);
}

.dash-insight-card {
  padding: 1.5rem;
  text-align: center;
  min-height: 160px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
}

.dash-insight-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--ic, #7c5cfc);
  background: linear-gradient(135deg, color-mix(in srgb, var(--ic, #7c5cfc) 15%, transparent), color-mix(in srgb, var(--ic, #7c5cfc) 5%, transparent));
  border: 1px solid color-mix(in srgb, var(--ic, #7c5cfc) 20%, transparent);
  margin-bottom: 6px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.glass-card-3d:hover .dash-insight-icon {
  transform: scale(1.15) rotate(-3deg);
  box-shadow: 0 0 20px color-mix(in srgb, var(--ic, #7c5cfc) 30%, transparent);
}

.dash-insight-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dash-insight-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dash-insight-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── Period Summary Bar ── */
.dash-period-summary {
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(124,92,252,0.06), rgba(18,18,28,0.8));
  border: 1px solid rgba(124,92,252,0.12);
}

.dash-psum-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e2e8f0, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dash-psum-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ── Enhanced 3D Card Animations ── */
@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

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

.glass-card-3d::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,92,252,0.3), rgba(34,211,238,0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer-3d 4s ease-in-out infinite;
}

/* ── Enhanced Card Hover Glow ── */
.dash-stat-card {
  transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.35s ease, border-color 0.3s;
}

.dash-stat-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0,0,0,0.3), 0 0 25px rgba(124,92,252,0.08);
}

/* ── Glass Card Enhanced ── */
.glass-card {
  transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.4s ease;
}

.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25), 0 0 20px rgba(124,92,252,0.06);
}

/* ── Animated text gradients ── */
@keyframes text-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.dash-insight-value, .dash-psum-val {
  background-size: 200% 200%;
  animation: text-gradient-shift 5s ease infinite;
}

/* ── Button glow pulse for active period ── */
.btn-glass.active {
  position: relative;
  overflow: hidden;
}

.btn-glass.active::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(124,92,252,0.15), transparent);
  background-size: 200% 100%;
  animation: shimmer-3d 3s ease-in-out infinite;
  pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .dash-insight-card { min-height: 110px; padding: 0.75rem; }
  .dash-insight-value { font-size: 1.2rem; }
  .dash-insight-label { font-size: 0.7rem; }
  .dash-insight-sub { font-size: 0.62rem; }
  .dash-insight-icon { width: 32px; height: 32px; font-size: 0.95rem; margin-bottom: 4px; }
  .dash-psum-val { font-size: 1.1rem; }
  .dash-psum-label { font-size: 0.65rem; }
  .dash-period-summary { padding: 0.75rem; }
  .glass-card-3d:hover { transform: none; }
  .dash-stat-card:hover { transform: none; }
  .glass-card:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════
   MOGGER AI — Full AI Dashboard Styles
   Futuristic · Glass-morphism · 3D Animations
   ═══════════════════════════════════════════════════════════ */

/* ── AI Page Layout ── */
.ai-page {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #08080e;
  position: relative;
}

.ai-page .footer-section,
.ai-page .glass-navbar { display: none !important; }

/* ── AI Sidebar ── */
.ai-sidebar {
  width: 280px;
  min-width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, rgba(12,12,20,0.98), rgba(8,8,14,0.99));
  border-right: 1px solid rgba(124,92,252,0.1);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.ai-sidebar-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(124,92,252,0.08);
}

.ai-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-logo-orb {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c5cfc, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  position: relative;
  animation: ai-orb-pulse 3s ease-in-out infinite;
}

.ai-orb-ring {
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  border: 1.5px solid rgba(124,92,252,0.3);
  animation: ai-ring-spin 6s linear infinite;
}

@keyframes ai-orb-pulse {
  0%, 100% { box-shadow: 0 0 15px rgba(124,92,252,0.3); }
  50% { box-shadow: 0 0 25px rgba(124,92,252,0.5), 0 0 50px rgba(34,211,238,0.2); }
}

@keyframes ai-ring-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ai-logo-text {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1.05rem;
  background: linear-gradient(135deg, #e2e8f0, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-new-chat-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(124,92,252,0.15);
  background: rgba(124,92,252,0.08);
  color: #a78bfa;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-new-chat-btn:hover {
  background: rgba(124,92,252,0.2);
  border-color: rgba(124,92,252,0.3);
  transform: scale(1.05);
}

/* ── Sidebar Tabs ── */
.ai-sidebar-tabs {
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.ai-tab:hover {
  background: rgba(124,92,252,0.08);
  color: rgba(255,255,255,0.8);
}

.ai-tab.active {
  background: linear-gradient(135deg, rgba(124,92,252,0.15), rgba(34,211,238,0.08));
  color: #e2e8f0;
  font-weight: 600;
  border: 1px solid rgba(124,92,252,0.15);
}

.ai-tab i { font-size: 1rem; width: 20px; text-align: center; }

/* ── Sidebar History ── */
.ai-sidebar-history {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}

.ai-sidebar-history::-webkit-scrollbar { width: 4px; }
.ai-sidebar-history::-webkit-scrollbar-thumb { background: rgba(124,92,252,0.2); border-radius: 4px; }

.ai-history-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 6px;
}

.ai-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
}

.ai-history-item:hover { background: rgba(124,92,252,0.08); color: rgba(255,255,255,0.8); }
.ai-history-item.active { background: rgba(124,92,252,0.12); color: #e2e8f0; }

.ai-history-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ai-history-delete {
  opacity: 0;
  border: none;
  background: none;
  color: rgba(255,100,100,0.6);
  cursor: pointer;
  padding: 2px;
  font-size: 0.8rem;
  transition: opacity 0.2s;
}

.ai-history-item:hover .ai-history-delete { opacity: 1; }

.ai-history-empty {
  text-align: center;
  color: rgba(255,255,255,0.2);
  padding: 20px 0;
  font-size: 0.82rem;
}

.ai-history-empty i { display: block; font-size: 1.5rem; margin-bottom: 6px; }

/* ── Sidebar Footer ── */
.ai-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(124,92,252,0.08);
}

.ai-limits-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px;
  background: rgba(124,92,252,0.04);
  border-radius: 8px;
}

.ai-limit-item {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-limit-item i { color: #a78bfa; font-size: 0.75rem; }

.ai-nav-links {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.ai-nav-link {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  border-radius: 6px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: all 0.2s;
}

.ai-nav-link:hover { background: rgba(124,92,252,0.08); color: rgba(255,255,255,0.7); }

.ai-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(124,92,252,0.04);
}

.ai-user-avatar { width: 28px; height: 28px; border-radius: 50%; }
.ai-user-name { flex: 1; font-size: 0.82rem; color: rgba(255,255,255,0.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ai-logout-btn {
  color: rgba(255,100,100,0.5);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.ai-logout-btn:hover { color: #ff6b6b; }

/* ── Mobile Toggle ── */
.ai-mobile-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(124,92,252,0.2);
  background: rgba(12,12,20,0.9);
  color: #a78bfa;
  font-size: 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
}

.ai-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
  backdrop-filter: blur(4px);
}

.ai-overlay.active { display: block; }

/* ── Main Content ── */
.ai-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124,92,252,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(34,211,238,0.02) 0%, transparent 50%),
    #08080e;
}

/* ── Mode Switching ── */
.ai-mode { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.ai-mode.active { display: flex; }

/* ═══ CHAT MODE ═══ */
.ai-chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  scroll-behavior: smooth;
}

.ai-chat-area::-webkit-scrollbar { width: 6px; }
.ai-chat-area::-webkit-scrollbar-thumb { background: rgba(124,92,252,0.15); border-radius: 6px; }

/* ── Welcome Screen ── */
.ai-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px 20px;
  text-align: center;
}

.ai-welcome-orb {
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
  position: relative;
}

.ai-welcome-orb.small-orb { width: 80px; height: 80px; margin-bottom: 16px; }

/* ── Nucleus Animation ── */
.ai-nucleus {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-nucleus-core {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cfc, #22d3ee);
  box-shadow: 0 0 30px rgba(124,92,252,0.4), 0 0 60px rgba(34,211,238,0.2);
  animation: ai-core-pulse 2s ease-in-out infinite;
}

.ai-nucleus.small .ai-nucleus-core { width: 28px; height: 28px; }

@keyframes ai-core-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(124,92,252,0.4), 0 0 60px rgba(34,211,238,0.2); }
  50% { transform: scale(1.1); box-shadow: 0 0 40px rgba(124,92,252,0.6), 0 0 80px rgba(34,211,238,0.3); }
}

.ai-nucleus-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(124,92,252,0.2);
}

.ai-nucleus-ring.r1 {
  inset: 10px;
  animation: ai-ring-spin 8s linear infinite;
  border-color: rgba(124,92,252,0.25);
  border-top-color: transparent;
  border-bottom-color: transparent;
}

.ai-nucleus-ring.r2 {
  inset: 0;
  animation: ai-ring-spin 12s linear infinite reverse;
  border-color: rgba(34,211,238,0.15);
  border-left-color: transparent;
  border-right-color: transparent;
}

.ai-nucleus-ring.r3 {
  inset: -10px;
  animation: ai-ring-spin 16s linear infinite;
  border-color: rgba(124,92,252,0.08);
  border-top-color: transparent;
}

.ai-welcome-title {
  font-family: 'Orbitron', monospace;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.ai-text-shimmer {
  background: linear-gradient(90deg, #e2e8f0, #a78bfa, #22d3ee, #a78bfa, #e2e8f0);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: ai-shimmer-text 4s ease infinite;
}

@keyframes ai-shimmer-text {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.ai-welcome-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 32px;
}

.ai-suggestions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 700px;
  width: 100%;
}

.ai-suggestion {
  padding: 14px 12px;
  background: rgba(124,92,252,0.06);
  border: 1px solid rgba(124,92,252,0.1);
  border-radius: 12px;
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-suggestion:hover {
  background: rgba(124,92,252,0.12);
  border-color: rgba(124,92,252,0.25);
  color: #e2e8f0;
  transform: translateY(-2px);
}

.ai-suggestion i { font-size: 1rem; color: #a78bfa; }

/* ── Messages ── */
.ai-messages { padding: 0 20px; max-width: 850px; margin: 0 auto; width: 100%; }

.ai-msg {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  animation: ai-msg-in 0.35s ease-out;
}

@keyframes ai-msg-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-msg-user {
  flex-direction: row-reverse;
}

.ai-msg-user .ai-msg-body {
  background: linear-gradient(135deg, rgba(124,92,252,0.15), rgba(124,92,252,0.08));
  border: 1px solid rgba(124,92,252,0.15);
  border-radius: 18px 18px 4px 18px;
  padding: 12px 16px;
  max-width: 75%;
}

.ai-msg-assistant .ai-msg-body {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 18px 18px 18px 4px;
  padding: 14px 18px;
  max-width: 85%;
}

.ai-msg-content {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  word-wrap: break-word;
}

.ai-msg-content strong { color: #e2e8f0; }
.ai-msg-content em { color: #a78bfa; }

.ai-msg-content .ai-md-h {
  margin: 12px 0 6px;
  color: #e2e8f0;
  font-weight: 700;
}

.ai-msg-content .ai-md-list {
  padding-left: 16px;
  margin: 6px 0;
}

.ai-msg-content .ai-md-list li {
  color: rgba(255,255,255,0.75);
  margin: 3px 0;
}

.ai-msg-content .ai-code {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(124,92,252,0.1);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 8px 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.ai-msg-content .ai-inline-code {
  background: rgba(124,92,252,0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #c4b5fd;
}

.ai-msg-avatar {
  flex-shrink: 0;
}

.ai-msg-orb {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c5cfc, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #fff;
  box-shadow: 0 0 12px rgba(124,92,252,0.3);
}

.ai-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.ai-msg-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #a78bfa;
}

.ai-msg-model {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(124,92,252,0.1);
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}

.ai-msg-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.ai-msg:hover .ai-msg-actions { opacity: 1; }

.ai-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ai-action-btn:hover {
  background: rgba(124,92,252,0.15);
  color: #a78bfa;
}

.ai-msg-system {
  background: rgba(255,200,50,0.08) !important;
  border-color: rgba(255,200,50,0.15) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 0.82rem;
  color: rgba(255,200,50,0.7);
}

/* ── Chat Input Bar ── */
.ai-input-bar {
  padding: 12px 20px 16px;
  max-width: 850px;
  margin: 0 auto;
  width: 100%;
}

.ai-input-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(124,92,252,0.12);
  border-radius: 16px;
  padding: 8px 12px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.ai-input-container:focus-within {
  border-color: rgba(124,92,252,0.3);
  box-shadow: 0 0 20px rgba(124,92,252,0.08);
}

.ai-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 0.9rem;
  resize: none;
  max-height: 150px;
  padding: 4px 0;
  line-height: 1.5;
}

.ai-input::placeholder { color: rgba(255,255,255,0.25); }

.ai-attach-btn, .ai-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.25s;
  flex-shrink: 0;
}

.ai-attach-btn {
  background: rgba(124,92,252,0.08);
  color: rgba(255,255,255,0.4);
}

.ai-attach-btn:hover { background: rgba(124,92,252,0.15); color: #a78bfa; }
.ai-attach-btn.recording { background: rgba(255,60,60,0.2); color: #ff6b6b; animation: ai-rec-pulse 1s infinite; }

@keyframes ai-rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,60,60,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(255,60,60,0); }
}

.ai-send-btn {
  background: linear-gradient(135deg, #7c5cfc, #6d4de8);
  color: #fff;
}

.ai-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(124,92,252,0.3);
}

.ai-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 0;
}

.ai-model-badge {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.2);
}

.ai-model-badge i { color: #a78bfa; margin-right: 3px; }

.ai-typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(124,92,252,0.6);
}

.ai-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7c5cfc;
  animation: ai-dot-bounce 1.4s infinite ease-in-out;
}

.ai-dot:nth-child(1) { animation-delay: 0s; }
.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* ═══ SEARCH MODE ═══ */
.ai-search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 20px;
  overflow-y: auto;
  flex: 1;
}

.ai-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 600px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(124,92,252,0.12);
  border-radius: 16px;
  margin-bottom: 24px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.ai-search-box:focus-within {
  border-color: rgba(124,92,252,0.3);
  box-shadow: 0 0 20px rgba(124,92,252,0.08);
}

.ai-search-box i { color: rgba(255,255,255,0.3); font-size: 1rem; }

.ai-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.ai-search-input::placeholder { color: rgba(255,255,255,0.25); }

.ai-search-go {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #7c5cfc, #6d4de8);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.ai-search-go:hover { transform: scale(1.05); }

.ai-search-results {
  width: 100%;
  max-width: 700px;
}

.ai-search-result-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(124,92,252,0.1);
  border-radius: 14px;
  padding: 20px;
}

.ai-search-meta {
  font-size: 0.75rem;
  color: rgba(124,92,252,0.6);
  margin-bottom: 12px;
}

.ai-search-answer { font-size: 0.88rem; color: rgba(255,255,255,0.8); line-height: 1.6; }
.ai-search-answer strong { color: #e2e8f0; }

.ai-search-model {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  margin-top: 12px;
  text-align: right;
}

/* ═══ VOICE MODE ═══ */
.ai-voice-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 20px;
}

.ai-voice-orb {
  width: 180px;
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  cursor: pointer;
}

.ai-voice-core {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cfc, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  z-index: 2;
  transition: all 0.3s;
  box-shadow: 0 0 30px rgba(124,92,252,0.3);
}

.ai-voice-rings { position: absolute; inset: 0; }

.ai-voice-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(124,92,252,0.15);
  transition: all 0.5s;
}

.ai-voice-ring.vr1 { inset: 15%; border-color: rgba(124,92,252,0.2); animation: ai-ring-spin 6s linear infinite; }
.ai-voice-ring.vr2 { inset: 5%; border-color: rgba(34,211,238,0.12); animation: ai-ring-spin 10s linear infinite reverse; }
.ai-voice-ring.vr3 { inset: -2%; border-color: rgba(124,92,252,0.08); animation: ai-ring-spin 15s linear infinite; }
.ai-voice-ring.vr4 { inset: -10%; border-color: rgba(34,211,238,0.05); animation: ai-ring-spin 20s linear infinite reverse; }

/* Listening state */
.ai-voice-orb.listening .ai-voice-core {
  box-shadow: 0 0 40px rgba(124,92,252,0.5), 0 0 80px rgba(34,211,238,0.3);
  animation: ai-voice-listen 1.5s ease-in-out infinite;
}

.ai-voice-orb.listening .ai-voice-ring { border-color: rgba(124,92,252,0.3); }

@keyframes ai-voice-listen {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Processing state */
.ai-voice-orb.processing .ai-voice-core {
  animation: ai-voice-process 0.8s ease-in-out infinite;
  background: linear-gradient(135deg, #f59e0b, #22d3ee);
}

@keyframes ai-voice-process {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.95); }
}

.ai-voice-controls { display: flex; gap: 12px; margin-top: 20px; }

.ai-voice-btn {
  padding: 10px 24px;
  border-radius: 12px;
  border: 1px solid rgba(124,92,252,0.2);
  background: linear-gradient(135deg, rgba(124,92,252,0.15), rgba(124,92,252,0.05));
  color: #e2e8f0;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-voice-btn:hover {
  background: linear-gradient(135deg, rgba(124,92,252,0.25), rgba(124,92,252,0.1));
  transform: translateY(-2px);
}

.ai-voice-btn.secondary {
  background: rgba(255,60,60,0.12);
  border-color: rgba(255,60,60,0.2);
  color: #ff8a8a;
}

.ai-voice-transcript {
  margin-top: 20px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(124,92,252,0.08);
  border-radius: 12px;
  min-height: 40px;
  max-width: 600px;
  width: 100%;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  font-style: italic;
}

.ai-voice-response {
  margin-top: 12px;
  max-width: 600px;
  width: 100%;
}

.ai-voice-answer {
  padding: 16px 20px;
  background: rgba(124,92,252,0.06);
  border: 1px solid rgba(124,92,252,0.1);
  border-radius: 14px;
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ═══ IMAGINE MODE ═══ */
.ai-imagine-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 20px;
  overflow-y: auto;
  flex: 1;
}

.ai-imagine-input-wrap {
  width: 100%;
  max-width: 600px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.ai-imagine-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(124,92,252,0.12);
  border-radius: 12px;
  padding: 12px 14px;
  color: #e2e8f0;
  font-size: 0.88rem;
  resize: none;
  outline: none;
  transition: border-color 0.3s;
}

.ai-imagine-input:focus { border-color: rgba(124,92,252,0.3); }
.ai-imagine-input::placeholder { color: rgba(255,255,255,0.25); }

.ai-imagine-btn {
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #7c5cfc, #22d3ee);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ai-imagine-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(124,92,252,0.3); }

.ai-imagine-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 900px;
}

.ai-imagine-card {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(124,92,252,0.1);
  transition: transform 0.3s;
}

.ai-imagine-card:hover { transform: translateY(-4px); }

.ai-imagine-card.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 12px;
  color: rgba(255,255,255,0.4);
}

.ai-imagine-card img { width: 100%; display: block; }

.ai-imagine-meta {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-imagine-prompt {
  flex: 1;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-imagine-download {
  color: rgba(255,255,255,0.3);
  transition: color 0.2s;
}

.ai-imagine-download:hover { color: #a78bfa; }

/* ═══ HISTORY MODE ═══ */
.ai-history-container {
  padding: 40px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ai-history-full {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-history-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(124,92,252,0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
}

.ai-history-card:hover {
  background: rgba(124,92,252,0.08);
  border-color: rgba(124,92,252,0.15);
  transform: translateX(4px);
}

.ai-history-card-body {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.ai-history-card-body i {
  font-size: 1.1rem;
  color: #a78bfa;
  flex-shrink: 0;
}

.ai-history-card-text {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-history-card-meta {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  margin-top: 2px;
}

.ai-history-card-actions { flex-shrink: 0; opacity: 0; transition: opacity 0.2s; }
.ai-history-card:hover .ai-history-card-actions { opacity: 1; }

.ai-history-empty-full {
  text-align: center;
  color: rgba(255,255,255,0.2);
  padding: 60px 20px;
}

.ai-history-empty-full i { font-size: 3rem; display: block; margin-bottom: 12px; }
.ai-history-empty-full h4 { color: rgba(255,255,255,0.3); margin-bottom: 4px; }

/* ── Mode Titles ── */
.ai-mode-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.ai-mode-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 24px;
}

/* ── Loading ── */
.ai-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 24px;
  color: rgba(255,255,255,0.4);
}

.ai-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid rgba(124,92,252,0.15);
  border-top-color: #7c5cfc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.ai-loading-spinner.large { width: 40px; height: 40px; border-width: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }

.ai-error {
  padding: 14px 18px;
  background: rgba(255,60,60,0.08);
  border: 1px solid rgba(255,60,60,0.15);
  border-radius: 10px;
  color: rgba(255,150,150,0.8);
  font-size: 0.85rem;
  text-align: center;
}

/* ── Mogger AI Navbar Link Glow ── */
.mogger-ai-link {
  position: relative;
  background: linear-gradient(135deg, rgba(124,92,252,0.08), rgba(34,211,238,0.05));
  border-radius: 8px !important;
  border: 1px solid rgba(124,92,252,0.15) !important;
}

.mogger-ai-link:hover {
  background: linear-gradient(135deg, rgba(124,92,252,0.15), rgba(34,211,238,0.08)) !important;
  box-shadow: 0 0 15px rgba(124,92,252,0.15);
}
