/* ============================================================
   Clean Pro · 专业清爽亮色  —  自定义样式覆盖层
   仅覆盖视觉表现，不改动任何 Markdown 内容。
   加载顺序在主题 style.css 之后，故同级选择器即可覆盖。

   方向：克制的亮色（参考 Vercel / Linear / GitHub Light 气质）——
        白底深字、单一蓝色强调、细边框、充足留白，通透明亮、对比清晰。纯系统字体。
   ============================================================ */

:root {
    /* 强调色：单一蓝，克制使用（亮底上保证对比度） */
    --c-primary:        #0969da;   /* 链接 / 主强调 */
    --c-primary-strong: #1f6feb;   /* hover */
    --c-primary-dark:   #0969da;   /* 实心按钮 / 表头 */

    /* 亮色中性阶（干净、低饱和） */
    --c-bg:             #ffffff;   /* 页面画布 */
    --c-text:           #1f2328;   /* 正文 */
    --c-text-muted:     #656d76;   /* 次要文字 */
    --c-heading:        #0d1117;   /* 标题 */
    --c-border:         #d0d7de;   /* 边框 */
    --c-border-soft:    #e4e8ec;   /* 浅边框 / 行分隔 */
    --c-surface:        #f6f8fa;   /* 卡片 / 表格底 / 导航 */
    --c-surface-2:      #f0f3f6;   /* 斑马纹 / 次级面 */
    --c-surface-tint:   #ddf4ff;   /* 蓝色淡底（hover / callout） */

    /* 高转化信号色：优惠码（亮底用深琥珀，醒目且对比足够） */
    --c-code:           #9a6700;
    --c-code-bg:        rgba(154, 103, 0, .10);

    --nav-h:            54px;
    --radius:           10px;
    --radius-sm:        6px;
    --shadow-sm:        0 1px 2px rgba(27, 31, 36, .08);
    --shadow-md:        0 12px 32px rgba(27, 31, 36, .14);
    --font-cn:          "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Hiragino Sans GB", sans-serif;
    --font-mono:        ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
}

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

/* ------------------------------------------------------------
   基础排版 —— 干净深色画布（无辉光、无噪点）
   ------------------------------------------------------------ */
html { background-color: var(--c-bg); }

body {
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, var(--font-cn);
    line-height: 1.78;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
    letter-spacing: -0.01em;
    color: var(--c-heading);
}

a {
    color: var(--c-primary);
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
a:hover {
    color: var(--c-primary-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ------------------------------------------------------------
   顶部导航栏 —— 吸顶、半透明毛玻璃、横向可滚动
   ------------------------------------------------------------ */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-h);
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
            backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--c-border);
}
.site-nav__inner {
    max-width: 1100px;
    height: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.site-nav__brand {
    flex: 0 0 auto;
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
    color: var(--c-heading);
}
.site-nav__brand:hover { text-decoration: none; color: var(--c-heading); }
.site-nav__brand span { color: var(--c-primary); margin-left: 1px; }

.site-nav__links {
    display: flex;
    align-items: center;
    gap: .25rem;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;            /* Firefox 隐藏滚动条 */
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.site-nav__links::-webkit-scrollbar { display: none; }   /* Chrome/Safari 隐藏滚动条 */

.site-nav__link {
    flex: 0 0 auto;
    padding: .35rem .7rem;
    border-radius: 999px;
    font-size: .9rem;
    color: var(--c-text-muted);
    white-space: nowrap;
    transition: color .18s ease, background-color .18s ease;
}
.site-nav__link:hover {
    color: var(--c-heading);
    background: var(--c-surface);
    text-decoration: none;
}
.site-nav__link.is-active {
    color: var(--c-primary);
    background: var(--c-surface-tint);
}

/* “更多机场” 折叠下拉（基于 <details>，无需 JS） */
.site-nav__more {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;               /* 推到导航最右侧 */
}
.site-nav__more-toggle {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.site-nav__more-toggle::-webkit-details-marker { display: none; }
.site-nav__more-toggle::after {
    content: "▾";
    display: inline-block;
    margin-left: .3rem;
    font-size: .8em;
    transition: transform .2s ease;
}
.site-nav__more[open] .site-nav__more-toggle { color: var(--c-heading); background: var(--c-surface); }
.site-nav__more[open] .site-nav__more-toggle::after { transform: rotate(180deg); }

.site-nav__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(98px, 1fr));
    gap: 2px;
    padding: 6px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 60;
}
.site-nav__drop-link {
    padding: .45rem .7rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--c-text-muted);
    white-space: nowrap;
}
.site-nav__drop-link:hover {
    color: var(--c-heading);
    background: var(--c-surface-2);
    text-decoration: none;
}
.site-nav__drop-link.is-active {
    color: var(--c-primary);
    background: var(--c-surface-tint);
}

/* ------------------------------------------------------------
   页眉 Header —— 平滑深蓝渐变，简洁无噪点
   ------------------------------------------------------------ */
.page-header {
    min-height: 6rem;
    color: #fff;
    background: linear-gradient(135deg, #0969da 0%, #1f6feb 55%, #218bff 130%);
    border-bottom: 1px solid var(--c-border);
}

.project-name {
    font-size: clamp(2rem, 6vw, 3.1rem);
    margin: 0;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f4f9ff;
}

.project-tagline {
    opacity: 0.85;
    font-weight: 400;
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
    color: #dbeafe;
}

/* ------------------------------------------------------------
   正文区
   ------------------------------------------------------------ */
.container, .main-content {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1rem;
}
.main-content { color: var(--c-text); }
.main-content p, .main-content li { color: var(--c-text); }

.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4,
.main-content h5,
.main-content h6 {
    color: var(--c-heading);
    font-weight: 700;
}

/* h2：章节主标题，左侧细色条 + 底部分隔线 */
.main-content h2 {
    margin-top: 2.8rem;
    padding-bottom: .45rem;
    padding-left: .8rem;
    border-left: 3px solid var(--c-primary);
    border-bottom: 1px solid var(--c-border);
    line-height: 1.4;
}

.main-content h3 {
    margin-top: 2rem;
    color: var(--c-primary-strong);
}
/* 覆盖旧规则里写死的 h3 颜色 */
.main-content h3, .main-content h3 a { color: var(--c-primary-strong); }

.main-content a { color: var(--c-primary); }
.main-content a:hover { color: var(--c-primary-strong); }

/* 分隔线：素净细线 */
.main-content hr {
    height: 1px;
    border: 0;
    margin: 2.6rem 0;
    background: var(--c-border);
}

/* 列表呼吸感 */
.main-content ul, .main-content ol { padding-left: 1.4rem; }
.main-content li { margin: .3rem 0; }
.main-content li::marker { color: var(--c-primary); }

/* ------------------------------------------------------------
   图片 —— 修复：覆盖写死的 width/height，保持原始比例
   ------------------------------------------------------------ */
.main-content img {
    max-width: 100%;
    height: auto;                /* 关键：抵消 HTML 里写死的 height，防纵向挤压 */
    display: block;
    margin: 1.2rem auto;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
}
/* shields.io 之类的徽章图标不当作大截图处理 */
.main-content img[src*="shields.io"],
.main-content img[src*="badge"] {
    display: inline-block;
    margin: 0 .15rem;
    border: 0;
    border-radius: 0;
    background: none;
    vertical-align: middle;
}

/* ------------------------------------------------------------
   引用块 / Callout
   ------------------------------------------------------------ */
.main-content blockquote,
body blockquote {
    background-color: var(--c-surface);
    color: var(--c-text);
    margin: 1.25rem 0;
    padding: .85rem 1.1rem;
    border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-primary);
    border-radius: var(--radius-sm);
}
.main-content blockquote > :first-child { margin-top: 0; }
.main-content blockquote > :last-child  { margin-bottom: 0; }

/* ------------------------------------------------------------
   表格 —— 对比表是页面主体，干净清晰
   ------------------------------------------------------------ */
.main-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.6rem 0;
    font-size: 14px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.main-content table th {
    background: #eaeef2;
    color: var(--c-heading);
    padding: 12px 14px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    border: none;
    border-bottom: 1px solid var(--c-border);
}

.main-content table td {
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid var(--c-border-soft);
    vertical-align: top;
    color: var(--c-text);
}

.main-content table tr:last-child td { border-bottom: none; }
.main-content table tbody tr:nth-child(even) { background-color: var(--c-surface-2); }
.main-content table tbody tr:hover { background-color: var(--c-surface-tint); }
.main-content table td code { font-family: var(--font-mono); }

/* ------------------------------------------------------------
   代码块 / 行内代码 / 优惠码
   ------------------------------------------------------------ */
.main-content code {
    color: var(--c-code);
    font-weight: 700;
    background-color: var(--c-code-bg);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(154, 103, 0, .30);
    font-family: var(--font-mono);
}

.main-content pre,
.main-content .highlight,
.main-content figure.highlight {
    background: var(--c-surface) !important;
    color: var(--c-text);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.main-content pre code {
    color: inherit;
    background: transparent;
    border: 0;
    font-weight: 400;
    padding: 0;
}

body blockquote code {
    background: var(--c-code-bg) !important;
    color: var(--c-code) !important;
    padding: 3px 10px;
    font-size: 16px;
    border: 1px solid rgba(154, 103, 0, .35);
    border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------
   按钮 / CTA / 卡片
   ------------------------------------------------------------ */
button, .btn {
    cursor: pointer;
    background-color: var(--c-primary-dark);
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    transition: background-color .2s ease, transform .15s ease;
}
button:hover, .btn:hover { background-color: var(--c-primary); }

.cta-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    background: var(--c-primary-dark);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
    box-shadow: var(--shadow-sm);
}
.cta-button:hover {
    transform: translateY(-2px);
    background: var(--c-primary);
    box-shadow: var(--shadow-md);
    text-decoration: none !important;
}

.quick-channel-card {
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, border-color .25s ease;
}
.quick-channel-card:hover {
    transform: translateY(-4px);
    border-color: var(--c-primary);
}

.promo-code-card {
    border-radius: var(--radius);
    padding: 15px;
    margin: 15px 0;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
}
.promo-code-card code {
    background: var(--c-code-bg) !important;
    color: var(--c-code) !important;
    padding: 5px 15px;
    font-size: 19px;
    font-weight: bold;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(154, 103, 0, .35);
    font-family: var(--font-mono);
}

/* ------------------------------------------------------------
   页脚
   ------------------------------------------------------------ */
.site-footer {
    border-top: 1px solid var(--c-border);
    color: var(--c-text-muted);
}
.site-footer small, .site-footer { color: var(--c-text-muted); }

/* ------------------------------------------------------------
   交互细节
   ------------------------------------------------------------ */
html { scroll-behavior: smooth; }

/* 锚点跳转留出顶部呼吸空间（含吸顶导航高度） */
:where(h1, h2, h3, h4, h5, h6, [id]) { scroll-margin-top: calc(var(--nav-h) + 24px); }

::selection { background: rgba(9, 105, 218, .18); color: #0d1117; }

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------
   移动端
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .site-nav__inner { gap: .6rem; }
    .site-nav__brand { font-size: .95rem; }
    .main-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .main-content h2 { margin-top: 2.1rem; }
    .promo-code-card { padding: 10px; }
    .promo-code-card code { font-size: 16px !important; }
    div[style*="display:flex"] { flex-direction: column !important; }
}
