:root {
    --light-page-start: #edf3fb;
    --light-page-end: #f7f9fc;
    --light-card: #ffffff;
    --light-text: #132238;
    --light-muted: #748197;
    --light-accent: #4b8dff;
    --light-button-text: #ffffff;
    --light-banner-text: #ffffff;
    --dark-page-start: #101722;
    --dark-page-end: #182233;
    --dark-card: #1d2939;
    --dark-text: #f3f6fb;
    --dark-muted: #a9b5c7;
    --dark-accent: #6ea4ff;
    --dark-button-text: #ffffff;
    --dark-banner-text: #ffffff;
    --page-image: none;
    --bg: var(--light-page-start);
    --page-end: var(--light-page-end);
    --card: var(--light-card);
    --ink: var(--light-text);
    --muted: var(--light-muted);
    --blue: var(--light-accent);
    --button-text: var(--light-button-text);
    --banner-text: var(--light-banner-text);
    --line: #dfe6ef;
    --green: #20a67a;
    --gold: #bd9850;
    --orange: #d97706;
    --shadow: 0 12px 30px rgba(48, 71, 104, .11);
    color-scheme: light;
    color: var(--ink);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

html[data-theme="dark"] {
    --bg: var(--dark-page-start);
    --page-end: var(--dark-page-end);
    --card: var(--dark-card);
    --ink: var(--dark-text);
    --muted: var(--dark-muted);
    --blue: var(--dark-accent);
    --button-text: var(--dark-button-text);
    --banner-text: var(--dark-banner-text);
    --line: #35445a;
    --shadow: 0 14px 34px rgba(0, 0, 0, .28);
    color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background-color: var(--bg);
    background-image: var(--page-image), linear-gradient(145deg, var(--bg), var(--page-end));
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.page-shell { width: min(100%, 1120px); min-height: 100vh; margin: auto; padding: 10px 10px 36px; }
.top-card {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-areas: "identity actions" "domain domain";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--shadow);
}
.site-identity { grid-area: identity; min-width: 0; display: flex; align-items: center; gap: 9px; }
.site-logo { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: linear-gradient(145deg, #6aa3ff, #655ed6); color: #fff; font-weight: 800; }
.site-logo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.site-identity div { min-width: 0; }
.site-identity strong,
.site-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-identity strong { font-size: 15px; }
.site-identity small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.domain-line { grid-area: domain; display: flex; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.domain-line b { color: var(--orange); font-size: 12px; }
.header-actions { grid-area: actions; display: flex; align-items: center; gap: 6px; }
.theme-toggle,
.copy-button { min-height: 34px; border: 0; border-radius: 8px; cursor: pointer; }
.theme-toggle { width: 34px; display: grid; place-items: center; background: var(--card); background: color-mix(in srgb, var(--blue) 13%, var(--card)); color: var(--blue); font-size: 17px; }
.copy-button { padding: 7px 13px; background: linear-gradient(120deg, var(--gold), var(--blue)); color: var(--button-text); font-size: 10px; font-weight: 750; }
.sun-icon { display: none; }
.moon-icon { display: block; }
html[data-theme="dark"] .sun-icon { display: block; }
html[data-theme="dark"] .moon-icon { display: none; }

.banner-slider { position: relative; margin-top: 8px; overflow: hidden; border-radius: 8px; background: #dce6f6; box-shadow: var(--shadow); aspect-ratio: 16 / 8.6; }
.slides,
.slide { position: absolute; inset: 0; }
.slide { opacity: 0; pointer-events: none; transition: opacity .4s ease; }
.slide.active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; display: block; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 48% 0 0; background: linear-gradient(transparent, rgba(8, 20, 42, .76)); }
.slide-copy { position: absolute; z-index: 2; left: 15px; right: 15px; bottom: 14px; color: var(--banner-text); }
.slide-copy strong,
.slide-copy span { display: block; }
.slide-copy strong { font-size: 21px; }
.slide-copy span { margin-top: 4px; font-size: 11px; opacity: .9; }
.slider-dots { position: absolute; z-index: 3; right: 12px; bottom: 12px; display: flex; gap: 5px; }
.slider-dots i { width: 7px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .5); }
.slider-dots i.active { width: 18px; background: #fff; }

.notice-bar { height: 36px; display: flex; align-items: center; gap: 8px; margin-top: 7px; padding: 0 11px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--card); box-shadow: 0 5px 15px rgba(48, 71, 104, .05); }
.notice-icon { font-size: 12px; }
.notice-window { flex: 1; overflow: hidden; }
.notice-track { width: max-content; display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 10px; white-space: nowrap; animation: notice 24s linear infinite; }
.notice-track i { color: var(--orange); font-style: normal; }
@keyframes notice { to { transform: translateX(-50%); } }

.content-section { margin-top: 14px; }
.section-title { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 0 2px 9px; padding-left: 11px; }
.section-title::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 3px; width: 4px; border-radius: 3px; background: linear-gradient(var(--gold), var(--blue)); }
.section-title span { display: none; }
.section-title h2 { margin: 0; font-size: 23px; line-height: 1.1; }
.section-title p { max-width: 58%; margin: 0; color: var(--muted); font-size: 9px; text-align: right; }

.platform-panel { padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); box-shadow: var(--shadow); }
.filter-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(115px, 1fr); gap: 7px; overflow-x: auto; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs button { min-height: 42px; padding: 8px 12px; border: 0; border-radius: 8px; background: var(--card); background: color-mix(in srgb, var(--card) 88%, var(--bg)); color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.filter-tabs button.active { background: linear-gradient(115deg, var(--gold), var(--blue)); color: var(--button-text); }
.platform-notice { display: flex; align-items: center; gap: 7px; margin-top: 7px; padding: 10px 11px; border: 1px solid #f5e7c7; border-radius: 8px; color: #9a6a22; background: linear-gradient(120deg, #fffdf8, #fff7e5); }
.platform-notice span { flex: 0 0 auto; color: var(--blue); font-size: 9px; }
.platform-notice p { margin: 0; font-size: 9px; line-height: 1.5; }
html[data-theme="dark"] .platform-notice { border-color: #675739; color: #efc778; background: #302a21; }

.platform-layout { position: relative; margin-top: 7px; }
.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.platform-card { position: relative; min-width: 0; height: 116px; display: grid; grid-template-rows: 52px auto auto; align-content: center; justify-items: center; padding: 8px 6px 6px; overflow: hidden; border: 1px solid var(--line); border-color: color-mix(in srgb, var(--line) 75%, transparent); border-radius: 8px; background: var(--card); box-shadow: 0 5px 15px rgba(44, 66, 98, .06); text-align: center; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.platform-card.custom-background { background-color: var(--platform-card-start); background-image: var(--platform-card-image), linear-gradient(135deg, var(--platform-card-start), var(--platform-card-end)); background-position: center, center; background-size: cover, cover; }
.platform-card.custom-background strong { color: var(--platform-card-text); text-shadow: 0 1px 2px rgba(255,255,255,.22); }
.platform-card.custom-background small { color: var(--platform-card-muted); text-shadow: 0 1px 2px rgba(255,255,255,.22); }
.platform-card:hover { transform: translateY(-2px); border-color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); box-shadow: 0 9px 20px rgba(44, 66, 98, .13); }
.platform-card:active { transform: scale(.98); }
.platform-card img,
.platform-card .letter-icon { width: 47px; height: 47px; align-self: center; }
.platform-card img { display: block; border-radius: 8px; object-fit: cover; }
.letter-icon { display: grid; place-items: center; border-radius: 8px; background: linear-gradient(145deg, #70a6ff, #64d3df); color: #fff; font-size: 19px; font-weight: 800; }
.platform-card strong,
.platform-card small { max-width: 100%; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-card strong { margin-top: 3px; font-size: 11px; }
.platform-card small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.status-badge { position: absolute; z-index: 1; top: 5px; right: 5px; padding: 2px 5px; border-radius: 5px; background: #dff8ed; color: var(--green); font-size: 7px; font-weight: 750; }
.category-panels { display: none; }
.platform-layout.category-active { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 60%); align-items: stretch; gap: 7px; }
.platform-layout.category-active .platform-grid { grid-template-columns: minmax(0, 1fr); align-content: start; }
.platform-layout.category-active .category-panels { display: block; }
.category-info { min-height: 100%; padding: 13px 10px; border: 1px solid rgba(127, 145, 170, .16); border-radius: 8px; color: var(--panel-text); background: linear-gradient(135deg, var(--panel-start), var(--panel-end)); }
.category-info > span { color: var(--panel-accent); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.category-info h3 { margin: 6px 0 8px; color: var(--panel-accent); font-size: 14px; }
.category-info p { margin: 0; color: var(--panel-text); font-size: 9px; font-weight: 600; line-height: 1.7; overflow-wrap: anywhere; }
.filter-empty,
.empty-card { padding: 26px 12px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 10px; text-align: center; }
.filter-empty { grid-column: 1 / -1; }

.contact-grid,
.tool-list { display: grid; gap: 8px; }
.contact-card,
.tool-card { min-width: 0; display: grid; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); box-shadow: var(--shadow); }
.contact-card { grid-template-columns: auto minmax(0, 1fr) auto; }
.contact-card img,
.contact-card .letter-icon,
.tool-card img,
.tool-card .letter-icon { width: 43px; height: 43px; border-radius: 8px; object-fit: cover; }
.service-icon { background: linear-gradient(145deg, #50d09d, #4399e9); font-size: 16px; }
.contact-card strong,
.contact-card small,
.contact-card em,
.tool-card strong,
.tool-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-card strong,
.tool-card strong { font-size: 12px; }
.contact-card small,
.tool-card small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.contact-card em { margin-top: 3px; color: var(--orange); font-size: 9px; font-style: normal; font-weight: 700; }
.contact-card > span:last-child { color: var(--muted); font-size: 20px; }
.tool-card { grid-template-columns: auto minmax(0, 1fr) auto; }
.tool-icon { background: linear-gradient(145deg, #9f82ff, #5c9aff); font-size: 16px; }
.tool-card > b { color: var(--blue); font-size: 9px; }

footer { padding: 26px 12px 8px; color: var(--muted); text-align: center; }
footer strong { color: var(--ink); font-size: 13px; }
footer p { margin: 6px 0; font-size: 9px; }
footer span { font-size: 8px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 8px; background: var(--ink); color: var(--card); font-size: 10px; opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 560px) {
    .page-shell { padding: 14px; }
    .top-card { grid-template-areas: "identity domain actions"; grid-template-columns: minmax(0, 1fr) auto auto; padding: 11px 14px; }
    .domain-line { padding: 0; border: 0; }
    .banner-slider { aspect-ratio: 16 / 7.3; }
    .contact-grid,
    .tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .platform-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .platform-layout.category-active { grid-template-columns: minmax(0, 39%) minmax(0, 61%); }
    .platform-layout.category-active .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 820px) {
    body { padding: 4px 0 14px; }
    .banner-slider { aspect-ratio: 16 / 6.5; }
    .section-title h2 { font-size: 26px; }
    .section-title p { max-width: none; font-size: 10px; }
    .platform-panel { padding: 8px; }
    .platform-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .platform-card { height: 88px; grid-template-rows: 45px auto auto; padding: 5px 5px 4px; }
    .platform-card img,
    .platform-card .letter-icon { width: 42px; height: 42px; }
    .platform-card strong { margin-top: 1px; font-size: 10px; }
    .platform-card small { margin-top: 0; font-size: 7px; }
    .platform-layout.category-active .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
    .category-info { padding: 22px 18px; }
    .category-info h3 { font-size: 18px; }
    .category-info p { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
