:root {
  --bg: #07110d;
  --panel: rgba(9, 24, 18, 0.94);
  --panel-2: #0c1d16;
  --text: #d9f5e7;
  --muted: #83aa97;
  --accent: #65f5a2;
  --accent-2: #51c8ff;
  --border: rgba(101, 245, 162, 0.24);
  --shadow: rgba(0, 0, 0, 0.5);
}

:root[data-theme="blue"] {
  --bg: #07101d;
  --panel: rgba(8, 20, 39, 0.95);
  --panel-2: #0c1b31;
  --text: #e0edff;
  --muted: #8ca9cd;
  --accent: #63b3ff;
  --accent-2: #7fffd4;
  --border: rgba(99, 179, 255, 0.25);
}

:root[data-theme="amber"] {
  --bg: #171005;
  --panel: rgba(31, 21, 7, 0.95);
  --panel-2: #2a1d0a;
  --text: #fff0c9;
  --muted: #c3a66a;
  --accent: #ffca5c;
  --accent-2: #ff916a;
  --border: rgba(255, 202, 92, 0.27);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 28%),
    radial-gradient(circle at 85% 85%, color-mix(in srgb, var(--accent-2) 9%, transparent), transparent 30%),
    var(--bg);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: linear-gradient(rgba(255,255,255,.8) 1px, transparent 1px);
  background-size: 100% 4px;
}

.shell {
  width: min(1050px, 100%);
  min-height: min(760px, calc(100vh - 48px));
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 30px 80px var(--shadow), 0 0 0 1px rgba(255,255,255,.025) inset;
  backdrop-filter: blur(18px);
}

.topbar {
  height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.dots { display: flex; gap: 8px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; display: block; }
.dots span:nth-child(1) { background: #ff5f57; }
.dots span:nth-child(2) { background: #febc2e; }
.dots span:nth-child(3) { background: #28c840; }
.title { color: var(--muted); font-size: 13px; }
.theme-button {
  justify-self: end;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.theme-button:hover { color: var(--accent); border-color: var(--accent); }

.terminal {
  min-height: calc(min(760px, calc(100vh - 48px)) - 48px);
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding: clamp(22px, 4vw, 48px);
  scrollbar-color: var(--border) transparent;
}

.hero { margin-bottom: 28px; }
.ascii {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: clamp(6px, 1.15vw, 13px);
  line-height: 1.05;
  text-shadow: 0 0 22px color-mix(in srgb, var(--accent) 35%, transparent);
}
h1 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 52px); letter-spacing: -0.05em; }
.role { margin: 0 0 15px; color: var(--accent-2); font-size: clamp(14px, 2vw, 18px); }
.intro { max-width: 760px; line-height: 1.7; color: var(--text); }
.hint { color: var(--muted); margin-top: 24px; }
kbd { color: var(--accent); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.quick-actions button {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 13px;
  font: inherit;
  cursor: pointer;
}
.quick-actions button:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); transform: translateY(-1px); }

.prompt-line { display: flex; align-items: baseline; gap: 10px; margin: 13px 0; }
.prompt { white-space: nowrap; color: var(--muted); }
.prompt .user { color: var(--accent); }
.prompt .path { color: var(--accent-2); }
#commandInput {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  caret-color: var(--accent);
  font: inherit;
  font-size: 16px;
}

.command-record { margin: 16px 0 8px; color: var(--muted); }
.command-record strong { color: var(--accent); font-weight: 500; }
.output-block {
  margin: 0 0 26px;
  padding: 18px 20px;
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  border-radius: 0 10px 10px 0;
  line-height: 1.65;
  animation: reveal .22s ease-out both;
}
.output-block h2 { margin: 0 0 10px; color: var(--accent); font-size: 18px; }
.output-block p { margin: 7px 0; }
.output-block ul { padding-left: 20px; margin: 8px 0; }
.output-block li { margin: 7px 0; }
.output-block a { color: var(--accent-2); text-underline-offset: 3px; }
.command-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 22px; }
.command-grid div span { color: var(--accent); display: inline-block; min-width: 95px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag { padding: 4px 9px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.timeline-item { margin-bottom: 18px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item strong { color: var(--accent-2); }
.muted { color: var(--muted); }
.error { color: #ff8c8c; }

@keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

@media (max-width: 620px) {
  body { padding: 0; }
  .shell { min-height: 100vh; border: 0; border-radius: 0; }
  .terminal { min-height: calc(100vh - 48px); max-height: calc(100vh - 48px); padding: 24px 18px; }
  .topbar { grid-template-columns: auto 1fr auto; gap: 12px; }
  .title { text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .prompt-line { gap: 7px; }
  .prompt { font-size: 13px; }
}
