/* ==========================================================================
   站点前台样式（原生 CSS，零依赖 / 零构建）
   —— PC 门户（/site、/donation、/site-upload）

   ⚠️ 本文件同时被 layouts/h5.php 在 h5.css **之前**引入：
      H5 侧会用自己的 :root 覆盖 --brand/--text/--border，
      并且 .h5-body 自带白底，所以这里改主题**不会**影响移动端。
      但反过来要注意：不要删掉 h5.css 会用到的变量名
      （--brand / --border / --text / --card …）。

   设计基准（取自 donation.php / site-upload.php 的实测值，保持全站一致）：
      品牌红 #C81623（渐变 #B91C1C → #DC2626）
      页面底色 #F7F8FA，卡片白底 / 1px #E8EAED 边 / 圆角 12px
      正文 #1F2328，次要 #6B7280，极浅 #9CA3AF
   ========================================================================== */
:root {
    --brand: #C81623;
    --brand-600: #DC2626;
    --brand-900: #B91C1C;
    --brand-grad: linear-gradient(135deg, #B91C1C 0%, #C81623 52%, #DC2626 100%);
    --brand-soft: #FDECEC;

    --bg: #F7F8FA;
    --card: #FFFFFF;
    --text: #1F2328;
    --muted: #6B7280;
    --faint: #9CA3AF;
    --border: #E8EAED;
    --border-soft: #EEF0F3;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    font-size: 14px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------------- 顶栏（layouts/site.php） ---------------- */
.site-header { background: var(--brand-grad); color: #fff; }
.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
}
.site-logo { color: #fff; font-size: 17px; font-weight: 700; text-decoration: none; }
.site-logo:hover { text-decoration: none; }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; }
.site-nav a {
    color: rgba(255, 255, 255, .92);
    font-size: 14px;
    margin-left: 18px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #fff; text-decoration: none; }
.site-nav a.is-on { color: #fff; font-weight: 700; border-bottom-color: #fff; }
.pc-wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ---------------- 通用栅格 / 旧类名（保留，历史视图可能仍在用） ---------------- */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding: 20px 0 60px;
}
.card-s {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.card-s h3 { margin: 0 0 8px; font-size: 16px; }
.card-s p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.btn-s {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.btn-s:hover { text-decoration: none; opacity: .92; }

/* ---------------- Hero ---------------- */
.pc-hero {
    background: var(--brand-grad);
    color: #fff;
    padding: 52px 20px 30px;
}
.pc-hero-main { max-width: 1040px; margin: 0 auto; text-align: center; }
.pc-hero-logo {
    width: 68px; height: 68px; margin: 0 auto 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 700; overflow: hidden;
}
.pc-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.pc-hero h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: .5px; }
.pc-hero-slogan { margin: 0 0 22px; font-size: 15px; color: rgba(255, 255, 255, .9); }
.pc-hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 42px; padding: 0 26px; border-radius: 999px;
    font-size: 14px; font-weight: 600; text-decoration: none;
    transition: opacity .15s, transform .15s;
}
.pc-btn:hover { text-decoration: none; opacity: .92; transform: translateY(-1px); }
.pc-btn-white { background: #fff; color: var(--brand); }
.pc-btn-ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .5); }

.pc-stats {
    max-width: 1040px; margin: 34px auto 0;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    background: rgba(255, 255, 255, .28);
    border-radius: var(--radius);
    overflow: hidden;
}
.pc-stat {
    background: rgba(0, 0, 0, .06);
    padding: 14px 8px; text-align: center;
}
.pc-stat b { display: block; font-size: 22px; line-height: 1.3; color: #fff; }
.pc-stat span { font-size: 12px; color: rgba(255, 255, 255, .85); }

/* ---------------- 区块 ---------------- */
.pc-sec { max-width: 1040px; margin: 0 auto; padding: 26px 20px 0; }
.pc-sec:last-child { padding-bottom: 40px; }
.pc-sec-head {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 14px;
}
.pc-sec-title {
    display: flex; align-items: center; gap: 8px;
    margin: 0; font-size: 18px; font-weight: 800; color: var(--text);
}
.pc-sec-bar {
    display: inline-block; width: 4px; height: 18px; border-radius: 2px;
    background: var(--brand);
}
.pc-sec-more { margin-left: auto; font-size: 13px; color: var(--muted); }
.pc-empty {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px; text-align: center; color: var(--faint); font-size: 13px;
}

/* ---------------- 快捷入口 ---------------- */
.pc-quick {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 12px;
    box-shadow: var(--shadow);
    margin-top: -34px;
    position: relative;
}
.pc-quick-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 8px 4px; border-radius: var(--radius-sm);
    color: var(--text); font-size: 13px;
}
.pc-quick-item:hover { background: var(--brand-soft); text-decoration: none; color: var(--brand); }
.pc-quick-ico {
    width: 42px; height: 42px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
}
.pc-quick-ico svg { width: 22px; height: 22px; }
.pc-quick-label { white-space: nowrap; }

/* ---------------- 赛事 ---------------- */
.pc-evs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pc-ev {
    display: block; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; color: var(--text);
    box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.pc-ev:hover { transform: translateY(-2px); border-color: rgba(200, 22, 35, .35); text-decoration: none; }
.pc-ev-cover {
    position: relative; height: 104px;
    background: linear-gradient(135deg, #C81623, #991B1B);
    background-size: cover; background-position: center;
}
.pc-ev-cover.has-photo { background-color: #000; }
.pc-ev-body { padding: 12px 14px 14px; }
.pc-ev-title { font-size: 15px; font-weight: 700; }
.pc-ev-teams {
    display: flex; align-items: center; gap: 10px;
    margin: 10px 0 6px; font-size: 14px; font-weight: 600;
}
.pc-ev-teams span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-ev-teams span:last-child { text-align: right; }
.pc-ev-teams em {
    flex: none; font-style: normal; font-size: 11px; font-weight: 800;
    color: var(--brand); background: var(--brand-soft);
    padding: 2px 8px; border-radius: 999px;
}
.pc-ev-meta, .pc-act-meta {
    display: flex; flex-wrap: wrap; gap: 4px 14px;
    font-size: 12px; color: var(--muted);
}

/* ---------------- 活动 ---------------- */
.pc-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pc-act {
    display: block; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; color: var(--text);
    box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.pc-act:hover { transform: translateY(-2px); border-color: rgba(200, 22, 35, .35); text-decoration: none; }
.pc-act-cover {
    position: relative; height: 118px;
    background: linear-gradient(135deg, #C81623, #991B1B);
    background-size: cover; background-position: center;
}
.pc-act-cover.has-photo { background-color: #000; }
.pc-act-kind {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0, 0, 0, .45); color: #fff;
    font-size: 11px; padding: 2px 8px; border-radius: 999px;
}
.pc-act-body { padding: 12px 14px 14px; }
.pc-act-title {
    font-size: 14px; font-weight: 700; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 42px;
}
.pc-act-body .pc-badge { margin-top: 8px; }

/* ---------------- 状态徽章 ---------------- */
.pc-badge {
    display: inline-block; font-size: 11px; line-height: 1.6;
    padding: 2px 9px; border-radius: 999px; font-weight: 600;
}
.pc-ev-cover .pc-badge { position: absolute; top: 10px; left: 10px; }
.pc-b-soon { background: var(--brand-soft); color: var(--brand); }
.pc-b-live { background: #DC2626; color: #fff; }
.pc-b-open { background: #ECFDF5; color: #047857; }
.pc-b-end { background: #F1F5F9; color: #64748B; }

/* ---------------- 公告 + 关于 两栏 ---------------- */
.pc-cols { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; }
.pc-col {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px 6px;
    box-shadow: var(--shadow);
}
.pc-col .pc-sec-head { margin-bottom: 6px; }
.pc-notices { list-style: none; margin: 0; padding: 0; }
.pc-notices li { border-top: 1px solid var(--border-soft); }
.pc-notices a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 0; color: var(--text); font-size: 14px;
}
.pc-notices a:hover { color: var(--brand); text-decoration: none; }
.pc-notice-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-notice-t::before { content: '·'; color: var(--brand); font-weight: 800; margin-right: 6px; }
.pc-notice-d { flex: none; font-size: 12px; color: var(--faint); }
.pc-about { margin: 4px 0 12px; font-size: 13px; color: var(--muted); line-height: 1.85; }
.pc-contact { list-style: none; margin: 0 0 12px; padding: 0; }
.pc-contact li {
    display: flex; gap: 10px; padding: 6px 0;
    font-size: 13px; border-top: 1px solid var(--border-soft);
}
.pc-contact b { flex: none; width: 68px; color: var(--faint); font-weight: 500; }
.pc-contact span { color: var(--text); word-break: break-all; }

/* ---------------- 合作伙伴 / 备案 ---------------- */
.pc-partners {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.pc-partner {
    height: 72px; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    padding: 10px; color: var(--muted); font-size: 13px; text-align: center;
    filter: grayscale(1); transition: filter .15s, border-color .15s;
}
.pc-partner:hover { filter: none; border-color: rgba(200, 22, 35, .3); text-decoration: none; }
.pc-partner img { max-height: 100%; object-fit: contain; }
.pc-legal {
    display: flex; flex-wrap: wrap; gap: 6px 18px;
    padding: 14px 0; font-size: 12px; color: var(--faint);
}

/* ---------------- 页脚（layouts/site.php） ---------------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
    color: var(--faint);
    font-size: 12px;
    padding: 18px 0;
    margin-top: 20px;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
    .pc-cols { grid-template-columns: 1fr; }
    .pc-stats { grid-template-columns: repeat(2, 1fr); }
    .pc-hero h1 { font-size: 24px; }
    .site-header .wrap { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
    .site-nav { width: 100%; margin-left: 0; }
    .site-nav a { margin-left: 0; margin-right: 16px; }
}

