/* ═══════════════════════════════════════════
   软件分发管理系统 — 中文软件商城风格
   ═══════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --card-bg: #ffffff;
    --card-border: #eef0f5;
    --text: #2c2c3a;
    --text-secondary: #6b6b80;
    --text-muted: #aaa;
    --accent: #4a90d9;
    --accent-hover: #2d6fc5;
    --accent-orange: #ff7800;
    --accent-orange-hover: #e56b00;
    --accent-red: #ff4d4f;
    --accent-purple: #7F77DD;
    --radius: 8px;
    --shadow: 0 1px 4px rgba(0,0,0,0.05);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.10);
    --transition: 0.22s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    background: #f5f7fa;
    overflow-x: hidden;
}

/* 顶部细广告条 */
.top-bar {
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    color: #999;
}
.top-bar-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    height: 30px; padding: 0 24px;
}
.top-bar .ts { color: #ff7800; }
.top-bar a { color: #999; text-decoration: none; }
.top-bar .right { display: flex; gap: 14px; }

/* 主导航栏 */
.navbar {
    background: #fff;
    border-bottom: 1px solid #f0f0f3;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.navbar-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 70px; padding: 0 24px;
}
.navbar-brand {
    font-size: 26px; font-weight: 800;
    color: var(--accent);
    text-decoration: none; letter-spacing: 0.5px;
    font-family: "Trebuchet MS", sans-serif;
}
.navbar-brand:hover { opacity: 0.85; }
.navbar-links { display: flex; gap: 28px; align-items: center; }
.navbar-links a {
    font-size: 15px; color: #555; text-decoration: none; font-weight: 500;
    transition: color 0.2s; position: relative;
}
.navbar-links a:hover, .navbar-links a.active { color: var(--accent); }
.navbar-links a.active::after {
    content: ''; position: absolute; bottom: -25px; left: 0; right: 0;
    height: 2px; background: var(--accent);
}

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 6px 18px;
    border: none; border-radius: 4px;
    font-size: 14px; font-weight: 500; cursor: pointer;
    text-decoration: none; transition: var(--transition);
    font-family: inherit;
}
.btn-primary { background: var(--accent-orange); color: #fff; }
.btn-primary:hover { background: var(--accent-orange-hover); }
.btn-blue { background: var(--accent); color: #fff; }
.btn-blue:hover { background: var(--accent-hover); }
.btn-outline {
    background: #fff; color: #555;
    border: 1px solid #ddd;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── 容器 ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Hero 蓝色大背景 ── */
.hero {
    background: linear-gradient(180deg, #74b9ff 0%, #4a90d9 50%, #2d6fc5 100%);
    padding: 50px 24px 70px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: -100px; left: 10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute; bottom: -150px; right: 5%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-tagline {
    font-size: 22px; font-weight: 600;
    color: #fff;
    margin-bottom: 28px;
    position: relative; z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.hero-search {
    max-width: 720px; margin: 0 auto 18px;
    display: flex; align-items: center;
    background: #fff; border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative; z-index: 1;
}
.hero-search input {
    flex: 1; height: 48px; padding: 0 20px;
    background: transparent; border: none; outline: none;
    font-size: 15px; color: #333;
}
.hero-search input::placeholder { color: #aaa; }
.hero-search button {
    width: 80px; height: 48px;
    background: var(--accent);
    color: #fff; border: none; cursor: pointer;
    font-size: 16px; transition: background 0.2s;
}
.hero-search button:hover { background: var(--accent-hover); }
.hero-tags {
    font-size: 13px; color: rgba(255,255,255,0.85);
    position: relative; z-index: 1;
}
.hero-tags a {
    color: rgba(255,255,255,0.85); text-decoration: none;
    margin: 0 6px; transition: color 0.2s;
}
.hero-tags a:hover { color: #fff; text-decoration: underline; }
.hero-tags strong { color: #fff; }
.hero-stats {
    display: inline-flex; gap: 30px; margin-top: 24px;
    font-size: 13px; color: rgba(255,255,255,0.8);
    position: relative; z-index: 1;
}
.hero-stats span strong { color: #fff; font-weight: 700; }

/* ── 统计行 ── */
.stats-bar {
    background: #fff;
    border-top: 3px solid var(--accent);
    padding: 14px 0;
    font-size: 13px; color: #888;
}
.stats-bar-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: flex; gap: 36px; flex-wrap: wrap; align-items: center;
}
.stats-bar strong { color: var(--accent-orange); font-weight: 700; }
.stats-bar .new { color: var(--accent-red); }

/* ── 区域标题 ── */
.section { padding: 32px 0; }
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 18px;
}
.section-title {
    font-size: 20px; font-weight: 700; color: var(--text);
    border-left: 4px solid var(--accent);
    padding-left: 12px;
}
.section-more {
    font-size: 13px; color: #999; text-decoration: none;
}
.section-more:hover { color: var(--accent); }

/* ── 分类图标行（5列） ── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
.cat-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px 16px;
    text-align: center;
    text-decoration: none; color: inherit;
    transition: var(--transition);
    box-shadow: var(--shadow);
}
.cat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.cat-icon {
    width: 60px; height: 60px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #f5f5f7;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
}
.cat-name {
    font-size: 15px; font-weight: 600; color: #333;
    margin-bottom: 3px;
}
.cat-desc {
    font-size: 12px; color: #999;
}

/* ── 软件商品卡片（4列大图版） ── */
.prod-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.prod-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none; color: inherit;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow);
}
.prod-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: #d0d0d8;
}
.prod-tag {
    position: absolute; top: 0; right: 0;
    width: 60px; height: 60px;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}
.prod-tag span {
    position: absolute; top: 12px; right: -22px;
    width: 90px; text-align: center;
    background: var(--accent-orange);
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 2px 0; transform: rotate(45deg);
    box-shadow: 0 2px 6px rgba(255,120,0,0.3);
}
.prod-tag.hot span { background: #ff4d4f; }
.prod-tag.new span { background: #2ca87a; }
.prod-tag.recommend span { background: #7F77DD; }

.prod-img {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex; align-items: center; justify-content: center;
    font-size: 64px;
    background: linear-gradient(135deg, #f8f9ff, #eef2fa);
    color: #5a6f99;
    position: relative;
    overflow: hidden;
}
.prod-img::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(45deg, rgba(74,144,217,0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(74,144,217,0.05) 25%, transparent 25%);
    background-size: 24px 24px;
    opacity: 0.4;
}
.prod-img-icon { position: relative; z-index: 1; text-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.prod-info { padding: 14px; }
.prod-title {
    font-size: 14px; font-weight: 600; color: #2c2c3a;
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.prod-desc {
    font-size: 12px; color: #999;
    line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    min-height: 36px;
}
.prod-bottom {
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid #f0f0f3;
    padding-top: 10px;
}
.prod-price {
    font-size: 18px; font-weight: 700;
    color: var(--accent-orange);
}
.prod-price small { font-size: 12px; font-weight: 400; }
.prod-version {
    font-size: 11px; color: #999;
    margin-bottom: 2px;
}

/* ── 分页 ── */
.pagination {
    display: flex; justify-content: center; gap: 6px;
    padding: 20px 0 48px;
}
.page-btn {
    min-width: 34px; height: 34px; padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    background: #fff; color: #555;
    cursor: pointer; text-decoration: none; transition: var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── 下载页 ── */
.dl-page { padding: 30px 0 50px; }
.dl-breadcrumb {
    font-size: 13px; color: #999;
    margin-bottom: 16px;
}
.dl-breadcrumb a { color: #999; text-decoration: none; }
.dl-breadcrumb a:hover { color: var(--accent); }
.dl-breadcrumb span { margin: 0 6px; }
.dl-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}
.dl-main { display: flex; flex-direction: column; gap: 16px; }
.dl-sidebar { position: sticky; top: 90px; }
.info-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 24px;
}
.info-card h3 {
    font-size: 15px; font-weight: 700; color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.info-card p, .info-card li {
    font-size: 13px; color: #666; line-height: 1.85;
}
.info-card ul { padding-left: 20px; margin: 6px 0; }
.info-card li { margin: 3px 0; }
.info-card li::marker { color: var(--accent); }

.dl-panel {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 22px;
    text-align: center;
}
.dl-panel .prod-img {
    aspect-ratio: 16/9;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 56px;
}
.dl-panel .dl-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 46px;
    background: var(--accent-orange);
    color: #fff; border: none; border-radius: 4px;
    font-size: 15px; font-weight: 700; letter-spacing: 1px;
    cursor: pointer; text-decoration: none;
    margin-bottom: 8px;
    transition: var(--transition);
}
.dl-panel .dl-btn:hover { background: var(--accent-orange-hover); }
.dl-panel .dl-version {
    font-size: 12px; color: #999; margin-bottom: 12px;
}
.dl-panel .dl-alt {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 36px;
    background: #f5f5f7; color: #666; border: none;
    border-radius: 4px;
    font-size: 12px; cursor: pointer;
    text-decoration: none; transition: var(--transition);
}
.dl-panel .dl-alt:hover { background: #eeeef1; }

/* 手动下载兜底（如果服务器直链失败时用户可手动去蓝奏云下） */
.dl-panel .dl-manual {
    margin-top: 12px; padding: 10px 12px;
    background: #f8f9fb; border: 1px dashed #e0e3e8;
    border-radius: 4px;
    font-size: 12px; color: #888; line-height: 1.7;
    text-align: center;
}
.dl-panel .dl-manual a {
    color: #534AB7; text-decoration: none; font-weight: 500;
    border-bottom: 1px dotted #534AB7;
}
.dl-panel .dl-manual a:hover { color: #1a73e8; border-bottom-color: #1a73e8; }
.dl-panel .dl-manual code {
    display: inline-block; padding: 1px 8px;
    background: #fff; border: 1px solid #e0e3e8;
    border-radius: 3px;
    font-family: "SF Mono", "Consolas", monospace;
    font-size: 12px; color: #e07b4c; font-weight: 600;
    user-select: all;
}
.dl-panel .dl-manual .dl-pwd { color: #aaa; }

.dl-meta-list {
    text-align: left; margin-top: 18px; padding-top: 14px;
    border-top: 1px solid #f0f0f3;
    font-size: 12px; color: #888;
}
.dl-meta-list p { margin: 6px 0; }
.dl-meta-list p strong { color: #555; }

/* ── 页脚 ── */
.footer {
    background: #2c2c3a;
    color: rgba(255,255,255,0.5);
    padding: 30px 0; text-align: center;
    font-size: 12px;
}
.footer p { margin: 4px 0; }
.footer a { color: rgba(255,255,255,0.5); text-decoration: none; margin: 0 8px; }
.footer a:hover { color: #fff; }

/* ── 响应式 ── */
@media (max-width: 980px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .prod-grid { grid-template-columns: repeat(2, 1fr); }
    .dl-layout { grid-template-columns: 1fr; }
    .dl-sidebar { position: static; }
}
@media (max-width: 600px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .prod-grid { grid-template-columns: 1fr; }
    .navbar-links { display: none; }
    .hero { padding: 36px 16px 50px; }
    .hero-tagline { font-size: 18px; }
    .hero-search { flex-direction: column; }
    .hero-search input { width: 100%; }
    .hero-search button { width: 100%; }
    .stats-bar-inner { gap: 16px; font-size: 12px; }
    .container { padding: 0 16px; }
}
