/* ================================================================
   ML-UNIVERSE.CSS — The Complete ML/DL/AI Visual Universe
   Synapse · Product of Synaptix Technologies · Built by Gurnoor Singh
   ================================================================ */

/* ══════════════════════════════════════════════════════════
   SECTION BACKGROUNDS
   ══════════════════════════════════════════════════════════ */
#s1 { background: radial-gradient(ellipse at 30% 50%, rgba(139, 92, 246, 0.07) 0%, transparent 70%); }
#s2 { background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.07) 0%, transparent 70%); }
#s3 { background: radial-gradient(ellipse at 20% 50%, rgba(0, 200, 255, 0.05) 0%, transparent 60%); }
#s4 { background: radial-gradient(ellipse at 70% 40%, rgba(139, 92, 246, 0.07) 0%, transparent 60%); }
#s5 { background: radial-gradient(ellipse at 80% 20%, rgba(0, 200, 255, 0.06) 0%, transparent 60%); }
#s6 { background: #02040a; }
#s7 { padding: 110px 60px; }
#s8 { background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.05) 0%, transparent 70%); }


/* ══════════════════════════════════════════════════════════
   APPS GRID (Section 1 — What Is AI)
   ══════════════════════════════════════════════════════════ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: floatCard 4s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.app-card:hover::before {
  opacity: 1;
}

/* ── App-Card Specific Brand Color Hover Overrides (Sleek Minimalist Transitions) ── */
.app-card[data-popup="youtube"]:hover { border-color: rgba(255, 0, 0, 0.35); }
.app-card[data-popup="youtube"]::before {
  background: radial-gradient(circle at 50% 0%, rgba(255, 0, 0, 0.08), transparent 70%);
}

.app-card[data-popup="netflix"]:hover { border-color: rgba(229, 9, 20, 0.35); }
.app-card[data-popup="netflix"]::before {
  background: radial-gradient(circle at 50% 0%, rgba(229, 9, 20, 0.08), transparent 70%);
}

.app-card[data-popup="maps"]:hover { border-color: rgba(66, 133, 244, 0.35); }
.app-card[data-popup="maps"]::before {
  background: radial-gradient(circle at 50% 0%, rgba(66, 133, 244, 0.08), transparent 70%);
}

.app-card[data-popup="instagram"]:hover { border-color: rgba(225, 48, 108, 0.35); }
.app-card[data-popup="instagram"]::before {
  background: radial-gradient(circle at 50% 0%, rgba(225, 48, 108, 0.08), transparent 70%);
}

.app-card[data-popup="alexa"]:hover { border-color: rgba(0, 168, 225, 0.35); }
.app-card[data-popup="alexa"]::before {
  background: radial-gradient(circle at 50% 0%, rgba(0, 168, 225, 0.08), transparent 70%);
}

.app-card[data-popup="faceunlock"]:hover { border-color: rgba(0, 255, 204, 0.35); }
.app-card[data-popup="faceunlock"]::before {
  background: radial-gradient(circle at 50% 0%, rgba(0, 255, 204, 0.08), transparent 70%);
}

.app-card[data-popup="spotify"]:hover { border-color: rgba(29, 185, 84, 0.35); }
.app-card[data-popup="spotify"]::before {
  background: radial-gradient(circle at 50% 0%, rgba(29, 185, 84, 0.08), transparent 70%);
}

.app-card[data-popup="snapchat"]:hover { border-color: rgba(255, 252, 0, 0.35); }
.app-card[data-popup="snapchat"]::before {
  background: radial-gradient(circle at 50% 0%, rgba(255, 252, 0, 0.08), transparent 70%);
}

.app-card[data-popup="chatgpt"]:hover { border-color: rgba(16, 163, 127, 0.35); }
.app-card[data-popup="chatgpt"]::before {
  background: radial-gradient(circle at 50% 0%, rgba(16, 163, 127, 0.08), transparent 70%);
}

.app-icon {
  font-size: 38px;
  margin-bottom: 10px;
  display: block;
}

.app-name {
  font-family: var(--fd);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--dim);
}

.app-tag {
  font-size: 9px;
  color: var(--purple);
  margin-top: 5px;
  font-family: var(--fd);
  letter-spacing: 1px;
}

/* Float animation stagger delays */
.app-card:nth-child(2) { animation-delay: 0.3s; }
.app-card:nth-child(3) { animation-delay: 0.6s; }
.app-card:nth-child(4) { animation-delay: 0.9s; }
.app-card:nth-child(5) { animation-delay: 1.2s; }
.app-card:nth-child(6) { animation-delay: 1.5s; }
.app-card:nth-child(7) { animation-delay: 1.8s; }
.app-card:nth-child(8) { animation-delay: 0.4s; }
.app-card:nth-child(9) { animation-delay: 0.7s; }


/* ══════════════════════════════════════════════════════════
   POPUP (AI App Detail)
   ══════════════════════════════════════════════════════════ */
.popup-bg {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(2, 4, 8, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
}

.popup-bg.open {
  display: flex;
}

.popup-box {
  background: rgba(6, 12, 20, 0.97);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 26px;
  padding: 44px;
  max-width: 540px;
  width: 92%;
  position: relative;
  box-shadow: var(--gp);
  animation: popIn 0.4s var(--ease-spring) both;
}

.popup-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  font-size: 16px;
  transition: all 0.2s var(--ease-smooth);
}

.popup-close:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: var(--red);
  color: var(--red);
  transform: rotate(90deg);
}

.popup-icon {
  font-size: 52px;
  margin-bottom: 18px;
}

.popup-title {
  font-family: var(--fd);
  font-size: 20px;
  margin-bottom: 6px;
  color: var(--blue);
}

.popup-type {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--purple);
  margin-bottom: 14px;
}

.popup-desc {
  color: var(--dim);
  line-height: 1.8;
  font-size: 14px;
}

.popup-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.ptag {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 10px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--purple);
  font-family: var(--fd);
  letter-spacing: 1px;
}

/* ══════════════════════════════════════════════════════════
   VENN DIAGRAM (Section 2 — AI vs ML vs DL)
   ══════════════════════════════════════════════════════════ */
.venn-outer {
  width: 440px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto 70px;
  position: relative;
}

.venn-ai {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding-top: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.5s var(--ease-smooth), border-color 0.5s, box-shadow 0.5s;
}

.venn-ai:hover {
  transform: scale(1.015);
  border-color: rgba(14, 165, 233, 0.55);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.venn-ml {
  position: absolute;
  width: 300px;
  height: 300px;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding-top: 30px;
  transition: transform 0.5s var(--ease-smooth), border-color 0.5s;
}

.venn-ml:hover {
  transform: translateX(-50%) scale(1.02);
  border-color: rgba(99, 102, 241, 0.65);
}

.venn-dl {
  position: absolute;
  width: 178px;
  height: 178px;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(217, 70, 239, 0.4);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.5s var(--ease-smooth), border-color 0.5s;
}

.venn-dl:hover {
  transform: translateX(-50%) scale(1.03);
  border-color: rgba(217, 70, 239, 0.75);
}

.venn-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.95);
  pointer-events: none;
  margin-bottom: 5px;
}

.venn-desc {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-family: var(--font-body);
  pointer-events: none;
  width: 72%;
  margin: 0 auto;
}

.venn-ml .venn-label {
  font-size: 10px;
  letter-spacing: 2px;
}

.venn-ml .venn-desc {
  font-size: 9.5px;
  width: 74%;
}

.venn-dl .venn-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  color: #ffffff;
  margin-bottom: 4px;
}

.venn-dl .venn-desc {
  font-size: 9.5px;
  width: 82%;
}


/* ══════════════════════════════════════════════════════════
   H-CARDS (AI / ML / DL comparison)
   ══════════════════════════════════════════════════════════ */
.h-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 60px;
}

.h-card {
  padding: 28px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s;
}

.h-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.18);
}

.h-card-ai {
  background: rgba(0, 200, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.h-card-ai:hover {
  background: rgba(14, 165, 233, 0.06);
  border-color: rgba(14, 165, 233, 0.25);
}

.h-card-ml {
  background: rgba(139, 92, 246, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.h-card-ml:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.25);
}

.h-card-dl {
  background: rgba(232, 121, 249, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.h-card-dl:hover {
  background: rgba(217, 70, 239, 0.06);
  border-color: rgba(217, 70, 239, 0.25);
}

.h-num {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 3px;
  margin-bottom: 8px;
  opacity: 0.6;
}

.h-title {
  font-family: var(--fd);
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 10px;
}

.h-card-ai .h-title { color: var(--blue); }
.h-card-ml .h-title { color: var(--purple); }
.h-card-dl .h-title { color: var(--magenta); }

.h-desc {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.h-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.h-chip {
  padding: 3px 11px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-family: var(--fd);
  letter-spacing: 1px;
}

.chip-blue {
  background: rgba(0, 200, 255, 0.1);
  border: 1px solid rgba(0, 200, 255, 0.3);
  color: var(--blue);
}

.chip-purple {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--purple);
}

.chip-magenta {
  background: rgba(232, 121, 249, 0.1);
  border: 1px solid rgba(232, 121, 249, 0.3);
  color: var(--magenta);
}


/* ══════════════════════════════════════════════════════════
   DRAG GAME
   ══════════════════════════════════════════════════════════ */
.drag-game-title {
  font-family: var(--fd);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--purple);
  text-align: center;
  margin-bottom: 20px;
}

.drag-cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.drag-card {
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: grab;
  font-size: 13px;
  font-family: var(--fb);
  transition: all 0.2s var(--ease-smooth);
  user-select: none;
}

.drag-card:hover {
  transform: scale(1.05);
  border-color: var(--blue);
  box-shadow: var(--gb);
}

.drag-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.drop-zones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.drop-zone {
  border: 2px dashed rgba(139, 92, 246, 0.35);
  border-radius: 16px;
  padding: 18px;
  min-height: 120px;
  transition: all 0.25s var(--ease-smooth);
  background: rgba(139, 92, 246, 0.03);
}

.drop-zone.over {
  border-color: var(--blue);
  background: rgba(0, 200, 255, 0.06);
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.15);
}

.drop-zone-title {
  font-family: var(--fd);
  font-size: 10px;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.dropped-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding-top: 6px;
}

.dropped-item {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  animation: popIn 0.3s ease both;
}

.correct-item {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid var(--green);
  color: var(--green);
}

.wrong-item {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--red);
  color: var(--red);
}


/* ══════════════════════════════════════════════════════════
   CLASSIFICATION & REGRESSION (Inline Sim)
   ══════════════════════════════════════════════════════════ */
.sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 40px;
}

.sim-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
}

.sim-title {
  font-family: var(--fd);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 6px;
}

.sim-sub {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 18px;
}

.classify-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.c-img {
  font-size: 28px;
  cursor: grab;
  padding: 8px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: all 0.2s var(--ease-smooth);
  user-select: none;
}

.c-img:hover {
  transform: scale(1.1);
  border-color: var(--purple);
}

.c-zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.c-zone {
  border: 2px dashed rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 14px;
  min-height: 80px;
  transition: all 0.2s var(--ease-smooth);
  text-align: center;
}

.c-zone.over {
  border-color: var(--blue);
  background: rgba(0, 200, 255, 0.05);
}

.c-zone-label {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--dim);
  margin-bottom: 8px;
}

.c-zone-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.reg-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.reg-slider-label {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--dim);
  width: 80px;
  flex-shrink: 0;
}

.reg-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--orange);
}

.reg-val {
  font-family: var(--fd);
  font-size: 11px;
  color: var(--orange);
  width: 50px;
  text-align: right;
}

.reg-result {
  margin-top: 16px;
  padding: 16px;
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.25);
  border-radius: 12px;
  text-align: center;
}

.reg-result-label {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 4px;
}

.reg-result-val {
  font-family: var(--fd);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
}


/* ══════════════════════════════════════════════════════════
   SPLIT PANELS (Section 3 — Traditional vs ML)
   ══════════════════════════════════════════════════════════ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 10px;
}

.split-panel {
  border-radius: var(--radius-lg);
  padding: 36px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-smooth);
}

.split-panel:hover {
  transform: translateY(-3px);
}

.split-trad {
  background: rgba(251, 146, 60, 0.05);
  border: 1px solid rgba(251, 146, 60, 0.25);
}

.split-ml {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.split-head {
  font-family: var(--fd);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.split-trad .split-head { color: var(--orange); }
.split-ml .split-head { color: var(--purple); }

.code-block {
  background: #0a0f1a;
  border-radius: 12px;
  padding: 18px;
  font-family: var(--fm);
  font-size: 12px;
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.15);
  margin-bottom: 16px;
  line-height: 1.8;
  overflow-x: auto;
}

.flow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.flow-box {
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--fd);
  font-size: 10px;
  letter-spacing: 1px;
  text-align: center;
}

.fb-orange {
  background: rgba(251, 146, 60, 0.15);
  border: 1px solid rgba(251, 146, 60, 0.3);
  color: var(--orange);
}

.fb-purple {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--purple);
}

.fb-blue {
  background: rgba(0, 200, 255, 0.1);
  border: 1px solid rgba(0, 200, 255, 0.3);
  color: var(--blue);
}

.flow-arrow {
  color: var(--dim);
  font-size: 16px;
}


/* ── Paradigm Slider ── */
.paradigm-wrap {
  margin-top: 36px;
}

.paradigm-label {
  font-family: var(--fd);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--dim);
  text-align: center;
  margin-bottom: 10px;
}

#paradigm-slider {
  width: 100%;
  accent-color: var(--purple);
  cursor: pointer;
}

.paradigm-ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--fd);
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 1px;
  margin-top: 6px;
}


/* ══════════════════════════════════════════════════════════
   LLM STATS (Section 4)
   ══════════════════════════════════════════════════════════ */
.llm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.llm-stat {
  padding: 26px;
  border-radius: 18px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s;
}

.llm-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.1);
}

.llm-stat-num {
  font-family: var(--fd);
  font-size: 28px;
  font-weight: 900;
  color: var(--blue);
  display: block;
  margin-bottom: 6px;
}

.llm-stat-label {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--dim);
}


/* ── Token Game ── */
.token-game {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 36px;
}

.token-game-title {
  font-family: var(--fd);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--blue);
  margin-bottom: 20px;
  text-align: center;
}

.token-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.t-chip {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.25s var(--ease-smooth);
}

.t-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
}

.token-stream {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  align-items: center;
}

.t-bubble {
  padding: 5px 13px;
  border-radius: var(--radius-full);
  font-family: var(--fm);
  font-size: 13px;
  opacity: 0;
  transform: scale(0.5) translateY(8px);
  animation: bubblePop 0.4s var(--d, 0s) forwards;
}

.t-user {
  background: rgba(0, 200, 255, 0.12);
  border: 1px solid rgba(0, 200, 255, 0.35);
  color: var(--blue);
}

.t-ai {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--purple);
}


/* ── Playground ── */
.playground {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.playground-title {
  font-family: var(--fd);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--purple);
  margin-bottom: 18px;
  text-align: center;
}

.pg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
}

.pg-chip {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.25s var(--ease-smooth);
}

.pg-chip:hover {
  border-color: var(--purple);
  color: var(--purple);
  transform: translateY(-2px);
}

.pg-input-wrap {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.pg-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 18px;
  color: var(--text);
  font-family: var(--fb);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s var(--ease-smooth), box-shadow 0.3s;
}

.pg-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.15);
}

.pg-output {
  min-height: 80px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
}

.pg-typing::after {
  content: '▋';
  animation: blink 0.7s infinite;
}


/* ══════════════════════════════════════════════════════════
   ML BRANCHES (Section 7 — ML Universe)
   ══════════════════════════════════════════════════════════ */
#ml-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.ml-universe-header {
  text-align: center;
  margin-bottom: 72px;
  position: relative;
  z-index: 2;
}

.ml-branches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  position: relative;
  z-index: 2;
}

.ml-branch {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease-smooth), border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.ml-branch:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.ml-supervised {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(251, 146, 60, 0.02);
}

.ml-supervised:hover {
  background: rgba(251, 146, 60, 0.05);
  border-color: rgba(251, 146, 60, 0.25);
}

.ml-unsupervised {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(232, 121, 249, 0.02);
}

.ml-unsupervised:hover {
  background: rgba(232, 121, 249, 0.05);
  border-color: rgba(232, 121, 249, 0.25);
}

.ml-reinforcement {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 200, 255, 0.02);
}

.ml-reinforcement:hover {
  background: rgba(0, 200, 255, 0.05);
  border-color: rgba(0, 200, 255, 0.25);
}

.ml-branch-head {
  padding: 26px 26px 20px;
}

.ml-branch-dot {
  font-size: 28px;
  margin-bottom: 10px;
}

.ml-branch-title {
  font-family: var(--fd);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ml-supervised .ml-branch-title { color: var(--orange); }
.ml-unsupervised .ml-branch-title { color: var(--magenta); }
.ml-reinforcement .ml-branch-title { color: var(--blue); }

.ml-branch-desc {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.ml-branch-body {
  padding: 0 26px 26px;
}

.ml-label {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--dim);
  margin-bottom: 10px;
}


/* ── Cluster Canvas (Unsupervised) ── */
#cluster-canvas {
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(232, 121, 249, 0.2);
  display: block;
  width: 100%;
}


/* ── Maze Canvas (Reinforcement) ── */
#maze-canvas {
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 200, 255, 0.2);
  display: block;
  width: 100%;
}

.maze-controls {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.maze-btn {
  flex: 1;
  padding: 9px;
  border-radius: 9px;
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
}

.mb-start {
  background: rgba(0, 200, 255, 0.12);
  border: 1px solid rgba(0, 200, 255, 0.35);
  color: var(--blue);
}

.mb-start:hover {
  background: rgba(0, 200, 255, 0.25);
}

.mb-reset {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--red);
}

.mb-reset:hover {
  background: rgba(248, 113, 113, 0.2);
}

.maze-info {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--dim);
  text-align: center;
  margin-top: 7px;
}


/* ── ML Regression Sliders ── */
.ml-reg-sliders {
  margin-top: 4px;
}

.ml-reg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ml-reg-label {
  font-family: var(--fd);
  font-size: 9px;
  color: var(--dim);
  width: 75px;
  flex-shrink: 0;
  letter-spacing: 1px;
}

.ml-reg-row input {
  flex: 1;
  accent-color: var(--orange);
}

.ml-reg-val {
  font-family: var(--fd);
  font-size: 10px;
  color: var(--orange);
  width: 45px;
  text-align: right;
}

.ml-reg-result {
  margin-top: 12px;
  padding: 12px;
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.2);
  border-radius: 10px;
  text-align: center;
}

.ml-reg-result-label {
  font-family: var(--fd);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 3px;
}

.ml-reg-result-val {
  font-family: var(--fd);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}


/* ── ML Classify Mini ── */
.ml-classify-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ml-c-img {
  font-size: 22px;
  cursor: grab;
  padding: 6px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: all 0.2s var(--ease-smooth);
  user-select: none;
}

.ml-c-img:hover {
  transform: scale(1.1);
  border-color: var(--orange);
}

.ml-c-zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ml-c-zone {
  border: 2px dashed rgba(251, 146, 60, 0.3);
  border-radius: 10px;
  padding: 10px;
  min-height: 68px;
  transition: all 0.2s var(--ease-smooth);
  text-align: center;
}

.ml-c-zone.over {
  border-color: var(--orange);
  background: rgba(251, 146, 60, 0.05);
}

.ml-c-zone-label {
  font-family: var(--fd);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--dim);
  margin-bottom: 6px;
}

.ml-c-zone-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}


/* ══════════════════════════════════════════════════════════
   ENDING SECTION (Section 9)
   ══════════════════════════════════════════════════════════ */
#s9 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 60px;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  position: relative;
  overflow: hidden;
}

#ending-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ending-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.ending-title {
  font-family: var(--fd);
  font-size: clamp(24px, 3.5vw, 46px);
  font-weight: 900;
  line-height: 1.35;
  max-width: 780px;
  margin: 0 auto 28px;
}

.et1 {
  display: block;
  color: var(--text);
}

.et2 {
  display: block;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ending-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin-top: 60px;
  text-align: left;
}


/* ── Certificate ── */
.cert {
  padding: 44px;
  background: rgba(2, 4, 8, 0.85);
  border-radius: 22px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cert-label {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 4px;
  color: var(--purple);
  margin-bottom: 14px;
}

.cert-title {
  font-family: var(--fd);
  font-size: 22px;
  margin-bottom: 6px;
}

.cert-name {
  font-family: var(--fd);
  font-size: 32px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 12px;
}

.cert-desc {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.cert-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cert-badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--surface);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.cert-badge:hover {
  transform: scale(1.15);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.3);
}

.cert-xp {
  font-family: var(--fd);
  font-size: 11px;
  letter-spacing: 2px;
  color: #c4b5fd;
  margin-top: 16px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  display: inline-block;
}

.cert-sig {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
}

.cert-sig-name {
  font-family: var(--fd);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cert-sig-role {
  font-family: var(--fd);
  font-size: 8px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}


/* ── Leaderboard ── */
.leaderboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lb-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  font-family: var(--fd);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-row {
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background 0.3s;
}

.lb-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.lb-rank {
  font-family: var(--fd);
  font-size: 11px;
  color: var(--dim);
  width: 24px;
}

.lb-rank.gold { color: var(--gold); }
.lb-rank.silver { color: #94a3b8; }
.lb-rank.bronze { color: #b45309; }

.lb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 2px solid var(--border);
  background: var(--surface);
}

.lb-name {
  flex: 1;
  font-size: 13px;
}

.lb-xp {
  font-family: var(--fd);
  font-size: 13px;
  color: var(--gold);
  font-weight: 700;
}

.lb-you {
  background: rgba(139, 92, 246, 0.08);
  border-left: 2px solid var(--purple);
}


/* ══════════════════════════════════════════════════════════
   NAV ACTIVE STATE
   ══════════════════════════════════════════════════════════ */
.nav-link.nav-active {
  color: var(--blue) !important;
  border-color: var(--blue) !important;
}


/* ══════════════════════════════════════════════════════════
   POPUP OVERLAY SYSTEM
   ══════════════════════════════════════════════════════════ */
.popup-bg {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(2, 4, 8, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  align-items: center;
  justify-content: center;
}

.popup-bg.open {
  display: flex;
}

.popup-box {
  background: rgba(2, 4, 8, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 44px;
  max-width: 540px;
  width: 92%;
  position: relative;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.65), 
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: popIn 0.4s var(--ease-spring) both;
}

.popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  font-size: 14px;
  transition: all 0.2s var(--ease-smooth);
}

.popup-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

.popup-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.popup-title {
  font-family: var(--fd);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #ffffff;
}

.popup-type {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--purple);
  margin-bottom: 16px;
}

.popup-desc {
  color: var(--dim);
  line-height: 1.8;
  font-size: 14px;
}

.popup-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.ptag {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 10px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--purple);
  font-family: var(--fd);
  letter-spacing: 1px;
}



