/* ========== 懒笔记 · Mylan 官方下载站 清爽卡片风格 ========== */
:root {
    --blue-50: #f0f7ff;
    --blue-100: #e0efff;
    --blue-200: #bcdcf8;
    --blue-400: #6fb1e8;
    --blue-500: #3d8fd4;
    --blue-600: #2b7cc0;
    --blue-700: #1f66a3;
    --ink: #23455f;
    --ink-light: #5b7a94;
    --white: #ffffff;
    --shadow: 0 12px 40px rgba(45, 120, 190, 0.16);
    --shadow-soft: 0 6px 20px rgba(35, 69, 95, 0.08);
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: #f6f9fc;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---------- 顶部导航 ---------- */
.dl-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #e8eef4;
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--blue-700);
    letter-spacing: 0.5px;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--blue-400), var(--blue-700));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
}

.nav-links { display: flex; gap: 26px; }

.nav-link {
    font-size: 15px;
    color: var(--ink);
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color .12s ease, border-color .12s ease;
}

.nav-link:hover { color: var(--blue-600); border-bottom-color: var(--blue-400); }

/* ---------- 标题区 ---------- */
.dl-head {
    max-width: 1080px;
    margin: 0 auto;
    padding: 64px 24px 30px;
    text-align: center;
}

.dl-hero-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 28px;
}

.dl-title {
    margin: 0 0 12px;
    font-size: 40px;
    font-weight: 800;
    color: var(--blue-700);
    letter-spacing: 1px;
}

.dl-subtitle {
    margin: 0 0 14px;
    font-size: 17px;
    color: var(--blue-500);
    letter-spacing: 3px;
}

.dl-intro {
    margin: 0 auto;
    max-width: 620px;
    font-size: 15px;
    line-height: 1.9;
    color: var(--ink-light);
}

/* ---------- 下载区 ---------- */
.dl-section { max-width: 1080px; margin: 0 auto; padding: 12px 24px 40px; }

.sec-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 30px;
}

.dl-grid {
    display: flex;
    gap: 26px;
    justify-content: center;
    flex-wrap: wrap;
}

.dl-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 42px 38px 34px;
    width: 380px;
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform .15s ease, box-shadow .15s ease;
}

.dl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.dl-icon { margin-bottom: 18px; line-height: 0; }

.dl-name {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
}

.dl-desc {
    margin: 0 0 26px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--ink-light);
    min-height: 50px;
}

.btn {
    display: inline-block;
    padding: 12px 34px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    user-select: none;
    font-family: inherit;
}

.btn:hover { transform: translateY(-2px); }

.btn-client {
    background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
    color: #fff;
    box-shadow: 0 8px 20px rgba(61, 143, 212, 0.35);
}

.btn-client:hover { background: var(--blue-600); }

.btn-android {
    background: #fff;
    color: var(--blue-600);
    border: 2px solid var(--blue-400);
    box-shadow: 0 8px 20px rgba(61, 143, 212, 0.15);
}

.btn-android:hover { border-color: var(--blue-600); background: var(--blue-50); }

.dl-links { margin-top: 18px; display: flex; align-items: center; gap: 10px; }

.dl-ver {
    font-size: 13px;
    color: var(--ink-light);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: 999px;
    padding: 5px 14px;
}

.qr-label {
    font-size: 13px;
    color: var(--blue-600);
    background: transparent;
    border: 1px solid var(--blue-200);
    border-radius: 999px;
    padding: 5px 14px;
    font-family: inherit;
    user-select: none;
}

/* 二维码浮层：悬浮于卡片之上（绝对定位不占文档流，显隐不改变卡片与页面尺寸） */
.qr-pop {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    z-index: 30;
    background: #fff;
    border: 1px solid var(--blue-200);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(45, 120, 190, 0.22);
    padding: 16px;
    text-align: center;
    max-width: min(260px, calc(100vw - 48px));
}

/* Android 卡片作为二维码浮层定位上下文 */
.dl-card-android { position: relative; }

.qr-canvas { line-height: 0; }
.qr-canvas img, .qr-canvas canvas { display: block; margin: 0 auto; }

.qr-tip {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--ink-light);
}

/* ---------- 核心功能 / 其它产品区 ---------- */
.feat-section { max-width: 1080px; margin: 0 auto; padding: 20px 24px 40px; }

.feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.feat-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 30px 26px;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
}

.feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.feat-icon { margin-bottom: 14px; line-height: 0; }

.feat-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--blue-700);
}

.feat-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--ink-light);
}

.page-foot {
    padding: 26px 16px 40px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-light);
    opacity: .85;
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 900px) {
    .feat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .nav-inner { padding: 0 16px; height: 56px; }
    .dl-head { padding: 40px 16px 24px; }
    .dl-title { font-size: 30px; }
    .dl-subtitle { letter-spacing: 2px; font-size: 15px; }
    .dl-intro { font-size: 14px; }
    .dl-section, .feat-section { padding-left: 16px; padding-right: 16px; }
    .dl-card { padding: 32px 22px 28px; width: 100%; }
    .dl-desc { min-height: 0; }
    .feat-grid { grid-template-columns: 1fr; }
}

/* ========== 后台（保留） ========== */
.admin-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 16px 60px;
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.admin-head h1 { font-size: 22px; color: var(--blue-700); }

.inline-form { display: inline; }

.panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 24px 28px;
    margin-bottom: 20px;
}

.panel h2 {
    margin: 0 0 16px;
    font-size: 17px;
    color: var(--blue-700);
    border-left: 4px solid var(--blue-400);
    padding-left: 10px;
}

.panel-form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-light); flex: 1; }

.field > span { line-height: 1.6; }

.field input[type="text"],
.field input[type="password"],
.field textarea {
    border: 1px solid var(--blue-200);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--ink);
    background: var(--blue-50);
    outline: none;
    height: 40px;
}

.field textarea { height: auto; resize: vertical; }

.field input:focus, .field textarea:focus { border-color: var(--blue-500); background: #fff; }

/* 文件选择框：统一高度与文本输入框对齐，避免并排时错位 */
.field input[type="file"] {
    font-size: 13px;
    width: 100%;
    height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--blue-200);
    border-radius: 8px;
    background: var(--blue-50);
    color: var(--ink-light);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row .field { min-width: 240px; }

/* ===== 兼容回退：旧内核浏览器（Chrome<84 / Edge<84 / 国产双核兼容模式）不支持 flex gap，
   用相邻外边距模拟间距，避免表单元素紧贴造成“重叠 / 错位 / 拥挤” ===== */
.panel-form > * + * { margin-top: 14px; }
.field > * + * { margin-top: 6px; }
.field-row { margin-left: -8px; margin-right: -8px; }
.field-row > .field { margin-left: 8px; margin-right: 8px; }

@supports (gap: 1px) {
    .panel-form > * + * { margin-top: 0; }
    .field > * + * { margin-top: 0; }
    .field-row { gap: 16px; margin-left: 0; margin-right: 0; }
    .field-row > .field { margin-left: 0; margin-right: 0; }
}

.btn-primary { background: var(--blue-500); color: #fff; }
.btn-primary:hover { background: var(--blue-600); }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--blue-400);
    color: var(--blue-600);
    padding: 8px 18px;
    font-size: 14px;
}

.btn-block { width: 100%; }

.alert {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 18px;
}

.alert-ok { background: #e8f8ee; color: #1d7a44; border: 1px solid #bfe8cf; }
.alert-error { background: #fdeeee; color: #b03a3a; border: 1px solid #f2c4c4; }

.muted { color: var(--ink-light); font-size: 14px; }

.panel-tip {
    background: var(--blue-50);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--ink-light);
    word-break: break-all;
}

.panel-tip code, .panel-preview code { color: var(--blue-700); }

.panel-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    border: 1px solid var(--blue-200);
    margin-bottom: 10px;
}

.panel-preview p { font-size: 13px; color: var(--ink-light); }

/* 登录页 */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    width: 380px;
    max-width: 100%;
    padding: 36px 34px;
    text-align: center;
}

.login-card h1 { margin: 0 0 6px; font-size: 22px; color: var(--blue-700); }

.login-sub { margin: 0 0 22px; font-size: 13px; color: var(--ink-light); }

.login-card form { display: flex; flex-direction: column; gap: 14px; text-align: left; }

.login-tip { margin: 18px 0 0; font-size: 12px; color: var(--ink-light); }
