/* Colors follow the app's dark theme (JetBrains-like): flat surfaces, no borders, one accent. */
:root {
    --bg: #1e1f22;
    --panel: #2b2d30;
    --panel-2: #313338;
    --text: #dfe1e5;
    --muted: #8c9099;
    --faint: #6f737a;
    --accent: #3b82f6;
    --accent-hover: #5592f7;
    --green: #6aab73;
    --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Two languages in one page; the inline script in <head> picks one before first paint. */
html[data-lang="zh"] [lang="en"],
html[data-lang="en"] [lang="zh"] {
    display: none !important;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
code { font-family: var(--mono); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
:focus { outline: none; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.35); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }

/* ---------------------------------------------------------------- top bar */
.bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(30, 31, 34, 0.86);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
}
.bar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.brand img { border-radius: 5px; }
nav { display: flex; align-items: center; gap: 4px; font-size: 14px; }
nav a, .lang {
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--muted);
}
nav a:hover, .lang:hover { background: var(--panel); color: var(--text); }
.lang { border: 0; background: none; font: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 88px 0 40px; text-align: center; }
.kicker { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.1; }
.lede { max-width: 720px; margin: 22px auto 0; color: #b4b8bf; font-size: 18px; }
.install {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 620px;
    margin: 36px auto 0;
    padding: 6px 6px 6px 18px;
    border-radius: 10px;
    background: var(--panel);
    text-align: left;
}
.install code {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 14.5px;
    color: var(--text);
    scrollbar-width: none;
}
.install code::-webkit-scrollbar { display: none; }
.copy {
    flex-shrink: 0;
    min-width: 72px;
    padding: 8px 14px;
    border: 0;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    font: 500 14px var(--sans);
    cursor: pointer;
}
.copy:hover { background: var(--accent-hover); }
.copy .ok { display: none; }
.copy.done { background: var(--green); }
.copy.done .idle { display: none; }
.copy.done .ok { display: inline; }
.meta { margin: 14px 0 0; color: var(--faint); font-size: 14px; }
.meta a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.2); }
.meta a:hover { color: var(--text); }
.sep { margin: 0 6px; }

/* ---------------------------------------------------------------- screenshots */
.shot { margin: 0; }
.shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: var(--panel);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.hero-shot { margin: 24px auto 0; }

/* ---------------------------------------------------------------- features */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 96px 0 24px;
}
.features article { padding: 22px 22px 24px; border-radius: 10px; background: var(--panel); }
.features h3 { font-size: 16px; }
.features p { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* ---------------------------------------------------------------- showcases */
.showcase {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    align-items: center;
    padding: 72px 0;
}
.showcase h2 { font-size: 26px; line-height: 1.3; }
.showcase p { margin: 14px 0 0; color: var(--muted); }

/* ---------------------------------------------------------------- install */
.install-section { padding: 72px 0 40px; }
.install-section h2 { font-size: 30px; }
.steps { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; margin-top: 24px; }
.steps > div { padding: 26px; border-radius: 10px; background: var(--panel); }
.steps h3 { font-size: 17px; }
.steps .install { margin: 16px 0 0; max-width: none; background: var(--bg); }
.steps ul { margin: 18px 0 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.steps li + li { margin-top: 8px; }
.steps li a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.25); }
.button {
    display: inline-block;
    margin-top: 16px;
    padding: 9px 16px;
    border-radius: 7px;
    background: var(--panel-2);
    font-size: 14px;
    font-weight: 500;
}
.button:hover { background: #3b3e44; }
code.block { display: block; margin-top: 8px; padding: 8px 12px; border-radius: 6px; background: var(--bg); font-size: 13px; color: var(--text); overflow-x: auto; white-space: nowrap; }
.note { margin: 18px 0 0; color: var(--faint); font-size: 14px; }

/* ---------------------------------------------------------------- footer */
.foot {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 40px 0 56px;
    color: var(--faint);
    font-size: 14px;
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 1000px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .showcase { grid-template-columns: 1fr; gap: 24px; padding: 48px 0; }
    .steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    body { font-size: 17px; }
    .wrap { width: calc(100% - 32px); }
    nav a[href^="#"] { display: none; }
    .hero { padding-top: 56px; }
    .lede { font-size: 17px; }
    .install code { font-size: 13px; }
    .features { grid-template-columns: 1fr; padding-top: 64px; }
    .features p, .steps ul { font-size: 15.5px; }
    .shot img { border-radius: 8px; }
    .foot { flex-direction: column; }
}
