/* ==========================================================================
   惊霄导航 · 前台主题（通栏 Banner + 大搜索 + 侧栏分类版式）
   仅前台页面加载；后台仍使用 assets/css/style.css
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f2f4f8;
  --card: #ffffff;
  --text: #23272e;
  --muted: #8b93a3;
  --border: #e9edf3;
  --accent: #ff4d4f;
  --accent-soft: #fff1f0;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(23, 35, 71, 0.06);
  --nav-h: 58px;
}
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
svg { display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.empty.small { padding: 26px 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.t-emoji { font-style: normal; }

/* ========== 顶部导航 ========== */
.nav {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: var(--nav-h); display: flex; align-items: center; gap: 22px;
}
.nav-logo { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; white-space: nowrap; }
.nav-logo img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
.nav-menu { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav-menu a {
  display: flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 9px;
  font-size: 14px; color: #4a5160; font-weight: 500; white-space: nowrap;
}
.nav-menu a svg { width: 15px; height: 15px; }
.nav-menu a:hover { background: rgba(255, 255, 255, 0.85); color: var(--accent); }
.nav-menu a.active { color: var(--accent); font-weight: 700; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.7); color: #5a6274;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { background: #fff; color: var(--accent); }
.nav-add {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 999px;
  background: linear-gradient(135deg, #ff6a5e, var(--accent)); color: #fff;
  font-size: 13.5px; font-weight: 600; box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}
.nav-add svg { width: 14px; height: 14px; }
.nav-add:hover { opacity: .92; }
.nav-user {
  display: inline-flex; align-items: center; gap: 7px; max-width: 150px;
  padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.72);
  font-size: 13.5px; font-weight: 600; color: #3c4353;
}
.nav-user:hover { background: #fff; color: var(--accent); }
.nav-user-avatar { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.nav-user-avatar img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.nav-user-avatar .letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; font-style: normal; }
.nav-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-login { padding: 6px 14px; }

/* 下拉面板（最近访问 / 收藏） */
.panel {
  position: absolute; right: 20px; top: calc(var(--nav-h) + 6px);
  width: 320px; max-width: calc(100vw - 40px);
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(23, 35, 71, 0.14); padding: 10px; z-index: 90;
}
.panel h3 { font-size: 12.5px; color: var(--muted); padding: 6px 10px 8px; font-weight: 600; }
.panel-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); }
.panel-item:hover { background: #f6f8fc; }
.panel-item .pi-name { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-item .pi-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.panel-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; position: relative;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: #fff; font-size: 14px; font-weight: 700;
}
.panel-icon img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.panel-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 16px 0; }

/* ========== 首页 Banner ========== */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--nav-h));
  padding-top: var(--nav-h);
  min-height: 430px;
  background-color: #fdeef2;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(242, 244, 248, 0.92)), var(--hero-img, none);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}
.hero-plain {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(242, 244, 248, 0.95)),
                    linear-gradient(135deg, #ffdde6 0%, #e8f0ff 55%, #f4ecff 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 30px 20px 34px;
  display: flex; flex-direction: column; align-items: center;
}
.hero-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin-bottom: 20px; }
.hero-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 15px; border-radius: 999px;
  font-size: 13.5px; color: #555c6b; background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background .15s, color .15s, transform .15s;
}
.hero-tab svg { width: 14px; height: 14px; }
.hero-tab:hover { background: #fff; color: var(--accent); transform: translateY(-1px); }

.hero-search {
  width: 100%; max-width: 620px; display: flex; align-items: center; gap: 6px;
  background: #fff; border-radius: 10px; padding: 5px 5px 5px 12px;
  box-shadow: 0 12px 34px rgba(41, 50, 80, 0.16);
}
.hero-search .engine-select {
  border: 0; outline: none; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 13.5px; color: #6b7280; padding: 6px 2px; -webkit-appearance: none; appearance: none;
}
.hero-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: inherit;
  font-size: 15px; color: var(--text); padding: 8px 4px;
}
.hero-search input::placeholder { color: #b0b7c3; }
.hero-search button {
  width: 46px; height: 40px; border: 0; border-radius: 8px; cursor: pointer;
  background: linear-gradient(135deg, #ff6a5e, var(--accent)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 77, 79, 0.35);
}
.hero-search button svg { width: 18px; height: 18px; }
.hero-search button:hover { opacity: .92; }

/* 热门面板 */
.hot-panel {
  width: 100%; max-width: 900px; margin-top: 24px; padding: 12px 14px 14px;
  background: rgba(255, 255, 255, 0.78); border-radius: 14px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 12px 34px rgba(41, 50, 80, 0.1);
}
.hot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hot-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.hot-title svg { width: 15px; height: 15px; color: var(--accent); }
.hot-join { border: 1px solid var(--accent); color: var(--accent); border-radius: 8px; padding: 3px 12px; font-size: 13px; font-weight: 600; }
.hot-join:hover { background: var(--accent); color: #fff; }
.hot-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 4px 6px; max-height: 158px; overflow: auto;
}
.hot-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; color: #3c4353; min-width: 0; }
.hot-item:hover { background: var(--accent-soft); color: var(--accent); }
.hi-icon {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; position: relative;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: #f1f4f9; color: #fff; font-size: 12px; font-weight: 700;
}
.hi-icon img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.hi-icon .letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; }
.hi-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 子页标题条 */
.page-head { background: #fff; border-bottom: 1px solid var(--border); padding: 20px 0; }
.page-head h1 { font-size: 20px; }

/* ========== 主体布局 ========== */
.page-main { padding-top: 22px; padding-bottom: 10px; }
.layout {
  max-width: 1200px; margin: 0 auto; padding: 22px 20px 10px;
  display: flex; align-items: flex-start; gap: 20px;
}
.side {
  width: 188px; flex-shrink: 0; position: sticky; top: calc(var(--nav-h) + 14px);
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 10px; box-shadow: var(--shadow);
}
.side-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.side-head svg { width: 15px; height: 15px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; max-height: 62vh; overflow: auto; }
.side-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; color: #48505f; min-width: 0; }
.side-nav a svg { width: 15px; height: 15px; flex-shrink: 0; }
.side-nav a:hover { background: #f6f8fc; }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sn-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-toggle {
  margin-top: 8px; width: 100%; border: 0; cursor: pointer; font-family: inherit;
  background: #f4f6fa; color: #5b6273; border-radius: 9px; padding: 7px;
  font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 5px;
}
.side-toggle svg { width: 14px; height: 14px; }
.side-toggle:hover { background: #eef1f7; color: var(--accent); }
body.side-collapsed .side { width: 74px; }
body.side-collapsed .side-head span, body.side-collapsed .side-nav { display: none; }

.content { flex: 1; min-width: 0; }
.cat-block { margin-bottom: 26px; scroll-margin-top: calc(var(--nav-h) + 12px); }
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cat-title { display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 700; }
.cat-title svg { width: 16px; height: 16px; color: var(--accent); }
.cat-title .count { font-size: 11.5px; font-weight: 400; color: var(--muted); background: #eef1f7; border-radius: 999px; padding: 1px 8px; }
.cat-more { font-size: 13px; color: var(--muted); }
.cat-more:hover { color: var(--accent); }

/* ========== 网址卡片 ========== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 12px; }
.card-wrap { position: relative; }
.card {
  display: flex; align-items: center; gap: 11px; height: 100%;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 13px; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: #ffd9d9; box-shadow: 0 8px 22px rgba(23, 35, 71, 0.1); }
.card-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; position: relative;
  display: flex; align-items: center; justify-content: center; overflow: hidden; background: #f2f5fa;
}
.card-icon .letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 17px; font-style: normal; }
.card-icon .favicon { position: relative; z-index: 1; width: 24px; height: 24px; object-fit: contain; background: #fff; border-radius: 6px; }
.card-body { min-width: 0; display: flex; flex-direction: column; }
.card-title { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; font-weight: 600; font-size: 14.5px; }
.card-title .badge { flex-shrink: 0; }
.card-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-style: normal; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 6px; line-height: 1.6; }
.badge.hot { background: var(--accent-soft); color: var(--accent); }
.badge.cat { background: #eef1f7; color: var(--muted); }
.fav-btn {
  position: absolute; top: 7px; right: 7px; width: 26px; height: 26px; border: 0; border-radius: 999px;
  background: #fff; box-shadow: 0 1px 6px rgba(23, 35, 71, 0.16); cursor: pointer;
  font-size: 14px; line-height: 1; color: #c6cdd9; opacity: 0; z-index: 2;
  transition: opacity .15s, color .15s;
}
.card-wrap:hover .fav-btn, .fav-btn.on { opacity: 1; }
.fav-btn:hover, .fav-btn.on { color: #ffb400; }

/* ========== 排行榜 ========== */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-tabs a { padding: 5px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: 13px; color: #4a5160; }
.filter-tabs a:hover { color: var(--accent); border-color: #ffd9d9; }
.filter-tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.rank-item:hover { border-color: #ffd9d9; }
.rank-no {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; background: #f2f4f8; color: #6b7280;
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.rank-no.n1 { background: #ffeee0; color: #ff7a1a; }
.rank-no.n2 { background: #eef1ff; color: #4f7cff; }
.rank-no.n3 { background: #e9f9f2; color: #12b886; }
.rank-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rank-title { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; font-weight: 600; font-size: 14.5px; }
.rank-title .badge { flex-shrink: 0; }
.rank-desc { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; text-align: right; }

/* ========== 表单 / 提示 ========== */
.form-page {
  max-width: 620px; margin: 0 auto; padding: 28px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
.form-page h1 { font-size: 22px; margin-bottom: 4px; }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 13.5px; font-weight: 600; }
.form-row label b { color: var(--accent); }
.form-row input[type="text"], .form-row input[type="url"], .form-row input[type="password"],
.form-row input[type="number"], .form-row select, .form-row textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px;
  font-size: 14px; font-family: inherit; background: #fff; outline: none;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--accent); }
.btn-primary {
  border: 0; cursor: pointer; font-family: inherit; font-weight: 600;
  background: linear-gradient(135deg, #ff6a5e, var(--accent)); color: #fff;
  border-radius: 10px; padding: 10px 26px; font-size: 14px;
  box-shadow: 0 4px 12px rgba(255, 77, 79, 0.28);
}
.btn-primary:hover { opacity: .92; }
.alert { border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.alert-error { background: #fdeeee; color: #c0392b; }
.alert-ok { background: #eafaf1; color: #16a34a; }
.alert-warn { background: #fff8e6; color: #b7791f; }
.search-hero { margin-bottom: 16px; }
.search-hero h1 { font-size: 20px; }

/* ========== 页脚 / 回到顶部 ========== */
.footer { margin-top: 40px; padding: 24px 0 34px; text-align: center; color: var(--muted); font-size: 13px; }
.footer p { margin: 3px 0; }
.friend-links { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin-bottom: 12px; }
.friend-links .fl-title { font-weight: 600; color: #5b6273; }
.friend-links a { color: var(--muted); }
.friend-links a:hover { color: var(--accent); }
.to-top {
  position: fixed; right: 22px; bottom: 28px; width: 42px; height: 42px; z-index: 70;
  border: 1px solid var(--border); border-radius: 50%; background: #fff; color: #5b6273;
  box-shadow: 0 8px 22px rgba(23, 35, 71, 0.14); cursor: pointer; display: none;
  align-items: center; justify-content: center;
}
.to-top svg { width: 18px; height: 18px; }
.to-top.show { display: flex; }
.to-top:hover { color: var(--accent); border-color: #ffd9d9; }

/* ========== 响应式 ========== */
@media (max-width: 1000px) {
  .layout { flex-direction: column; padding-top: 16px; }
  .side { width: 100%; position: static; }
  .side-nav { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .side-nav a { background: #f6f8fc; }
  body.side-collapsed .side { width: 100%; }
  body.side-collapsed .side-nav { display: none; }
  .hot-list { grid-template-columns: 1fr; max-height: 220px; }
}
@media (max-width: 640px) {
  .nav-inner { gap: 10px; padding: 0 14px; }
  .nav-logo span { display: none; }
  .nav-menu { gap: 0; }
  .nav-menu a { padding: 6px 8px; font-size: 13.5px; }
  .nav-menu a svg { display: none; }
  .nav-add { padding: 6px 10px; font-size: 13px; }
  .hero { min-height: 0; }
  .hero-inner { padding: 20px 14px 24px; }
  .hero-tabs { gap: 6px 8px; margin-bottom: 14px; }
  .hero-tab { padding: 5px 12px; font-size: 13px; }
  .hero-search { padding: 4px 4px 4px 10px; }
  .hero-search input { font-size: 14px; padding: 7px 2px; }
  .hero-search button { width: 42px; height: 36px; }
  .hot-panel { margin-top: 16px; padding: 10px 10px 12px; }
  .panel { right: 14px; width: calc(100vw - 28px); }
  .container { padding: 0 14px; }
  .layout { padding: 14px 14px 0; }
  .card-grid { grid-template-columns: 1fr; gap: 10px; }
  .form-page { padding: 20px; border-radius: 12px; }
  .footer { margin-top: 28px; }
}
@media (hover: none), (max-width: 640px) {
  .fav-btn { opacity: 1; }
  .card:hover { transform: none; }
}

/* ==========================================================================
   登录 / 注册页
   ========================================================================== */
.auth-wrap { max-width: 440px; margin: 0 auto; }
.auth-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 26px 26px 20px; box-shadow: 0 14px 40px rgba(23, 35, 71, 0.09);
}
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-bottom: 20px; text-align: center; }
.auth-brand img { width: 46px; height: 46px; border-radius: 14px; object-fit: cover; box-shadow: 0 6px 16px rgba(23, 35, 71, 0.14); }
.auth-brand .ab-name { font-size: 19px; font-weight: 800; }
.auth-brand .muted { font-size: 12.5px; }
.auth-title { font-size: 18px; text-align: center; margin-bottom: 14px; }
.auth-tabs { display: flex; gap: 4px; background: #f2f4f8; border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.auth-tabs a { flex: 1; text-align: center; padding: 9px 0; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: #626a7a; }
.auth-tabs a:hover { color: var(--accent); }
.auth-tabs a.active { background: #fff; color: var(--accent); box-shadow: 0 2px 8px rgba(23, 35, 71, 0.08); }
.auth-card .form { gap: 14px; margin-top: 0; }
.auth-card .form-row label { font-size: 13px; color: #4a5160; }
.auth-card .form-row input { padding: 11px 13px; border-radius: 10px; background: #fbfcfe; }
.auth-card .form-row input:focus { background: #fff; box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.1); }
.btn-block {
  width: 100%; border: 0; cursor: pointer; font-family: inherit;
  padding: 12px 0; border-radius: 10px; font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #ff6a5e, var(--accent));
  box-shadow: 0 6px 18px rgba(255, 77, 79, 0.32);
}
.btn-block:hover { opacity: .93; }
.auth-other { margin-top: 20px; }
.auth-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.oauth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oauth-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 8px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
  font-size: 13.5px; font-weight: 600; color: #3c4353;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.oauth-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(23, 35, 71, 0.1); }
.oauth-btn svg { width: 15px; height: 15px; }
.ob-logo {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11.5px; font-weight: 800; line-height: 1;
}
.ob-logo svg { width: 13px; height: 13px; }
.ob-qq { border-color: #bfe6fa; color: #0a97d4; background: #f4fbff; }
.ob-qq .ob-logo { background: #12b7f5; }
.ob-wx { border-color: #c2eed4; color: #089c4c; background: #f3fdf7; }
.ob-wx .ob-logo { background: #07c160; }
.ob-alipay { border-color: #c6dbff; color: #1677ff; background: #f4f8ff; }
.ob-alipay .ob-logo { background: #1677ff; }
.ob-more { grid-column: 1 / -1; border-color: #ffd9d9; color: var(--accent); background: var(--accent-soft); }
.ob-more .ob-logo { background: linear-gradient(135deg, #ff6a5e, var(--accent)); }
.auth-foot { margin-top: 16px; text-align: center; font-size: 12.5px; }
.auth-foot a { color: var(--accent); }
.auth-switch { display: flex; justify-content: center; gap: 6px; margin-top: 10px; font-size: 13px; }
.auth-switch a { color: var(--accent); font-weight: 600; }
.user-auth .alert, .user-center .alert { margin-bottom: 14px; }

/* 验证码输入 + 获取按钮 */
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; }
.btn-code {
  flex-shrink: 0; border: 1px solid #ffd9d9; background: var(--accent-soft); color: var(--accent);
  border-radius: 10px; padding: 0 14px; font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  white-space: nowrap;
}
.btn-code:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-code:disabled { background: #f2f4f8; border-color: var(--border); color: #a8b0bd; cursor: not-allowed; }
.code-tip { margin-top: 2px; }
.code-tip.ok { color: #16a34a; }
.code-tip.err { color: #e5533c; }

/* 滑块验证码 */
.slider-cap { max-width: 320px; }
.sc-canvas { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background: #eef1f7; line-height: 0; }
.sc-canvas .sc-bg { display: block; width: 100%; }
.sc-piece { position: absolute; left: 0; top: 0; z-index: 2; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); pointer-events: none; }
.sc-bar { position: relative; height: 40px; margin-top: 10px; border-radius: 999px; background: #eef1f7; border: 1px solid var(--border); overflow: hidden; }
.sc-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 77, 79, 0.16); }
.sc-handle {
  position: absolute; left: 0; top: 0; width: 40px; height: 38px; border-radius: 999px; background: #fff;
  box-shadow: 0 2px 8px rgba(23, 35, 71, 0.18); z-index: 2;
  display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 15px;
  pointer-events: none;
}
.sc-range { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 3; }
.slider-cap.passed .sc-bar { border-color: #b7e4c7; background: #eefbf3; }
.slider-cap.passed .sc-handle { color: #16a34a; }
.sc-tip { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.sc-tip.ok { color: #16a34a; }
.sc-tip.err { color: #e5533c; }

/* 个人中心 */
.user-center { max-width: 760px; margin: 0 auto; }
.uc-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 16px 18px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
.uc-avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.uc-avatar img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.uc-avatar .letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; font-weight: 700; font-style: normal; }
.uc-meta { flex: 1; min-width: 0; }
.uc-name { font-size: 16px; font-weight: 700; }
.user-center .panel-box { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.user-center .block-h2 { font-size: 16px; margin-bottom: 12px; }
.user-center .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.user-center .form-full { grid-column: 1 / -1; }
.user-center .form-row { display: flex; flex-direction: column; gap: 6px; }
.user-center .form-row label { font-size: 13.5px; font-weight: 600; }
.user-center .form-row input { border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none; background: #fff; }
.user-center .form-row input:focus { border-color: var(--accent); }
.user-center .form-row input:disabled { background: #f6f8fc; color: var(--muted); }
.bind-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.bind-list li { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid #f1f4f9; font-size: 14px; }
.bind-list li:last-child { border-bottom: 0; }
.bind-name { min-width: 76px; font-weight: 600; }
.bind-extra { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: #eef1f7; color: var(--muted); }
.tag-ok { background: #eafaf1; color: #16a34a; }
.btn-plain { display: inline-flex; align-items: center; border: 1px solid var(--border); background: #fff; color: #5b6273; border-radius: 10px; padding: 7px 16px; font-size: 13px; cursor: pointer; }
.btn-plain:hover { border-color: #ffd9d9; color: var(--accent); }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 13px; padding: 0 2px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: #e5533c; }
.inline-form { display: inline; }

@media (max-width: 640px) {
  .uc-head { flex-wrap: wrap; }
  .user-center .form-grid { grid-template-columns: 1fr; }
  .oauth-btn { flex: 1 1 calc(50% - 5px); justify-content: center; }
}
