:root {
  --bg: #050506;
  --bg-alt: #0c0c0f;
  --bg-elevated: #151517;
  --text: #f5f5f5;
  --muted: #a0a0a0;
  --border-subtle: #2b2b2f;
  --accent: #1f7cff;
  --accent-soft: rgba(31, 124, 255, 0.15);
  --radius: 14px;
  --shadow-soft: 0 22px 55px rgba(0, 0, 0, 0.9);
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  font-size: 18px;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #737373 0, #737373 45%, #737373 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.page-shell {
  width: 90vw;
  height: 90vh;
}

/* TERMINAL FRAME */
.terminal-frame {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top, #141416, #070708 55%, #050506 100%);
  border-radius: 18px;
  border: 1px solid #262629;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(
    to bottom,
    #111112,
    #09090a
  );
  font-family: var(--font-mono);

  letter-spacing: 0.08em;
  color: #a3a3a3;
}

.terminal-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.1rem;
}

.terminal-title-main {
  font-size: 1.3em;
}

.terminal-title-sub {
  font-size: 0.8rem;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.terminal-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
}

.cmd-link {
  border: none;
  background: none;
  color: #c9c9c9;
  font: inherit;
  text-transform: lowercase;
  cursor: pointer;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  position: relative;
  transition: background 0.16s ease-out, color 0.16s ease-out, transform 0.1s ease-out;
}

.cmd-link::after {
  content: "";
  position: absolute;
  inset: auto 0 -0.18rem;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(to right, #ffffff, var(--accent));
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: center;
  transition: opacity 0.16s ease-out, transform 0.16s ease-out;
}

.cmd-link:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.cmd-link:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.cmd-link.active {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.cmd-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* TERMINAL BODY */
.terminal-body {
  flex: 1;
  padding: 1rem 1rem 0.8rem;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: var(--font-mono);
  font-size: 1.02rem;
  background:
    linear-gradient(
      to bottom,
      rgba(10, 10, 12, 0.95),
      #050506 40%
    );
  position: relative;
}

.terminal-body-inner {
  max-width: 100%;
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 0.14rem;
}

.terminal-line.muted {
  color: var(--muted);
}

.terminal-line .accent {
  color: var(--accent);
}

.prompt-line {
  color: #d4d4d4;
}

.prompt-text {
  color: #7dd3fc;
}

.path-text {
  color: #abc;
}

.command-text {
  color: #e5e5e5;
}

.caret {
  display: inline-block;
  width: 0.6ch;
  background: #f5f5f5;
  margin-left: 1px;
  animation: blink 1s step-end infinite;
}

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

.hint-line {
  margin-top: 0.6rem;
  color: #737373;
  font-size: 0.9rem;
}

.hint-key {
  border-radius: 4px;
  padding: 0 0.25rem;
  border: 1px solid #3f3f3f;
  background: rgba(12, 12, 13, 0.9);
  font-size: 0.82rem;
}

.inline-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dashed rgba(31, 124, 255, 0.6);
}

.inline-link:hover {
  text-decoration: none;
  border-bottom-style: solid;
}

.prompt-prefix {
    display: flex;
    align-items: center;
    white-space: nowrap;
    color: #d4d4d4;
}
.prompt-label {
    font-family: var(--font-mono);
}

.user {
  color: #7dd3fc;
}

.host1 {
  color: white;
}
.host2 {
    color: #737373;
}

.logo1 {
    color: white;
}
.logo2 {
    color: #737373;
}

.path {
  color: #a3a3a3;
}

.terminal-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 0.15rem 0;
}

.terminal-input::placeholder {
  color: #555;
  font-size: 0.9rem;
}

/* SCROLLBAR */
.terminal-body::-webkit-scrollbar {
  width: 7px;
}

.terminal-body::-webkit-scrollbar-track {
  background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: #262629;
  border-radius: 999px;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  body {
      padding: 0.75em;
  }

    .page-shell {
        width: 100%;
        height: auto;
        min-height: 100vh;       /* lets it grow but still fill vertically */
    }

    .terminal-frame {
        border-radius: 18px;     /* keep the rounded corners like desktop */
    }

    .terminal-header {
        flex-wrap: wrap;
        row-gap: 0.4rem;
    }

    .terminal-title {
        order: 3;
        width: 100%;
        align-items: flex-start;
        margin-top: 0.15rem;
    }

    .terminal-nav {
        font-size: 0.86rem;
    }

    .terminal-body {
        font-size: 1rem;
    }
}
