:root {
    --primary: #6366f1;
    --primary-2: #8b5cf6;
    --bg: #fafbff;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #eef1f8;
    --radius: 24px;
    --shadow-lg: 0 24px 60px -20px rgba(99, 102, 241, .16);
    --shadow-sm: 0 8px 28px -10px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 背景图 + 遮罩 */
.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: var(--bg);
    background-image: url('../img/bg.jpg');
    background-size: 100% auto;
    background-position: center top;
    background-repeat: no-repeat;
}
.bg-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(255,255,255,.55) 0%,
        rgba(255,255,255,.48) 22%,
        rgba(250,251,255,.78) 50%,
        rgba(250,251,255,.94) 78%,
        rgba(250,251,255,.98) 100%);
}

.container {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* 导航 */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.nav-right { display: flex; gap: 24px; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-link:hover { color: var(--primary); }

/* 主卡片 */
.hero { padding: 36px 0 8px; }
.app-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 52px 44px;
    text-align: center;
    animation: fadeUp .6s ease both;
}
.app-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.app-info { width: 100%; text-align: center; }
.app-name {
    margin: 0 0 10px;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
}
.app-subtitle { margin: 0 0 18px; color: var(--muted); font-size: 16px; }
.app-meta {
    display: flex; gap: 10px; margin-bottom: 28px;
    flex-wrap: wrap; justify-content: center;
}
.meta-tag {
    font-size: 13px; color: var(--primary); background: #eef2ff;
    padding: 7px 14px; border-radius: 999px; font-weight: 600;
}

.download-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    max-width: 260px;
    margin: 0 auto;
}
.download-btns .btn {
    width: 100%;
    justify-content: center;
}
.download-btns-wrap {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: center;
}
.download-btns-wrap .download-btns {
    max-width: 280px;
    flex: 0 1 280px;
    margin: 0;
}
.download-btns-backup {
    padding-top: 0;
}
.btn-backup-1 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.btn-backup-2 { background: linear-gradient(135deg, #10b981, #059669); }
.btn-backup-3 { background: linear-gradient(135deg, #475569, #1e293b); }
.btn-backup-4 { background: linear-gradient(135deg, #1f295d, #5da2e3); }
.btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 15px 30px; border-radius: 16px;
    font-size: 16px; font-weight: 700; text-decoration: none; color: #fff;
    box-shadow: 0 12px 26px -10px rgba(15, 23, 42, .35);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    position: relative; overflow: hidden;
}
.btn::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0));
    pointer-events: none;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -12px rgba(15, 23, 42, .4); filter: brightness(1.03); }
.btn:active { transform: translateY(-1px); }
.btn-pc { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.btn-primary { background: linear-gradient(135deg, #34d399, #059669); }
.btn-ios { background: linear-gradient(135deg, #475569, #1e293b); }
.btn-size { font-size: 12px; font-weight: 600; opacity: .82; }

.empty-tip {
    color: #92400e; background: #fffbeb; border: 1px solid #fde68a;
    padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-top: 4px;
}

.app-qr {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    margin-top: 24px;
}
.app-qr img {
    width: 96px; height: 96px; border-radius: 14px;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.app-qr span { font-size: 12px; color: var(--muted); }

.changelog {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 28px 32px;
    margin-top: 56px;
    text-align: left;
}
.changelog h3 { margin: 0 0 10px; font-size: 15px; color: var(--text); }
.changelog p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.changelog + .changelog { margin-top: 20px; }

/* 区块标题 */
.section-title {
    font-size: 20px; font-weight: 800; margin: 56px 0 20px; text-align: center;
    letter-spacing: -.3px;
}

/* 截图 */
.shots-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px;
}
.shot-item {
    border-radius: 18px; overflow: hidden; cursor: zoom-in;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
    aspect-ratio: 9 / 19; background: #eef1f6;
}
.shot-item:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .25); }
.shot-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 赞助 */
.sponsor { margin-top: 56px; }
.sponsor-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    text-align: center;
}
.sponsor-icon { font-size: 34px; margin-bottom: 6px; }
.sponsor-title { margin: 0 0 8px; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.sponsor-desc { margin: 0 0 22px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.btn-sponsor { background: linear-gradient(135deg, #f59e0b, #f97316); }
.btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* 页脚 */
.footer { text-align: center; margin-top: 40px; color: var(--muted); }
.footer p { margin: 4px 0; font-size: 14px; }
.footer-sub { font-size: 12px; opacity: .65; }

/* 下载统计 */
.download-stat-wrap { text-align: center; margin-top: 56px; }
.download-stat {
    display: inline-flex; align-items: center; gap: 18px;
    padding: 18px 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .25s, box-shadow .25s;
}
.download-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.download-stat-icon {
    width: 54px; height: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(79,70,229,.3);
}
.download-stat-text { text-align: left; line-height: 1.2; }
.download-stat-num {
    font-size: 30px; font-weight: 800; color: var(--text);
    letter-spacing: -.5px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.download-stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* 留言板 */
.message-board { background: #fff; border-radius: 18px; padding: 28px 32px; box-shadow: 0 8px 32px rgba(79, 70, 229, .08); margin-top: 56px; }
.message-board h2 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.message-board .sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.msg-form { display: block; }
.msg-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-bottom: 4px; }
.msg-form label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin: 14px 0 6px; }
.msg-form input[type="text"],
.msg-form textarea {
    width: 100%; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 10px;
    font-size: 14px; font-family: inherit; background: #fafbff; color: var(--text);
}
.msg-form input[type="text"]:focus,
.msg-form textarea:focus { outline: none; border-color: #4f46e5; background: #fff; box-shadow: 0 0 0 3px rgba(79, 70, 229, .1); }
.msg-form textarea { min-height: 110px; resize: vertical; line-height: 1.6; margin-bottom: 4px; }
.msg-form .honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg-form .btn-submit { margin-top: 18px; }
.msg-flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.msg-flash.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.msg-flash.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.msg-form-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 14px; }
.msg-form-foot a { color: #4f46e5; text-decoration: none; font-weight: 600; }
.msg-form-foot a:hover { text-decoration: underline; }

/* 留言列表 */
.msg-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}
.msg-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .04);
    border: 1px solid rgba(79, 70, 229, .06);
}
.msg-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.msg-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}
.msg-meta { flex: 1; min-width: 0; }
.msg-name { font-size: 14px; font-weight: 600; color: #1f2937; }
.msg-time { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.msg-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}
.msg-contact { font-size: 12px; color: #6b7280; margin-top: 8px; }

/* 官方回复 */
.msg-reply {
    margin-top: 14px;
    background: #f5f3ff;
    border-left: 3px solid #7c3aed;
    padding: 12px 16px;
    border-radius: 0 10px 10px 0;
}
.msg-reply-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #7c3aed;
    font-weight: 600;
    margin-bottom: 6px;
}
.msg-reply-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}
.msg-reply-time { font-size: 12px; color: #9ca3af; margin-top: 6px; }
.msg-empty { text-align: center; padding: 40px 0; color: #9ca3af; font-size: 14px; }

/* 留言图片 */
.msg-image {
    display: block;
    max-width: 240px;
    max-height: 240px;
    border-radius: 10px;
    margin-top: 10px;
    object-fit: cover;
    cursor: zoom-in;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.msg-form input[type="file"] {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}
.msg-form input[type="file"]::file-selector-button {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    margin-right: 10px;
}
.msg-form input[type="file"]::file-selector-button:hover {
    background: #e5e7eb;
}

/* 灯箱 */
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 100;
    background: rgba(0, 0, 0, .9); align-items: center; justify-content: center;
    cursor: zoom-out;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 10px; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
    .app-card { padding: 36px 22px; }
    .app-name { font-size: 30px; }
    .download-btns { max-width: 100%; }
    .download-btns .btn { width: 100%; }
    .download-btns-wrap { flex-direction: column; align-items: center; }
    .download-btns-wrap .download-btns { max-width: 100%; flex: 1 1 auto; width: 100%; }
    .download-btns-backup { padding-top: 0; }
    .nav-right { display: none; }
    .message-board { padding: 22px 18px; margin-top: 36px; }
    .msg-form .row2 { grid-template-columns: 1fr; }
}
