@import url("https://cdn.bootcdn.net/ajax/libs/bootstrap-icons/1.13.1/font/bootstrap-icons.css");

/* ===== 设计变量（Tailwind 颜色令牌的数据源） ===== */
:root {
    --primary: #d13e1e;
    --primary-dark: #b83516;
    --primary-light: #e04e2c;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --gray: #f1f5f9;
    --border: #e2e8f0;
    --text: #334155;
    --text-light: #64748b;
    --white: #ffffff;
    --bg-body: #ffffff;
    --bg-hero-start: #f8fafc;
    --bg-hero-end: #eff6ff;
    --bg-card: #ffffff;
    --bg-table-header: #f8fafc;
    --bg-ext: #f8fafc;
    --bg-screenshots: #f8fafc;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --dark: #f1f5f9;
        --gray: #1e293b;
        --border: #334155;
        --text: #cbd5e1;
        --text-light: #94a3b8;
        --white: #0f172a;
        --bg-body: #0f172a;
        --bg-hero-start: #0f172a;
        --bg-hero-end: #1e293b;
        --bg-card: #1e293b;
        --bg-table-header: #1e293b;
        --bg-ext: #0f172a;
        --bg-screenshots: #0f172a;
    }
}

/* ===== 基础 ===== */
html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* 防止页面级横向溢出（clip 不影响吸顶定位） */
html, body {
    overflow-x: clip;
}

/* ===== Tailwind 配套 ===== */
.site-header {
    background: rgba(255, 255, 255, 0.95);
}

@media (prefers-color-scheme: dark) {
    .site-header {
        background: rgba(15, 23, 42, 0.95);
    }
}

/* 滚动浮现动画 */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

/* 套餐选项选中态 */
[data-package-option].selected {
    border-color: var(--primary);
    background: rgba(209, 62, 30, 0.08);
    box-shadow: 0 0 0 2px rgba(209, 62, 30, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    .fade-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== 表单校验提示（ASP.NET 生成的类名） ===== */
.validation-summary-errors {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: var(--danger);
}

.field-validation-error {
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 0.375rem;
    display: block;
}

/* ===== 内容排版（Markdown 正文，博客与文档共用） ===== */
:root {
    --md-text: #24292e;
    --md-text-light: #6a737d;
    --md-border: #eaecef;
    --md-border-light: #dfe2e5;
    --md-bg-code: #f6f8fa;
    --md-bg-table: #ffffff;
    --md-bg-table-alt: #f6f8fa;
    --md-link: #0366d6;
}

@media (prefers-color-scheme: dark) {
    :root {
        --md-text: #c9d1d9;
        --md-text-light: #8b949e;
        --md-border: #21262d;
        --md-border-light: #30363d;
        --md-bg-code: #161b22;
        --md-bg-table: #0d1117;
        --md-bg-table-alt: #161b22;
        --md-link: #58a6ff;
    }
}

.md {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.6;
    max-width: 860px;
    margin: 0 auto;
    color: var(--md-text);
    overflow-wrap: break-word;
}

    .md h1, .md h2, .md h3, .md h4, .md h5, .md h6 {
        font-weight: 600;
        margin-top: 24px;
        margin-bottom: 16px;
        line-height: 1.25;
        color: var(--md-text);
    }

    .md h1 {
        font-size: 2em;
        border-bottom: 1px solid var(--md-border);
        padding-bottom: 0.3em;
    }

    .md h2 {
        font-size: 1.5em;
        border-bottom: 1px solid var(--md-border);
        padding-bottom: 0.3em;
    }

    .md h3 {
        font-size: 1.25em;
    }

    .md h4 {
        font-size: 1em;
    }

    .md h5 {
        font-size: 0.875em;
    }

    .md h6 {
        font-size: 0.85em;
        color: var(--md-text-light);
    }

    .md p {
        margin-bottom: 16px;
    }

    .md a {
        color: var(--md-link);
        text-decoration: none;
    }

        .md a:hover {
            text-decoration: underline;
        }

    .md ul, .md ol {
        padding-left: 2em;
        margin-bottom: 16px;
    }

    .md li {
        margin-bottom: 4px;
    }

    .md pre {
        background-color: var(--md-bg-code);
        border-radius: 3px;
        font-size: 85%;
        line-height: 1.45;
        overflow: auto;
        max-width: 100%;
        padding: 16px;
        margin-bottom: 16px;
    }

    .md code {
        background-color: rgba(27, 31, 35, 0.05);
        border-radius: 3px;
        font-size: 85%;
        margin: 0;
        padding: 0.2em 0.4em;
    }

@media (prefers-color-scheme: dark) {
    .md code {
        background-color: rgba(110, 118, 129, 0.2);
    }
}

.md pre code {
    background-color: transparent;
    border: 0;
    display: inline;
    line-height: inherit;
    margin: 0;
    max-width: auto;
    overflow: visible;
    padding: 0;
    word-wrap: normal;
}

.md blockquote {
    border-left: 0.25em solid var(--md-border-light);
    color: var(--md-text-light);
    padding: 0 1em;
    margin-bottom: 16px;
}

.md table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin-bottom: 16px;
    width: 100%;
}

    .md table th, .md table td {
        border: 1px solid var(--md-border-light);
        padding: 6px 13px;
    }

    .md table th {
        font-weight: 600;
        color: var(--md-text);
    }

    .md table tr {
        background-color: var(--md-bg-table);
        border-top: 1px solid var(--md-border-light);
    }

        .md table tr:nth-child(2n) {
            background-color: var(--md-bg-table-alt);
        }

.md img {
    max-width: 100%;
    box-sizing: content-box;
    background-color: var(--md-bg-table);
}
