:root {
  --bg: #06101f;
  --panel: rgba(8, 17, 34, 0.76);
  --panel-2: rgba(14, 26, 49, 0.82);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eff6ff;
  --muted: rgba(221, 232, 255, 0.76);
  --accent: #7cf0ad;
  --accent-2: #36d6ff;
  --accent-3: #ffbb6b;
  --danger: #ff8d8d;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 18%, rgba(54, 214, 255, 0.1), transparent 28%),
    radial-gradient(circle at 84% 16%, rgba(124, 240, 173, 0.08), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(255, 187, 107, 0.06), transparent 26%),
    linear-gradient(180deg, #050b15 0%, #091426 100%);
}

.app {
  position: relative;
  min-height: 100vh;
  padding: 22px;
  overflow: hidden;
}

.orb {
  position: fixed;
  width: 44vw;
  height: 44vw;
  border-radius: 50%;
  filter: blur(86px);
  pointer-events: none;
  opacity: 0.32;
}

.orb-left {
  left: -14vw;
  top: -12vw;
  background: rgba(54, 214, 255, 0.18);
  animation: floatBlob 14s ease-in-out infinite;
}

.orb-right {
  right: -12vw;
  bottom: -14vw;
  background: rgba(124, 240, 173, 0.16);
  animation: floatBlob 16s ease-in-out infinite reverse;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1360px, 100%);
  margin: 0 auto;
}

.hero,
.main-panel,
.side-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero {
  border-radius: var(--radius-xl);
  padding: 34px;
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 22px;
}

.eyebrow {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-2);
}

.hero h1 {
  margin: 10px 0 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-text {
  margin: 18px 0 0;
  max-width: 42ch;
  line-height: 1.85;
  color: var(--muted);
}

.hero-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.hero-metric {
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-metric strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  margin-bottom: 6px;
}

.hero-metric span,
.headline-panel p,
.guide-card p,
.test-card p,
.training-copy p,
.side-card p,
.snapshot-grid span {
  color: var(--muted);
  line-height: 1.75;
}

.workspace {
  margin-top: 18px;
}

.topline {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.step-chip,
.mission-pill,
.choice,
.ghost-button,
.action-button {
  appearance: none;
  border: none;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease, background 180ms ease;
}

.step-chip {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-align: left;
}

.step-chip span {
  display: block;
  font-size: 0.78rem;
  color: var(--accent-2);
  margin-bottom: 8px;
}

.step-chip.active {
  background: rgba(124, 240, 173, 0.12);
  border-color: rgba(124, 240, 173, 0.4);
}

.headline-panel {
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.headline-panel h2 {
  margin: 10px 0 8px;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
}

.workgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 320px;
  gap: 18px;
}

.main-panel {
  border-radius: var(--radius-xl);
  padding: 26px;
}

.side-panel {
  display: grid;
  gap: 18px;
}

.side-card {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.side-card h3 {
  margin: 10px 0 8px;
}

.side-card-dark {
  background: var(--panel-2);
}

.progress-meter {
  margin-top: 14px;
}

.progress-meter span {
  display: block;
  margin-bottom: 8px;
  font-family: "Space Grotesk", sans-serif;
  color: var(--accent);
}

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

.progress-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 220ms ease;
}

.snapshot-grid {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.snapshot-grid div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.snapshot-grid div:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.panel-switch {
  position: relative;
}

.panel-screen {
  display: none;
  animation: revealUp 0.35s ease;
}

.panel-screen.active {
  display: block;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.panel-head h3 {
  margin: 8px 0 0;
  font-size: 1.4rem;
}

.ghost-button,
.choice,
.mission-pill {
  border-radius: 999px;
  padding: 12px 16px;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.ghost-button:hover,
.choice:hover,
.mission-pill:hover,
.action-button:hover {
  transform: translateY(-2px);
}

.setup-guide {
  display: grid;
  gap: 14px;
}

.guide-card,
.test-card {
  padding: 20px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.guide-card span,
.test-head span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 700;
}

.guide-card h4,
.test-head h4,
.training-copy h4 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.choice-group,
.mission-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.choice,
.mission-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.choice.active,
.mission-pill.active {
  background: rgba(124, 240, 173, 0.12);
  border-color: rgba(124, 240, 173, 0.45);
}

.mission-pill.completed {
  background: rgba(54, 214, 255, 0.12);
  border-color: rgba(54, 214, 255, 0.4);
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.test-card-wide {
  grid-column: 1 / -1;
}

.test-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.test-head strong {
  color: var(--danger);
}

.test-head strong.passed {
  color: var(--accent);
}

.test-pad,
.scroll-pad {
  width: 100%;
  min-height: 170px;
  margin-top: 14px;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at center, rgba(124, 240, 173, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
}

.test-pad b,
.scroll-pad span {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
}

.test-pad.flash,
.scroll-pad.flash {
  animation: flashPanel 0.35s ease;
}

.help-tip {
  margin-top: 10px;
  font-size: 0.92rem;
}

.scroll-pad {
  position: relative;
  overflow: hidden;
}

.scroll-trace {
  position: absolute;
  inset: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.7;
  transition: transform 200ms ease;
}

.training-shell {
  display: grid;
  gap: 16px;
}

.training-copy {
  padding: 20px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.practice-board {
  position: relative;
  min-height: 620px;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #12213f 0%, #0a1223 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.board-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 95%);
}

.board-feedback {
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%) translateY(-10px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(8, 18, 36, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent);
  opacity: 0;
}

.board-feedback.show {
  animation: popFeedback 0.8s ease;
}

.board-topline,
.board-bottomline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 24px 24px 0;
}

.board-topline span,
.board-bottomline p {
  color: var(--muted);
  line-height: 1.7;
}

.board-topline strong {
  color: var(--accent);
}

.board-stage {
  position: relative;
  z-index: 1;
  min-height: 420px;
  margin: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 240, 173, 0.07), transparent 40%),
    rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.board-stage::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}

.space-switcher {
  position: absolute;
  left: 42px;
  right: 42px;
  top: 38px;
  height: 138px;
  z-index: 0;
  overflow: hidden;
}

.space-track {
  display: flex;
  gap: 16px;
  width: max-content;
  transition: transform 280ms ease;
}

.space-card {
  width: 220px;
  height: 118px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(8, 18, 36, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  opacity: 0.5;
  transform: scale(0.94);
  transition: transform 220ms ease, opacity 220ms ease, border-color 220ms ease;
}

.space-card.active {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(124, 240, 173, 0.34);
}

.space-card span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent-2);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.space-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.space-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.space-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.space-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: transform 200ms ease, background 200ms ease;
}

.space-dots i.active {
  background: var(--accent);
  transform: scale(1.25);
}

.finger,
.pulse,
.context-menu,
.zoom-focus,
.zoom-grid,
.drag-object,
.drag-target {
  position: absolute;
}

.finger {
  width: 34px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(210, 228, 255, 0.68));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.finger-a {
  margin-left: -22px;
}

.finger-b {
  margin-left: 22px;
}

.pulse {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 1px solid rgba(124, 240, 173, 0.6);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
}

.pulse-b {
  border-color: rgba(54, 214, 255, 0.6);
}

.context-menu {
  right: 52px;
  top: 196px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(8, 18, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
  min-width: 120px;
  opacity: 0;
  transform: translateY(12px);
}

.zoom-focus {
  inset: 192px 90px 78px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at center, rgba(255, 187, 107, 0.22), transparent 32%),
    rgba(255, 255, 255, 0.02);
  transform: scale(0.86);
  opacity: 0;
}

.zoom-grid {
  inset: 182px 76px 64px;
  border-radius: 24px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0;
  transform: scale(0.88);
}

.drag-object {
  left: 84px;
  bottom: 72px;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd57e, #ff9a62);
  color: #331700;
  font-weight: 800;
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.26);
}

.drag-object.dragging {
  cursor: grabbing;
}

.drag-target {
  right: 78px;
  bottom: 64px;
  width: 180px;
  height: 120px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  border: 1px dashed rgba(124, 240, 173, 0.4);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.drag-target.active {
  border-color: rgba(124, 240, 173, 0.85);
  background: rgba(124, 240, 173, 0.12);
  color: var(--text);
}

.action-button {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07101d;
  font-weight: 800;
  padding: 14px 18px;
}

.action-button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  transform: none;
}

.event-log {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.event-log li {
  color: var(--muted);
}

.event-log li.latest {
  color: var(--text);
  font-weight: 700;
}

.mission-tapClick .finger-a {
  opacity: 1;
  animation: tapFinger 1.25s ease-in-out infinite;
}

.mission-tapClick .pulse-a {
  opacity: 1;
  animation: pulseRing 1.25s ease-out infinite;
}

.mission-secondaryClick .finger-a,
.mission-secondaryClick .finger-b {
  opacity: 1;
  animation: pressFinger 1.4s ease-in-out infinite;
}

.mission-secondaryClick .context-menu {
  opacity: 1;
  transform: translateY(0);
  animation: menuPulse 1.7s ease-in-out infinite;
}

.mission-vertical .finger-a,
.mission-vertical .finger-b {
  opacity: 1;
  animation: verticalFlow 1.5s ease-in-out infinite;
}

.mission-horizontal .finger-a,
.mission-horizontal .finger-b {
  opacity: 1;
  animation: horizontalFlow 1.5s ease-in-out infinite;
}

.mission-smartZoom .zoom-focus {
  opacity: 1;
  animation: smartZoomPulse 1.4s ease-in-out infinite;
}

.mission-smartZoom .pulse-a,
.mission-smartZoom .pulse-b {
  opacity: 1;
  animation: pulseRing 1.2s ease-out infinite;
}

.mission-zoom .zoom-grid {
  opacity: 1;
  animation: pinchZoom 1.7s ease-in-out infinite;
}

.mission-zoom .finger-a,
.mission-zoom .finger-b {
  opacity: 1;
}

.mission-zoom .finger-a {
  animation: pinchLeft 1.7s ease-in-out infinite;
}

.mission-zoom .finger-b {
  animation: pinchRight 1.7s ease-in-out infinite;
}

.mission-drag .drag-target {
  animation: dropPulse 1.7s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp 0.7s ease forwards;
}

.reveal-delay-1 {
  animation-delay: 0.14s;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatBlob {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(26px, -22px) scale(1.06);
  }
}

@keyframes flashPanel {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 240, 173, 0.24);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(124, 240, 173, 0);
  }
}

@keyframes popFeedback {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px) scale(0.9);
  }
  20%,
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px) scale(0.96);
  }
}

@keyframes pulseRing {
  0% {
    transform: translate(-50%, -50%) scale(0.66);
    opacity: 0.72;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.34);
    opacity: 0;
  }
}

@keyframes tapFinger {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  40% {
    transform: translate(-50%, -50%) translateY(14px);
  }
}

@keyframes pressFinger {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  40% {
    transform: translate(-50%, -50%) translateY(10px);
  }
}

@keyframes menuPulse {
  0%,
  100% {
    opacity: 0.88;
  }
  50% {
    opacity: 1;
  }
}

@keyframes verticalFlow {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(-28px);
  }
  50% {
    transform: translate(-50%, -50%) translateY(28px);
  }
}

@keyframes horizontalFlow {
  0%,
  100% {
    transform: translate(-50%, -50%) translateX(-30px);
  }
  50% {
    transform: translate(-50%, -50%) translateX(30px);
  }
}

@keyframes smartZoomPulse {
  0%,
  100% {
    transform: scale(0.88);
  }
  50% {
    transform: scale(1.03);
  }
}

@keyframes pinchZoom {
  0%,
  100% {
    transform: scale(0.84);
  }
  50% {
    transform: scale(1.02);
  }
}

@keyframes pinchLeft {
  0%,
  100% {
    transform: translate(-50%, -50%) translateX(-58px);
  }
  50% {
    transform: translate(-50%, -50%) translateX(-18px);
  }
}

@keyframes pinchRight {
  0%,
  100% {
    transform: translate(-50%, -50%) translateX(58px);
  }
  50% {
    transform: translate(-50%, -50%) translateX(18px);
  }
}

@keyframes dropPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(124, 240, 173, 0.16);
  }
  50% {
    box-shadow: 0 0 0 16px rgba(124, 240, 173, 0);
  }
}

@media (max-width: 1180px) {
  .hero,
  .topline,
  .workgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .panel-head,
  .board-topline,
  .board-bottomline {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .test-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .app {
    padding: 14px;
  }

  .hero,
  .main-panel,
  .side-card {
    border-radius: 22px;
    padding: 18px;
  }

  .practice-board {
    min-height: 600px;
  }

  .board-stage {
    min-height: 360px;
    margin: 18px;
  }

  .context-menu {
    right: 22px;
    top: 180px;
  }

  .drag-object {
    left: 30px;
    bottom: 30px;
  }

  .drag-target {
    right: 26px;
    bottom: 28px;
    width: 140px;
    height: 100px;
  }

  .space-switcher {
    left: 18px;
    right: 18px;
    top: 20px;
    height: 126px;
  }

  .space-card {
    width: 180px;
    height: 104px;
    padding: 14px;
  }
}
