/* ═══════════════════════════════════════════════════════════
   🧬 BIOLAB - Ultra Cyberpunk/Bio Lab Theme
   ═══════════════════════════════════════════════════════════ */

:root {
  --red-primary: #DC143C;
  --red-glow: #ff2d5c;
  --red-deep: #8b0000;
  --red-dark: #3d000a;
  --red-mid: #6b0a1a;
  --black: #050002;
  --black-2: #0a0208;
  --black-3: #140510;
  --white: #f5f0e8;
  --gray: #8a7080;
  --cyan: #00e5ff;
  --glass: rgba(220, 20, 60, 0.08);
  --glass-border: rgba(220, 20, 60, 0.35);
  --glow: 0 0 20px rgba(220, 20, 60, 0.5), 0 0 40px rgba(220, 20, 60, 0.2);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

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

html, body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

body { position: relative; z-index: 1; }

a { color: var(--red-glow); text-decoration: none; transition: all .3s; }
a:hover { color: #fff; text-shadow: 0 0 10px var(--red-glow); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ── Background layers ─────────────────────────────────────── */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -10;
  background: radial-gradient(ellipse at 20% 30%, var(--red-dark) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 70%, var(--red-deep) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 100%, #1a0008 0%, var(--black) 60%),
              var(--black);
  overflow: hidden;
}

#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(220, 20, 60, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 20, 60, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  opacity: .3;
}

.dna-helix {
  position: absolute;
  right: -100px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 400px;
  height: 200%;
  opacity: .1;
}
.dna-helix span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
  animation: helixSpin 6s linear infinite;
}
.dna-helix span:nth-child(1) { top: 0%; animation-delay: 0s; }
.dna-helix span:nth-child(2) { top: 20%; animation-delay: 1s; }
.dna-helix span:nth-child(3) { top: 40%; animation-delay: 2s; }
.dna-helix span:nth-child(4) { top: 60%; animation-delay: 3s; }
.dna-helix span:nth-child(5) { top: 80%; animation-delay: 4s; }
.dna-helix span:nth-child(6) { top: 100%; animation-delay: 5s; }

@keyframes helixSpin {
  0% { transform: scaleX(0); opacity: 0; }
  50% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(0); opacity: 0; }
}

/* ── Top bar ───────────────────────────────────────────────── */
.topbar {
  background: linear-gradient(90deg, var(--red-deep), var(--red-dark), var(--red-deep));
  border-bottom: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  padding: .3rem 1rem;
  position: relative;
  z-index: 100;
}
.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  color: rgba(255, 200, 210, 0.8);
}
.topbar .sep { color: var(--red-glow); opacity: .4; }
.blink-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff66;
  box-shadow: 0 0 10px #00ff66;
  animation: blink 1.5s ease-in-out infinite;
  display: inline-block;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ── Header / Nav ──────────────────────────────────────────── */
.main-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(180deg, rgba(5,0,2,.95), rgba(5,0,2,.7), transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: .8rem 2rem;
}
.nav {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none !important;
  color: inherit !important;
}
.logo-ring {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 0deg, var(--red-primary), transparent 40%, var(--red-primary) 60%, transparent, var(--red-primary));
  animation: rotateRing 8s linear infinite;
}
.logo-ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--black);
  box-shadow: inset 0 0 20px rgba(220,20,60,.3);
}
.logo-ring::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--red-primary);
  filter: blur(15px);
  opacity: .4;
  z-index: -1;
}
@keyframes rotateRing {
  to { transform: rotate(360deg); }
}
.logo-img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  z-index: 1;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-bio, .logo-lab {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: .1em;
}
.logo-bio { color: #fff; text-shadow: 0 0 10px #fff, 0 0 20px rgba(255,255,255,.3); }
.logo-lab { color: var(--red-glow); text-shadow: var(--glow); }
.logo-text small {
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .3em;
  color: var(--gray);
  margin-top: 2px;
}
.logo-text.small { flex-direction: row; gap: 0; }
.logo-text.small .logo-bio, .logo-text.small .logo-lab { font-size: 1.3rem; }

.nav-links {
  display: flex;
  gap: .5rem;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  color: var(--gray);
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all .3s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.nav-links a span {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--red-primary);
  opacity: .6;
}
.nav-links a:hover, .nav-links a.active {
  color: #fff;
  background: var(--glass);
  border-color: var(--glass-border);
  text-shadow: 0 0 10px var(--red-glow);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--red-glow);
  box-shadow: 0 0 8px var(--red-glow);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .8rem .3rem .3rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--white) !important;
  font-size: .85rem;
  font-weight: 600;
}
.user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--red-primary);
}
.owner-badge {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #000;
  font-size: .55rem;
  font-weight: 900;
  font-family: var(--font-display);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: .1em;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all .3s;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.btn-sm { padding: .4rem 1rem; font-size: .7rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--red-primary), var(--red-glow));
  color: #fff;
  box-shadow: var(--glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(220, 20, 60, .8), 0 5px 20px rgba(0,0,0,.5);
  color: #fff !important;
}
.btn-ghost {
  background: transparent;
  color: var(--red-glow);
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover {
  background: var(--glass);
  color: #fff !important;
  border-color: var(--red-primary);
}
.btn-danger {
  background: linear-gradient(135deg, #8b0000, var(--red-primary));
  color: #fff;
}
.btn-success {
  background: linear-gradient(135deg, #0f5132, #198754);
  color: #fff;
}

/* ── Flash messages ────────────────────────────────────────── */
.flash-container {
  position: fixed;
  top: 90px;
  right: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 400px;
}
.flash {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .8rem 1.2rem;
  background: var(--black-3);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--red-primary);
  border-radius: 4px;
  font-weight: 500;
  box-shadow: 0 5px 20px rgba(0,0,0,.5);
  animation: slideIn .4s ease-out;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.flash-success { border-left-color: #00ff66; }
.flash-error { border-left-color: #ff4444; }
.flash-info { border-left-color: var(--cyan); }
.flash-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--red-primary);
  color: #fff;
  font-weight: bold;
  font-size: .7rem;
}
.flash-success .flash-icon { background: #00ff66; color: #000; }
.flash-error .flash-icon { background: #ff4444; }
.flash-info .flash-icon { background: var(--cyan); color: #000; }

/* ── Content ───────────────────────────────────────────────── */
.content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 80vh;
}

/* ── Hero (home) ───────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 4rem 1rem 3rem;
  margin-bottom: 3rem;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--red-primary) 0%, transparent 60%);
  opacity: .1;
  filter: blur(60px);
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .08; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: .15; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .2em;
  color: var(--red-glow);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.status-dot.online { background: #00ff66; box-shadow: 0 0 8px #00ff66; animation: blink 1.5s infinite; }

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}
.hero h1 .glitch {
  display: inline-block;
  position: relative;
  color: var(--red-glow);
  text-shadow: var(--glow), 0 0 80px rgba(220,20,60,.3);
}
.hero h1 .glitch::before, .hero h1 .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
}
.hero h1 .glitch::before {
  color: #00e5ff;
  animation: glitchA 3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}
.hero h1 .glitch::after {
  color: #ff00ff;
  animation: glitchB 3s infinite;
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
}
@keyframes glitchA {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-3px, 1px); }
  94% { transform: translate(3px, -1px); }
  96% { transform: translate(-2px, 2px); }
}
@keyframes glitchB {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(3px, -1px); }
  94% { transform: translate(-3px, 1px); }
  96% { transform: translate(2px, -2px); }
}

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}
.hero .subtitle .tech {
  font-family: var(--font-mono);
  color: var(--red-glow);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ── Cards / Panels ────────────────────────────────────────── */
.panel {
  position: relative;
  background: linear-gradient(135deg, rgba(220, 20, 60, .04), rgba(0,0,0,.4));
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border-top: 2px solid var(--red-primary);
  border-left: 2px solid var(--red-primary);
}
.panel::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 40px; height: 40px;
  border-bottom: 2px solid var(--red-primary);
  border-right: 2px solid var(--red-primary);
}
.panel-header {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}
.panel-header .icon {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  font-size: 1.3rem;
}
.panel-header h2, .panel-header h3 {
  font-size: 1rem;
  margin: 0;
}
.panel-header .tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .7rem;
  padding: .2rem .6rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 3px;
  color: var(--red-glow);
  letter-spacing: .1em;
}

/* ── Stats grid ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  position: relative;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(220,20,60,.06), rgba(0,0,0,.5));
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all .3s;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--red-primary);
  box-shadow: var(--glow);
}
.stat-card .label {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .15em;
  color: var(--gray);
  text-transform: uppercase;
}
.stat-card .value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  margin: .3rem 0;
  text-shadow: 0 0 20px var(--red-glow);
}
.stat-card .trend {
  font-size: .8rem;
  color: var(--red-glow);
  font-family: var(--font-mono);
}
.stat-card .stat-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  opacity: .2;
}

/* ── Grids ─────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }

/* ── Leaderboard / lists ───────────────────────────────────── */
.user-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .8rem 1rem;
  background: rgba(0,0,0,.3);
  border: 1px solid transparent;
  border-radius: 6px;
  margin-bottom: .5rem;
  transition: all .3s;
}
.user-row:hover {
  background: var(--glass);
  border-color: var(--glass-border);
  transform: translateX(4px);
}
.user-row .rank {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  width: 36px;
  text-align: center;
  color: var(--gray);
}
.user-row.top-1 .rank { color: #ffd700; text-shadow: 0 0 10px #ffd700; }
.user-row.top-2 .rank { color: #c0c0c0; text-shadow: 0 0 10px #c0c0c0; }
.user-row.top-3 .rank { color: #cd7f32; text-shadow: 0 0 10px #cd7f32; }
.user-row img {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--glass-border);
}
.user-row .info { flex: 1; }
.user-row .name { font-weight: 600; color: #fff; }
.user-row .sub { font-size: .75rem; color: var(--gray); font-family: var(--font-mono); }
.user-row .score {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red-glow);
  font-size: 1.1rem;
}

/* ── Forms ─────────────────────────────────────────────────── */
input, textarea, select {
  background: rgba(0,0,0,.5);
  border: 1px solid var(--glass-border);
  color: var(--white);
  padding: .7rem 1rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: .95rem;
  transition: all .3s;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 2px rgba(220,20,60,.2), var(--glow);
}
label {
  display: block;
  margin-bottom: .4rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--gray);
  text-transform: uppercase;
}
.form-group { margin-bottom: 1.2rem; }

/* ── Profile ───────────────────────────────────────────────── */
.profile-header {
  display: flex;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--red-dark), rgba(0,0,0,.5));
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.profile-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, var(--red-primary) 0%, transparent 60%);
  opacity: .1;
}
.profile-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 3px solid var(--red-primary);
  box-shadow: var(--glow);
  position: relative;
  z-index: 1;
}
.profile-info { flex: 1; position: relative; z-index: 1; }
.profile-info h1 { font-size: 2rem; margin-bottom: .3rem; }
.profile-info .title-tag {
  display: inline-block;
  padding: .2rem .7rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: .75rem;
  font-family: var(--font-mono);
  color: var(--red-glow);
  letter-spacing: .1em;
}

/* ── XP Bar ────────────────────────────────────────────────── */
.xp-bar {
  width: 100%;
  height: 8px;
  background: rgba(0,0,0,.5);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  margin-top: .5rem;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red-deep), var(--red-primary), var(--red-glow));
  box-shadow: 0 0 10px var(--red-glow);
  transition: width .5s ease;
  position: relative;
}
.xp-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  animation: xpShimmer 2s infinite;
}
@keyframes xpShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── Music player (special) ────────────────────────────────── */
.music-player {
  background: linear-gradient(135deg, rgba(220,20,60,.08), rgba(0,0,0,.6));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.music-disc {
  width: 200px; height: 200px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--red-primary) 0%, var(--red-dark) 30%, #111 70%);
  border: 3px solid var(--red-primary);
  position: relative;
  animation: spin 8s linear infinite;
  animation-play-state: paused;
}
.music-disc.playing { animation-play-state: running; }
.music-disc::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 30px; height: 30px;
  background: var(--black);
  border-radius: 50%;
  border: 2px solid var(--red-glow);
}
.music-disc::after {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px dashed rgba(220,20,60,.3);
}
@keyframes spin { to { transform: rotate(360deg); } }

.music-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
}
.music-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all .3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.music-btn:hover {
  background: var(--red-primary);
  border-color: var(--red-glow);
  box-shadow: var(--glow);
  transform: scale(1.1);
}
.music-btn.play {
  width: 64px; height: 64px;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--red-primary), var(--red-glow));
  border-color: var(--red-glow);
  box-shadow: var(--glow);
}

.eq-bars {
  display: flex;
  gap: 3px;
  justify-content: center;
  align-items: flex-end;
  height: 40px;
  margin-top: 1rem;
}
.eq-bars span {
  width: 4px;
  background: var(--red-glow);
  border-radius: 2px;
  animation: eqBar 1s ease-in-out infinite;
}
.eq-bars span:nth-child(1) { animation-delay: 0s; height: 20%; }
.eq-bars span:nth-child(2) { animation-delay: .1s; height: 50%; }
.eq-bars span:nth-child(3) { animation-delay: .2s; height: 80%; }
.eq-bars span:nth-child(4) { animation-delay: .3s; height: 40%; }
.eq-bars span:nth-child(5) { animation-delay: .4s; height: 90%; }
.eq-bars span:nth-child(6) { animation-delay: .5s; height: 60%; }
.eq-bars span:nth-child(7) { animation-delay: .6s; height: 30%; }
.music-player.paused .eq-bars span { animation-play-state: paused; height: 10%; }

@keyframes eqBar {
  0%, 100% { height: 20%; }
  50% { height: 90%; }
}

.music-progress {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,.5);
  border-radius: 3px;
  margin-top: 1rem;
  cursor: pointer;
  overflow: hidden;
}
.music-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red-primary), var(--red-glow));
  border-radius: 3px;
  width: 30%;
  transition: width .1s;
}

/* ── Lab click game ────────────────────────────────────────── */
.lab-container {
  text-align: center;
  padding: 2rem;
}
.dna-orb {
  width: 180px; height: 180px;
  margin: 0 auto 2rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--red-primary), var(--red-deep) 60%, transparent 80%);
  box-shadow: 0 0 60px var(--red-primary), inset 0 0 40px rgba(0,0,0,.5);
  cursor: pointer;
  position: relative;
  transition: transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  user-select: none;
}
.dna-orb:hover { transform: scale(1.05); }
.dna-orb:active { transform: scale(0.95); }
.dna-orb::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 2px solid var(--red-glow);
  opacity: .3;
  animation: orbit 3s linear infinite;
}
.dna-orb::after {
  content: '';
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  border: 1px dashed var(--red-primary);
  opacity: .2;
  animation: orbit 5s linear infinite reverse;
}
@keyframes orbit { to { transform: rotate(360deg); } }

/* ── Tables ────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: .7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}
th {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--red-glow);
  text-transform: uppercase;
  background: rgba(0,0,0,.3);
}
td { font-size: .9rem; }
tr:hover td { background: var(--glass); }

/* ── Tech text ─────────────────────────────────────────────── */
.tech { font-family: var(--font-mono); font-size: .8rem; color: var(--gray); letter-spacing: .05em; }

/* ── Pending page ──────────────────────────────────────────── */
.pending-wrap {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}
.loading-spinner {
  width: 60px; height: 60px;
  margin: 0 auto 2rem;
  border: 3px solid var(--glass-border);
  border-top-color: var(--red-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ── Error page ────────────────────────────────────────────── */
.error-wrap {
  text-align: center;
  padding: 6rem 2rem;
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  color: var(--red-primary);
  text-shadow: var(--glow);
  line-height: 1;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  margin-top: 4rem;
  padding: 3rem 2rem 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.8));
  border-top: 1px solid var(--glass-border);
  position: relative;
}
.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer h4 {
  font-size: .8rem;
  color: var(--red-glow);
  margin-bottom: 1rem;
}
.footer a {
  display: block;
  color: var(--gray);
  font-size: .85rem;
  margin-bottom: .3rem;
}
.footer a:hover { color: var(--red-glow); text-shadow: 0 0 8px var(--red-glow); transform: translateX(4px); }
.footer p { color: var(--gray); font-size: .85rem; }
.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .75rem;
  color: var(--gray);
  font-family: var(--font-mono);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .content { padding: 1rem; }
  .profile-header { flex-direction: column; text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .logo-text small { display: none; }
  .user-chip span { display: none; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── Badge de notification dans la nav ─────────────────────── */
.nav-badge {
  background: var(--red-primary);
  color: #fff;
  font-size: .55rem;
  font-weight: 900;
  font-family: var(--font-display);
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 2px;
  box-shadow: 0 0 8px rgba(220, 20, 60, .8);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
