/* ═══════════════════════════════════════════════════════════════════
   STUDENT CENTER 2.0 — IMMERSIVE PILOT'S VIEW
   perspective: 1200px | preserve-3d | parallax | glassmorphism
   ═══════════════════════════════════════════════════════════════════ */

/* ── Student List ──────────────────────────────────────────────── */
.sc-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 18px;
  padding: 24px;
}
.sc-student-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 22px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  overflow: hidden;
}
.sc-student-card:hover {
  transform: translateY(-8px) scale(1.04);
  border-color: rgba(123,160,91,0.5);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 30px rgba(123,160,91,0.2);
}
.sc-card-avatar { font-size: 2.8rem; margin-bottom: 8px; display: block; }
.sc-card-name   { font-weight: 800; font-size: 0.88rem; color: #e2e8f0; margin-bottom: 4px; }
.sc-card-tokens { font-size: 0.95rem; letter-spacing: 2px; min-height: 20px; }
.sc-card-score  { font-size: 0.82rem; letter-spacing: 1px; margin-top: 5px; }
.sc-card-class  { margin-top: 3px; color: #64748b; font-size: 0.74rem; }

/* Aura glow per personality */
.sc-aura-blue   { box-shadow: 0 0 28px rgba(0,86,179,0.3); }
.sc-aura-green  { box-shadow: 0 0 28px rgba(60,125,30,0.35); }
.sc-aura-red    { box-shadow: 0 0 28px rgba(185,29,29,0.35); }
.sc-aura-yellow { box-shadow: 0 0 28px rgba(201,150,0,0.35); }
.sc-aura-purple { box-shadow: 0 0 28px rgba(111,66,193,0.4); }

/* ── THE IMMERSIVE COCKPIT ─────────────────────────────────────── */
.sc-pilot-screen {
  position: relative;
  width: 100%;
  height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* 3D SPACE */
  perspective: 1200px;
  perspective-origin: 50% 48%;

  /* Deep space gradient */
  background: radial-gradient(ellipse at 50% 35%, #0e2247 0%, #050c1a 65%, #02060f 100%);
  transition: background 1.4s ease;
}

/* Weather backgrounds */
.sc-pilot-screen[data-weather="clear"] {
  background: radial-gradient(ellipse at 50% 30%, #0d3060 0%, #050d20 60%, #020612 100%);
}
.sc-pilot-screen[data-weather="cloudy"] {
  background: radial-gradient(ellipse at 50% 40%, #1a1f40 0%, #08091c 70%);
}
.sc-pilot-screen[data-weather="storm"] {
  background: radial-gradient(ellipse at 50% 45%, #1a0a28 0%, #050108 80%);
  animation: sc-storm-flicker 3.5s ease-in-out infinite;
}
@keyframes sc-storm-flicker {
  0%,100%  { filter: brightness(1); }
  30%,70%  { filter: brightness(1.06) hue-rotate(5deg); }
  50%      { filter: brightness(0.96); }
}

/* ── Social Web SVG ────────────────────────────────────────────── */
.sc-social-web-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
  z-index: 1;
}

/* ── Ambient particles ─────────────────────────────────────────── */
.sc-weather-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.sc-particle {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  animation: sc-pdrift 8s linear infinite;
}
.sc-particle:nth-child(1) { left:8%;  animation-duration:7s;  animation-delay:0s;   }
.sc-particle:nth-child(2) { left:22%; animation-duration:10s; animation-delay:1.3s; }
.sc-particle:nth-child(3) { left:41%; animation-duration:6s;  animation-delay:2.1s; }
.sc-particle:nth-child(4) { left:60%; animation-duration:9s;  animation-delay:0.7s; }
.sc-particle:nth-child(5) { left:77%; animation-duration:11s; animation-delay:3s;   }
.sc-particle:nth-child(6) { left:91%; animation-duration:8s;  animation-delay:1.8s; }
@keyframes sc-pdrift {
  0%   { top:-5px; opacity:0; }
  10%  { opacity:1; }
  90%  { opacity:0.5; }
  100% { top:105vh; opacity:0; }
}

/* ── Top Bar ───────────────────────────────────────────────────── */
.sc-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(5,10,25,0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  z-index: 50;
}
.sc-back-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s;
}
.sc-back-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.sc-nav-students { display: flex; align-items: center; gap: 12px; }
.sc-topbar-name {
  color: #e2e8f0;
  font-weight: 900;
  font-size: 1.1rem;
  min-width: 160px;
  text-align: center;
  letter-spacing: 0.5px;
}
.sc-nav-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: #64748b;
  width: 30px; height: 30px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.78rem;
}
.sc-nav-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.sc-sos-btn {
  background: linear-gradient(135deg, #dc2626, #7f1d1d);
  border: 1px solid rgba(220,38,38,0.6);
  color: #fff;
  padding: 7px 18px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.86rem;
  box-shadow: 0 0 18px rgba(220,38,38,0.5);
  animation: sc-sos-glow 2s ease-in-out infinite;
  transition: transform 0.15s;
}
.sc-sos-btn:hover { transform: scale(1.06); }
.sc-sos-btn:disabled { opacity: 0.6; animation: none; }
@keyframes sc-sos-glow {
  0%,100% { box-shadow: 0 0 12px rgba(220,38,38,0.4); }
  50%      { box-shadow: 0 0 32px rgba(220,38,38,0.85); }
}

/* ══════════════════════════════════════════════════════════════════
   THE 3D COCKPIT STAGE (preserve-3d container)
   ══════════════════════════════════════════════════════════════════ */
.sc-cockpit-stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  margin-top: 48px; /* offset topbar */
}

/* ── HERO CENTER ───────────────────────────────────────────────── */
.sc-hero-wrap {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 20;
  transform-style: preserve-3d;
  /* Sits closest to viewer */
  transform: translateZ(60px);
  transition: transform 0.12s ease-out;
}

/* Multi-ring aura */
.sc-aura-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: sc-aura-breathe 3.5s ease-in-out infinite;
}
.sc-aura-ring-1 {
  width: 160px; height: 160px;
  border: 2px solid rgba(123,160,91,0.45);
  box-shadow: 0 0 30px rgba(123,160,91,0.25), inset 0 0 20px rgba(123,160,91,0.1);
}
.sc-aura-ring-2 {
  width: 210px; height: 210px;
  border: 1px solid rgba(123,160,91,0.2);
  animation-delay: 0.8s;
  animation-duration: 4.5s;
}
.sc-aura-ring-3 {
  width: 265px; height: 265px;
  border: 1px solid rgba(123,160,91,0.1);
  animation-delay: 1.6s;
  animation-duration: 5.5s;
}
@keyframes sc-aura-breathe {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.06); opacity: 0.7; }
}
/* Personality ring colors */
.sc-ring-blue   { border-color: rgba(0,86,179,0.55) !important; box-shadow: 0 0 40px rgba(0,86,179,0.35) !important; }
.sc-ring-green  { border-color: rgba(60,125,30,0.55) !important; box-shadow: 0 0 40px rgba(60,125,30,0.35) !important; }
.sc-ring-red    { border-color: rgba(185,29,29,0.6) !important; box-shadow: 0 0 40px rgba(185,29,29,0.4) !important; }
.sc-ring-yellow { border-color: rgba(201,150,0,0.6) !important; box-shadow: 0 0 40px rgba(201,150,0,0.3) !important; }
.sc-ring-purple { border-color: rgba(111,66,193,0.6) !important; box-shadow: 0 0 40px rgba(111,66,193,0.4) !important; }

.sc-hero-avatar {
  font-size: 5.5rem;
  width: 130px; height: 130px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(15,25,55,0.7);
  backdrop-filter: blur(10px);
  border: 2.5px solid rgba(255,255,255,0.14);
  position: relative;
  z-index: 5;
  transform: translateZ(20px);
  transition: all 0.3s;
}
/* Hero aura glow variants */
.sc-hero-avatar.sc-aura-blue   { box-shadow: 0 0 60px rgba(0,86,179,0.6), 0 0 120px rgba(0,86,179,0.2); }
.sc-hero-avatar.sc-aura-green  { box-shadow: 0 0 60px rgba(60,125,30,0.6), 0 0 120px rgba(60,125,30,0.2); }
.sc-hero-avatar.sc-aura-red    { box-shadow: 0 0 60px rgba(185,29,29,0.65),0 0 120px rgba(185,29,29,0.25); }
.sc-hero-avatar.sc-aura-yellow { box-shadow: 0 0 60px rgba(201,150,0,0.6), 0 0 120px rgba(201,150,0,0.2); }
.sc-hero-avatar.sc-aura-purple { box-shadow: 0 0 60px rgba(111,66,193,0.6),0 0 120px rgba(111,66,193,0.25); }

.sc-hero-class {
  color: rgba(148,163,184,0.7);
  font-size: 0.75rem;
  margin-top: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ── Orbital Tokens (3D rings) ─────────────────────────────────── */
.sc-orbit-container {
  position: absolute;
  width: 240px; height: 240px;
  transform-style: preserve-3d;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.sc-orbit-token {
  position: absolute;
  font-size: 1.5rem;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  top: 50%; left: 50%;
  margin: -20px 0 0 -20px;
  animation: sc-orbit3d calc(5s + var(--orbit-i,0) * 1.3s) linear infinite;
  transform-style: preserve-3d;
  box-shadow: 0 0 12px rgba(255,255,255,0.1);
}
@keyframes sc-orbit3d {
  0%   { transform: rotateY(calc(var(--orbit-start, 0deg))) translateX(105px) rotateY(0deg); }
  100% { transform: rotateY(calc(var(--orbit-start, 0deg) + 360deg)) translateX(105px) rotateY(-360deg); }
}

/* ══════════════════════════════════════════════════════════════════
   3D GAUGES — curved, tilted, glassmorphic
   ══════════════════════════════════════════════════════════════════ */
.sc-gauges {
  position: absolute;
  top: 50%;
  transform: translateY(-55%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 15;
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out;
}
.sc-gauges-right {
  right: 28px;
  transform: translateY(-55%) translateZ(30px) rotateY(-22deg);
}
.sc-gauges-left {
  left: 28px;
  transform: translateY(-55%) translateZ(30px) rotateY(22deg);
}

.sc-gauge-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 14px 16px;
  min-width: 148px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: box-shadow 0.3s;
}
.sc-gauge-card:hover {
  box-shadow: 0 12px 48px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.12), 0 0 20px rgba(123,160,91,0.15);
}
.sc-gauge-label {
  font-size: 0.68rem;
  color: rgba(148,163,184,0.75);
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.sc-gauge {
  position: relative;
  width: 110px;
  height: 68px;
  margin: 0 auto;
}
.sc-gauge-arc {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 55px;
  border: 3px solid rgba(255,255,255,0.08);
  border-bottom: none;
  border-radius: 55px 55px 0 0;
}
.sc-gauge-arc::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 30px;
  border-radius: 30px 30px 0 0;
  background: rgba(0,0,0,0.35);
}
.sc-gauge-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  margin-left: -2.5px;
  width: 0; height: 0;
  border-left: 2.5px solid transparent;
  border-right: 2.5px solid transparent;
  border-top: 48px solid #22c55e;
  transform-origin: bottom center;
  transform: rotate(-130deg);
  transition: transform 1.4s cubic-bezier(.34,1.56,.64,1),
              border-top-color 0.8s ease;
  filter: drop-shadow(0 0 6px currentColor);
}
.sc-gauge-value {
  position: absolute;
  bottom: 4px;
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 900;
  color: white;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
.sc-gauge-title {
  font-size: 0.62rem;
  color: rgba(71,85,105,0.8);
  margin-top: 5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* ── Neumorphic Indicator Lights ───────────────────────────────── */
.sc-indicator-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 2px;
}
.sc-indicator-light {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 5px;
  border-radius: 10px;
  cursor: default;
  /* Neumorphism base */
  background: rgba(10,20,45,0.6);
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5), -1px -1px 4px rgba(255,255,255,0.04);
}
.sc-light-ok {
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5), -1px -1px 3px rgba(34,197,94,0.08),
              inset 0 0 8px rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
}
.sc-light-warn {
  border: 1px solid rgba(245,158,11,0.4);
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5), inset 0 0 8px rgba(245,158,11,0.15);
  animation: sc-blink-warn 2.2s ease-in-out infinite;
}
.sc-light-err {
  border: 1px solid rgba(239,68,68,0.5);
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5), inset 0 0 12px rgba(239,68,68,0.2);
  animation: sc-blink-err 1s ease-in-out infinite;
}
@keyframes sc-blink-warn {
  0%,100% { box-shadow: 2px 2px 6px rgba(0,0,0,0.5), inset 0 0 8px rgba(245,158,11,0.15); }
  50%      { box-shadow: 2px 2px 6px rgba(0,0,0,0.5), inset 0 0 18px rgba(245,158,11,0.4), 0 0 12px rgba(245,158,11,0.3); }
}
@keyframes sc-blink-err {
  0%,100% { box-shadow: 2px 2px 6px rgba(0,0,0,0.5), inset 0 0 12px rgba(239,68,68,0.2); }
  50%      { box-shadow: 2px 2px 6px rgba(0,0,0,0.5), inset 0 0 22px rgba(239,68,68,0.5), 0 0 16px rgba(239,68,68,0.4); }
}
.sc-light-icon  { font-size: 1rem; }
.sc-light-label { font-size: 0.55rem; color: rgba(148,163,184,0.7); font-weight: 700; letter-spacing: 0.3px; }

/* ══════════════════════════════════════════════════════════════════
   SVG PERSPECTIVE ROAD
   ══════════════════════════════════════════════════════════════════ */
.sc-road-wrap {
  position: absolute;
  bottom: 48px;
  left: 0; right: 0;
  height: 220px;
  z-index: 12;
  pointer-events: none;
}
.sc-road-svg {
  width: 100%;
  height: 100%;
}
/* Waypoint overlays on the road */
.sc-waypoints-overlay {
  position: absolute;
  bottom: 48px;
  left: 0; right: 0;
  height: 180px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  z-index: 14;
  padding-bottom: 12px;
  pointer-events: all;
}
.sc-waypoint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(.34,1.56,.64,1);
  opacity: 0.42;
  transform: scale(calc(0.72 + var(--wp-i, 0) * 0.065));
}
.sc-waypoint.sc-wp-done { opacity: 1; }
.sc-waypoint:hover { transform: scale(calc(0.72 + var(--wp-i, 0) * 0.065)) translateY(-6px); opacity: 1; }
.sc-wp-icon  { font-size: 1.3rem; filter: drop-shadow(0 0 6px rgba(123,160,91,0.7)); }
.sc-wp-label { font-size: 0.55rem; color: rgba(148,163,184,0.7); font-weight: 700; white-space: nowrap; text-align: center; }
.sc-waypoint.sc-wp-done .sc-wp-icon { filter: drop-shadow(0 0 10px rgba(123,160,91,0.9)) drop-shadow(0 0 3px gold); }

/* Road hazard block */
.sc-road-block {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  animation: sc-hazard-flash 0.8s ease-in-out infinite;
  z-index: 16;
}
@keyframes sc-hazard-flash { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── AI Co-Pilot Ticker ────────────────────────────────────────── */
.sc-ticker-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: rgba(2,6,15,0.75);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  overflow: hidden;
  z-index: 50;
}
.sc-ticker-label {
  font-size: 0.68rem;
  font-weight: 900;
  color: #7ba05b;
  letter-spacing: 1.2px;
  white-space: nowrap;
  padding: 3px 8px;
  border: 1px solid rgba(123,160,91,0.35);
  border-radius: 5px;
  background: rgba(123,160,91,0.08);
}
.sc-ticker-scroll {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
#sc-ticker-text {
  white-space: nowrap;
  font-size: 0.8rem;
  color: rgba(226,232,240,0.82);
  display: inline-block;
  will-change: transform;
  transition: none;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sc-gauges-right { right: 8px; transform: translateY(-55%) translateZ(10px) rotateY(-14deg); }
  .sc-gauges-left  { left: 8px;  transform: translateY(-55%) translateZ(10px) rotateY(14deg); }
  .sc-gauge-card   { min-width: 118px; }
}
@media (max-width: 680px) {
  .sc-gauges { display: none; }
  .sc-hero-avatar { font-size: 3.8rem; width: 100px; height: 100px; }
  .sc-student-grid { grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 10px; padding: 12px; }
}
