:root {
    color-scheme: light;
    --bg: #f7f9fc;
    --panel: rgba(255, 255, 255, 0.92);
    --text: #172033;
    --muted: #637083;
    --line: #dfe6ef;
    --primary: #1677ff;
    --primary-dark: #0f5fd4;
    --accent: #17b890;
    --danger: #d14343;
    --shadow: 0 18px 48px rgba(23, 32, 51, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 8%, rgba(22, 119, 255, 0.13), transparent 32%),
        radial-gradient(circle at 88% 12%, rgba(23, 184, 144, 0.14), transparent 30%),
        linear-gradient(135deg, #f7f9fc 0%, #eef4fb 46%, #f8fbff 100%);
}

a {
    color: inherit;
}

.page {
    width: min(1040px, calc(100% - 40px));
    margin: 0 auto;
    padding: 48px 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 54px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 24px rgba(22, 119, 255, 0.22);
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(22, 119, 255, 0.18);
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

.nav-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.nav-link {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: var(--primary);
    border-color: rgba(22, 119, 255, 0.38);
    transform: translateY(-1px);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 32px;
    align-items: center;
    margin-bottom: 34px;
}

.hero-copy {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: 0;
}

.subtitle {
    max-width: 620px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.hero-panel,
.download-panel {
    border: 1px solid rgba(223, 230, 239, 0.92);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-panel {
    padding: 26px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.stat {
    min-height: 116px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.stat strong {
    display: block;
    font-size: 30px;
    line-height: 1;
}

.stat span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.section-title {
    margin: 0 0 16px;
    font-size: 24px;
}

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

.file-card {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.file-card:hover {
    border-color: rgba(22, 119, 255, 0.44);
    box-shadow: 0 14px 34px rgba(22, 119, 255, 0.12);
    transform: translateY(-3px);
}

.file-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.file-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.file-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 26px;
    color: var(--primary);
    font-weight: 700;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #0d5d49;
    font-size: 13px;
    font-weight: 700;
    background: rgba(23, 184, 144, 0.14);
}

.download-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 20px;
}

.download-panel {
    width: min(560px, 100%);
    padding: 34px;
    text-align: center;
}

.download-icon {
    display: grid;
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.download-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 14px 26px rgba(22, 119, 255, 0.18);
}

.download-panel h1 {
    font-size: clamp(30px, 7vw, 44px);
}

.download-panel p {
    margin: 14px auto 0;
    color: var(--muted);
    line-height: 1.8;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #fff;
    background: var(--primary);
}

.button-primary:hover {
    background: var(--primary-dark);
}

.button-secondary {
    color: var(--text);
    border-color: var(--line);
    background: #fff;
}

.button-secondary:hover {
    border-color: rgba(22, 119, 255, 0.42);
}

.status {
    min-height: 32px;
    margin-top: 20px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #0d5d49;
    background: rgba(23, 184, 144, 0.12);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(23, 32, 51, 0.42);
    z-index: 20;
}

.modal.is-open {
    display: flex;
}

.modal-panel {
    width: min(420px, 100%);
    padding: 26px;
    border: 1px solid rgba(223, 230, 239, 0.92);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.modal-panel h2 {
    margin: 0;
    font-size: 24px;
}

.modal-panel p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.share-form {
    margin-top: 20px;
}

.share-input {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.share-input:focus {
    border-color: rgba(22, 119, 255, 0.72);
    box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12);
}

.form-error {
    min-height: 24px;
    margin-top: 10px;
    color: var(--danger);
    font-size: 14px;
}

@media (max-width: 760px) {
    .page {
        width: min(100% - 28px, 1040px);
        padding: 28px 0;
    }

    .topbar {
        margin-bottom: 36px;
    }

    .nav-actions {
        justify-content: flex-start;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        padding: 18px;
    }

    .download-panel {
        padding: 26px 18px;
    }
}

@media (max-width: 440px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .button {
        width: 100%;
    }
}
