/* =========================
   MISSIONS
========================= */

.mission-list {
  display: grid;
  gap: 16px;
}

.mission-item {
  display: grid;
  grid-template-columns: 70px 1fr 120px;
  align-items: center;
  cursor: pointer;
  transition: 0.25s ease;
}

.mission-item:hover {
  border-color: #22d3ee;
  transform: translateY(-3px);
}

.mission-item span {
  width: 48px;
  height: 48px;
  background: rgba(34, 211, 238, 0.15);
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #67e8f9;
  font-weight: bold;
}

.locked {
  opacity: 0.45;
  cursor: not-allowed;
}

/* =========================
   MAP UNLOCK / SHAKE
========================= */

.map-shake-overlay {
  position: absolute;
  inset: 0;
  min-height: 720px;
  background:
    radial-gradient(circle at 50% 40%, rgba(34, 211, 238, 0.18), transparent 32%),
    rgba(2, 6, 23, 0.92);
  border-radius: 32px;
  display: grid;
  place-items: center;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.map-shake-card {
  width: min(520px, 90%);
  text-align: center;
  padding: 36px;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
  animation: floatCard 1.8s ease-in-out infinite;
}

.scan-ring {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  position: relative;
  display: grid;
  place-items: center;
}

.scan-ring::before {
  content: "🗺️";
  position: absolute;
  font-size: 42px;
  z-index: 3;
}

.scan-ring span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(34, 211, 238, 0.45);
  animation: scanPulse 1.8s ease-out infinite;
}

.scan-ring span:nth-child(2) {
  animation-delay: 0.45s;
}

.scan-ring span:nth-child(3) {
  animation-delay: 0.9s;
}

.loading-bars {
  display: grid;
  gap: 8px;
  margin: 26px auto;
  width: 80%;
}

.loading-bars div {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #a78bfa, #22c55e);
  animation: loadingBar 1.3s ease-in-out infinite;
}

.loading-bars div:nth-child(2) {
  width: 72%;
  animation-delay: 0.2s;
}

.loading-bars div:nth-child(3) {
  width: 46%;
  animation-delay: 0.4s;
}

.map-shake-active {
  animation: mapShake 0.38s linear 4;
}

.screen-shake {
  animation: screenShake 0.42s linear 3;
}

@keyframes mapShake {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  20% {
    transform: translate(-8px, 5px) rotate(-0.6deg);
  }

  40% {
    transform: translate(7px, -4px) rotate(0.6deg);
  }

  60% {
    transform: translate(-5px, -3px) rotate(-0.4deg);
  }

  80% {
    transform: translate(4px, 5px) rotate(0.4deg);
  }

  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes screenShake {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-4px, 2px);
  }

  50% {
    transform: translate(4px, -2px);
  }

  75% {
    transform: translate(-2px, -1px);
  }

  100% {
    transform: translate(0, 0);
  }
}

@keyframes scanPulse {
  0% {
    transform: scale(0.5);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes loadingBar {
  0% {
    transform: scaleX(0.25);
    opacity: 0.45;
    transform-origin: left;
  }

  50% {
    transform: scaleX(1);
    opacity: 1;
    transform-origin: left;
  }

  100% {
    transform: scaleX(0.25);
    opacity: 0.45;
    transform-origin: right;
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* =========================
   LAB
========================= */

.lab-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr 0.85fr;
  gap: 20px;
  align-items: start;
}

.panel-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.mode-pill {
  color: #020617;
  background: #67e8f9;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 12px;
}

.mission-control-text{

    color:#67e8f9;

    font-weight:700;

    text-shadow:0 0 10px rgba(103,232,249,.45);

}

.objective,
.unlock,
.lesson-card,
.switch-card {
  margin: 20px 0;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px;
  border-radius: 18px;
}

.lesson-card {
  border-color: rgba(167, 139, 250, 0.55);
  background: linear-gradient(145deg, rgba(88, 28, 135, 0.3), rgba(2, 6, 23, 0.55));
}

.lesson-card p,
.lesson-card li {
  color: #dbeafe;
  line-height: 1.65;
}

#doFirstInfo {
  border-color: rgba(34, 211, 238, 0.5);
  background: linear-gradient(145deg, rgba(14, 116, 144, 0.22), rgba(2, 6, 23, 0.55));
}

.steps {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

code {
  display: inline-block;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 10px 12px;
  border-radius: 10px;
  color: #86efac;
}

.unlock {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(20, 83, 45, 0.25);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #020617;
  border-radius: 16px 16px 0 0;
  padding: 12px 15px;
}

.terminal-header span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ef4444;
}

.terminal-header span:nth-child(2) {
  background: #f59e0b;
}

.terminal-header span:nth-child(3) {
  background: #22c55e;
}

.terminal-header p {
  margin-left: 10px;
  color: #94a3b8;
}

.terminal {
  height: 330px;
  background: #020617;
  color: #86efac;
  padding: 18px;
  font-family: Consolas, monospace;
  overflow-y: auto;
  border-radius: 0 0 16px 16px;
}

.muted {
  color: #64748b;
}

.command-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.command-row input {
  flex: 1;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.75);
  color: white;
}

.command-row button {
  background: #22d3ee;
  color: #020617;
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #22d3ee);
  transition: 0.4s;
}

.switch-card button {
  width: 100%;
  margin-top: 8px;
  background: #1e293b;
  color: white;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.debrief {
  margin-top: 22px;
  border-color: rgba(34, 197, 94, 0.5);
}

.ports {
  display: flex;
  gap: 12px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.ports span {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 12px 14px;
  border-radius: 14px;
}

.empty-box {
  max-width: 500px;
}

/* =========================
   MISSION COMPLETE OVERLAY
========================= */

.mission-complete-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  display: grid;
  place-items: center;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.mission-complete-card {

  width: min(520px,90%);
  text-align:center;

  padding:40px;

  border-radius:28px;

  background:rgba(15,23,42,.95);

  border:1px solid rgba(34,211,238,.35);

  box-shadow:0 35px 100px rgba(0,0,0,.55);

  animation:missionCompletePop .45s ease;
}

.mission-check{

    font-size:74px;

    color:#22c55e;

    margin-bottom:10px;
}

.mission-complete-card h2{

    margin:12px 0;
}

@keyframes missionCompletePop{

    from{

        opacity:0;

        transform:scale(.82);
    }

    to{

        opacity:1;

        transform:scale(1);
    }

}
.terminal-support{

    margin-top:24px;

    padding:24px;

    border-radius:18px;

    background:#11192b;

    border:1px solid rgba(0,255,255,.12);

}

.terminal-support #toolUnlock{

    margin-bottom:18px;

}

.terminal-support #mentorButton{

    width:100%;

}