:root {
  --primary: #00ff88;
  --secondary: #2dd4bf;
  --green: #76ff7a;
  --yellow: #d6a84f;
  --red: #ff5f56;
  --bg: #05080d;
  --bg-2: #0b111a;
  --panel: rgba(9, 18, 28, 0.72);
  --panel-strong: rgba(11, 21, 33, 0.9);
  --border: rgba(0, 255, 136, 0.16);
  --text: #e6f2ed;
  --muted: #7f918c;
  --shadow-cyan: 0 0 24px rgba(0, 255, 136, 0.16);
  --shadow-purple: 0 0 26px rgba(214, 168, 79, 0.16);
  --radius: 8px;
  --ease: 300ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 6%, rgba(0, 255, 136, 0.08), transparent 28rem),
    radial-gradient(circle at 86% 12%, rgba(214, 168, 79, 0.08), transparent 26rem),
    linear-gradient(135deg, #0b121c 0%, #060a11 46%, #010203 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.22));
  animation: gridDrift 18s linear infinite;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  font: inherit;
}

.particle-canvas,
.noise-layer,
.scanline-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.particle-canvas {
  z-index: -2;
}

.noise-layer {
  z-index: -1;
  opacity: 0.1;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px),
    radial-gradient(circle at 76% 62%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px);
  background-size: 37px 41px, 43px 47px;
  mix-blend-mode: screen;
}

.scanline-layer {
  z-index: 0;
  opacity: 0.08;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, rgba(0, 255, 136, 0.08) 6px);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(0, 255, 136, 0.13);
  background: rgba(3, 7, 12, 0.86);
  backdrop-filter: blur(18px);
}

.navbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
}

.brand,
.nav-actions,
.nav-menu,
.hero-actions,
.level-card-top,
.section-header,
.site-footer,
.socials,
.coin-pill,
.avatar-button,
.live-indicator {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.28);
}

.brand-mark {
  position: relative;
  width: 35px;
  height: 35px;
  border: 2px solid #00ff88;
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.24), inset 0 0 12px rgba(0, 255, 136, 0.1);
  transform: rotate(45deg);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
}

.brand-mark::before {
  inset: 8px;
  border: 1px solid var(--primary);
  border-radius: 5px;
}

.brand-mark::after {
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  transform: translate(-50%, -50%);
}

.brand-wordmark {
  display: grid;
  gap: 1px;
  line-height: 0.92;
  text-transform: uppercase;
}

.brand-wordmark span {
  color: #f5fbff;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
}

.brand-wordmark strong {
  color: #00ff88;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-shadow: 0 0 14px rgba(0, 255, 136, 0.45);
}

.nav-menu {
  justify-content: center;
  gap: 6px;
}

.nav-menu a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  transition: color var(--ease), border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.nav-menu a:hover {
  border-color: rgba(0, 255, 136, 0.22);
  color: var(--primary);
  background: rgba(0, 255, 136, 0.08);
  box-shadow: var(--shadow-cyan);
}

.nav-actions {
  gap: 10px;
}

.icon-button,
.avatar-button,
.coin-pill,
.login-pill {
  min-height: 42px;
  border: 1px solid rgba(0, 255, 136, 0.16);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

.login-pill {
  padding: 0 16px;
  font-weight: 800;
  color: var(--primary);
  background: rgba(0, 255, 136, 0.08);
}

.icon-button,
.avatar-button {
  position: relative;
  cursor: pointer;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.icon-button {
  width: 42px;
  display: grid;
  place-items: center;
}

.icon-button:hover,
.avatar-button:hover {
  border-color: rgba(0, 255, 136, 0.52);
  box-shadow: var(--shadow-cyan);
  transform: translateY(-2px);
}

.icon-button svg,
.coin-pill svg,
.avatar-button svg,
.socials svg,
.primary-cta svg {
  width: 18px;
  height: 18px;
}

.alert-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
}

.coin-pill {
  gap: 8px;
  padding: 0 14px;
  color: var(--primary);
  font-weight: 800;
}

.avatar-button {
  gap: 7px;
  padding: 4px 9px 4px 4px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #001018;
  font-size: 0.78rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.7);
}

.hero {
  position: relative;
  min-height: 720px;
  padding: 150px 0 70px;
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.hero::before {
  top: 110px;
  left: -8vw;
  width: 52vw;
  height: 18vh;
  background: linear-gradient(100deg, transparent, rgba(28, 255, 139, 0.1), transparent);
  filter: blur(6px);
  transform: rotate(-13deg);
}

.hero::after {
  right: 0;
  bottom: 0;
  width: 100%;
  height: 160px;
  background: linear-gradient(to bottom, transparent, rgba(2, 5, 13, 0.92));
}

.hero-grid,
.shell-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 46px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  position: relative;
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.9rem, 6vw, 5.8rem);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #e8fff4;
  text-shadow: 0 0 18px rgba(0, 255, 136, 0.2), 0 0 32px rgba(0, 255, 136, 0.12);
}

.hacker-title {
  max-width: 700px;
  font-family: "Inter", system-ui, sans-serif;
}

.glitch::before,
.glitch::after {
  position: absolute;
  inset: 0;
  content: attr(data-text);
  overflow: hidden;
  opacity: 0.5;
}

.glitch::before {
  color: rgba(0, 255, 136, 0.56);
  transform: translate(1px, 0);
  clip-path: inset(0 0 54% 0);
  animation: glitchShift 4.8s infinite steps(1, end);
}

.glitch::after {
  color: rgba(0, 255, 136, 0.44);
  transform: translate(-1px, 0);
  clip-path: inset(58% 0 0 0);
  animation: glitchShift 6s infinite steps(1, end) reverse;
}

.hero-subtitle {
  max-width: 530px;
  margin: 24px 0 0;
  color: #c9d8e8;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 1px solid rgba(0, 255, 136, 0.42);
  border-radius: var(--radius);
  padding: 0 22px;
  color: #03110b;
  font-weight: 900;
  background: linear-gradient(135deg, #00d875, #8affb8);
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.24), inset 0 0 16px rgba(255, 255, 255, 0.24);
  transition: transform var(--ease), box-shadow var(--ease), filter var(--ease);
}

.primary-cta:hover {
  transform: translateY(-3px);
  filter: saturate(1.15);
  box-shadow: 0 0 28px rgba(0, 255, 136, 0.38), 0 16px 42px rgba(0, 0, 0, 0.28);
}

.secondary-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  color: var(--text);
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: var(--radius);
  background: rgba(0, 255, 136, 0.08);
  transition: transform var(--ease), background var(--ease), border-color var(--ease);
}

.secondary-cta:hover {
  transform: translateY(-2px);
  background: rgba(0, 255, 136, 0.15);
  border-color: rgba(0, 255, 136, 0.35);
}

.live-indicator {
  gap: 9px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.live-indicator span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
  animation: pulse 1.8s infinite;
}

.hero-visual {
  position: relative;
  min-height: 480px;
}

.hud-ring {
  position: absolute;
  border: 1px solid rgba(0, 255, 136, 0.36);
  border-radius: 50%;
  box-shadow: inset 0 0 32px rgba(0, 255, 136, 0.13), 0 0 40px rgba(214, 168, 79, 0.16);
}

.hud-ring::before,
.hud-ring::after {
  position: absolute;
  inset: 18%;
  border: 1px dashed rgba(0, 255, 136, 0.32);
  border-radius: 50%;
  content: "";
}

.hud-ring::after {
  inset: 36%;
  border-style: solid;
  border-color: rgba(214, 168, 79, 0.42);
}

.ring-one {
  top: 15px;
  right: 26px;
  width: 310px;
  height: 310px;
  animation: rotateSlow 24s linear infinite;
}

.ring-two {
  left: 18px;
  bottom: 22px;
  width: 190px;
  height: 190px;
  animation: rotateSlow 18s linear infinite reverse;
}

.terminal-window,
.glass-card,
.glass-panel,
.sidebar-card,
.level-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12, 22, 32, 0.86), rgba(3, 7, 12, 0.72));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.terminal-window {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(390px, 88vw);
  overflow: hidden;
  box-shadow: 0 0 34px rgba(0, 255, 136, 0.12), 0 24px 80px rgba(0, 0, 0, 0.56);
}

.terminal-bar {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.12);
  background: rgba(0, 0, 0, 0.24);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.terminal-bar span:nth-child(2) {
  background: var(--yellow);
}

.terminal-bar span:nth-child(3) {
  background: var(--green);
}

.terminal-lines {
  padding: 20px;
  color: #b8f8ff;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.7;
}

.terminal-lines p {
  margin: 0 0 8px;
}

.terminal-lines strong {
  color: var(--primary);
}

.typing-line span {
  animation: blink 0.8s infinite;
}

.node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 18px var(--primary), 0 0 50px rgba(0, 255, 136, 0.5);
  animation: float 4.5s ease-in-out infinite;
}

.node-a {
  top: 80px;
  left: 34px;
}

.node-b {
  top: 310px;
  right: 86px;
  animation-delay: -1.3s;
}

.node-c {
  bottom: 42px;
  left: 48%;
  animation-delay: -2.4s;
}

.shell-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 72px;
}

.main-column {
  display: grid;
  gap: 24px;
}

.levels-embed-card {
  min-width: 0;
}

.levels-frame {
  display: block;
  width: 100%;
  height: 1640px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.levels-embed-card ~ .progression-section,
.levels-embed-card ~ .levels-section {
  display: none;
}

.embedded-levels-page {
  min-height: auto;
  margin: 0;
  overflow-x: hidden;
  background: transparent;
}

.embedded-levels-page::before {
  display: none;
}

.embedded-levels-page .progression-section {
  margin-bottom: 24px;
}

.welcome-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 24px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: var(--radius);
  color: var(--primary);
  background: rgba(0, 255, 136, 0.08);
  box-shadow: var(--shadow-cyan);
}

.card-icon svg {
  width: 30px;
  height: 30px;
}

.welcome-card h2,
.progression-section h2,
.levels-section h2,
.sidebar-card h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: 0;
}

.intel-panel,
.certificate-panel {
  padding: 24px;
  margin-top: 24px;
  border: 1px solid rgba(0, 255, 136, 0.14);
  border-radius: var(--radius);
  background: rgba(4, 11, 18, 0.95);
}

.intel-panel .intel-summary,
.certificate-panel .login-note {
  color: var(--muted);
  line-height: 1.75;
}

.certificate-page.certificate-document {
  min-height: 100vh;
  padding: 40px 20px 60px;
  background: radial-gradient(circle at top left, rgba(0, 255, 136, 0.05), transparent 24%),
              radial-gradient(circle at bottom right, rgba(214, 168, 79, 0.04), transparent 24%),
              linear-gradient(180deg, #0d121d 0%, #06090f 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.certificate-page .certificate-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.certificate-frame {
  background-color: #0a1628;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='1000' viewBox='0 0 1400 1000'%3E%3Cpath d='M0,120 L180,120 L300,240 L300,360' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='300' cy='360' r='6' fill='rgba(0,240,255,0.3)'/%3E%3Cpath d='M120,0 L120,150 L220,250 L420,250' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='420' cy='250' r='6' fill='rgba(0,240,255,0.3)'/%3E%3Cpath d='M0,270 L100,270 L180,190 L180,60' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='180' cy='60' r='6' fill='rgba(0,240,255,0.3)'/%3E%3Cpath d='M1400,120 L1220,120 L1100,240 L1100,360' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='1100' cy='360' r='6' fill='rgba(0,240,255,0.3)'/%3E%3Cpath d='M1280,0 L1280,150 L1180,250 L980,250' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='980' cy='250' r='6' fill='rgba(0,240,255,0.3)'/%3E%3Cpath d='M1400,270 L1300,270 L1220,190 L1220,60' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='1220' cy='60' r='6' fill='rgba(0,240,255,0.3)'/%3E%3Cpath d='M0,880 L180,880 L300,760 L300,640' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='300' cy='640' r='6' fill='rgba(0,240,255,0.3)'/%3E%3Cpath d='M120,1000 L120,850 L220,750 L420,750' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='420' cy='750' r='6' fill='rgba(0,240,255,0.3)'/%3E%3Cpath d='M0,730 L100,730 L180,810 L180,940' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='180' cy='940' r='6' fill='rgba(0,240,255,0.3)'/%3E%3Cpath d='M1400,880 L1220,880 L1100,760 L1100,640' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='1100' cy='640' r='6' fill='rgba(0,240,255,0.3)'/%3E%3Cpath d='M1280,1000 L1280,850 L1180,750 L980,750' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='980' cy='750' r='6' fill='rgba(0,240,255,0.3)'/%3E%3Cpath d='M1400,730 L1300,730 L1220,810 L1220,940' stroke='rgba(0,240,255,0.15)' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='1220' cy='940' r='6' fill='rgba(0,240,255,0.3)'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  border-radius: 32px;
  border: 2px solid rgba(0, 240, 255, 0.2);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(0, 240, 255, 0.05);
  padding: 32px 48px 32px;
  position: relative;
  color: #ffffff;
}

.certificate-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(11, 155, 135, 0.02), rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

@media (min-width: 901px) {
  .certificate-page.certificate-document {
    padding: 5px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .certificate-page .certificate-shell {
    padding: 5px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
  }
  .certificate-frame {
    --scale-h: calc((100vh - 100px) / 960);
    --scale-w: calc((100vw - 120px) / 1400);
    --scale-factor: min(var(--scale-h), var(--scale-w), 0.85);

    transform: scale(var(--scale-factor));
    transform-origin: center center;
    margin-top: calc(-480px * (1 - var(--scale-factor)));
    margin-bottom: calc(-480px * (1 - var(--scale-factor)));
    width: 100%;
  }
}

.certificate-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 40px;
}

.cert-brand {
  margin: 0 0 10px;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #00f0ff;
  font-weight: 600;
}

.cert-title {
  margin: 0;
  font-size: clamp(2.8rem, 4.2vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.8),
               0 0 20px rgba(0, 240, 255, 0.4),
               0 0 30px rgba(0, 240, 255, 0.2);
}

.cert-subtitle {
  margin: 8px 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #ffffff;
  text-transform: uppercase;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.cert-subtitle::before,
.cert-subtitle::after {
  content: "";
  display: inline-block;
  width: 40px;
  height: 2px;
  background-color: #00f0ff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.certificate-body-copy {
  margin: 0 auto 20px;
  max-width: 900px;
  text-align: center;
}

.certificate-subline {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
}

.certificate-recipient {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(3.2rem, 5.5vw, 5rem);
  color: #00f0ff;
  margin: 14px 0;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  text-align: center;
}

.certificate-description {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 1.1rem;
}

.certificate-program {
  margin: 0 0 24px;
  font-size: 1.75rem;
  color: #00f0ff;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.certificate-text {
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.75;
  color: #a0aec0;
  max-width: 780px;
}

.certificate-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: center;
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 20px;
  margin-top: 24px;
  background: rgba(10, 22, 40, 0.6);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.05);
  clip-path: polygon(
    15px 0,
    calc(100% - 15px) 0,
    100% 15px,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    15px 100%,
    0 calc(100% - 15px),
    0 15px
  );
}

.footer-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  box-sizing: border-box;
}

.footer-col.left {
  align-items: center;
  text-align: center;
  padding-right: 20px;
}

.footer-col.center {
  align-items: center;
  text-align: center;
  padding: 0 20px;
  border-left: 1px solid rgba(0, 240, 255, 0.2);
  border-right: 1px solid rgba(0, 240, 255, 0.2);
}

.footer-col.right {
  align-items: center;
  text-align: center;
  padding-left: 20px;
}

.certificate-frame.is-locked {
  opacity: 0.6;
}

.certificate-signature-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.signature-image {
  width: 100%;
  max-width: 240px;
  height: 80px;
  object-fit: contain;
  background: transparent !important;
  background-color: transparent !important;
}

.sig-line {
  width: 180px;
  height: 1px;
  background-color: #00f0ff;
  box-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
  margin: 4px 0;
}

.signature-meta {
  display: grid;
  gap: 4px;
}

.signature-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #00f0ff;
}

.signature-title {
  color: #a0aec0;
  font-size: 0.85rem;
}

.certificate-badges-row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin: 40px auto 30px;
  width: 100%;
  max-width: 800px;
  min-height: 220px;
}

.certificate-badges-row::before {
  content: "";
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  width: 620px;
  height: 86px;
  border-top: 2px solid #00f0ff;
  border-radius: 50% 50% 0 0;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.6));
}

.badge-item {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid #00f0ff;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.6), inset 0 0 15px rgba(0, 240, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0a1628;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
  overflow: hidden;
}

.badge-item.badge-1,
.badge-item.badge-4 {
  transform: translateY(30px);
}

.badge-item.badge-2,
.badge-item.badge-3 {
  transform: translateY(-10px);
}

.badge-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.badge-img.aieys-badge {
  object-fit: contain;
  padding: 10px;
  box-sizing: border-box;
}

.badge-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  text-align: center;
  box-shadow: none;
  border: none;
  background: transparent;
}

.teal-circle-placeholder {
  color: #00f0ff;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.purple-circle-placeholder {
  color: #bd93f9;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.deadlock-placeholder {
  flex-direction: column;
  gap: 4px;
}

.deadlock-placeholder span {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  background: linear-gradient(90deg, #ffffff, #92fbd9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.deadlock-placeholder small {
  font-size: 0.58rem;
  color: #92fbd9;
  letter-spacing: 0.15em;
}

.date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.calendar-icon {
  width: 28px;
  height: 28px;
  stroke: #00f0ff;
  filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.4));
}

.date-label {
  font-weight: 800;
  color: #00f0ff;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  margin: 0;
}

.date-value {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.certificate-qr-block {
  display: flex;
  justify-content: center;
}

.qr-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  padding: 6px;
  background: #ffffff;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 120px;
}

.qr-placeholder span {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: #a0aec0;
  font-weight: 600;
}

.qr-box {
  width: 100px;
  height: 100px;
  background: rgba(0, 240, 255, 0.04);
  border: 1px dashed rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(0, 240, 255, 0.6);
  letter-spacing: 0.05em;
}

.qr-box-corner {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid #00f0ff;
}

.qr-box-corner.tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.qr-box-corner.tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.qr-box-corner.bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.qr-box-corner.br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

@media (max-width: 900px) {
  .certificate-topbar {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }

  .certificate-logo {
    margin: 0 auto;
  }

  .certificate-date-block {
    text-align: center;
  }

  .certificate-bottom-panel {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .certificate-signature-block {
    text-align: center;
    align-items: center;
  }

  .certificate-qr-block {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .certificate-frame {
    padding: 30px 22px 28px;
  }

  .certificate-recipient {
    font-size: 2.6rem;
  }
}

.intel-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.intel-stats div {
  border: 1px solid rgba(0, 255, 136, 0.1);
  border-radius: 14px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.16);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.intel-stats strong {
  color: #f4fff7;
  font-size: 1rem;
}

.certificate-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1.3fr;
  align-items: start;
}

.certificate-upload {
  display: grid;
  gap: 14px;
}

.certificate-upload input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(0, 255, 136, 0.16);
  background: rgba(2, 5, 12, 0.92);
  color: var(--text);
  padding: 0 14px;
}

.certificate-preview {
  display: grid;
  gap: 16px;
}

.certificate-preview canvas,
.certificate-preview img {
  width: 100%;
  max-width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(0, 255, 136, 0.14);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.22);
}

.certificate-actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}

.certificate-actions button,
.certificate-actions a.secondary-link {
  width: fit-content;
}

.certificate-actions button {
  padding: 14px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.25), rgba(23, 255, 173, 0.12));
  color: #111111;
  border: 1px solid rgba(0, 255, 136, 0.16);
  cursor: pointer;
  transition: transform var(--ease), background var(--ease);
}

.certificate-actions button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.35), rgba(23, 255, 173, 0.2));
}

.certificate-actions a.secondary-link {
  display: inline-flex;
  align-items: center;
  padding: 14px 24px;
  border-radius: 999px;
  color: #111111;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(240, 240, 240, 0.9);
  text-decoration: none;
  transition: transform var(--ease), background var(--ease);
}

.certificate-actions a.secondary-link:hover {
  transform: translateY(-2px);
  background: rgba(230, 230, 230, 0.95);
}

.certificate-actions span {
  color: var(--muted);
  font-weight: 700;
}

#certificateLocked {
  margin-top: 22px;
  padding: 24px;
  border-radius: 20px;
  background: #fff4f2;
  border: 1px solid #ffc2b8;
  color: #9f2311;
}

#certificateLocked strong {
  display: block;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.welcome-card p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
}

.glass-panel {
  padding: 24px;
}

.section-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.completion-chip,
.ghost-link {
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--primary);
  background: rgba(0, 255, 136, 0.07);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.level-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 64px);
  gap: 18px;
  min-height: 118px;
  overflow-x: auto;
  padding: 28px 8px 18px;
  scrollbar-color: rgba(0, 255, 136, 0.42) transparent;
}

.map-line {
  position: absolute;
  top: 57px;
  left: 40px;
  width: 902px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.map-line span {
  display: block;
  width: 31%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.85);
  animation: progressGlow 2.6s ease-in-out infinite alternate;
}

.level-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  background: rgba(5, 14, 29, 0.95);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), filter var(--ease);
}

.level-node span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.06);
}

.level-node::after {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  width: max-content;
  max-width: 190px;
  border: 1px solid rgba(0, 255, 136, 0.24);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: #dffbff;
  font-size: 0.74rem;
  font-weight: 800;
  content: attr(data-tip);
  background: rgba(3, 9, 20, 0.95);
  box-shadow: var(--shadow-cyan);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity var(--ease), transform var(--ease);
}

.level-node:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.level-node.unlocked {
  border-color: rgba(0, 255, 136, 0.48);
  color: var(--primary);
  box-shadow: var(--shadow-cyan);
}

.level-node.current {
  border-color: rgba(214, 168, 79, 0.7);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(214, 168, 79, 0.08), var(--shadow-purple);
  animation: neonPulse 1.7s infinite;
}

.level-node.locked {
  cursor: not-allowed;
  filter: grayscale(0.8) blur(0.2px);
  opacity: 0.48;
}

.level-node:hover {
  transform: translateY(-6px);
}

.path-board {
  position: relative;
  min-height: 760px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(0, 255, 136, 0.09);
  border-radius: var(--radius);
  padding: 22px 20px 34px;
  background:
    radial-gradient(circle at 62% 18%, rgba(0, 255, 136, 0.07), transparent 10rem),
    radial-gradient(circle at 74% 56%, rgba(214, 168, 79, 0.06), transparent 12rem),
    linear-gradient(145deg, rgba(15, 25, 36, 0.9), rgba(7, 13, 22, 0.96));
  scrollbar-color: rgba(0, 255, 136, 0.42) transparent;
}

.path-board::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.46;
  pointer-events: none;
}

.path-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  min-width: 1040px;
  color: #a9b7c9;
  font-size: 0.86rem;
  font-weight: 800;
}

.path-tabs span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  padding: 0 0 10px;
}

.path-tabs svg {
  width: 17px;
  height: 17px;
}

.path-tabs .active {
  color: #e9fff1;
  border-color: #00ff88;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.28);
}

.path-binary {
  position: absolute;
  z-index: 1;
  margin: 0;
  color: rgba(146, 164, 187, 0.08);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.binary-left {
  top: 105px;
  left: 24px;
}

.binary-right {
  top: 90px;
  right: 42px;
}

.module-label {
  position: absolute;
  z-index: 4;
  top: 76px;
  left: 50%;
  display: grid;
  gap: 8px;
  width: min(520px, calc(100% - 48px));
  border: 1px solid rgba(0, 255, 136, 0.1);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: #dce8f7;
  text-align: center;
  background: rgba(5, 10, 16, 0.7);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.module-label::before,
.module-label::after {
  position: absolute;
  top: 50%;
  width: 110px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(201, 216, 232, 0.22));
}

.module-label::before {
  right: calc(100% + 16px);
}

.module-label::after {
  left: calc(100% + 16px);
  transform: rotate(180deg);
}

.module-label span {
  color: rgba(0, 255, 136, 0.74);
  font-size: 0.8rem;
  font-weight: 900;
}

.module-label strong {
  color: #eaf7f0;
  font-size: clamp(1.45rem, 3vw, 2.45rem);
  text-shadow: none;
}

.path-canvas {
  position: relative;
  z-index: 2;
  min-width: 1040px;
  height: 620px;
  margin-top: 112px;
}

.path-lines {
  position: absolute;
  z-index: 1;
  inset: 70px 10px 0;
  width: 1010px;
  height: 520px;
}

.path-lines path {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 10 12;
}

.line-done {
  stroke: rgba(0, 255, 136, 0.72);
  filter: drop-shadow(0 0 5px rgba(0, 255, 136, 0.32));
}

.line-live {
  stroke: rgba(45, 212, 191, 0.76);
  filter: drop-shadow(0 0 6px rgba(45, 212, 191, 0.35));
  animation: pathFlow 2.8s linear infinite;
}

.line-locked {
  stroke: rgba(96, 112, 132, 0.32);
}

.room-node {
  position: absolute;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 164px;
  color: #ecf6ff;
  cursor: pointer;
  background: transparent;
  transform: translate(-50%, -50%);
  transition: transform var(--ease), filter var(--ease), opacity var(--ease);
}

.room-node.current {
  width: 190px;
}

.room-node::after {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  width: max-content;
  max-width: 220px;
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: #dffbff;
  font-size: 0.74rem;
  font-weight: 800;
  content: attr(data-tip);
  background: rgba(4, 10, 20, 0.95);
  box-shadow: var(--shadow-cyan);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity var(--ease), transform var(--ease);
}

.room-node:hover {
  transform: translate(-50%, calc(-50% - 7px));
}

.room-node:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.node-platform {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 58px;
  border: 1px solid rgba(0, 255, 136, 0.28);
  border-radius: 12px;
  color: var(--primary);
  background:
    linear-gradient(145deg, rgba(0, 255, 136, 0.11), rgba(45, 212, 191, 0.05)),
    rgba(13, 28, 37, 0.98);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.24), 0 14px 28px rgba(0, 0, 0, 0.32), 0 0 16px rgba(0, 255, 136, 0.12);
  transform: perspective(130px) rotateX(14deg);
}

.node-platform::before {
  position: absolute;
  inset: auto 10px -10px;
  height: 14px;
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: 0 0 10px 10px;
  content: "";
  background: rgba(8, 24, 41, 0.96);
  transform: skewX(-18deg);
}

.node-platform svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 9px currentColor);
}

.room-node strong {
  display: block;
  max-width: 170px;
  border: 1px solid rgba(0, 255, 136, 0.1);
  border-radius: 7px;
  padding: 5px 9px;
  color: #ecf6f1;
  font-size: 0.94rem;
  line-height: 1.2;
  text-align: center;
  background: rgba(4, 9, 15, 0.82);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  text-shadow: none;
  backdrop-filter: blur(8px);
}

.room-node small {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 9px;
  color: rgba(225, 238, 232, 0.82);
  font-size: 0.75rem;
  font-weight: 900;
  background: rgba(4, 9, 15, 0.76);
}

.room-node.complete .node-platform {
  border-color: rgba(0, 255, 136, 0.45);
  color: #00ff88;
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.24), 0 0 18px rgba(0, 255, 136, 0.16);
}

.room-node.current .node-platform {
  border-color: rgba(45, 212, 191, 0.68);
  color: var(--primary);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.24), 0 0 26px rgba(45, 212, 191, 0.26);
  animation: neonPulse 1.8s infinite;
}

.room-node.current strong {
  max-width: 190px;
}

.room-node.locked {
  cursor: not-allowed;
  opacity: 0.68;
  filter: grayscale(0.58);
}

.room-node.locked strong {
  color: rgba(220, 232, 247, 0.72);
  border-color: rgba(255, 255, 255, 0.06);
}

.room-node.locked:hover {
  transform: translate(-50%, -50%);
}

.next-room {
  position: relative;
  border-radius: 7px;
  padding: 8px 13px;
  color: #041000;
  font-size: 0.82rem;
  font-weight: 900;
  background: #00df78;
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.3);
}

.next-room::after {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  content: "";
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.node-recon {
  left: 12%;
  top: 76%;
}

.node-packet {
  left: 31.5%;
  top: 58%;
}

.node-laptop {
  left: 52%;
  top: 38%;
}

.node-hash {
  left: 39%;
  top: 86%;
}

.node-proxy {
  left: 74%;
  top: 38%;
}

.node-kernel {
  left: 76%;
  top: 80%;
}

.node-final {
  left: 91%;
  top: 50%;
}

.node-cipher {
  left: 19%;
  top: 35%;
}

.node-firewall {
  left: 55%;
  top: 78%;
}

.node-zero {
  left: 64%;
  top: 18%;
}

.node-root {
  left: 68.5%;
  top: 61%;
}

.node-ice {
  left: 90%;
  top: 82%;
}

.levels-section {
  padding-top: 6px;
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.level-card {
  min-height: 214px;
  padding: 20px;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), opacity var(--ease), filter var(--ease);
}

.level-card:hover {
  border-color: rgba(0, 255, 136, 0.34);
  box-shadow: 0 0 22px rgba(0, 255, 136, 0.12), 0 18px 48px rgba(0, 0, 0, 0.42);
  transform: translateY(-7px);
}

.level-card.locked {
  opacity: 0.54;
  filter: saturate(0.6);
}

.level-card.locked:hover {
  transform: none;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

.level-card.current {
  border-color: rgba(214, 168, 79, 0.62);
  box-shadow: var(--shadow-purple);
}

.level-card-top {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.level-number {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  font-weight: 900;
}

.badge,
.status {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.72rem;
  font-weight: 900;
}

.badge.easy {
  color: var(--green);
  background: rgba(61, 255, 159, 0.1);
  box-shadow: 0 0 18px rgba(61, 255, 159, 0.16);
}

.badge.medium {
  color: var(--yellow);
  background: rgba(255, 200, 90, 0.1);
  box-shadow: 0 0 18px rgba(255, 200, 90, 0.14);
}

.badge.hard {
  color: var(--red);
  background: rgba(255, 78, 106, 0.1);
  box-shadow: 0 0 18px rgba(255, 78, 106, 0.14);
}

.level-card h3 {
  margin: 0 0 11px;
  font-size: 1.08rem;
}

.level-card p {
  min-height: 70px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.status {
  display: inline-flex;
}

.unlocked-status {
  color: var(--green);
  background: rgba(61, 255, 159, 0.09);
}

.current-status {
  color: var(--primary);
  background: rgba(0, 255, 136, 0.1);
}

.locked-status {
  color: #9ba4b0;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar {
  position: fixed;
  top: 92px;
  right: 20px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  align-content: start;
  gap: 18px;
  width: min(380px, calc(100vw - 32px));
  overflow-y: auto;
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(3, 8, 14, 0.94);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.42), 0 0 28px rgba(0, 255, 136, 0.12);
  backdrop-filter: blur(20px);
  transform: translateX(calc(100% + 32px));
  opacity: 0;
  pointer-events: none;
  transition: transform 360ms ease, opacity 260ms ease;
}

.sidebar.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.intel-drawer-toggle {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 39;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid rgba(0, 255, 136, 0.28);
  border-radius: 999px;
  padding: 0 16px;
  color: #03110b;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #00df78, #8affb8);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34), 0 0 18px rgba(0, 255, 136, 0.22);
  transition: transform var(--ease), box-shadow var(--ease), filter var(--ease);
}

.intel-drawer-toggle:hover {
  filter: brightness(1.06);
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38), 0 0 24px rgba(0, 255, 136, 0.32);
}

.intel-drawer-toggle svg {
  width: 18px;
  height: 18px;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.12);
  padding-bottom: 16px;
}

.drawer-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.drawer-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: var(--radius);
  color: var(--primary);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.drawer-close:hover {
  border-color: rgba(0, 255, 136, 0.38);
  box-shadow: var(--shadow-cyan);
  transform: translateY(-2px);
}

.drawer-close svg {
  width: 18px;
  height: 18px;
}

.sidebar-card {
  padding: 20px;
}

.collapsible-card {
  padding: 0;
  overflow: hidden;
}

.card-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 20px;
  color: var(--text);
  cursor: pointer;
  background: transparent;
  transition: background var(--ease), box-shadow var(--ease);
}

.card-toggle:hover {
  background: rgba(0, 255, 136, 0.045);
}

.card-toggle .section-kicker {
  margin: 0;
}

.card-toggle svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  transition: transform var(--ease), color var(--ease);
}

.collapsible-card.is-open .card-toggle {
  border-bottom: 1px solid rgba(0, 255, 136, 0.12);
  background: rgba(0, 255, 136, 0.035);
}

.collapsible-card.is-open .card-toggle svg {
  color: #eaf7f0;
  transform: rotate(180deg);
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  opacity: 0;
  transition: max-height 360ms ease, opacity 260ms ease, padding 360ms ease;
}

.collapsible-card.is-open .collapsible-content {
  max-height: 520px;
  padding: 18px 20px 20px;
  opacity: 1;
}

.sidebar-card p:not(.section-kicker) {
  color: var(--muted);
  line-height: 1.55;
}

.mini-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00df78, #2dd4bf);
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.32);
  animation: fillIn 1.4s ease-out both;
}

.card-meta,
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-meta {
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.stat-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 15px 0;
  color: var(--muted);
}

.stat-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.stat-grid {
  display: grid;
  gap: 10px;
}

.stat-row strong {
  color: var(--primary);
  font-size: 1.05rem;
  text-align: right;
}

.stat-row span {
  color: rgba(245, 251, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 700;
}

.suggestions {
  display: grid;
}

.suggestions .collapsible-content {
  display: grid;
  gap: 10px;
}

.suggestions a {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(0, 255, 136, 0.12);
  border-radius: var(--radius);
  padding: 13px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.suggestions a:hover {
  border-color: rgba(0, 255, 136, 0.42);
  box-shadow: var(--shadow-cyan);
  transform: translateX(4px);
}

.suggestions span {
  font-weight: 900;
}

.suggestions small {
  color: var(--muted);
}

.site-footer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(200px, 1.15fr) minmax(220px, 1fr) minmax(180px, 0.9fr);
  gap: 26px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 30px 42px;
  color: var(--muted);
  background: rgba(2, 8, 14, 0.88);
  border: 1px solid rgba(0, 255, 136, 0.14);
  border-radius: 26px;
  box-shadow: inset 0 0 80px rgba(0, 255, 136, 0.06), 0 0 30px rgba(0, 255, 136, 0.08);
}

.hacker-footer {
  backdrop-filter: blur(18px);
}

.footer-line {
  position: absolute;
  left: 50%;
  width: min(1180px, calc(100% - 32px));
  height: 1px;
  transform: translate(-50%, -26px);
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.30), transparent);
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.18);
}

.footer-left,
.footer-info,
.footer-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.brand-tag {
  color: var(--primary);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.footer-brand strong {
  color: #f4fff7;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
}

.footer-copy,
.footer-info p,
.footer-status {
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(244, 255, 247, 0.84);
}

.footer-copy {
  max-width: 380px;
}

.footer-heading {
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--primary);
}

.footer-info a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--ease);
}

.footer-info a:hover {
  color: #9cffb1;
}

.footer-status {
  color: #7fffc4;
}

.footer-right {
  align-items: flex-end;
  justify-content: space-between;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: 16px;
  background: rgba(0, 255, 136, 0.04);
}

.socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: 14px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.04);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.socials a:hover {
  border-color: rgba(0, 255, 136, 0.65);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.22);
  transform: translateY(-3px);
}

@media (max-width: 840px) {
  .site-footer {
    grid-template-columns: 1fr;
    padding: 28px 20px 32px;
  }

  .footer-right {
    align-items: flex-start;
  }
}

@keyframes gridDrift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 54px 54px;
  }
}

@keyframes glitchShift {
  0%, 92%, 100% {
    transform: translate(0, 0);
  }
  93% {
    transform: translate(3px, -1px);
  }
  94% {
    transform: translate(-2px, 1px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
  }
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow: 0 0 0 7px rgba(45, 212, 191, 0.07), 0 0 24px rgba(45, 212, 191, 0.22);
  }
  50% {
    box-shadow: 0 0 0 11px rgba(0, 255, 136, 0.08), 0 0 34px rgba(0, 255, 136, 0.28);
  }
}

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

@keyframes blink {
  50% {
    opacity: 0;
  }
}

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

@keyframes progressGlow {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.55);
  }
}

@keyframes pathFlow {
  to {
    stroke-dashoffset: -44;
  }
}

@keyframes fillIn {
  from {
    width: 0;
  }
}

@media (max-width: 1040px) {
  .navbar {
    grid-template-columns: auto auto 1fr;
  }

  .nav-toggle {
    display: block;
    order: 2;
  }

  .brand {
    order: 1;
  }

  .nav-actions {
    order: 3;
    justify-content: end;
  }

  .nav-menu {
    position: absolute;
    top: 76px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(2, 7, 17, 0.96);
    box-shadow: var(--shadow-cyan);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a {
    border-radius: var(--radius);
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 390px;
  }

  .levels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .navbar {
    width: min(100% - 24px, 1180px);
    min-height: 68px;
    gap: 10px;
  }

  .brand-wordmark {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-menu {
    top: 68px;
  }

  .coin-pill {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 118px;
  }

  .hero-grid,
  .shell-layout,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .hero h1 {
    font-size: clamp(2.35rem, 13vw, 3.8rem);
  }

  .hero-visual {
    min-height: 330px;
  }

  .ring-one {
    right: -42px;
    width: 260px;
    height: 260px;
  }

  .ring-two {
    width: 150px;
    height: 150px;
  }

  .terminal-window {
    right: auto;
    left: 0;
    bottom: 35px;
  }

  .path-board {
    min-height: 690px;
    padding: 18px 14px 22px;
  }

  .path-tabs,
  .path-canvas {
    min-width: 1040px;
  }

  .module-label {
    left: 260px;
    width: 430px;
    transform: none;
  }

  .welcome-card {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .levels-grid {
    grid-template-columns: 1fr;
  }

  .level-card {
    min-height: 190px;
  }

  .level-card p {
    min-height: auto;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Level 1 room */
.level-page {
  min-height: 100vh;
}

.level-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 118px 0 70px;
}

.level-nav-menu {
  justify-content: center;
}

.level-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 28px;
}

.level-brief h1 {
  max-width: 760px;
  margin: 0;
  color: #eaf7f0;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
  text-transform: uppercase;
}

.level-brief p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.level-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.level-brief-card {
  display: grid;
  align-content: center;
  gap: 12px;
  border: 1px solid rgba(0, 255, 136, 0.16);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(0, 0, 0, 0.2);
}

.brief-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(0, 255, 136, 0.24);
  border-radius: var(--radius);
  color: var(--primary);
  background: rgba(0, 255, 136, 0.07);
}

.brief-icon svg {
  width: 30px;
  height: 30px;
}

.level-brief-card strong {
  font-size: 1.1rem;
}

.level-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.level-workspace.terminal-active {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
  align-items: start;
}

.task-stack {
  min-width: 0;
}

.task-card {
  border: 1px solid rgba(0, 255, 136, 0.13);
  border-radius: var(--radius);
  margin-bottom: 16px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(12, 22, 32, 0.88), rgba(3, 7, 12, 0.76));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
}

.task-card.is-solved {
  border-color: rgba(0, 255, 136, 0.38);
  box-shadow: 0 0 22px rgba(0, 255, 136, 0.1), 0 18px 44px rgba(0, 0, 0, 0.26);
}

.task-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.task-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius);
  color: var(--primary);
  font-weight: 900;
  background: rgba(0, 255, 136, 0.055);
}

.task-card h3 {
  margin: 0 0 7px;
  font-size: 1.1rem;
}

.task-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hint-toggle,
.submit-flag,
.terminal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: var(--radius);
  min-height: 40px;
  padding: 0 12px;
  color: var(--primary);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.hint-toggle:hover,
.submit-flag:hover,
.terminal-close:hover {
  border-color: rgba(0, 255, 136, 0.38);
  box-shadow: var(--shadow-cyan);
  transform: translateY(-2px);
}

.hint-toggle svg,
.terminal-close svg {
  width: 17px;
  height: 17px;
}

.hint-box {
  display: none;
  border-left: 2px solid var(--yellow);
  margin: 15px 0 0 58px;
  padding: 10px 12px;
  color: #d9c58e;
  background: rgba(214, 168, 79, 0.07);
}

.task-card.hint-open .hint-box {
  display: block;
}

.hint-box code,
.terminal-help code,
.ctf-terminal code {
  color: #8affb8;
}

.flag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 16px 0 0 58px;
}

.flag-row input,
.terminal-form input {
  width: 100%;
  border: 1px solid rgba(0, 255, 136, 0.16);
  border-radius: var(--radius);
  min-height: 44px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.26);
  outline: none;
}

.flag-row input:focus,
.terminal-form input:focus {
  border-color: rgba(0, 255, 136, 0.42);
  box-shadow: var(--shadow-cyan);
}

.flag-result {
  grid-column: 1 / -1;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.flag-result.success {
  color: var(--primary);
}

.flag-result.error {
  color: var(--red);
}

.level-terminal-panel {
  display: none;
  position: sticky;
  top: 96px;
  min-height: 620px;
  border: 1px solid rgba(0, 255, 136, 0.16);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(2, 7, 11, 0.94);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35), 0 0 22px rgba(0, 255, 136, 0.08);
}

.level-workspace.terminal-active .level-terminal-panel {
  display: block;
}

.level-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.12);
  padding: 18px;
}

.level-terminal-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.terminal-help {
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
  padding: 14px 18px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  background: rgba(0, 255, 136, 0.035);
}

.ctf-terminal {
  display: grid;
  grid-template-rows: minmax(420px, 1fr) auto;
  min-height: 520px;
  font-family: "Consolas", "Courier New", monospace;
}

.ctf-terminal-output {
  overflow-y: auto;
  padding: 18px;
  color: #d8f8e8;
  font-size: 0.9rem;
  line-height: 1.55;
}

.ctf-terminal-output p {
  margin: 0 0 9px;
  overflow-wrap: anywhere;
}

.ctf-terminal-output span {
  color: var(--primary);
}

.terminal-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(0, 255, 136, 0.12);
  padding: 14px 18px;
}

.terminal-form label {
  color: var(--primary);
  font-weight: 900;
}

@media (max-width: 1040px) {
  .level-brief {
    grid-template-columns: 1fr;
  }

  .level-workspace.terminal-active {
    grid-template-columns: 1fr;
  }

  .level-terminal-panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 720px) {
  .level-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 102px;
  }

  .level-nav-menu {
    display: none;
  }

  .level-brief,
  .task-card {
    padding: 18px;
  }

  .task-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .hint-toggle {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .hint-box,
  .flag-row {
    margin-left: 0;
  }

  .flag-row {
    grid-template-columns: 1fr;
  }

  .terminal-form {
    grid-template-columns: 1fr;
  }
}
