* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #000;
  --green: #22c55e;
  --green-bright: #4ade80;
  --blue: #3b82f6;
  --text: #d1d5db;
  --border: #166534;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes caretBlink {
  0%, 45% {
    border-color: var(--green-bright);
    opacity: 1;
  }
  50%, 100% {
    border-color: transparent;
    opacity: .65;
  }
}

html, body {
  height: 100%;
  background:
    radial-gradient(circle at top left, rgba(74, 222, 128, 0.10), transparent 32%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, #020202 0%, #000 45%, #000 100%);
  color: var(--text);
  font-family: 'Courier New', Courier, monospace;
  overflow: hidden;
}

body {
  position: relative;
  isolation: isolate;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background:
    radial-gradient(circle at 20% 20%, rgba(74, 222, 128, 0.14), transparent 22%),
    radial-gradient(circle at 80% 30%, rgba(59, 130, 246, 0.12), transparent 18%),
    radial-gradient(circle at 50% 80%, rgba(74, 222, 128, 0.06), transparent 24%);
  filter: blur(18px);
  opacity: .9;
}

body::after {
  z-index: -1;
  opacity: .11;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 3px 3px, 3px 3px;
  mix-blend-mode: screen;
}

.header {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  animation: fadeUp .45s ease both;
}
.header h1 {
  color: var(--green-bright);
  font-size: 26px;
  letter-spacing: 1px;
}
.header p { color: #9ca3af; font-size: 13px; margin-top: 2px;}

.main {
  display: grid;
  grid-template-columns: 40% 60%;
  height: calc(100vh - 96px);
}

/* CARD PANE */
.card-pane {
  position: relative;
  border-right: 1px solid var(--border);
  overflow: hidden;
  animation: fadeUp .55s ease both;
}
#card-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
#card-canvas:active { cursor: grabbing; }
.card-tag {
  position: absolute;
  bottom: 12px;
  right: 16px;
  color: #9ca3af;
  font-size: 12px;
  pointer-events: none;
}

/* TERMINAL PANE */
.terminal-pane {
  display: flex;
  flex-direction: column;
  animation: fadeUp .65s ease both;
}
.term-nav {
  display: flex;
  gap: 28px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.term-nav button {
  background: transparent;
  border: none;
  color: var(--green);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color .15s, text-shadow .15s;
}
.term-nav button:hover {
  color: var(--green-bright);
  text-shadow: 0 0 6px var(--green);
}

.terminal {
  flex: 1;
  padding: 18px 24px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.35;          /* tighter, like a real shell */
}
.terminal::-webkit-scrollbar { width: 8px; }
.terminal::-webkit-scrollbar-thumb { background: #166534; }

.output > div { white-space: pre-wrap; }
.block { margin: 6px 0; }      /* spacing between command blocks */
.block.reveal {
  animation: fadeUp .28s cubic-bezier(.2, .8, .2, 1) both;
}

.prompt { color: var(--blue); }
.cmd-typed { color: var(--green-bright); margin-left: 6px; }
.typing-cursor {
  border-right: 1px solid var(--green-bright);
  padding-right: 2px;
  animation: caretBlink .85s steps(1) infinite;
}

.input-line { display: flex; align-items: center; }
#cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--green-bright);
  font-family: inherit;
  font-size: 14px;
  margin-left: 8px;
  caret-color: var(--green-bright);
}

.section-title { color: var(--green-bright); font-weight: bold; }
.label { color: var(--green); }
.dim { color: #9ca3af; }

.footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 6px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--green);
  background: var(--bg);
  animation: fadeUp .45s ease both;
}

@media (max-width: 800px) {
  .main { grid-template-columns: 1fr; grid-template-rows: 45% 55%; }
  .card-pane { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}