/*
 * style.css —— 站点全局样式
 *
 * 电脑工具帮助站 (Computer Tools Help Station)
 * Copyright (C) 2026  辉夜 <18759765356@163.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

:root {
    --primary: #2563eb;
    --primary-dark: #1e4fd8;
    --accent: #7c3aed;
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 4px 16px rgba(31, 41, 55, .08);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

.container { width: min(1080px, 92%); margin: 0 auto; }

/* ---- 头部导航 ---- */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }

.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-logo { width: 34px; height: 34px; border-radius: 8px; }
.brand-text { font-size: 1.15rem; font-weight: 700; }

.main-nav { display: flex; gap: 20px; }
.main-nav a { color: var(--text); text-decoration: none; font-weight: 500; padding: 6px 4px; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ---- 页脚 ---- */
.site-footer { background: var(--card); border-top: 1px solid var(--border); margin-top: 48px; }
.footer-inner { padding: 20px 0; text-align: center; color: var(--muted); font-size: .9rem; }
.footer-inner a { color: var(--primary); text-decoration: none; }
.footer-inner p { margin: 4px 0; }

/* ---- 页面主体 ---- */
.page-main { padding: 28px 0; min-height: 60vh; }

/* ---- Hero ---- */
.hero { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; padding: 56px 32px; border-radius: var(--radius); text-align: center; margin-top: 8px; }
.hero h1 { margin: 0 0 12px; font-size: 1.9rem; }
.hero p { max-width: 640px; margin: 0 auto 22px; opacity: .95; }

/* ---- 区块 ---- */
.section { margin-bottom: 36px; }
.section-title { font-size: 1.45rem; margin: 0 0 18px; }
.block { margin: 26px 0; }
.block h2 { font-size: 1.2rem; }

/* ---- 卡片 ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-body { padding: 18px 18px 8px; flex: 1; }
.card-body h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h3 a:hover { color: var(--primary); }
.card-body p { color: var(--muted); font-size: .95rem; margin: 8px 0 0; }
.card-foot { padding: 10px 18px 16px; }
.card-foot a { color: var(--primary); text-decoration: none; font-weight: 600; }
.card-foot a:hover { text-decoration: underline; }

/* ---- 标签 ---- */
.tag { display: inline-block; background: #eef2ff; color: var(--primary-dark); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 600; }

/* ---- 按钮：Hero 中为白底浅字，正文中为品牌色底白字 ---- */
.btn { display: inline-block; padding: 10px 22px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: background .2s; }
/* Hero 区域按钮 */
.hero .btn-primary { background: #fff; color: var(--primary); }
.hero .btn-primary:hover { background: #f3f4f6; }
/* 正文区域按钮 */
.section .btn-primary { background: var(--primary); color: #fff; }
.section .btn-primary:hover { background: var(--primary-dark); }

/* ---- 列表 ---- */
.plain-list { padding-left: 20px; }
.plain-list li { margin: 6px 0; }

/* ---- 步骤 ---- */
.steps { padding-left: 20px; }
.steps li { margin: 10px 0; }

/* ---- 面包屑 ---- */
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--primary); text-decoration: none; }

/* ---- 工具详情头部 ---- */
.tool-head { margin-bottom: 10px; }
.tool-head h1 { margin: 6px 0 4px; }

/* ---- 警告块 ---- */
.warning { background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--radius); padding: 14px 20px; }
.warning h2 { color: #92400e; }

/* ---- 下载按钮组（官网 + 镜像站）---- */
.dl-title { margin: 18px 0 8px; font-size: 1rem; color: var(--muted); }
.btn-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn-group .btn { margin: 0; }
.btn-ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }

/* ---- 工具列表搜索与分类 ---- */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; }
.toolbar .search { flex: 1; max-width: 420px; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: .95rem; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag-filter { text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.tag-filter.is-active { background: var(--primary); color: #fff; }
.tag-mirror { background: #e0f2fe; color: #0369a1; }

/* ---- 其它 ---- */
.muted { color: var(--muted); }
.not-found { text-align: center; padding: 48px 0; }

@media (max-width: 600px) {
    .header-inner { flex-direction: column; gap: 8px; }
    .hero { padding: 40px 18px; }
}