:root { --blue: #2f6cf5; --ink: #16223b; --muted: #73809a; --line: #e9edf4; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; background: #f8faff; color: var(--ink); }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.site { min-height: 100vh; background: linear-gradient(180deg, #f5f8ff 0, #fbfcff 410px, #f8faff 100%); transition: .3s; position: relative; overflow: hidden; }
.site.dark { --ink: #eef3ff; --muted: #9ca9c0; --line: #28334a; background: #111827; }
.ambient { position: absolute; border-radius: 50%; filter: blur(3px); pointer-events: none; opacity: .55; }
.ambient-one { width: 340px; height: 340px; background: radial-gradient(circle, #dfe9ff 0, transparent 70%); top: -120px; left: -100px; }
.ambient-two { width: 420px; height: 420px; background: radial-gradient(circle, #e7e0ff 0, transparent 70%); top: 40px; right: -180px; }
.dark .ambient { opacity: .09; }
.topbar { height: 76px; max-width: 1180px; margin: auto; padding: 0 26px; display: flex; align-items: center; position: relative; z-index: 3; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 750; font-size: 17px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: white; font-weight: 900; background: linear-gradient(145deg, #6d9aff, #2f6cf5); box-shadow: 0 8px 20px #3972ed3b; }
.header-nav { display: flex; gap: 32px; margin: auto; color: var(--muted); font-size: 14px; }
.header-nav a:first-child { color: var(--blue); font-weight: 650; }
.theme-toggle { width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #ffffffaa; cursor: pointer; font-size: 20px; }
.login-button, .primary-button { border: 0; border-radius: 11px; background: var(--blue); color: white; padding: 11px 17px; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 8px 20px #326ef234; }
.login-button { margin-left: 10px; }
.account { display: flex; align-items: center; gap: 9px; margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); font-size: 12px; }
.avatar { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #8a7cf5, #526ce8); font-weight: 800; }
.account-name { font-weight: 700; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.admin-button { border: 0; border-radius: 8px; padding: 7px 9px; background: #ecf2ff; color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 700; }
.dark .admin-button { background: #283754; }
.dark .theme-toggle { background: #1d273b; }
.hero { max-width: 850px; margin: 73px auto 92px; padding: 0 24px; text-align: center; position: relative; z-index: 2; }
.eyebrow { width: max-content; margin: auto; padding: 7px 13px; border: 1px solid #dce6fb; background: #ffffffc2; border-radius: 99px; font-size: 12px; color: #6181bd; display: flex; align-items: center; gap: 8px; }
.dark .eyebrow { background: #1d273b; border-color: #2d3b56; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: #4b83fa; box-shadow: 0 0 0 4px #dce8ff; }
.hero h1 { font-size: clamp(42px, 6vw, 68px); letter-spacing: -3px; line-height: 1.08; margin: 24px 0 16px; font-weight: 850; }
.hero h1 span { display: block; color: var(--blue); }
.hero > p { color: var(--muted); font-size: 16px; margin: 0 auto 32px; }
.engine-tabs { display: flex; justify-content: center; gap: 6px; margin: 0 auto 9px; }
.engine-tabs button { border: 0; padding: 6px 11px; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.engine-tabs button.active { color: var(--blue); background: #eaf1ff; font-weight: 700; }
.dark .engine-tabs button.active { background: #263654; }
.search-box { max-width: 620px; height: 62px; margin: auto; display: flex; align-items: center; padding: 0 17px 0 22px; background: white; border: 1px solid #e5eaf3; border-radius: 18px; box-shadow: 0 15px 45px #5476b818; text-align: left; transition: .2s; }
.dark .search-box, .dark .nav-card { background: #1a2437; border-color: #2a374f; }
.search-box:focus-within { border-color: #96b7ff; box-shadow: 0 15px 45px #5476b829, 0 0 0 4px #e6eeff; }
.search-box > span { font-size: 28px; color: #92a0b8; transform: rotate(-15deg); }
.search-box input { flex: 1; border: 0; outline: 0; padding: 0 15px; background: transparent; color: var(--ink); font-size: 15px; min-width: 0; }
.search-box kbd { font: 12px system-ui; background: #f3f6fa; color: #8c99ae; padding: 6px 9px; border-radius: 7px; }
.search-submit { border: 0; border-radius: 10px; padding: 9px 15px; background: var(--blue); color: white; cursor: pointer; font-size: 12px; font-weight: 700; }
.dark .search-box kbd { background: #263248; }
.quick-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 22px; font-size: 12px; color: #8490a4; }
.quick-links a { color: #56647b; transition: .2s; }
.dark .quick-links a { color: #a9b5c8; }
.quick-links a:hover { color: var(--blue); transform: translateY(-1px); }
.hero-actions { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--muted); font-size: 12px; }
.directory { max-width: 1180px; margin: auto; padding: 0 26px 80px; position: relative; z-index: 2; }
.section-heading { display: flex; justify-content: space-between; align-items: end; }
.section-kicker { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.section-heading h2 { margin: 5px 0 0; font-size: 28px; letter-spacing: -1px; }
.result-count { font-size: 12px; color: var(--muted); }
.category-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 25px 0 24px; scrollbar-width: none; }
.category-tabs button { flex: 0 0 auto; padding: 9px 16px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; transition: .2s; }
.category-tabs button.active { background: var(--blue); color: white; border-color: var(--blue); box-shadow: 0 7px 18px #326ef23d; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.nav-card { min-width: 0; min-height: 106px; padding: 0; background: white; border: 1px solid var(--line); border-radius: 16px; display: flex; align-items: center; position: relative; transition: .25s; animation: rise .45s both; overflow: hidden; }
.nav-card:hover { transform: translateY(-4px); border-color: #cbd9f6; box-shadow: 0 14px 35px #49689616; }
.card-main { min-width: 0; flex: 1; padding: 20px; display: flex; align-items: center; gap: 14px; }
.icon-box { flex: 0 0 auto; width: 47px; height: 47px; border-radius: 13px; display: grid; place-items: center; font-weight: 850; font-size: 18px; color: #38527c; }
.card-copy { min-width: 0; display: grid; gap: 7px; }
.card-copy strong { font-size: 15px; }
.card-copy small { color: var(--muted); font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-copy em { width: max-content; color: #7892c1; background: #f0f5ff; border-radius: 5px; padding: 2px 5px; font-size: 9px; font-style: normal; }
.dark .card-copy em { background: #26334b; color: #adc3ef; }
.delete-button { position: absolute; top: 10px; right: 10px; width: 25px; height: 25px; border: 0; border-radius: 8px; background: #f6f8fb; color: #9aa6b8; cursor: pointer; opacity: 0; transition: .2s; }
.nav-card:hover .delete-button { opacity: 1; }
.delete-button:hover { color: #e94d62; background: #fff0f2; }
.arrow { position: absolute; top: 14px; right: 14px; color: #b5bfd0; opacity: 0; transform: translate(-4px, 4px); transition: .2s; }
.nav-card:hover .arrow { opacity: 1; transform: none; }
.empty-state { text-align: center; padding: 70px; color: var(--muted); }
.empty-state > span { font-size: 40px; }
.empty-state h3 { color: var(--ink); margin-bottom: 4px; }
footer { max-width: 1128px; margin: auto; padding: 34px 0 46px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 30px; color: var(--muted); font-size: 12px; }
.footer-brand { color: var(--ink); margin-right: auto; }
.footer-brand .brand-mark { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: #111a2b99; backdrop-filter: blur(8px); }
.modal-card { width: min(440px, 100%); max-height: 90vh; overflow: auto; padding: 34px; border-radius: 22px; background: white; color: #16223b; box-shadow: 0 30px 80px #0b132855; position: relative; animation: pop .25s ease-out; }
.dark .modal-card { background: #1a2437; color: #eef3ff; }
.modal-close { position: absolute; top: 15px; right: 15px; width: 30px; height: 30px; border: 0; border-radius: 9px; background: #f1f4f8; color: #7f8ca0; cursor: pointer; font-size: 20px; }
.dark .modal-close { background: #263248; }
.modal-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: #edf3ff; color: var(--blue); font-size: 25px; font-weight: 800; }
.modal-card h2 { margin: 18px 0 7px; font-size: 24px; }
.modal-card > p { margin: 0 0 23px; color: #7c899e; font-size: 13px; }
.modal-card form { display: grid; gap: 14px; }
.modal-card label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; }
.modal-card input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #e0e6ef; border-radius: 11px; outline: 0; background: #fafcff; color: inherit; }
.dark .modal-card input { background: #202d43; border-color: #34435d; }
.modal-card input:focus { border-color: #7da3fa; box-shadow: 0 0 0 3px #e5edff; }
.modal-card form .primary-button { height: 47px; margin-top: 4px; }
.form-error { padding: 10px 12px; border-radius: 9px; color: #c93d53; background: #fff0f2; font-size: 12px; }
.switch-auth { width: 100%; margin-top: 17px; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 12px; }
.admin-modal { width: min(780px, 100%); }
.admin-panel { display: grid; grid-template-columns: 240px 1fr; gap: 22px; }
.admin-panel h3 { display: flex; justify-content: space-between; margin: 0 0 10px; font-size: 13px; }
.admin-panel h3 small { color: #8b97aa; font-weight: 500; }
.admin-list { display: grid; gap: 7px; max-height: 420px; overflow: auto; padding-right: 3px; }
.admin-tools { display: grid; grid-template-columns: 150px 1fr; gap: 8px; margin-bottom: 10px; }
.admin-tools select, .admin-tools input { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid #e0e6ef; border-radius: 9px; background: #fafcff; color: inherit; font-size: 11px; outline: 0; }
.dark .admin-tools select, .dark .admin-tools input { background: #202d43; border-color: #34435d; }
.category-badge { color: #356fd7; font-weight: 650; }
.admin-empty { padding: 34px 12px; text-align: center; color: #8a96a8; font-size: 11px; }
.admin-row { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 9px; border: 1px solid #e8ecf2; border-radius: 10px; }
.dark .admin-row { border-color: #33415a; }
.admin-row > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; flex: 1; }
.admin-row strong, .admin-row small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.admin-row strong { font-size: 11px; }
.admin-row small { color: #8a96a8; font-size: 9px; }
.mini-avatar { flex: 0 0 auto; width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; background: #edf3ff; color: #526d9e; font-size: 10px; font-weight: 800; }
.danger-link, .publish-link, .unpublish-link, .approve-link { flex: 0 0 auto; border: 0; background: transparent; cursor: pointer; padding: 4px; font-size: 9px; }
.danger-link { color: #d95165; }
.publish-link { color: #3372f3; }
.unpublish-link { color: #9a6b34; }
.approve-link { color: #17885f; }
.admin-loading { padding: 40px; text-align: center; color: #8b97aa; }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } footer { margin: 0 26px; } }
@media (max-width: 600px) {
  .topbar { height: 66px; padding: 0 18px; } .header-nav { display: none; } .theme-toggle { margin-left: auto; } .account-name { display: none; } .login-button { padding: 10px 12px; }
  .hero { margin: 50px auto 70px; padding: 0 18px; } .hero h1 { letter-spacing: -2px; } .hero > p { font-size: 14px; line-height: 1.7; }
  .search-box { height: 56px; border-radius: 15px; } .search-box kbd { display: none; } .quick-links { gap: 11px; }
  .directory { padding: 0 16px 60px; } .card-grid { grid-template-columns: 1fr; gap: 10px; } .nav-card { min-height: 92px; } .card-main { padding: 16px; }
  .hero-actions { flex-direction: column; gap: 11px; }
  .admin-panel { grid-template-columns: 1fr; } .admin-button { padding: 6px; font-size: 0; } .admin-button::after { content: "管理"; font-size: 10px; }
  footer { margin: 0 18px; padding: 30px 0; flex-wrap: wrap; gap: 12px; } footer p { order: 3; width: 100%; margin: 0; }
}
