:root {
    --bg: #0b0e14;
    --bg-soft: #11151f;
    --panel: #0f141f;
    --border: #1e2635;
    --text: #c9d1d9;
    --muted: #7d8590;
    --accent: #00d9ff;
    --accent-dim: #0aa8c9;
    --green: #3fb950;
    --red: #f85149;
    --mono: "SFMono-Regular", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    font-size: 16px;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */

nav {
    position: sticky; top: 0; z-index: 10;
    background: rgba(11, 14, 20, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
nav .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px;
}
.brand {
    font-family: var(--mono);
    font-weight: 700; font-size: 17px;
    color: var(--accent);
    letter-spacing: -0.5px;
    text-decoration: none;
}
.brand .cursor {
    display: inline-block; width: 9px; height: 17px;
    background: var(--accent);
    vertical-align: -2px;
    animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
nav .links a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 24px;
    font-size: 14px;
}
nav .links a:hover { color: var(--accent); }

/* ---------- hero ---------- */

.hero {
    padding: 84px 0 48px;
    text-align: center;
    background:
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(0, 217, 255, 0.10), transparent),
        var(--bg);
}
.hero .tag {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 18px;
}
.hero h1 {
    font-family: var(--mono);
    font-size: clamp(38px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -2px;
    color: var(--accent);
    text-shadow: 0 0 40px rgba(0, 217, 255, 0.35);
}
.hero .sub {
    max-width: 640px;
    margin: 20px auto 0;
    color: var(--muted);
    font-size: 18px;
}
.hero .cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 8px;
    font-family: var(--mono);
    font-size: 14px;
    text-decoration: none;
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    transition: all 0.15s ease;
}
.btn:hover { background: rgba(0, 217, 255, 0.08); box-shadow: 0 0 24px rgba(0, 217, 255, 0.25); }
.btn.solid { background: var(--accent-dim); color: #04161c; font-weight: 700; border-color: transparent; }
.btn.solid:hover { background: var(--accent); }
.hero .badges { margin-top: 22px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hero .badges img { height: 20px; }

/* ---------- tui screenshot ---------- */

.tui-wrap {
    margin: 40px auto 0;
    max-width: 1180px;
    padding: 0 24px;
}
.tui-shell {
    background: #0a0d12;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 217, 255, 0.05);
    overflow: hidden;
}
.tui-titlebar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
}
.tui-titlebar .dots { display: flex; gap: 6px; margin-right: 8px; }
.tui-titlebar .dots i {
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--border);
}
.tui-titlebar .dots i:nth-child(1) { background: #f85149; }
.tui-titlebar .dots i:nth-child(2) { background: #d29922; }
.tui-titlebar .dots i:nth-child(3) { background: #3fb950; }
.tui-screen {
    padding: 10px 0 0;
    overflow-x: auto;
    max-height: 620px;
    overflow-y: auto;
}
.tui-screen pre {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.25;
    color: #e6edf3;
    padding: 0 12px 12px;
    display: inline-block;
    min-width: 100%;
    white-space: pre;
}

/* ---------- cast player ---------- */

.cast-wrap {
    max-width: 1180px;
    margin: 40px auto 0;
    padding: 0 24px;
}
.cast-wrap .ap-wrapper,
.cast-wrap .ap-player {
    width: 100% !important;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 217, 255, 0.05);
    overflow: hidden;
}

/* ---------- sections ---------- */

section { padding: 72px 0; }
section.alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.sec-head .kicker {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}
.sec-head h2 { font-size: 30px; letter-spacing: -0.5px; }
.sec-head p { color: var(--muted); margin-top: 12px; }

/* feature cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--accent-dim); }
.card .icon { font-family: var(--mono); font-size: 22px; color: var(--accent); }
.card h3 { font-size: 17px; margin: 12px 0 8px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* install */
.quick-title {
    max-width: 760px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}
.one-liner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
    max-width: 760px;
    background: #0a0d12;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    font-family: var(--mono);
    font-size: 13.5px;
    color: #e6edf3;
}
.one-liner .prompt {
    color: var(--green);
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
}
.one-liner #install-cmd-text {
    flex: 1;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.copy-btn {
    flex-shrink: 0;
    background: var(--bg-soft);
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 4px 12px;
    font-family: var(--mono);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

.install-table {
    width: 100%;
    max-width: 760px;
    margin: 26px auto 0;
    border-collapse: collapse;
    font-size: 14px;
}
.install-table th {
    text-align: left;
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
}
.install-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.install-table tr:last-child td { border-bottom: none; }
.install-table td:first-child { color: var(--text); white-space: nowrap; }
.install-table td:nth-child(2) { width: 55%; }
.install-table code {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--accent);
    word-break: break-all;
}
.install-table td:last-child {
    color: var(--muted);
    font-size: 13px;
}
.install-table a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent-dim);
}
.install-table a:hover { color: var(--accent-dim); }

/* keys + flow */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.flow ol { list-style: none; counter-reset: step; }
.flow li {
    counter-increment: step;
    position: relative;
    padding: 0 0 22px 48px;
    color: var(--muted);
}
.flow li::before {
    content: counter(step);
    position: absolute; left: 0; top: 2px;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border: 1px solid var(--accent-dim);
    border-radius: 50%;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 13px;
}
.flow li strong { color: var(--text); }
.flow li code { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.flow li:not(:last-child)::after {
    content: "";
    position: absolute; left: 14.5px; top: 36px;
    width: 1px; height: calc(100% - 34px);
    background: var(--border);
}

table.keys { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.keys td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
}
table.keys tr:last-child td { border-bottom: none; }
table.keys td:first-child { width: 150px; }
table.keys kbd {
    font-family: var(--mono);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 12.5px;
    color: var(--accent);
}
table.keys td:last-child { color: var(--muted); }

/* how it works */
.how ul { list-style: none; max-width: 720px; margin: 0 auto; }
.how li {
    padding: 16px 0 16px 34px;
    position: relative;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}
.how li::before {
    content: "$";
    position: absolute; left: 0; top: 16px;
    color: var(--accent);
    font-family: var(--mono);
}
.how li strong { color: var(--text); }

/* footer */
footer {
    border-top: 1px solid var(--border);
    padding: 34px 0;
    text-align: center;
    color: var(--muted);
    font-size: 13.5px;
}
footer a { color: var(--accent); text-decoration: none; }
footer .mono { font-family: var(--mono); font-size: 12.5px; margin-top: 8px; }
