/* ============================================================
   Mi Monitor Light Tray — GitHub Pages
   Fluent Design 深色主题，配色沿用桌面应用
   ============================================================ */

:root {
    --bg-primary:      #1f1f1f;
    --bg-secondary:    #2a2a2a;
    --bg-tertiary:     #333333;
    --bg-elevated:     #2e2e2e;
    --border:          #3d3d3d;
    --border-strong:   #4a4a4a;
    --text-primary:    #ffffff;
    --text-secondary:  #d0d0d0;
    --text-muted:      #8a8a8a;
    --accent:          #60cdff;
    --accent-hover:    #9de4ff;
    --accent-dim:      rgba(96, 205, 255, 0.15);
    --success:         #6ccb5f;
    --warning:         #ffb020;
    --danger:          #ff6b6b;
    --radius-sm:       6px;
    --radius:          10px;
    --radius-lg:       16px;
    --shadow:          0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg:       0 8px 40px rgba(0, 0, 0, 0.5);
    --font-sans:       "Segoe UI Variable Display", "Microsoft YaHei UI",
                       -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    --font-mono:       "Cascadia Code", "Consolas", "SF Mono", Menlo, monospace;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* 背景光晕 */
body::before {
    content: "";
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

code {
    font-family: var(--font-mono);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.9em;
    color: var(--accent);
}

pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 16px 0;
}

pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* ============================================================
   顶部导航
   ============================================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(31, 31, 31, 0.75);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.nav-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), #4a9eff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(96, 205, 255, 0.3);
}

.nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.nav-github {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    transition: border-color 0.15s, color 0.15s;
}

.nav-github:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
   主容器
   ============================================================ */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 24px 80px;
    position: relative;
    z-index: 1;
}

.page-main {
    max-width: 900px;
}

/* ============================================================
   Hero 首屏
   ============================================================ */

.hero {
    text-align: center;
    padding: 40px 0 60px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(180deg, var(--text-primary) 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: #0a0a0a;
    box-shadow: 0 4px 16px rgba(96, 205, 255, 0.35);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #0a0a0a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(96, 205, 255, 0.45);
}

.btn-secondary {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    color: var(--text-primary);
}

.hero-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-meta span::before {
    content: "•";
    margin-right: 16px;
    color: var(--border-strong);
}
.hero-meta span:first-child::before { content: none; }

/* ============================================================
   Section & 标题
   ============================================================ */

section { padding: 60px 0; }

.section-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    text-align: center;
}

.section-sub {
    color: var(--text-muted);
    text-align: center;
    max-width: 560px;
    margin: 0 auto 48px;
    font-size: 16px;
}

/* ============================================================
   截图预览
   ============================================================ */

.preview {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.preview-mock {
    width: 360px;
    background: var(--bg-primary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 14px 14px 6px;
    box-shadow: var(--shadow-lg);
    transform: perspective(1200px) rotateX(2deg);
}

.mock-device {
    padding: 10px 4px 12px;
    border-bottom: 1px solid var(--border);
}
.mock-device:last-of-type { border-bottom: none; padding-bottom: 8px; }

.mock-device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mock-device-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.mock-device-status {
    font-size: 12px;
    color: var(--text-muted);
}

.mock-power {
    font-size: 16px;
    color: var(--text-muted);
    padding: 0 6px;
}
.mock-power.on { color: var(--accent); }

.mock-slider-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.mock-slider-label span:last-child { color: var(--text-primary); font-weight: 600; }

.mock-slider {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    position: relative;
    margin-bottom: 12px;
}
.mock-slider:last-child { margin-bottom: 0; }

.mock-slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
}

.mock-slider-thumb {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px rgba(96, 205, 255, 0.2);
}

.mock-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
}

.mock-footer-btn {
    font-size: 14px;
    color: var(--text-muted);
    padding: 2px 8px;
    cursor: default;
}

/* ============================================================
   特性卡片
   ============================================================ */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.feature {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform 0.2s, border-color 0.2s;
}

.feature:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}

.feature h3 {
    font-size: 17px;
    margin-bottom: 8px;
    font-weight: 600;
}

.feature p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}

/* ============================================================
   快速上手
   ============================================================ */

.steps {
    display: grid;
    gap: 20px;
    max-width: 760px;
    margin: 0 auto;
}

.step {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    align-items: start;
}

.step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 14px; }

/* ============================================================
   兼容设备
   ============================================================ */

.compat {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.compat-stat {
    display: flex;
    justify-content: space-around;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.compat-stat-item {
    text-align: center;
}

.compat-stat-num {
    font-size: 40px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 6px;
}

.compat-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================================
   Footer
   ============================================================ */

footer {
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    position: relative;
    z-index: 1;
}

footer a { color: var(--text-secondary); }

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ============================================================
   文档页样式
   ============================================================ */

.doc-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
}

.doc-toc {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 20px 0;
    border-right: 1px solid var(--border);
    padding-right: 20px;
}

.doc-toc h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
}

.doc-toc ul { list-style: none; }

.doc-toc a {
    display: block;
    padding: 6px 12px;
    color: var(--text-secondary);
    font-size: 13.5px;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
    border-left: 2px solid transparent;
}

.doc-toc a:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.doc-toc a.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-dim);
}

.doc-content {
    min-width: 0;
    max-width: 780px;
}

.doc-content h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.doc-content .doc-lead {
    color: var(--text-muted);
    font-size: 17px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.doc-content h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 48px 0 16px;
    letter-spacing: -0.01em;
    padding-top: 8px;
}

.doc-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 28px 0 12px;
}

.doc-content p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.75;
}

.doc-content ul,
.doc-content ol {
    margin: 12px 0 20px 24px;
    color: var(--text-secondary);
}

.doc-content li {
    margin-bottom: 6px;
    line-height: 1.7;
}

.doc-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.doc-content blockquote {
    border-left: 3px solid var(--accent);
    background: var(--accent-dim);
    padding: 12px 20px;
    margin: 20px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
}

.doc-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.doc-content th,
.doc-content td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.doc-content th {
    background: var(--bg-elevated);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.doc-content tr:last-child td { border-bottom: none; }

.doc-content tr:hover td { background: var(--bg-elevated); }

.callout {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin: 20px 0;
    border-left: 3px solid;
    background: var(--bg-secondary);
}

.callout-icon { font-size: 20px; flex-shrink: 0; }
.callout-body { flex: 1; }
.callout-body p:last-child { margin-bottom: 0; }
.callout-info    { border-left-color: var(--accent); }
.callout-warn    { border-left-color: var(--warning); }
.callout-success { border-left-color: var(--success); }

/* ============================================================
   Release 页
   ============================================================ */

.release {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
}

.release-latest {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-dim);
}

.release-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    flex-wrap: wrap;
    gap: 12px;
}

.release-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.release-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.release-date {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.release-body h3 {
    font-size: 16px;
    margin: 20px 0 10px;
    font-weight: 600;
    color: var(--accent);
}

.release-body ul {
    margin: 8px 0 12px 20px;
    color: var(--text-secondary);
}

.release-body li { margin-bottom: 6px; line-height: 1.7; }
.release-body p { color: var(--text-secondary); margin-bottom: 12px; }

.release-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-inner { padding: 12px 16px; }
    main { padding: 90px 16px 60px; }

    .doc-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .doc-toc {
        position: static;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 20px;
    }
    .doc-toc ul { display: flex; flex-wrap: wrap; gap: 4px; }
    .doc-toc a { padding: 4px 10px; font-size: 12.5px; }

    section { padding: 40px 0; }
    .hero { padding: 20px 0 40px; }
    pre { font-size: 12.5px; padding: 12px 14px; }
    .compat { padding: 24px 20px; }
    .release { padding: 24px 20px; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

