:root {
    --bg: #090c10;
    --panel: #101419;
    --line: #1c232c;
    --text: #d6dce4;
    --muted: #8b96a6;
    --accent: #75fca3;
    --glow-a: rgba(66, 153, 225, 0.18);
    --glow-b: rgba(117, 252, 163, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--bg);
  scrollbar-color: #324255 #0f1620;
}

body {
    font-family: "JetBrains Mono", monospace;
    background:
        radial-gradient(circle at 22% 10%, #223347 0%, transparent 48%),
        radial-gradient(circle at 78% 86%, #1c3122 0%, transparent 45%),
        linear-gradient(120deg, #111a26 0%, #182434 55%, #121c2a 100%);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

body::before {
    background-image:
        linear-gradient(rgba(120, 140, 160, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 140, 160, 0.07) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at center, black 10%, transparent 78%);
}

body::after {
    background:
        radial-gradient(circle at 15% 35%, var(--glow-a), transparent 40%),
        radial-gradient(circle at 85% 72%, var(--glow-b), transparent 46%);
}

.terminal {
    width: min(920px, 100%);
    border: 1px solid var(--line);
    background: rgba(16, 20, 25, 0.94);
    backdrop-filter: blur(2px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.terminal__header {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border-bottom: 1px solid var(--line);
    padding: 0 1rem;
    background: #0e1318;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot--red {
    background: #ff5f56;
}

.dot--yellow {
    background: #ffbd2e;
}

.dot--green {
    background: #27c93f;
}

.terminal__title {
    margin: 0 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.terminal__screen {
  min-height: 70vh;
  max-height: 74vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  scrollbar-color: #324255 #0f1620;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.terminal__screen::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.terminal__screen::-webkit-scrollbar-track {
  background: #0f1620;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.terminal__screen::-webkit-scrollbar-thumb {
  background: #324255;
  border-radius: 999px;
  border: 2px solid #0f1620;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.terminal__screen::-webkit-scrollbar-thumb:hover {
  background: #3e546d;
}

.output {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.output p {
    margin: 0.15rem 0;
}

.output a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.output a:visited {
    color: var(--accent);
}

.output a:hover {
    opacity: 0.88;
}

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

.highlight {
    color: var(--accent);
}

.prompt-row {
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
}

.prompt-label {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.96rem;
}

.prompt-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

.mobile-tabs {
    display: none;
}

@media (max-width: 640px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        padding: 0.75rem;
    }

    body::before {
        background-size: 38px 38px;
    }

    .terminal {
        width: 100%;
        max-width: 100%;
        border-radius: 10px;
    }

    .terminal__title {
        font-size: 0.75rem;
    }

    .terminal__screen {
        min-height: 68vh;
        max-height: 72vh;
        padding: 0.9rem;
        font-size: 0.86rem;
    }

    .prompt-label {
        font-size: 0.78rem;
        flex-shrink: 0;
    }

    .prompt-input {
        font-size: 1rem;
    }

    .mobile-tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding: 0.65rem 0.75rem 0.75rem;
        border-top: 1px solid var(--line);
        background: #0d1217;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-tab {
        flex: 0 0 auto;
        border: 1px solid #25313f;
        background: #111923;
        color: var(--text);
        font: inherit;
        font-size: 0.8rem;
        line-height: 1;
        padding: 0.52rem 0.68rem;
        border-radius: 999px;
    }

    .mobile-tab:active {
        transform: translateY(1px);
        background: #16212e;
        border-color: #2b3d4f;
    }
}
