/* ============================================================
   OICPP IDE — 站点样式表
   设计语言：中性灰底 + 单一深蓝强调色，1px 细边框，小圆角，
            不使用大面积渐变与超大圆角。
   ============================================================ */

:root {
    --ink: #101418;
    --ink-2: #3b4553;
    --muted: #6b7480;
    --line: #e4e7ec;
    --line-strong: #cfd5de;
    --bg: #ffffff;
    --bg-soft: #f7f8fa;
    --bg-dark: #0f1319;

    --brand: #1c4ed8;
    --brand-ink: #1740b0;
    --brand-soft: #eef2fd;

    --ok: #0f7a4d;
    --ok-soft: #eaf6ef;
    --warn: #9a5b06;
    --warn-soft: #fdf4e6;
    --err: #b3261e;
    --err-soft: #fdeceb;

    --r: 4px;
    --r-md: 6px;

    --shadow-1: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow-2: 0 12px 32px -20px rgba(16, 24, 40, .55);

    --max: 1120px;

    --sans: "Inter", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; line-height: 1.28; letter-spacing: -.018em; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
table { border-collapse: collapse; }

.hidden { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 18px; } }

/* ---------------- 导航 ---------------- */
.site-nav {
    position: sticky; top: 0; z-index: 60;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .2s ease;
}
.site-nav.nav-scrolled { box-shadow: 0 1px 8px rgba(16, 24, 40, .06); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 650; letter-spacing: -.012em; }
.brand img { width: 28px; height: 28px; border-radius: var(--r-md); border: 1px solid var(--line); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14.5px; color: var(--ink-2); transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
    display: none; width: 40px; height: 40px; padding: 0;
    align-items: center; justify-content: center;
    border: 1px solid var(--line-strong); border-radius: var(--r);
    background: #fff; color: var(--ink-2); cursor: pointer;
}
.nav-toggle:hover { background: var(--bg-soft); }

.mobile-menu { display: none; border-top: 1px solid var(--line); background: #fff; }
.mobile-menu:not(.hidden) { display: block; }
.mobile-menu a { display: block; padding: 13px 24px; font-size: 15px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu a:hover { background: var(--bg-soft); color: var(--ink); }

@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-toggle { display: inline-flex; }
}
@media (max-width: 420px) {
    .nav-cta { display: none; }
}

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px;
    border: 1px solid transparent; border-radius: var(--r);
    font-size: 14.5px; font-weight: 550; line-height: 1;
    cursor: pointer; white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn i { font-size: 13.5px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(28, 78, 216, .22); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-outline { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { background: var(--bg-soft); border-color: #b8bfca; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15.5px; }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ---------------- 通用区块 ---------------- */
.section { padding: 80px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
@media (max-width: 700px) { .section { padding: 52px 0; } }

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(23px, 2.7vw, 31px); font-weight: 670; letter-spacing: -.026em; }
.section-head p { margin-top: 12px; font-size: 15.5px; color: var(--muted); }
@media (max-width: 700px) { .section-head { margin-bottom: 28px; } }

.eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 12px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase;
    color: var(--brand); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: currentColor; }

/* ---------------- 首屏 ---------------- */
.hero { border-bottom: 1px solid var(--line); padding: 76px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 680; letter-spacing: -.032em; }
.hero h1 .accent { color: var(--brand); }
.hero .sub { margin-top: 18px; max-width: 33em; font-size: clamp(15px, 1.55vw, 17px); color: var(--muted); line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-meta .k { font-size: 23px; font-weight: 680; letter-spacing: -.024em; font-variant-numeric: tabular-nums; }
.hero-meta .v { margin-top: 3px; font-size: 13px; color: var(--muted); }
@media (max-width: 960px) {
    .hero { padding: 48px 0 44px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 520px) {
    .hero-meta { gap: 26px; }
    .hero-meta .k { font-size: 20px; }
}

/* 版本信息面板 */
.release-card {
    border: 1px solid var(--line); border-radius: var(--r-md);
    background: #fff; box-shadow: var(--shadow-1);
}
.release-card .rc-head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 13px 18px; border-bottom: 1px solid var(--line);
}
.release-card .rc-title { font-size: 13px; font-weight: 650; letter-spacing: .02em; color: var(--ink); }
.release-card .rc-link { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: color .15s ease; }
.release-card .rc-link i { font-size: 11px; }
.release-card .rc-link:hover { color: var(--brand); }
.release-card dl { margin: 0; }
.release-card .rc-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
    padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.release-card .rc-row:last-child { border-bottom: 0; }
.release-card dt { color: var(--muted); white-space: nowrap; }
.release-card dd { margin: 0; text-align: right; color: var(--ink); font-weight: 550; }
.release-card dd .mono { font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* ---------------- 特性网格 ---------------- */
.feature-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px; background: var(--line);
    border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.feature { background: #fff; padding: 26px 24px; transition: background-color .15s ease; }
.feature:hover { background: var(--bg-soft); }
.feature-icon {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin-bottom: 16px;
    border: 1px solid var(--line); border-radius: var(--r-md);
    background: #fff; color: var(--brand); font-size: 14.5px;
}
.feature h3 { font-size: 15.5px; font-weight: 630; letter-spacing: -.012em; }
.feature p { margin-top: 8px; font-size: 14px; line-height: 1.7; color: var(--muted); }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------------- 徽标 ---------------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    height: 22px; padding: 0 8px;
    border: 1px solid var(--line); border-radius: 3px;
    background: var(--bg-soft); color: var(--ink-2);
    font-size: 12px; font-weight: 600; letter-spacing: .015em; white-space: nowrap;
}
.badge-brand { background: var(--brand-soft); border-color: #d6e0fb; color: var(--brand-ink); }
.badge-ok { background: var(--ok-soft); border-color: #cde8da; color: var(--ok); }
.badge-warn { background: var(--warn-soft); border-color: #f2e1c1; color: var(--warn); }
.badge-err { background: var(--err-soft); border-color: #f6d4d1; color: var(--err); }

/* ---------------- 更新日志卡片 ---------------- */
.log-card { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; padding: 26px; }
.log-head {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.log-head h3 { font-size: 17px; font-weight: 640; font-family: var(--mono); letter-spacing: -.01em; }
.log-head .date { font-size: 13px; color: var(--muted); margin-left: auto; }
@media (max-width: 520px) { .log-head .date { margin-left: 0; } }

.log-list { display: grid; gap: 9px; }
.log-item { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.log-item::before {
    content: ""; flex: none; width: 5px; height: 5px; margin-top: 9px;
    border-radius: 50%; background: var(--line-strong);
}
.log-more { margin-top: 14px; font-size: 13.5px; color: var(--muted); font-style: italic; }

/* ---------------- 关于 ---------------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; }
.about-grid h2 { font-size: clamp(23px, 2.7vw, 31px); font-weight: 670; letter-spacing: -.026em; }
.about-grid p { margin-top: 16px; font-size: 15px; line-height: 1.78; color: var(--muted); }
.stat-row { display: flex; flex-wrap: wrap; gap: 48px; margin-top: 34px; }
.stat .n { font-size: 30px; font-weight: 680; letter-spacing: -.028em; font-variant-numeric: tabular-nums; }
.stat .l { margin-top: 4px; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }

.contact-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-soft); padding: 8px 22px; }
.contact-row { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-row > i { width: 18px; margin-top: 3px; color: var(--muted); font-size: 13.5px; text-align: center; }
.contact-row .label { font-size: 13px; color: var(--muted); }
.contact-row .value { font-size: 14.5px; color: var(--ink); margin-top: 1px; }
.contact-row .value.link { color: var(--brand); }
.contact-row .value.link:hover { text-decoration: underline; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 34px 0; }
.footer-inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 16px; font-size: 13.5px; color: var(--muted);
}
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-brand img { width: 22px; height: 22px; border-radius: var(--r); opacity: .8; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--muted); transition: color .15s ease; }
.footer-links a:hover { color: var(--ink); }

/* ---------------- 内页头部 ---------------- */
.page-head { border-bottom: 1px solid var(--line); padding: 56px 0 40px; }
.page-head h1 { font-size: clamp(26px, 3.3vw, 35px); font-weight: 680; letter-spacing: -.028em; }
.page-head p { margin-top: 12px; max-width: 46em; font-size: 15.5px; color: var(--muted); line-height: 1.72; }
@media (max-width: 700px) { .page-head { padding: 36px 0 28px; } }

/* ---------------- 版本胶囊 ---------------- */
.version-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.version-pill {
    display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: var(--r);
    background: #fff; font-size: 13px; color: var(--muted);
}
.version-pill b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--ink); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #9aa4b2; }
.dot-ok { background: var(--ok); }
.dot-warn { background: #c98a12; }

/* ---------------- 下载页 ---------------- */
.page-body { padding: 12px 0 72px; }
.dl-group { margin-top: 40px; }
.dl-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.dl-group-head h2 { font-size: 17px; font-weight: 640; letter-spacing: -.014em; }
.dl-group-head .ver { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.dl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 14px; }
.dl-card {
    display: flex; flex-direction: column; gap: 14px;
    border: 1px solid var(--line); border-radius: var(--r-md);
    background: #fff; padding: 18px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dl-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.dl-card-top { display: flex; align-items: center; gap: 11px; }
.dl-icon {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex: none;
    border: 1px solid var(--line); border-radius: var(--r-md);
    background: var(--bg-soft); color: var(--ink-2); font-size: 15px;
}
.dl-name { font-size: 14.5px; font-weight: 620; letter-spacing: -.012em; }
.dl-desc { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.dl-meta { display: grid; gap: 6px; }
.dl-meta .row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.dl-meta .row > span:first-child { color: var(--muted); }
.dl-meta .row > span:last-child { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.dl-card .btn { margin-top: auto; }

.empty-state {
    border: 1px dashed var(--line-strong); border-radius: var(--r-md);
    padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px;
}
.empty-state i { display: block; margin-bottom: 10px; font-size: 20px; color: #9aa4b2; }

.callout {
    display: flex; gap: 12px;
    border: 1px solid var(--line); border-left: 2px solid var(--brand);
    border-radius: var(--r); background: var(--bg-soft);
    padding: 14px 16px; margin-top: 20px;
    font-size: 13.5px; line-height: 1.7; color: var(--ink-2);
}
.callout i { margin-top: 3px; color: var(--brand); font-size: 13px; }
.callout strong { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 2px; }
.callout code {
    display: inline-block; margin-top: 8px; padding: 7px 10px;
    border: 1px solid var(--line); border-radius: 3px; background: #fff;
    font-family: var(--mono); font-size: 12.5px; color: var(--ink-2);
    word-break: break-all; -webkit-user-select: all; user-select: all;
}

/* ---------------- 更新日志页 ---------------- */
.log-entry { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; padding: 24px; margin-bottom: 14px; }
.log-entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.log-entry-head h3 { font-family: var(--mono); font-size: 16.5px; font-weight: 640; }
.log-entry-head .date { font-size: 13px; color: var(--muted); margin-left: auto; }
@media (max-width: 520px) { .log-entry-head .date { margin-left: 0; } }

/* ---------------- FAQ ---------------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; padding: 20px 22px; margin-bottom: 12px; }
.faq-item h2 { font-size: 15.5px; font-weight: 630; letter-spacing: -.012em; }
.faq-item p { margin-top: 8px; font-size: 14.5px; line-height: 1.78; color: var(--ink-2); }

/* ---------------- 登录页 ---------------- */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px; background: var(--bg-soft);
}
.auth-card {
    width: 100%; max-width: 384px; background: #fff;
    border: 1px solid var(--line); border-radius: 8px;
    padding: 32px; box-shadow: var(--shadow-1);
}
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head .mark {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: 0 auto 14px;
    border: 1px solid var(--line); border-radius: var(--r-md);
    background: var(--bg-soft); color: var(--brand); font-size: 16px;
}
.auth-head h1 { font-size: 19px; font-weight: 660; letter-spacing: -.02em; }
.auth-head p { margin-top: 6px; font-size: 13.5px; color: var(--muted); }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 16px; }
.field > label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 550; color: var(--ink-2); }
.input, .select, .textarea {
    width: 100%; padding: 0 12px; height: 42px;
    border: 1px solid var(--line-strong); border-radius: var(--r);
    background: #fff; color: var(--ink);
    font: inherit; font-size: 14.5px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.select { -webkit-appearance: none; appearance: none; padding-right: 32px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7480' d='M6 8.5 1.8 4.3l.9-.9L6 6.7l3.3-3.3.9.9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(28, 78, 216, .12);
}
.input::placeholder, .textarea::placeholder { color: #9aa4b2; }

.alert { margin-top: 16px; padding: 10px 12px; border: 1px solid #f6d4d1; border-radius: var(--r); background: var(--err-soft); color: var(--err); font-size: 13.5px; }

/* ---------------- 加载 ---------------- */
.spinner {
    display: inline-block; width: 14px; height: 14px; vertical-align: -2px;
    border: 2px solid var(--line-strong); border-top-color: var(--brand);
    border-radius: 50%; animation: oicpp-spin .8s linear infinite;
}
@keyframes oicpp-spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 44px 0; color: var(--muted); font-size: 14px; }

/* ---------------- 兼容旧工具类 ---------------- */
.opacity-50 { opacity: .5; }
.cursor-not-allowed { cursor: not-allowed; }
.mr-2 { margin-right: .5rem; }

/* ---------------- 打印 ---------------- */
@media print {
    .site-nav, .site-footer, .hero-actions { display: none !important; }
    body { background: #fff; }
}
