/* ==========================================================
   Privacy Pages — Shared Stylesheet
   Based on Material Design 3 (https://m3.material.io/)
   ========================================================== */

/* ---- Material 3 color tokens: light scheme ---- */
:root {
    --md-sys-color-primary: #0b57d0;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #d3e3fd;
    --md-sys-color-on-primary-container: #041e49;
    --md-sys-color-surface: #f8fafd;
    --md-sys-color-surface-container-lowest: #ffffff;
    --md-sys-color-surface-container: #f0f4f9;
    --md-sys-color-on-surface: #1f1f1f;
    --md-sys-color-on-surface-variant: #444746;
    --md-sys-color-outline-variant: #c4c7c5;

    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 28px;

    --md-sys-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.3),
                          0 1px 3px 1px rgba(0, 0, 0, 0.15);
}

/* ---- Material 3 color tokens: dark scheme ---- */
@media (prefers-color-scheme: dark) {
    :root {
        --md-sys-color-primary: #a8c7fa;
        --md-sys-color-on-primary: #062e6f;
        --md-sys-color-primary-container: #0842a0;
        --md-sys-color-on-primary-container: #d3e3fd;
        --md-sys-color-surface: #131314;
        --md-sys-color-surface-container-lowest: #1e1f20;
        --md-sys-color-surface-container: #282a2c;
        --md-sys-color-on-surface: #e3e3e3;
        --md-sys-color-on-surface-variant: #c4c7c5;
        --md-sys-color-outline-variant: #444746;
    }
}

/* ---- Base layout ---- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px 16px;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "Helvetica Neue", Arial, sans-serif;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---- Main elevated card ---- */
.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px;
    background-color: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--md-sys-shape-corner-extra-large);
    box-shadow: var(--md-sys-elevation-1);
}

/* ---- Typography (Material 3 type scale) ---- */
h1 {
    /* headline-large */
    margin: 0 0 8px;
    font-size: 2rem;
    line-height: 2.5rem;
    font-weight: 400;
    color: var(--md-sys-color-on-surface);
}

.meta {
    /* supporting "last updated" line */
    margin: 0 0 32px;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: var(--md-sys-color-on-surface-variant);
}

h2 {
    /* title-large */
    margin: 32px 0 12px;
    font-size: 1.375rem;
    line-height: 1.75rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

p {
    /* body-large */
    margin: 0 0 16px;
    font-size: 1rem;
    line-height: 1.5rem;
    color: var(--md-sys-color-on-surface-variant);
}

strong {
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

a {
    color: var(--md-sys-color-primary);
    font-weight: 500;
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

/* ---- Filled highlight card (contact info) ---- */
.contact-box {
    margin: 24px 0;
    padding: 16px 20px;
    background-color: var(--md-sys-color-primary-container);
    border-radius: var(--md-sys-shape-corner-large);
}

.contact-box p {
    margin: 0;
    color: var(--md-sys-color-on-primary-container);
}

.contact-box a,
.contact-box strong {
    color: inherit;
    text-decoration: underline;
}

/* ---- Tonal footer section (product links) ---- */
.products-section {
    margin-top: 24px;
    padding: 14px 20px;
    background-color: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-large);
    text-align: center;
}

.products-section p {
    margin: 0;
}

/* ---- Ad area ---- */
.ad-container {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    text-align: center;
    min-height: 100px; /* 防止广告未加载时页面跳动 */
}

.ad-label {
    display: block;
    margin-bottom: 16px;
    font-size: 0.6875rem;
    line-height: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--md-sys-color-on-surface-variant);
}

#ad-fallback {
    display: none; /* 默认隐藏，广告被拦截时再显示 */
    margin-top: 8px;
    padding: 20px;
    background-color: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
    body {
        padding: 16px 12px;
    }

    .container {
        padding: 32px 20px;
        border-radius: var(--md-sys-shape-corner-large);
    }

    h1 {
        font-size: 1.75rem;
        line-height: 2.25rem;
    }
}
