/* 同模版1层级：页面底 → 顶栏 → Tab → 卡片 → 标题条 → 强调字 */
:root {
    --brand: #c62828;
    --brand-deep: #8e1b1b;
    --card: #ffffff;
    --ink: #2a1f1f;
    --line: #f0e2e2;
    --nav-bg: rgba(229, 83, 83, 0.94);
    --nav-border: rgba(142, 27, 27, 0.3);
    --tab-bg: #e05555;
    --tab-bg-hover: #cf3d3d;
    --tab-border: #c62828;
    --tab-border-bottom: #9b1f1f;
    --title-bg: #fff1f1;
    --title-ink: #8e1b1b;
    --tint: rgba(198, 40, 40, 0.1);
    --on-brand: #ffffff;
    --on-tab: #ffffff;
    --radius: 4px;
    --grid-gap: 3px;
    --container-width: 1020px;
    --sidebar-margin: 515px;
    --shadow: 0 1px 2px rgba(60, 16, 16, 0.06), 0 8px 24px rgba(60, 16, 16, 0.1);
}

.site-logo {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

::-webkit-scrollbar { width: 8px; height: 5px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.06); border-radius: 2em; }
::-webkit-scrollbar-thumb { background-color: color-mix(in srgb, var(--brand-deep) 55%, transparent); border-radius: 2em; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--brand-deep) 75%, transparent); }

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

body {
    background-color: var(--brand);
    color: var(--ink);
    font-size: 13px;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
html { overflow-y: scroll; scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }

.gd-header {
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--nav-border);
    padding: 12px 0;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 18px;
}
.gd-hdrbox {
    width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.gd-hdrleft { flex-shrink: 0; }
.gd-title { font-size: 24px; font-weight: 800; margin: 0; }
.gd-title a {
    color: var(--on-brand);
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.22);
    display: flex;
    align-items: center;
    gap: 8px;
}
.gd-hdrmid { flex: 1; max-width: 360px; }
.gd-searchform { display: flex; width: 100%; position: relative; }
.gd-searchinp {
    width: 100%;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 22px;
    padding: 8px 45px 8px 15px;
    color: var(--on-brand);
    font-size: 13px;
    outline: none;
}
.gd-searchinp::placeholder { color: rgba(255,255,255,0.62); }
.gd-searchinp:focus {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.36);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}
.gd-searchbtn {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: rgba(255,255,255,0.8);
    cursor: pointer; font-size: 14px; padding: 6px 10px;
}
.gd-searchbtn:hover { color: var(--on-brand); }
.gd-hdrright { flex-shrink: 0; }
.gd-hdrlinks { display: flex; align-items: center; gap: 6px; }
.gd-hdrlink {
    color: rgba(255,255,255,0.88);
    font-weight: 600; font-size: 12px;
    padding: 6px 9px; border-radius: 999px;
    display: flex; align-items: center; gap: 4px; white-space: nowrap;
    transition: background .25s, color .25s;
}
.gd-hdrlink:hover { background: rgba(255,255,255,0.12); color: var(--on-brand); }
.gd-hdrlink.active { background: rgba(255,255,255,0.92); color: var(--brand-deep); }
.gd-hdrlink.active i { color: var(--brand-deep); }

.gd-container {
    width: var(--container-width);
    margin: 0 auto;
    padding-bottom: 0;
}

.gd-catnav { width: 100%; margin-bottom: 12px; }
.gd-navlist {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--grid-gap);
    list-style: none;
}
.gd-navitem {
    background: var(--tab-bg);
    border: 1px solid var(--tab-border);
    border-bottom: 2px solid var(--tab-border-bottom);
    border-radius: 5px;
    height: 40px;
    overflow: hidden;
    transition: background .25s, border-color .25s;
}
.gd-navitem a {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    color: var(--on-tab); font-weight: 700; font-size: 13px;
}
.gd-navitem:hover,
.gd-navitem.highlight:hover { background: var(--tab-bg-hover); }

.gd-featured,
.gd-appsec,
.gd-recomsec,
.gd-catsec {
    width: 100%;
    background: var(--card);
    margin-bottom: 12px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.gd-featlist,
.gd-recomlist,
.gd-linkgrid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    list-style: none;
}
.gd-featitem,
.gd-recomitem,
.gd-linkitem {
    height: 40px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background .22s;
    overflow: hidden;
}
.gd-featitem a,
.gd-recomitem a,
.gd-linkitem a {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    color: var(--ink); font-size: 13px; text-align: center; padding: 0 5px;
}
.gd-featitem:hover,
.gd-recomitem:hover,
.gd-linkitem:hover { background: var(--tint); }
.gd-featitem:hover a,
.gd-recomitem:hover a,
.gd-linkitem:hover a { color: var(--brand-deep) !important; }

.gd-banners {
    width: 100%; margin-bottom: 12px;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}

/* Banner + APP hover (synced from template 1; classes keep gd-* fingerprint) */
.gd-banitem { min-width: 0; position: relative; }
.gd-banitem > a {
    display: block; position: relative;
    border-radius: calc(var(--radius) + 2px); overflow: hidden;
    background: var(--card);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.08);
    transform: translateZ(0);
    transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s cubic-bezier(.2,.8,.2,1);
}
.gd-banitem > a::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: inset 0 0 0 1px transparent;
    transition: box-shadow .22s ease;
}
.gd-banitem img {
    width: 100%; display: block; border-radius: inherit;
    transform: scale(1);
    transition: transform .28s cubic-bezier(.2,.8,.2,1), filter .22s ease;
}
@media (hover: hover) and (pointer: fine) {
    .gd-banitem > a:hover,
    .gd-banitem > a:focus-visible {
        transform: translateY(-4px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1), 0 16px 32px color-mix(in srgb, var(--brand-deep) 22%, transparent);
        outline: none;
    }
    .gd-banitem > a:hover::after,
    .gd-banitem > a:focus-visible::after {
        box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 45%, transparent);
    }
    .gd-banitem > a:hover img,
    .gd-banitem > a:focus-visible img {
        transform: scale(1.03); filter: saturate(1.06) contrast(1.02);
    }
}
.gd-appgrid { padding: 8px 6px 12px; }
.gd-applink {
    display: flex; flex-direction: column; align-items: center; width: 100%;
    padding: 6px 2px 4px; border-radius: 12px;
    transition: background-color .2s ease;
}
.gd-appicon {
    width: 64px; height: 64px; border-radius: 16px; overflow: hidden;
    margin: 8px 12px 10px; position: relative;
    background: color-mix(in srgb, var(--title-bg) 80%, #fff);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 6px 14px rgba(0,0,0,0.1);
    transform: translateZ(0);
    transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s cubic-bezier(.2,.8,.2,1);
}
.gd-appicon::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 12%, transparent);
    transition: box-shadow .22s ease;
}
.gd-appicon img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.gd-appname { transition: color .2s ease, transform .22s ease; }
@media (hover: hover) and (pointer: fine) {
    .gd-applink:hover,
    .gd-applink:focus-visible {
        background: color-mix(in srgb, var(--brand) 6%, transparent);
        outline: none;
    }
    .gd-applink:hover .gd-appicon,
    .gd-applink:focus-visible .gd-appicon {
        transform: translateY(-5px) scale(1.06);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 14px 28px color-mix(in srgb, var(--brand-deep) 22%, transparent);
    }
    .gd-applink:hover .gd-appicon::after,
    .gd-applink:focus-visible .gd-appicon::after {
        box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 42%, transparent);
    }
    .gd-applink:hover .gd-appicon img,
    .gd-applink:focus-visible .gd-appicon img { transform: scale(1.05); }
    .gd-applink:hover .gd-appname,
    .gd-applink:focus-visible .gd-appname {
        color: var(--brand-deep); transform: translateY(-1px); font-weight: 700;
    }
}
@media (prefers-reduced-motion: reduce) {
    .gd-banitem > a, .gd-banitem img, .gd-applink, .gd-appicon, .gd-appicon img, .gd-appname { transition: none; }
    .gd-banitem > a:hover, .gd-applink:hover .gd-appicon { transform: none; }
}
.gd-banitem img { width: 100%; display: block; border-radius: var(--radius); }

.gd-sechdr {
    height: 42px; width: 100%;
    display: flex; align-items: center; padding-left: 18px;
    background: var(--title-bg);
    border-bottom: 1px solid var(--line);
}
.gd-secttl {
    font-size: 16px; font-weight: 700; color: var(--title-ink);
    letter-spacing: 0.04em;
    display: inline-flex; align-items: center; gap: 8px;
}
.theme-pink, .theme-red, .theme-green, .theme-yellow,
.theme-blue, .theme-gray, .theme-orange, .theme-black {
    background: var(--title-bg);
    color: var(--title-ink);
}

.gd-appgrid {
    display: grid; grid-template-columns: repeat(10, 1fr);
    list-style: none; padding: 5px;
}
.gd-appitem { margin: 4px 0; }
.gd-appname {
    width: 100%; height: 25px; line-height: 25px; text-align: center;
    font-size: 13px; color: var(--ink);
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

.gd-footer {
    background: rgba(255,255,255,0.94);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 18px 20px; text-align: center;
    box-shadow: var(--shadow);
}
.gd-footlinks {
    margin-bottom: 12px; font-weight: 700; font-size: 13px;
    color: var(--line); white-space: nowrap; line-height: 1.5;
}
.gd-footlinks a { color: var(--brand-deep); }
.gd-footlinks a:hover { color: var(--ink); }
.gd-footer p { line-height: 24px; color: var(--ink); }
.gd-footer p a { color: var(--ink); font-weight: 700; }
.gd-warntext { margin-top: 10px; font-size: 12px; color: var(--ink); opacity: .72; }

.gd-sidebar {
    position: fixed; bottom: 0; width: 70px;
    left: 50%; margin-left: var(--sidebar-margin);
    display: flex; flex-direction: column; gap: var(--grid-gap);
}
.gd-sideitem {
    width: 70px; height: 32px; line-height: 32px; text-align: center;
    color: var(--on-tab); border-radius: 5px; font-size: 12px;
    background: var(--tab-bg);
    border: 1px solid var(--tab-border);
    border-bottom: 2px solid var(--tab-border-bottom);
    transition: background .25s;
}
.gd-sideitem:hover { background: var(--tab-bg-hover); }

.gd-backhome .gd-navlist { grid-template-columns: 1fr; }
.gd-subsec {
    width: 100%; background: var(--card); margin-bottom: 12px;
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.gd-subbody {
    padding: 24px 28px; color: var(--ink); font-size: 14px; line-height: 1.85;
}
.gd-subbody h3 {
    font-size: 17px; margin-top: 22px; margin-bottom: 12px;
    color: var(--brand-deep); border-left: 4px solid var(--brand);
    padding-left: 10px; display: flex; align-items: center; gap: 8px;
}
.gd-subbody h3:first-child { margin-top: 0; }
.gd-subbody p { margin-bottom: 14px; }
.gd-subbody ul, .gd-subbody ol { margin-bottom: 14px; padding-left: 20px; }
.gd-subbody li { margin-bottom: 6px; }
.gd-subbody a { color: var(--brand-deep); font-weight: 700; text-decoration: underline; }
.gd-subbody a:hover { color: var(--brand); }
.gd-subbody code {
    background: var(--tint); border: 1px solid var(--line); border-radius: 4px;
    padding: 2px 7px; font-family: inherit; font-size: 13px; font-weight: 700;
    color: var(--brand-deep);
}
.gd-callout {
    background: var(--title-bg); border: 1px solid var(--line);
    border-left: 4px solid var(--brand); border-radius: var(--radius);
    padding: 16px 18px; margin-bottom: 22px;
}
.gd-callout h3 { margin-top: 0; border-left: none; padding-left: 0; }
.gd-chip {
    display: inline-block; background: var(--card); border: 1px solid var(--line);
    border-radius: 4px; padding: 3px 9px; font-family: inherit; font-size: 14px;
    font-weight: 700; color: var(--brand-deep);
}
.gd-rulelist { list-style: none; padding-left: 0; margin-bottom: 22px; }
.gd-rulelist li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.gd-rulelist li > i { color: var(--brand-deep); margin-top: 4px; width: 1.1em; text-align: center; }
.gd-contact {
    background: var(--title-bg); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 18px 20px; max-width: 520px;
}
.gd-contact p {
    margin-bottom: 12px; font-size: 15px;
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px;
}
.gd-contact p:last-child { margin-bottom: 0; }
.gd-contact i { color: var(--brand-deep); font-size: 18px; width: 1.25em; text-align: center; }
.gd-contact a { color: var(--brand-deep); font-weight: 700; text-decoration: underline; }
.gd-subnote { color: var(--ink); opacity: .72; font-size: 12px; margin-top: 16px; }
.gd-formctrl {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: 6px; font-size: 14px; outline: none;
    background: #fff; color: var(--ink);
}
.gd-formctrl:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--tint); }
.gd-btn {
    background: var(--brand); color: var(--on-brand); border: 0; border-radius: 6px;
    padding: 10px 22px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.gd-btn:hover { background: var(--brand-deep); }
.gd-searchbox { display: flex; gap: 10px; margin-bottom: 24px; max-width: 640px; }
.gd-searchbox .gd-formctrl { flex: 1; min-width: 0; }
.gd-restitle {
    font-size: 15px; font-weight: 700; margin-bottom: 14px;
    color: var(--brand-deep); border-bottom: 1px solid var(--line); padding-bottom: 8px;
}
.gd-resgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; list-style: none; }
.gd-resitem {
    background: var(--title-bg); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 12px 14px;
    transition: border-color .25s, background .25s, transform .25s;
}
.gd-resitem:hover {
    border-color: var(--brand); background: var(--tint); transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.gd-resname { font-weight: 700; color: var(--brand-deep); font-size: 14px; margin-bottom: 5px; display: block; }
.gd-resdesc { font-size: 12px; color: var(--ink); opacity: .72; line-height: 1.45; display: block; }
.gd-resempty {
    grid-column: 1 / -1; text-align: center; padding: 36px 16px;
    color: var(--ink); opacity: .55; font-size: 15px;
}
.gd-resempty i { font-size: 24px; margin-bottom: 10px; display: block; color: var(--brand); }

@media screen and (max-width:1360px) {
    .gd-sidebar { display: none; }
}
@media screen and (max-width:960px) {
    .gd-hdrbox {
        width: min(var(--container-width), calc(100% - 24px));
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "left right" "middle middle";
        gap: 10px 12px;
    }
    .gd-hdrleft { grid-area: left; }
    .gd-hdrright { grid-area: right; }
    .gd-hdrmid { grid-area: middle; max-width: 100%; }
    .gd-container { width: 98%; }
    .gd-navlist { grid-template-columns: repeat(5, 1fr); }
    .gd-featlist, .gd-recomlist, .gd-linkgrid { grid-template-columns: repeat(4, 1fr); }
    .gd-appgrid { grid-template-columns: repeat(5, 1fr); }
}
@media screen and (max-width:800px) {
    .gd-navlist, .gd-featlist, .gd-appgrid, .gd-recomlist, .gd-linkgrid {
        grid-template-columns: repeat(4, 1fr);
    }
    .gd-banners { grid-template-columns: 1fr; }
    .gd-resgrid { grid-template-columns: repeat(2, 1fr); }
    .gd-subbody { padding: 18px 16px; }
}
@media screen and (max-width:640px) {
    .gd-hdrbox {
        grid-template-columns: 1fr;
        grid-template-areas: "left" "middle" "right";
    }
    .gd-hdrleft { display: flex; justify-content: center; }
    .gd-hdrlinks {
        display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
        width: 100%; max-width: none;
    }
    .gd-hdrlink { flex-direction: column; font-size: 9px; padding: 5px 1px; border-radius: 10px; }
    .gd-navitem a, .gd-featitem a, .gd-recomitem a, .gd-linkitem a { font-size: 11px; }
}
@media screen and (max-width:480px) {
    .gd-resgrid { grid-template-columns: 1fr; }
    .gd-searchbox { flex-direction: column; }
}
