/* ============================================================
   ToolCMS - 前台主样式 v3.2.7
   ============================================================ */
:root {
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --text-4: #cbd5e1;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --bg: #f6f8fb;
  --bg-card: #ffffff;
  --bg-soft: #f8fafc;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.05);
  --shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 16px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg: 0 12px 40px rgba(15,23,42,0.12), 0 4px 8px rgba(15,23,42,0.06);
  --shadow-primary: 0 4px 16px rgba(37,99,235,0.18);
  --header-h: 64px;
  --max-w: 1240px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-y: scroll; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main.main-wrap { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; outline: none; border: none; background: none; }
button { cursor: pointer; }
::selection { background: var(--primary); color: #fff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

input[type="range"] { -webkit-appearance: none; appearance: none; height: 6px; background: linear-gradient(to right, var(--primary) 0%, var(--primary) var(--fill,50%), #e5e7eb var(--fill,50%), #e5e7eb 100%); border-radius: 3px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); cursor: pointer; border: none; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--primary); cursor: pointer; border: none; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
input[type="range"]::-moz-range-track { height: 6px; background: #e5e7eb; border-radius: 3px; }
input[type="range"]::-moz-range-progress { height: 6px; background: var(--primary); border-radius: 3px; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.main-wrap { padding-top: calc(var(--header-h) + 16px); padding-bottom: 32px; }

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(226,232,240,0.8);
}
.header-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; height: 100%; display: flex; align-items: center; gap: 0; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--primary); flex-shrink: 0; letter-spacing: -0.3px; padding-left: 0 !important; margin-right: 18px; }
.logo .logo-icon { font-size: 26px; }
.logo img { height: 30px; width: auto; display: block; }
.logo-icon img { height: 30px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; -ms-overflow-style: none; margin: 0; padding: 0; }
.nav-menu::-webkit-scrollbar { display: none; }
.nav-menu a { padding: 7px 14px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; flex-shrink: 0; transition: var(--transition-fast); }
.nav-menu a:hover, .nav-menu a.active { background: var(--primary-light); color: var(--primary); }

.nav-dropdown { position: relative; flex-shrink: 0; }
.nav-dropdown-trigger { cursor: pointer; }
.nav-dropdown-menu {
    position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-4px);
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 6px; min-width: 160px; z-index: 200;
    opacity: 0; visibility: hidden; transition: all 0.2s ease;
}
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown.open .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
/* v1.9.70 修复：JS toggleNavMenu/initDropdowns 给菜单添加 .show class，但原CSS缺少对应规则，
   导致移动端（无hover）点击触发器后菜单不显示。补充 .show 规则与 hover/open 一致。 */
.nav-dropdown-menu.show { opacity: 1 !important; visibility: visible !important; transform: translateX(-50%) translateY(0) !important; }
.user-dropdown-menu.show { opacity: 1 !important; visibility: visible !important; transform: translateY(0) !important; }
.nav-dropdown-menu a { display: block; padding: 8px 14px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 13px; white-space: nowrap; transition: var(--transition-fast); }
.nav-dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); }

.lang-dropdown .nav-dropdown-menu {
    left: 50% !important; right: auto !important; transform: translateX(-50%) translateY(-4px) !important;
    width: 168px; min-width: 168px; padding: 6px; box-sizing: border-box;
}
.lang-dropdown.open .nav-dropdown-menu, .lang-dropdown:hover .nav-dropdown-menu {
    transform: translateX(-50%) translateY(0) !important;
}
/* v1.9.70: 语言下拉菜单 .show 状态（JS点击展开），与 open/hover 一致 */
.lang-dropdown .nav-dropdown-menu.show {
    opacity: 1 !important; visibility: visible !important; transform: translateX(-50%) translateY(0) !important;
}
.lang-dropdown .nav-dropdown-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 12px; font-size: 13px; border-radius: 6px; width: 100%; box-sizing: border-box;
}
.lang-dropdown .nav-dropdown-item .lang-check { opacity: 0; font-size: 12px; }
.lang-dropdown .nav-dropdown-item.active {
    background: var(--primary-light); color: var(--primary); font-weight: 600;
}
.lang-dropdown .nav-dropdown-item.active .lang-check { opacity: 1; }
@media (max-width: 480px) {
    .lang-dropdown .nav-dropdown-menu { max-width: calc(100vw - 16px); }
}

.header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto; }
.header-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; text-decoration: none; font-size: 17px; transition: var(--transition-fast); position: relative; color: var(--text-2); }
.header-icon-btn:hover { background: var(--bg-soft); color: var(--primary); }
.header-icon-btn .badge-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid #fff; }
.btn-login { padding: 7px 18px; border: 1.5px solid var(--primary); color: var(--primary) !important; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; transition: var(--transition-fast); }
.btn-login:hover { background: var(--primary); color: #fff !important; box-shadow: var(--shadow-primary); }

.user-dropdown { position: relative; }
.user-dropdown-trigger { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 20px; cursor: pointer; transition: var(--transition-fast); }
.user-dropdown-trigger:hover { background: var(--bg-soft); }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; overflow: hidden; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-dropdown-name { font-size: 13px; font-weight: 500; color: var(--text-1); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-vip-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-sm); white-space: nowrap; border: 1px solid; }
.user-vip-badge.vip-normal { color: #6b7280; background: linear-gradient(135deg, #f3f4f6, #e5e7eb); border-color: #d1d5db; }

.user-vip-badge.vip-vip { color: var(--primary); background: linear-gradient(135deg, var(--primary-light), var(--primary-bg)); border-color: var(--primary-bg); }
.user-vip-badge.vip-svip { color: #b45309; background: linear-gradient(135deg, #fef3c7, #fde68a); border-color: #fcd34d; }
.user-sidebar .sidebar-user .su-email.vip-badge-sidebar { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius); white-space: nowrap; border: 1px solid; display: inline-flex; align-items: center; gap: 4px; }
.user-sidebar .sidebar-user .su-email.vip-badge-sidebar.vip-normal { color: #6b7280; background: linear-gradient(135deg, #f3f4f6, #e5e7eb); border-color: #d1d5db; }

.user-sidebar .sidebar-user .su-email.vip-badge-sidebar.vip-vip { color: var(--primary); background: linear-gradient(135deg, var(--primary-light), var(--primary-bg)); border-color: var(--primary-bg); }
.user-sidebar .sidebar-user .su-email.vip-badge-sidebar.vip-svip { color: #b45309; background: linear-gradient(135deg, #fef3c7, #fde68a); border-color: #fcd34d; }
.user-sidebar .sidebar-user .su-email.vip-badge-sidebar .vip-diamond-icon { font-size: 13px; }
.user-dropdown-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 8px; min-width: 200px; z-index: 200;
    opacity: 0; visibility: hidden; transform: translateY(-4px); transition: all 0.2s ease;
}
.user-dropdown:hover .user-dropdown-menu, .user-dropdown.open .user-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown-menu .ud-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 13px; transition: var(--transition-fast); }
.user-dropdown-menu .ud-item:hover { background: var(--primary-light); color: var(--primary); }
.user-dropdown-menu .ud-item .ud-icon { font-size: 15px; width: 18px; text-align: center; position: relative; display: inline-flex; align-items: center; justify-content: center; }
.user-dropdown-menu .ud-item .ud-icon .badge-dot { position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; background: var(--danger); color: #fff; border-radius: var(--radius-sm); border: 2px solid var(--bg,#fff); font-size: 10px; font-weight: 700; line-height: 12px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.user-dropdown-menu .ud-divider { height: 1px; background: var(--border-light); margin: 6px 0; }

.hero { padding: 36px 0 32px; margin-bottom: 12px; text-align: center; position: relative; }
.hero::before { content: ''; position: absolute; top: -40px; left: 50%; transform: translateX(-50%); width: 600px; height: 300px; background: radial-gradient(ellipse, var(--primary-light) 0%, transparent 70%); opacity: 0.5; z-index: -1; pointer-events: none; }
.hero-title { font-size: 32px; font-weight: 800; color: var(--text-1); margin-bottom: 10px; letter-spacing: -0.8px; line-height: 1.25; }
.hero-subtitle { font-size: 15px; color: var(--text-3); margin-bottom: 28px; font-weight: 400; }
.hero-search { display: flex; align-items: center; max-width: 60%; margin: 0 auto 20px; background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 6px 6px 6px 20px; transition: all 0.25s ease; box-shadow: var(--shadow-xs); }
.hero-search:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.hero-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-md); }
.hero-search .hs-icon { font-size: 18px; color: var(--text-3); margin-right: 12px; flex-shrink: 0; }
.hero-search input { flex: 1; border: none; padding: 12px 0; font-size: 15px; outline: none; background: transparent; color: var(--text-1); }
.hero-search input::placeholder { color: var(--text-4); }
.hero-search .hs-btn { border: none; background: var(--primary); color: #fff; padding: 10px 26px; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: var(--radius); white-space: nowrap; transition: var(--transition-fast); }
.hero-search .hs-btn:hover { background: var(--primary-hover); box-shadow: var(--shadow-primary); }
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hero-tags a { color: var(--text-2); font-size: 13px; padding: 6px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); transition: var(--transition-fast); font-weight: 500; }
.hero-tags a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.section { margin-bottom: 28px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title { font-size: 19px; font-weight: 700; color: var(--text-1); letter-spacing: -0.3px; display: flex; align-items: center; gap: 8px; }
.section-title .iconfont { color: var(--primary); }
.section-more { font-size: 13px; color: var(--text-3); font-weight: 500; transition: var(--transition-fast); display: inline-flex; align-items: center; gap: 2px; }
.section-more:hover { color: var(--primary); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tool-card { position: relative;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: block; overflow: hidden;
}
.tool-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), transparent); opacity: 0; transition: opacity 0.25s; }
.tool-card:hover { border-color: transparent; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.tool-card:hover::before { opacity: 1; }
.tool-card:active { transform: translateY(-1px); }
.tool-card:focus { outline: none; }
.tool-card .tc-icon { font-size: 30px; margin-bottom: 12px; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: var(--primary-light); border-radius: var(--radius-sm); }
.tool-card .tc-icon .iconfont { font-size: 26px; }
.tool-card .tc-name { font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 6px; line-height: 1.3; }
.tool-card .tc-desc { font-size: 12.5px; color: var(--text-3); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-card .tc-tag { position: absolute; top: 14px; right: 14px; padding: 3px 10px; font-size: 11px; border-radius: var(--radius-sm); font-weight: 600; }
.tag-hot { background: #fef2f2; color: var(--danger); }
.tag-new { background: #f0fdf4; color: var(--success); }
.tag-vip { background: #fffbeb; color: var(--warning); }
.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-green { background: #f0fdf4; color: var(--success); }
.tag-orange { background: #fff7ed; color: #ea580c; }
.tag-purple { background: #faf5ff; color: #9333ea; }
.tag-red { background: #fef2f2; color: var(--danger); }
.tag-gray { background: var(--border-light); color: var(--text-3); }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.category-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 18px; text-align: center; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); display: block; }
.category-card:hover { border-color: transparent; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.category-card .cc-icon { font-size: 34px; margin-bottom: 12px; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; background: var(--primary-light); border-radius: var(--radius); }
.category-card .cc-name { font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.category-card .cc-count { font-size: 12px; color: var(--text-3); font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; transition: var(--transition-fast); cursor: pointer; border: 1.5px solid transparent; text-decoration: none; line-height: 1.4; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:active { transform: scale(0.98); }

.btn-primary.favorited { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary.favorited:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline { border-color: var(--border); color: var(--text-2); background: #fff; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; color: #fff; }
.btn-default { background: #fff; border-color: var(--border); color: var(--text-2); }
.btn-default:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-block { width: 100%; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; height: 42px; line-height: 1.4; padding: 0 14px; box-sizing: border-box;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit; color: var(--text-1); background: #fff;
    transition: var(--transition-fast); outline: none; vertical-align: middle;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.form-group input[type="checkbox"], .form-group input[type="radio"] {
    width: 18px; height: 18px; padding: 0; border: none; border-radius: 0;
    -webkit-appearance: auto; -moz-appearance: auto; appearance: auto;
    accent-color: var(--primary); cursor: pointer;
}
.form-group input[type="password"] { letter-spacing: 2px; padding-right: 40px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-4); line-height: 42px; }
.form-group textarea { resize: vertical; min-height: 100px; height: auto; padding: 10px 14px; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-tip { font-size: 12px; color: var(--text-3); margin-top: 6px; }

.admin-card, .card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding: 20px; }
.admin-card.no-padding, .card.no-padding { padding: 0; }
.admin-card > .card-header:first-child, .card > .card-header:first-child { margin: -20px -20px 16px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 16px; font-weight: 700; color: var(--text-1); }
.card-body { padding: 20px; }

.admin-table, .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .data-table th { padding: 12px 16px; text-align: left; font-weight: 600; color: var(--text-2); background: var(--bg-soft); border-bottom: 1px solid var(--border); font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; }
.admin-table td, .data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); color: var(--text-1); }
.admin-table tr:hover td, .data-table tr:hover td { background: var(--bg-soft); }

.status-badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; }
.status-success { background: #dcfce7; color: #16a34a; }
.status-warning { background: #fef9c3; color: #ca8a04; }
.status-danger { background: #fee2e2; color: #dc2626; }
.status-default { background: var(--border-light); color: var(--text-3); }
.status-info { background: var(--primary-light); color: var(--primary); }

.empty-state { text-align: center; padding: 70px 20px; color: var(--text-3); }
.empty-state .empty-icon { font-size: 52px; margin-bottom: 16px; opacity: 0.4; }
.empty-state p { font-size: 14px; font-weight: 500; }

.faq-list { display: grid; gap: 10px; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0; transition: var(--transition-fast); }
.faq-item[open] { border-color: var(--primary); box-shadow: var(--shadow-xs); }
.faq-question { padding: 14px 18px; font-weight: 600; cursor: pointer; font-size: 14px; color: var(--text-1); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '+'; font-size: 20px; color: var(--text-3); transition: transform 0.2s; font-weight: 400; }
.faq-item[open] .faq-question::after { content: '−'; color: var(--primary); }
.faq-answer { padding: 0 18px 16px; color: var(--text-2); font-size: 13.5px; line-height: 1.75; }
.faq-answer p { margin: 0 0 8px; }
.faq-answer p:last-child { margin-bottom: 0; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; color: var(--text-2); background: #fff; border: 1px solid var(--border); transition: var(--transition-fast); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: 0.4; cursor: not-allowed; }

.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.5); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.25s; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-box { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 480px; width: 90%; max-height: 85vh; overflow-y: auto; transform: scale(0.95) translateY(10px); transition: all 0.25s cubic-bezier(0.4,0,0.2,1); }
.modal-overlay.show .modal-box { transform: scale(1) translateY(0); }
.modal-box .form-row { margin-bottom: 16px; }
.modal-box .form-row label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; font-weight: 600; }
.modal-box .form-row input, .modal-box .form-row select, .modal-box .form-row textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.modal-box .form-row input:focus, .modal-box .form-row select:focus, .modal-box .form-row textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.site-footer { background: #fff; border-top: 1px solid var(--border); padding: 28px 0; margin-top: auto; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.footer-inner a { color: var(--text-2); }
.footer-inner a:hover { color: var(--primary); }
.footer-brand-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: baseline; gap: 8px; }
.footer-brand-name { font-size: 16px; font-weight: 700; color: var(--text-1); }
.footer-brand-ver { font-size: 12px; color: var(--text-3); }
.footer-contact { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
.footer-powered { margin: 0; padding: 0; }
.footer-powered a { color: var(--text-2) !important; font-weight: 600; text-decoration: none; }
.footer-powered a:hover { color: var(--primary) !important; }

.search-section { text-align: center; padding: 24px 0 18px; }
.search-box { display: flex; align-items: center; max-width: 560px; margin: 0 auto; background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 4px 4px 4px 16px; transition: var(--transition-fast); }
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.search-box input { flex: 1; border: none; padding: 12px 0; font-size: 15px; outline: none; }
.search-box button { background: var(--primary); color: #fff; border: none; padding: 10px 24px; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; transition: var(--transition-fast); }
.search-box button:hover { background: var(--primary-hover); }

.tool-detail { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 20px; }
.tool-detail-header { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.tool-detail-icon { width: 64px; height: 64px; border-radius: var(--radius); background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 36px; color: var(--primary); flex-shrink: 0; }
.tool-detail-info h1 { font-size: 22px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.tool-detail-info p { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.tool-detail-meta { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--border-light); }
.tool-detail-meta .meta-item { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.tool-detail-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.user-center { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.user-sidebar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; position: sticky; top: calc(var(--header-h) + 16px); }
.user-sidebar .sidebar-user { text-align: center; padding: 16px 0 20px; border-bottom: 1px solid var(--border-light); margin-bottom: 12px; }
.user-sidebar .sidebar-user .user-avatar { width: 56px; height: 56px; font-size: 22px; margin: 0 auto 10px; }
.user-sidebar .sidebar-user .su-name { font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.user-sidebar .sidebar-user .su-email { font-size: 12px; color: var(--text-3); }
.user-sidebar .sidebar-menu { display: flex; flex-direction: column; gap: 2px; }
.user-sidebar .sidebar-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 13px; font-weight: 500; transition: var(--transition-fast); }
.user-sidebar .sidebar-menu a:hover { background: var(--bg-soft); color: var(--primary); }
.user-sidebar .sidebar-menu a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.user-sidebar .sidebar-menu .sm-icon { font-size: 16px; width: 20px; text-align: center; }
.user-sidebar .sidebar-badge { display: inline-block; background: var(--danger); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: var(--radius-sm); margin-left: auto; font-weight: 600; }
.user-content { min-width: 0; }
.user-content .admin-card { margin-bottom: 16px; }

.auth-page { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.auth-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; width: 100%; max-width: 420px; box-shadow: var(--shadow-md); }
.auth-box h2 { font-size: 22px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; text-align: center; }
.auth-box .auth-sub { font-size: 13px; color: var(--text-3); text-align: center; margin-bottom: 28px; }
.auth-box .form-group { margin-bottom: 18px; }
.auth-box .btn-primary { width: 100%; padding: 12px; font-size: 15px; margin-top: 8px; }
.auth-box .auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-3); }
.auth-box .auth-footer a { color: var(--primary); font-weight: 500; }

.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.plugin-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: all 0.25s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; }
.plugin-card:hover { border-color: transparent; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.plugin-card .pc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.plugin-card .pc-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--primary); flex-shrink: 0; }
.plugin-card .pc-title { font-size: 15px; font-weight: 600; color: var(--text-1); }
.plugin-card .pc-author { font-size: 12px; color: var(--text-3); }
.plugin-card .pc-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 14px; flex: 1; }
.plugin-card .pc-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border-light); }
.plugin-card .pc-stats { font-size: 12px; color: var(--text-3); display: flex; gap: 12px; }

.level-lock-box { text-align: center; padding: 60px 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.level-lock-box .lock-icon { font-size: 60px; margin-bottom: 18px; }
.level-lock-box h2 { font-size: 22px; margin-bottom: 10px; color: var(--text-1); font-weight: 700; }
.level-lock-box p { color: var(--text-3); margin-bottom: 28px; font-size: 14px; }
.lock-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.level-table { max-width: 500px; margin: 0 auto; text-align: left; }
.level-table h3 { font-size: 16px; margin-bottom: 14px; color: var(--text-1); font-weight: 600; }
.level-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.level-table th, .level-table td { padding: 12px 16px; border: 1px solid var(--border); text-align: left; }
.level-table th { background: var(--bg-soft); font-weight: 600; color: var(--text-2); }

.pay-result { display: flex; justify-content: center; padding: 50px 0; }
.pay-result-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 44px; text-align: center; max-width: 480px; width: 100%; box-shadow: var(--shadow-md); }
.pay-result-box .pr-icon { font-size: 64px; margin-bottom: 18px; }
.pay-result-box h2 { font-size: 22px; margin-bottom: 8px; font-weight: 700; }
.pay-result-box p { color: var(--text-3); margin-bottom: 24px; }

.kefu-btn { position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: var(--shadow-primary); z-index: 90; transition: var(--transition-fast); cursor: pointer; border: none; }
.kefu-btn:hover { background: var(--primary-hover); transform: scale(1.08); }

@media (max-width: 1024px) {
  .user-center { grid-template-columns: 200px 1fr; }
}
@media (max-width: 768px) {
  :root { --header-h: 56px; --max-w: 100%; }
  .container { padding: 0 8px; }
  .header-inner { padding: 0 8px; }
  .nav-menu { margin-left: 0; gap: 0; }
  .nav-menu a { padding: 6px 10px; font-size: 13px; }
  .hero { padding: 24px 0 20px; }
  .hero-title { font-size: 24px; }
  .hero-subtitle { font-size: 13px; margin-bottom: 20px; }
  .category-hero { padding: 20px 0 16px; }
  .category-hero-title { font-size: 24px; }
  .category-hero-subtitle { font-size: 13px; }
  .hero-search { max-width: 100%; padding: 4px 4px 4px 14px; }
  .hero-search input { padding: 10px 0; font-size: 14px; }
  .hero-search .hs-btn { padding: 8px 18px; font-size: 13px; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tool-card { padding: 12px; }
  .tool-card .tc-icon { width: 38px; height: 38px; font-size: 22px; }
  .tool-card .tc-name { font-size: 14px; }
  .tool-card .tc-desc { font-size: 12px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .category-card { padding: 14px 10px; }
  .plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .user-plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .coupon-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .links-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .vip-plans-v2 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .section-title { font-size: 17px; }
  .user-center { grid-template-columns: 1fr; }
  .hero { padding: 24px 0 20px; }
  .auth-page { padding: 30px 0; }
  .user-sidebar { position: static; }
  .user-sidebar .sidebar-menu { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; }
  .user-sidebar .sidebar-menu a { white-space: nowrap; flex-shrink: 0; }
  .form-row { grid-template-columns: 1fr; }
  .auth-box { padding: 24px; }
  .main-wrap { padding-top: calc(var(--header-h) + 10px); }
  .hero-search { max-width: 100%; }
}
@media (max-width: 480px) {
  .container { padding: 0 6px; }
  .header-inner { padding: 0 6px; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .user-plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .coupon-grid { grid-template-columns: repeat(1, 1fr); }
  .links-grid { grid-template-columns: repeat(1, 1fr); }
  .vip-plans-v2 { grid-template-columns: repeat(1, 1fr); }
  .user-dropdown-name { display: none; }
}

.alert { padding: 12px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.alert-success { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-bg); }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.alert-info { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-light); }

.uc-page-header { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.uc-page-header h2 { font-size: 20px; font-weight: 700; color: var(--text-1); letter-spacing: -0.3px; display: flex; align-items: center; gap: 8px; }

/* V3.1.8 用户中心文件选择器美化（隐藏原生 input，自定义按钮 + 文件名） */
.uc-filepicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px; border: 1.5px dashed var(--border); border-radius: var(--radius-sm); background: var(--bg-soft); transition: border-color var(--transition-fast); max-width: 100%; box-sizing: border-box; }
.uc-filepicker:hover { border-color: var(--primary); }
.uc-filepicker-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.uc-filepicker-btn { margin: 0; cursor: pointer; }
.uc-filepicker-name { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(240px, 56vw); }
/* V3.1.8 布局防护：用户中心卡片/表单在任何视口宽度下不溢出 */
.user-content .card { max-width: 100%; box-sizing: border-box; }
.user-content .card form { max-width: 100%; box-sizing: border-box; }
.user-content .card .form-group { max-width: 100%; box-sizing: border-box; }
.user-content .card input[type="text"], .user-content .card input[type="password"], .user-content .card input[type="email"], .user-content .card select, .user-content .card textarea { max-width: 100%; box-sizing: border-box; }

.form-input { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--text-1); background: #fff; transition: var(--transition-fast); }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); outline: none; }
.form-input::placeholder { color: var(--text-4); }

.p-4 { padding: 20px; }
.p-3 { padding: 16px; }
.p-2 { padding: 12px; }
.mb-4 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 16px; }
.mb-2 { margin-bottom: 12px; }
.mt-4 { margin-top: 20px; }
.mt-3 { margin-top: 16px; }
.py-4 { padding-top: 20px; padding-bottom: 20px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-3); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.fw-bold { font-weight: 600; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.flex-1 { flex: 1; }
.w-100 { width: 100%; }

.empty-state .empty-text { font-size: 14px; color: var(--text-3); font-weight: 500; }

.coupon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.coupon-card { display: flex; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition-fast); }
.coupon-card:hover { box-shadow: var(--shadow-md); border-color: transparent; transform: translateY(-2px); }
.coupon-card-left { width: 100px; background: linear-gradient(135deg, var(--primary), var(--primary-hover)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 8px; flex-shrink: 0; }
.coupon-card-left .coupon-amount { font-size: 24px; font-weight: 800; }
.coupon-card-left .coupon-unit { font-size: 12px; opacity: 0.9; }
.coupon-card-right { flex: 1; padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.coupon-card-right .coupon-name { font-size: 15px; font-weight: 600; color: var(--text-1); }
.coupon-card-right .coupon-desc { font-size: 12px; color: var(--text-3); }
.coupon-card-right .coupon-expire { font-size: 11px; color: var(--text-4); margin-top: 4px; }
.coupon-card.used .coupon-card-left { background: var(--text-4); }
.coupon-card.expired { opacity: 0.6; }

.fb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.fb-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.fb-stat-num { display: block; font-size: 24px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.fb-stat-label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.fb-list { display: flex; flex-direction: column; gap: 12px; }
.fb-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: var(--transition-fast); position: relative; }
.fb-card:hover { box-shadow: var(--shadow-sm); }
.fb-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fb-card-title { font-size: 15px; font-weight: 600; color: var(--text-1); }
.fb-type-tag { font-size: 12px; font-weight: 600; }
.fb-card-text { font-size: 13.5px; color: var(--text-2); line-height: 1.65; margin-bottom: 10px; }
.fb-card-tool { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.fb-card-tool a { color: var(--primary); font-weight: 500; }
.fb-card-reply { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; color: var(--text-2); line-height: 1.6; border-left: 3px solid var(--primary); }
.fb-card-reply .reply-label { font-size: 11px; color: var(--primary); font-weight: 600; margin-bottom: 4px; display: block; }
.fb-timeline { position: relative; padding-left: 20px; }
.fb-timeline-dot { position: absolute; left: 0; top: 6px; width: 10px; height: 10px; border-radius: 50%; }
.fb-card-meta { font-size: 12px; color: var(--text-3); display: flex; gap: 14px; margin-top: 8px; }

.order-status { font-size: 13px; font-weight: 600; }
.order-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; transition: var(--transition-fast); }
.order-card:hover { box-shadow: var(--shadow-sm); }
.order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light); }
.order-card-body { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-2); }
.order-no { font-size: 12px; color: var(--text-3); font-family: monospace; }
.order-amount { font-size: 18px; font-weight: 700; color: var(--danger); }

.msg-list { display: flex; flex-direction: column; gap: 1px; background: var(--border-light); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.msg-item { background: #fff; padding: 16px 18px; display: flex; gap: 14px; transition: var(--transition-fast); cursor: pointer; }
.msg-item:hover { background: var(--bg-soft); }
.msg-item.unread { background: var(--primary-light); }
.msg-item.unread .msg-title { font-weight: 700; }
.msg-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.msg-body { flex: 1; min-width: 0; }
.msg-title { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.msg-preview { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-time { font-size: 12px; color: var(--text-4); flex-shrink: 0; }
.msg-detail { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.msg-detail-header { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border-light); }
.msg-detail-title { font-size: 18px; font-weight: 700; color: var(--text-1); margin-bottom: 8px; }
.msg-detail-meta { font-size: 12px; color: var(--text-3); display: flex; gap: 16px; }
.msg-detail-content { font-size: 14px; color: var(--text-2); line-height: 1.8; }

.user-plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.user-plugin-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: var(--transition-fast); display: flex; flex-direction: column; }
.user-plugin-card:hover { box-shadow: var(--shadow-md); border-color: transparent; transform: translateY(-2px); }
.upc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.upc-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--primary); flex-shrink: 0; }
.upc-info { flex: 1; min-width: 0; }
.upc-name { font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.upc-version { font-size: 11px; color: var(--text-3); }
.upc-desc { font-size: 13px; color: var(--text-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; flex: 1; }
.upc-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border-light); }
.upc-stats { font-size: 12px; color: var(--text-3); display: flex; gap: 12px; }
.upc-actions { display: flex; gap: 6px; }

.points-overview { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); border-radius: var(--radius-lg); padding: 28px; color: #fff; margin-bottom: 20px; }
.points-overview .po-label { font-size: 13px; opacity: 0.9; margin-bottom: 6px; }
.points-overview .po-value { font-size: 36px; font-weight: 800; margin-bottom: 4px; }
.points-overview .po-level { font-size: 13px; opacity: 0.85; }
.points-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.points-actions .btn { background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.3); }
.points-actions .btn:hover { background: rgba(255,255,255,0.3); }

.login-log-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.login-log-item .ll-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.login-log-item .ll-info { flex: 1; }
.login-log-item .ll-ip { font-size: 14px; font-weight: 600; color: var(--text-1); }
.login-log-item .ll-detail { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.login-log-item .ll-time { font-size: 12px; color: var(--text-3); flex-shrink: 0; }

.api-key-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.api-key-row:last-child { border-bottom: none; }
.api-key-row code { background: var(--bg-soft); padding: 4px 10px; border-radius: var(--radius-sm); font-size: 12px; font-family: monospace; color: var(--text-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.invite-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.invite-link-box { display: flex; gap: 10px; align-items: center; background: var(--bg-soft); border-radius: var(--radius-sm); padding: 12px 16px; margin: 12px 0; }
.invite-link-box input { flex: 1; border: none; background: transparent; font-size: 13px; color: var(--text-2); outline: none; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: var(--transition-fast); }
.stat-card:hover { box-shadow: var(--shadow-sm); }
.stat-label { font-size: 12px; color: var(--text-3); margin-bottom: 6px; font-weight: 500; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--text-1); }

.avatar-preview-wrap { display: inline-block; }
.avatar-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border-light); }
.avatar-preview-default { background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { padding: 12px 14px; text-align: left; font-weight: 600; color: var(--text-2); background: var(--bg-soft); border-bottom: 1px solid var(--border); font-size: 12px; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); color: var(--text-1); }
.table tr:hover td { background: var(--bg-soft); }
.table-wrap { overflow-x: auto; }
.table-sm th, .table-sm td { padding: 8px 12px; }
.table-responsive { overflow-x: auto; }

.tab-bar { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 2px solid var(--border-light); padding-bottom: 0; }
.tab-item { padding: 10px 18px; font-size: 14px; font-weight: 500; color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition-fast); }
.tab-item:hover { color: var(--text-2); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--text-1); background: #fff; transition: var(--transition-fast); }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); outline: none; }
.input-group { display: flex; gap: 10px; align-items: center; }
.input-group .form-control { flex: 1; }

.badge { display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-gray { background: var(--border-light); color: var(--text-3); }
.badge-warning { background: #fef9c3; color: #ca8a04; }
.badge-danger { background: #fee2e2; color: #dc2626; }

.uc-subtitle { font-size: 13px; color: var(--text-3); margin-top: 4px; }

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.vip-header { margin-bottom: 24px; }
.vip-header h2 { font-size: 22px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; letter-spacing: -0.3px; }
.vip-header p { font-size: 14px; color: var(--text-3); }

.vip-plans-v2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 28px; }
.vip-card-v2 { background: #fff; border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; text-align: center; transition: all 0.3s cubic-bezier(0.4,0,0.2,1); position: relative; display: flex; flex-direction: column; }
.vip-card-v2:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.vip-card-v2.recommend { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.vip-card-v2.recommend:hover { box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-lg); }
.vip-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--warning), #f97316); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 16px; border-radius: var(--radius); letter-spacing: 0.5px; }
.vip-card-name { font-size: 18px; font-weight: 700; color: var(--text-1); margin-bottom: 12px; }
.vip-card-price { font-size: 36px; font-weight: 800; color: var(--danger); margin-bottom: 8px; display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.vip-card-price .currency { font-size: 18px; font-weight: 600; }
.vip-card-price .unit { font-size: 14px; color: var(--text-3); font-weight: 500; }
.vip-card-price .vip-card-original-price { font-size: 14px; color: var(--text-3); font-weight: 400; margin-left: 6px; }
.vip-card-price .vip-card-original-price del { color: var(--text-3); }
.vip-card-desc { font-size: 13px; color: var(--text-2); margin-bottom: 18px; line-height: 1.5; }
.vip-card-features { list-style: none; text-align: left; margin-bottom: 22px; flex: 1; }
.vip-card-features li { font-size: 13px; color: var(--text-2); padding: 6px 0; display: flex; align-items: center; gap: 8px; }
.vip-card-btn { width: 100%; padding: 12px; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; cursor: pointer; transition: var(--transition-fast); background: var(--primary); color: #fff; }
.vip-card-btn:hover { background: var(--primary-hover); box-shadow: var(--shadow-primary); }
.vip-card-v2:not(.recommend) .vip-card-btn { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.vip-card-v2:not(.recommend) .vip-card-btn:hover { background: var(--primary-light); }

.vip-faq { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.vip-faq h3 { font-size: 17px; font-weight: 700; color: var(--text-1); margin-bottom: 16px; }
.vip-faq-item { padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.vip-faq-item:last-child { border-bottom: none; }
.vip-faq-item strong { font-size: 14px; color: var(--text-1); display: block; margin-bottom: 4px; }
.vip-faq-item p { font-size: 13px; color: var(--text-3); line-height: 1.6; }

.pay-modal { position: fixed; inset: 0; background: rgba(15,23,42,0.5); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.25s; }
.pay-modal.show { opacity: 1; visibility: visible; }
.pay-modal-box { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 420px; width: 90%; overflow: hidden; transform: scale(0.95) translateY(10px); transition: all 0.25s cubic-bezier(0.4,0,0.2,1); }
.pay-modal.show .pay-modal-box { transform: scale(1) translateY(0); }
.pay-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-light); }
.pay-modal-header h3 { font-size: 17px; font-weight: 700; color: var(--text-1); }
.pay-modal-close { cursor: pointer; font-size: 18px; color: var(--text-3); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: var(--transition-fast); }
.pay-modal-close:hover { background: var(--bg-soft); color: var(--text-1); }
.pay-modal-body { padding: 22px; }
.pay-plan-info { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--bg-soft); border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; color: var(--text-2); }
.pay-plan-amount { font-size: 20px; font-weight: 700; color: var(--danger); }
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.pay-method { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition-fast); }
.pay-method:hover { border-color: var(--primary); background: var(--primary-light); }
.pay-method input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; }

input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 16px; height: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 3px;
    background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.15s;
    vertical-align: middle;
}
input[type="checkbox"]:hover { border-color: var(--primary); }
input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}
input[type="checkbox"]:checked::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}
input[type="radio"] { accent-color: var(--primary); cursor: pointer; }
.pay-method:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.pay-method-icon { font-size: 20px; }
.pay-method-name { font-size: 14px; font-weight: 500; color: var(--text-1); }
.pay-confirm-btn { width: 100%; }

.msg-detail { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.msg-detail-header { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border-light); }
.msg-detail-title { font-size: 20px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; }
.msg-detail-meta { font-size: 12px; color: var(--text-3); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.msg-detail-content { font-size: 14.5px; color: var(--text-2); line-height: 1.85; }
.msg-detail-content p { margin-bottom: 12px; }
.msg-detail-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border-light); }

.row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.row.g-4 { gap: 0; }
.col-md-8, .col-md-4 { padding: 0 10px; }
.col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
@media (max-width: 768px) {
  .col-md-8, .col-md-4 { flex: 0 0 100%; max-width: 100%; }
}
.g-4 { gap: 0; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 6px !important; }
.mb-3 { margin-bottom: 16px !important; }
.ps-3 { padding-left: 16px !important; }
h5 { font-size: 15px; font-weight: 700; color: var(--text-1); margin-bottom: 14px; }
.bg-success { background: var(--success) !important; color: #fff !important; }
.bg-secondary { background: var(--text-3) !important; color: #fff !important; }
code { background: var(--bg-soft); padding: 2px 8px; border-radius: var(--radius-sm); font-size: 12px; font-family: monospace; color: var(--text-2); }

.fb-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.fb-page-header h2 { font-size: 20px; font-weight: 700; color: var(--text-1); letter-spacing: -0.3px; }
.fb-timeline { position: relative; padding-left: 0; }
.fb-timeline-item { position: relative; margin-bottom: 16px; }
.fb-timeline-dot { position: absolute; left: 8px; top: 20px; width: 12px; height: 12px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px currentColor; z-index: 1; }
.fb-timeline-content { position: relative; }
.fb-status-tag { font-size: 11px; padding: 3px 10px; border-radius: var(--radius-sm); font-weight: 600; }
.fb-status-tag.status-replied { background: #dcfce7; color: #16a34a; }
.fb-status-tag.status-pending { background: #fef9c3; color: #ca8a04; }
.fb-date { font-size: 12px; color: var(--text-3); margin-left: auto; }
.fb-reply-label { font-size: 11px; color: var(--primary); font-weight: 700; margin-bottom: 6px; display: block; }
.fb-reply-text { font-size: 13px; color: var(--text-2); line-height: 1.7; }

.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; transition: var(--transition-fast); }
.order-item:hover { box-shadow: var(--shadow-sm); border-color: transparent; }
.order-info { flex: 1; min-width: 0; }
.order-name { font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 6px; }
.order-meta { font-size: 12px; color: var(--text-3); display: flex; gap: 16px; flex-wrap: wrap; }
.order-right { text-align: right; flex-shrink: 0; }
.order-amount { font-size: 20px; font-weight: 800; color: var(--danger); margin-bottom: 4px; }

.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,0.5); backdrop-filter: blur(4px); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
#feedbackModal, #qrcodeModal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1001; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 460px; width: calc(100% - 40px); max-height: 85vh; overflow-y: auto; padding: 24px; }
#feedbackModal h3, #qrcodeModal h3 { font-size: 18px; font-weight: 700; color: var(--text-1); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border-light); }
#feedbackModal .form-group { margin-bottom: 16px; }
#feedbackModal .form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
#feedbackModal .form-group input, #feedbackModal .form-group select, #feedbackModal .form-group textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--text-1); background: #fff; transition: var(--transition-fast); }
#feedbackModal .form-group input:focus, #feedbackModal .form-group select:focus, #feedbackModal .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); outline: none; }
#feedbackModal .form-group textarea { resize: vertical; min-height: 100px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.modal-actions .btn { min-width: 90px; }

.back-top { position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; z-index: 90; box-shadow: var(--shadow); transition: var(--transition-fast); opacity: 0; visibility: hidden; transform: translateY(10px); line-height: 1; }
.back-top:hover { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: var(--shadow-primary); }
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

.category-header { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border-light); }
.category-header h1 { font-size: 19px; font-weight: 700; color: var(--text-1); margin-bottom: 8px; letter-spacing: -0.3px; line-height: 1.3; }
.category-header p { font-size: 14px; color: var(--text-3); font-weight: 500; }

.category-hero { padding: 28px 0 24px; margin-bottom: 8px; text-align: center; position: relative; }
.category-hero::before { content: ''; position: absolute; top: -30px; left: 50%; transform: translateX(-50%); width: 500px; height: 240px; background: radial-gradient(ellipse, var(--primary-light) 0%, transparent 70%); opacity: 0.4; z-index: -1; pointer-events: none; }
.category-hero-title { font-size: 32px; font-weight: 800; color: var(--text-1); margin-bottom: 10px; letter-spacing: -0.8px; line-height: 1.25; }
.category-hero-subtitle { font-size: 15px; color: var(--text-3); margin-bottom: 0; font-weight: 400; }

.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 28px; font-weight: 800; color: var(--text-1); margin-bottom: 8px; letter-spacing: -0.5px; }
.page-header p { font-size: 14px; color: var(--text-3); }

.pay-result { display: flex; justify-content: center; padding: 50px 0; }
.pay-result-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 44px; text-align: center; max-width: 480px; width: 100%; box-shadow: var(--shadow-md); }
.pay-icon { font-size: 64px; margin-bottom: 18px; }
.pay-result-box h2 { font-size: 22px; margin-bottom: 8px; font-weight: 700; color: var(--text-1); }
.pay-result-box p { color: var(--text-3); margin-bottom: 24px; font-size: 14px; }
.pay-info { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 24px; text-align: left; }
.pay-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--border-light); }
.pay-row:last-child { border-bottom: none; }
.pay-row span:first-child { color: var(--text-3); }
.pay-row span:last-child { color: var(--text-1); font-weight: 500; }
.pay-amount { color: var(--danger) !important; font-weight: 700 !important; font-size: 16px; }

.td-icon { width: 64px; height: 64px; border-radius: var(--radius); background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 36px; color: var(--primary); flex-shrink: 0; }
.td-info { flex: 1; min-width: 0; }
.td-desc { font-size: 14px; color: var(--text-2); line-height: 1.6; margin-top: 6px; }
.td-meta { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border-light); align-items: center; }
.td-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.tool-runner { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.tool-iframe-wrap { position: relative; width: 100%; min-height: 400px; background: #fff; padding: 24px; box-sizing: border-box; }
.tool-iframe-wrap iframe { width: calc(100% + 48px); min-height: 400px; border: none; display: block; margin: -24px; }
.tool-iframe-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 14px; }
.tool-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-num { font-size: 20px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.tool-content { background: var(--bg-card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: var(--radius, 12px); padding: 28px; margin-bottom: 24px; box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.04)); }
.tool-content > h2 { font-size: 20px; font-weight: 700; color: #111827; margin: 0 0 20px 0; padding-bottom: 16px; border-bottom: 2px solid #f3f4f6; letter-spacing: 0.5px; }
.tool-content h3 { font-size: 17px; font-weight: 700; color: var(--text-1); margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.rich-content { font-size: 14px; color: #374151; line-height: 1.9; }
.rich-content p { margin-bottom: 14px; }
.rich-content p:last-child { margin-bottom: 0; }
/* Sub-section titles: <p><strong>📖 工具介绍</strong></p> */
.rich-content p > strong { display: block; font-size: 16px; font-weight: 700; color: #111827; margin: 22px 0 8px 0; padding-bottom: 10px; border-bottom: 1px solid #e5e7eb; letter-spacing: 0.3px; }
.rich-content p > strong:first-child { margin-top: 0; }
/* Separator <hr> after sub-title */
.rich-content hr { border: none; border-top: 1px solid #f3f4f6; margin: 0 0 16px 0; }
/* 使用说明章节标题 - 左侧蓝色色条样式 */
.rich-content h1, .rich-content h2, .rich-content h3, .rich-content h4 { color: #1e293b; margin: 28px 0 14px; font-weight: 700; padding: 10px 14px; border-left: 4px solid #2563eb; border-bottom: 1px solid #e5e7eb; background: linear-gradient(to right, #f0f5ff, transparent); border-radius: 0 6px 6px 0; letter-spacing: 0.3px; }
.rich-content h1 { font-size: 19px; }
.rich-content h2 { font-size: 18px; }
.rich-content h3 { font-size: 16px; }
.rich-content h4 { font-size: 15px; }
.rich-content h1:first-child, .rich-content h2:first-child, .rich-content h3:first-child, .rich-content h4:first-child { margin-top: 0; }
.rich-content ul, .rich-content ol { padding-left: 24px; margin-bottom: 16px; }
.rich-content li { margin-bottom: 8px; color: #374151; }
.rich-content li::marker { color: #2563eb; }
.rich-content ol li { padding-left: 4px; }
.rich-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 13px; color: #dc2626; }
.rich-content pre { background: #f9fafb; padding: 14px; border-radius: 8px; overflow-x: auto; margin-bottom: 14px; border: 1px solid #e5e7eb; }
.rich-content pre code { background: none; padding: 0; color: #374151; }
.rich-content blockquote { border-left: 3px solid #2563eb; padding-left: 14px; color: #6b7280; margin: 14px 0; background: #f8faff; padding: 12px 16px; border-radius: 0 8px 8px 0; }
.rich-content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.rich-content a { color: #2563eb; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; }
.rich-content a:hover { border-bottom-color: #2563eb; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.rich-content th, .rich-content td { border: 1px solid #e5e7eb; padding: 10px 14px; text-align: left; }
.rich-content th { background: #f0f5ff; font-weight: 600; color: #1e293b; }

.tutorial-content { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.tutorial-content h1 { font-size: 24px; font-weight: 700; color: var(--text-1); margin-bottom: 16px; }
.tutorial-content h3 { font-size: 17px; font-weight: 700; color: var(--text-1); margin: 20px 0 10px; }
.tutorial-content .h3 { font-size: 17px; font-weight: 700; color: var(--text-1); margin: 20px 0 10px; }
.tutorial-content p { font-size: 14px; color: var(--text-2); line-height: 1.85; margin-bottom: 12px; }
.tutorial-content ul, .tutorial-content ol { padding-left: 20px; margin-bottom: 12px; }
.tutorial-content li { margin-bottom: 6px; color: var(--text-2); }
.tutorial-content code { background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.tutorial-content pre { background: var(--bg-soft); padding: 14px; border-radius: var(--radius-sm); overflow-x: auto; }
.list-unstyled { list-style: none; padding: 0; margin: 0; }
.list-unstyled li { padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.list-unstyled li:last-child { border-bottom: none; }
.list-unstyled a { color: var(--text-2); font-size: 14px; }
.list-unstyled a:hover { color: var(--primary); }

.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.level-lock-box .td-icon { margin: 0 auto 16px; }

@media (max-width: 768px) {
  .tool-stats { grid-template-columns: repeat(2, 1fr); }
  .col-md-9, .col-md-3 { flex: 0 0 100%; max-width: 100%; }
  
  .tool-detail { padding: 16px; }
  .tool-detail-header { flex-direction: column; gap: 12px; }
  .td-icon { width: 48px; height: 48px; font-size: 28px; }
  .td-info h1 { font-size: 18px; }
  .td-desc { font-size: 13px; }
  .td-meta { gap: 10px; font-size: 12px; padding-top: 10px; margin-top: 10px; }
  .td-actions { width: 100%; }
  .td-actions .btn { flex: 1; padding: 8px 10px; font-size: 12px; }
  .tool-runner { border-radius: var(--radius); }
  .tool-content { padding: 18px; border-radius: var(--radius, 10px); }
  .tool-content > h2 { font-size: 17px; margin-bottom: 14px; padding-bottom: 12px; }
  .rich-content p > strong { font-size: 15px; margin: 18px 0 6px 0; }
  .rich-content { font-size: 13px; line-height: 1.8; }
  .section-title { font-size: 16px; }
  .review-form-box { padding: 12px; }
  .review-item { padding-left: 0 !important; }
  .review-item > div:last-child { padding-left: 0 !important; }
  
  .user-sidebar { position: static; width: 100%; }
  .user-sidebar .sidebar-user { display: flex; align-items: center; gap: 12px; padding: 12px; }
  .user-sidebar .sidebar-user .user-avatar { width: 40px; height: 40px; font-size: 16px; }
  .user-sidebar .sidebar-menu { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; padding: 8px 12px; }
  .user-sidebar .sidebar-menu a { white-space: nowrap; flex-shrink: 0; padding: 8px 14px; font-size: 13px; }
  .user-sidebar .sidebar-menu .sm-icon { margin-right: 4px; }
  .user-content { padding: 14px; }
  
  .container { padding: 0 8px; }
  .header-inner { padding: 0 8px; }
  .nav-menu { margin-left: 0; gap: 0; overflow-x: auto; flex-wrap: nowrap; flex: 1; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-menu::-webkit-scrollbar { display: none; }
  .nav-menu a { padding: 6px 10px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
  .hero-title { font-size: 22px; }
  .hero-subtitle { font-size: 12px; }
  .footer-inner { padding: 0 8px; font-size: 12px; }
  .admin-card, .card { padding: 14px; }
  table.admin-table { font-size: 12px; }
  table.admin-table th, table.admin-table td { padding: 8px 6px; }
  .btn { padding: 7px 14px; font-size: 13px; }
  .form-row { grid-template-columns: 1fr; gap: 10px; }
  input, select, textarea { font-size: 14px; }
}

.tool-iframe-wrap a { color: var(--primary); }
.tool-iframe-wrap a:hover { color: var(--primary-hover); }

.tool-iframe-wrap button[style*="background: #2563eb"],
.tool-iframe-wrap button[style*="background:#2563eb"],
.tool-iframe-wrap button[style*="background-color: #2563eb"],
.tool-iframe-wrap button[style*="background-color:#2563eb"],
.tool-iframe-wrap input[type="submit"][style*="background: #2563eb"],
.tool-iframe-wrap input[type="submit"][style*="background:#2563eb"],
.tool-iframe-wrap input[type="button"][style*="background: #2563eb"],
.tool-iframe-wrap input[type="button"][style*="background:#2563eb"] { background: var(--primary) !important; }
.tool-iframe-wrap button[style*="background: #3b82f6"],
.tool-iframe-wrap button[style*="background:#3b82f6"],
.tool-iframe-wrap input[type="submit"][style*="background: #3b82f6"],
.tool-iframe-wrap input[type="submit"][style*="background:#3b82f6"] { background: var(--primary) !important; }
.tool-iframe-wrap button[style*="background: #1677ff"],
.tool-iframe-wrap button[style*="background:#1677ff"],
.tool-iframe-wrap input[type="submit"][style*="background: #1677ff"],
.tool-iframe-wrap input[type="submit"][style*="background:#1677ff"] { background: var(--primary) !important; }
.tool-iframe-wrap button[style*="background: #409eff"],
.tool-iframe-wrap button[style*="background:#409eff"],
.tool-iframe-wrap input[type="submit"][style*="background: #409eff"],
.tool-iframe-wrap input[type="submit"][style*="background:#409eff"] { background: var(--primary) !important; }

.tool-iframe-wrap [style*="color: #2563eb"],
.tool-iframe-wrap [style*="color:#2563eb"],
.tool-iframe-wrap [style*="color: #3b82f6"],
.tool-iframe-wrap [style*="color:#3b82f6"],
.tool-iframe-wrap [style*="color: #1677ff"],
.tool-iframe-wrap [style*="color:#1677ff"],
.tool-iframe-wrap [style*="color: #409eff"],
.tool-iframe-wrap [style*="color:#409eff"] { color: var(--primary) !important; }
.tool-iframe-wrap [style*="border-color: #2563eb"],
.tool-iframe-wrap [style*="border-color:#2563eb"],
.tool-iframe-wrap [style*="border-color: #3b82f6"],
.tool-iframe-wrap [style*="border-color:#3b82f6"] { border-color: var(--primary) !important; }

.tool-iframe-wrap input:focus,
.tool-iframe-wrap textarea:focus,
.tool-iframe-wrap select:focus { border-color: var(--primary) !important; outline: none; box-shadow: 0 0 0 3px var(--primary-light); }

.tool-iframe-wrap .btn-primary,
.tool-iframe-wrap .button-primary,
.tool-iframe-wrap .primary-btn,
.tool-iframe-wrap button.primary { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
.tool-iframe-wrap .btn-primary:hover,
.tool-iframe-wrap .button-primary:hover,
.tool-iframe-wrap .primary-btn:hover { background: var(--primary-hover) !important; }

.tool-iframe-wrap .tab.active,
.tool-iframe-wrap .tabs .active,
.tool-iframe-wrap .nav-tab.active { border-bottom-color: var(--primary) !important; color: var(--primary) !important; }

body .tool-iframe-wrap .b64-btns button:not(.secondary),
body .tool-iframe-wrap .plugin-btn-primary,
body .tool-iframe-wrap .plugin-button.primary,
body .tool-iframe-wrap button.plugin-primary { background: var(--primary) !important; border-color: var(--primary) !important; }
body .tool-iframe-wrap .b64-btns button:not(.secondary):hover { background: var(--primary-hover) !important; }

body .tool-iframe-wrap .plugin-btns button:first-child:not(.secondary):not(.ghost):not(.outline),
body .tool-iframe-wrap .tool-btns button:first-child:not(.secondary):not(.ghost):not(.outline),
body .tool-iframe-wrap .actions button:first-child:not(.secondary):not(.ghost):not(.outline),
body .tool-iframe-wrap .btn-group button:first-child:not(.secondary):not(.ghost):not(.outline) { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }

body .tool-iframe-wrap .b64-tabs .tab.active,
body .tool-iframe-wrap .plugin-tabs .tab.active { border-bottom-color: var(--primary) !important; color: var(--primary) !important; }

body .tool-iframe-wrap .b64-wrap a,
body .tool-iframe-wrap .plugin-wrap a { color: var(--primary) !important; }

.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    /* v1.9.70 宽度由后台 cookie_banner_width 配置，默认600px */
    width: var(--cookie-banner-width, 600px);
    /* 移动端防溢出：屏幕小于配置宽度时自动收缩 */
    max-width: calc(100% - 40px);
    background: var(--bg-card, #fff);
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border, #e8e8e8);
    animation: cookieSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cookieSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(30px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.cookie-consent-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
}
.cookie-icon {
    font-size: 36px;
    flex-shrink: 0;
    line-height: 1;
}
.cookie-text {
    flex: 1;
    min-width: 0;
}
.cookie-text strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1, #1a1a1a);
    margin-bottom: 4px;
}
.cookie-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-2, #666);
}
.cookie-btns {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.cookie-btn {
    padding: 8px 20px;
    border-radius: var(--radius-md, 10px);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.cookie-decline {
    background: var(--bg-soft, #f5f5f5);
    color: var(--text-2, #666);
    border-color: var(--border, #e0e0e0);
}
.cookie-decline:hover {
    background: var(--bg-hover, #ebebeb);
    color: var(--text-1, #333);
}
.cookie-accept {
    background: var(--primary, #2563eb);
    color: #fff;
    border-color: var(--primary, #2563eb);
}
.cookie-accept:hover {
    background: var(--primary-hover, #1d4ed8);
    border-color: var(--primary-hover, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}
@media (max-width: 600px) {
    .cookie-consent-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 16px;
    }
    .cookie-icon { font-size: 32px; }
    .cookie-btns { justify-content: center; }
    .cookie-btn { flex: 1; }
}

@media (min-width: 1400px) {
    .container { max-width: var(--max-w); }
    .tool-grid { gap: 20px; }
    .tool-card { padding: 20px; }
}

@media (max-width: 1200px) and (min-width: 1025px) {
    .container { padding: 0 24px; }
    .tool-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .plugin-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
    .user-center { grid-template-columns: 200px 1fr; gap: 18px; }
}

@media (max-width: 1024px) and (min-width: 901px) {
    .container { padding: 0 20px; }
    .tool-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
    .tool-card { padding: 16px; }
    .tool-card .tc-icon { width: 44px; height: 44px; font-size: 26px; }
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .plugin-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
    .user-plugin-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
    .coupon-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
    .links-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
    .user-center { grid-template-columns: 200px 1fr; gap: 16px; }
    .hero-title { font-size: 28px; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .tool-stats { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) and (min-width: 769px) {
    .container { padding: 0 16px; }
    .header-inner { padding: 0 16px; }
    .tool-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .tool-card { padding: 16px; }
    .tool-card .tc-icon { width: 44px; height: 44px; font-size: 26px; }
    .category-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .user-plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .coupon-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .links-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .vip-plans-v2 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .user-center { grid-template-columns: 1fr; }
    .user-sidebar { position: static; width: 100%; }
    .user-sidebar .sidebar-menu { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; }
    .user-sidebar .sidebar-menu a { white-space: nowrap; flex-shrink: 0; }
    .hero-title { font-size: 26px; }
    .hero-search { max-width: 80%; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .tool-stats { grid-template-columns: repeat(4, 1fr); }
    .nav-menu { overflow-x: auto; flex-wrap: nowrap; }
    .nav-menu a { white-space: nowrap; flex-shrink: 0; }
}

@media (max-width: 768px) and (min-width: 601px) {
    .container { padding: 0 10px; }
    .header-inner { padding: 0 10px; }
    .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .tool-card { padding: 14px; }
    .tool-card .tc-icon { width: 40px; height: 40px; font-size: 24px; }
    .tool-card .tc-name { font-size: 14px; }
    .tool-card .tc-desc { font-size: 12px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .category-card { padding: 14px 10px; }
    .plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .user-plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .coupon-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .links-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .vip-plans-v2 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hero-title { font-size: 24px; }
    .hero-subtitle { font-size: 13px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .tool-stats { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .auth-box { padding: 24px; }
    .tool-detail { padding: 16px; }
    .tool-detail-header { flex-direction: column; gap: 12px; }
    .td-actions { width: 100%; }
    .td-actions .btn { flex: 1; }
}

@media (max-width: 600px) and (min-width: 481px) {
    .container { padding: 0 8px; }
    .header-inner { padding: 0 8px; }
    .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tool-card { padding: 12px; }
    .tool-card .tc-icon { width: 38px; height: 38px; font-size: 22px; }
    .tool-card .tc-name { font-size: 13.5px; }
    .tool-card .tc-desc { font-size: 11.5px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .category-card { padding: 12px 8px; }
    .plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .user-plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .coupon-grid { grid-template-columns: repeat(1, 1fr); }
    .links-grid { grid-template-columns: repeat(1, 1fr); }
    .vip-plans-v2 { grid-template-columns: repeat(1, 1fr); gap: 12px; }
    .hero { padding: 20px 0 16px; }
    .hero-title { font-size: 22px; }
    .hero-subtitle { font-size: 12px; margin-bottom: 16px; }
    .hero-search { padding: 4px 4px 4px 12px; }
    .hero-search input { padding: 9px 0; font-size: 14px; }
    .hero-search .hs-btn { padding: 7px 14px; font-size: 12px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tool-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .section-title { font-size: 16px; }
    .form-row { grid-template-columns: 1fr; gap: 10px; }
    .auth-box { padding: 20px; }
    .tool-detail { padding: 14px; }
    .td-icon { width: 44px; height: 44px; font-size: 26px; }
    .td-info h1 { font-size: 17px; }
    .td-desc { font-size: 12.5px; }
    .td-meta { gap: 8px; font-size: 11.5px; }
    .footer-inner { padding: 0 8px; font-size: 11.5px; }
    .btn { padding: 7px 12px; font-size: 13px; }
    input, select, textarea { font-size: 14px; }
}

@media (max-width: 480px) and (min-width: 361px) {
    .container { padding: 0 6px; }
    .header-inner { padding: 0 6px; }
    .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .tool-card { padding: 10px; }
    .tool-card .tc-icon { width: 36px; height: 36px; font-size: 20px; }
    .tool-card .tc-name { font-size: 13px; }
    .tool-card .tc-desc { font-size: 11px; -webkit-line-clamp: 1; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .category-card { padding: 10px 6px; }
    .category-card .cc-icon { font-size: 24px; }
    .plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .user-plugin-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .coupon-grid { grid-template-columns: repeat(1, 1fr); }
    .links-grid { grid-template-columns: repeat(1, 1fr); }
    .vip-plans-v2 { grid-template-columns: repeat(1, 1fr); gap: 10px; }
    .hero { padding: 18px 0 14px; }
    .hero-title { font-size: 20px; }
    .hero-subtitle { font-size: 11.5px; margin-bottom: 14px; }
    .hero-search { padding: 3px 3px 3px 10px; }
    .hero-search input { padding: 8px 0; font-size: 13px; }
    .hero-search .hs-btn { padding: 6px 12px; font-size: 12px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .tool-stats { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .stat-item .stat-num { font-size: 18px; }
    .stat-item .stat-label { font-size: 11px; }
    .section-title { font-size: 15px; }
    .form-row { grid-template-columns: 1fr; gap: 8px; }
    .auth-box { padding: 18px; }
    .tool-detail { padding: 12px; }
    .td-icon { width: 40px; height: 40px; font-size: 24px; }
    .td-info h1 { font-size: 16px; }
    .td-desc { font-size: 12px; }
    .td-meta { gap: 6px; font-size: 11px; flex-wrap: wrap; }
    .td-actions .btn { padding: 7px 8px; font-size: 11.5px; }
    .footer-inner { padding: 0 6px; font-size: 11px; }
    .btn { padding: 6px 10px; font-size: 12px; }
    input, select, textarea { font-size: 14px; }
    .user-dropdown-name { display: none; }
    .toast-item { font-size: 12px; padding: 7px 14px; min-width: 160px; }
}

@media (max-width: 360px) {
    .container { padding: 0 4px; }
    .header-inner { padding: 0 4px; }
    .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
    .tool-card { padding: 8px; }
    .tool-card .tc-icon { width: 32px; height: 32px; font-size: 18px; }
    .tool-card .tc-name { font-size: 12px; }
    .tool-card .tc-desc { display: none; }
    .tool-card .tc-tag { font-size: 10px; padding: 2px 6px; top: 8px; right: 8px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
    .category-card { padding: 8px 4px; }
    .category-card .cc-icon { font-size: 20px; }
    .category-card .cc-name { font-size: 12px; }
    .plugin-grid { grid-template-columns: repeat(1, 1fr); }
    .user-plugin-grid { grid-template-columns: repeat(1, 1fr); }
    .coupon-grid { grid-template-columns: repeat(1, 1fr); }
    .links-grid { grid-template-columns: repeat(1, 1fr); }
    .vip-plans-v2 { grid-template-columns: repeat(1, 1fr); gap: 8px; }
    .hero { padding: 16px 0 12px; }
    .hero-title { font-size: 18px; }
    .hero-subtitle { font-size: 11px; margin-bottom: 12px; }
    .hero-search { padding: 3px; flex-direction: column; gap: 6px; }
    .hero-search input { padding: 8px 6px; font-size: 13px; width: 100%; }
    .hero-search .hs-btn { padding: 8px; font-size: 12px; width: 100%; border-radius: var(--radius-sm); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
    .tool-stats { grid-template-columns: repeat(2, 1fr); gap: 4px; }
    .stat-item { padding: 8px 4px; }
    .stat-item .stat-num { font-size: 16px; }
    .stat-item .stat-label { font-size: 10px; }
    .section-title { font-size: 14px; }
    .form-row { grid-template-columns: 1fr; gap: 6px; }
    .auth-box { padding: 16px; }
    .tool-detail { padding: 10px; }
    .td-icon { width: 36px; height: 36px; font-size: 22px; }
    .td-info h1 { font-size: 15px; }
    .td-desc { font-size: 11.5px; }
    .td-meta { gap: 4px; font-size: 10.5px; }
    .td-actions { flex-wrap: wrap; }
    .td-actions .btn { padding: 6px 8px; font-size: 11px; flex: 1 1 40%; }
    .footer-inner { padding: 0 4px; font-size: 10.5px; }
    .btn { padding: 5px 8px; font-size: 11.5px; }
    input, select, textarea { font-size: 14px; }
    .user-dropdown-name { display: none; }
    .toast-item { font-size: 11px; padding: 6px 12px; min-width: 140px; }
    .nav-menu a { padding: 5px 8px; font-size: 12px; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero { padding: 12px 0; }
    .hero-title { font-size: 20px; margin-bottom: 4px; }
    .hero-subtitle { font-size: 12px; margin-bottom: 10px; }
    .auth-page { padding: 16px 0; }
    .auth-box { padding: 16px 24px; }
}

@media (min-width: 1600px) {
    .container { max-width: var(--max-w); }
    .tool-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
    .tool-card { padding: 22px; }
    .tool-card .tc-icon { width: 52px; height: 52px; font-size: 30px; }
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .tool-card, .category-card, .admin-card { 
        -webkit-font-smoothing: antialiased; 
        -moz-osx-font-smoothing: grayscale; 
    }
}

@media print {
    .header, .footer, .user-sidebar, .hero-search, .btn, .toast-container, .cookie-consent { display: none !important; }
    .container { max-width: 100%; padding: 0; }
    .tool-grid { grid-template-columns: repeat(3, 1fr); }
    .tool-card { break-inside: avoid; border: 1px solid #ccc; }
}

body, button, input, textarea, select { font-display: swap; }

pre, code, .rich-content pre, .rich-content code {
  overflow-x: auto;
  max-width: 100%;
  word-break: break-all;
  white-space: pre-wrap;
  word-wrap: break-word;
}
pre { padding: 12px; border-radius: var(--radius-sm); background: var(--bg-soft, #f8fafc); font-size: 13px; line-height: 1.5; }

.table-wrap {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-box, .admin-modal-box {
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  overflow-x: hidden;
}

p, li, td, th, .stat-value, .up-card-desc, .pm-card-desc, .fb-card-text, .msg-content, .feedback-content {
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

.user-sidebar img, .admin-card img, .up-card img, .pm-card img, .fb-card img {
  max-width: 100%;
}

img {
  background-color: var(--bg-soft, #f1f5f9);
  color: var(--text-3, #999);
  font-size: 12px;
}

.user-sidebar { flex-shrink: 0; min-width: 0; }
.user-content { min-width: 0; overflow: hidden; }
.user-content > * { max-width: 100%; }
@media (max-width: 768px) {
  .user-sidebar { width: 100%; }
}

.up-version, .up-status, .pm-tag, .badge, .sidebar-badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.up-card-actions, .td-actions, .form-actions {
  flex-wrap: wrap;
}

#toolcms-debugbar, .error-message, .debug-output {
  max-width: 100vw;
  overflow-x: auto;
  word-break: break-all;
  white-space: pre-wrap;
}

[data-theme="dark"] {
  --text-1: #e2e8f0;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --text-4: #64748b;
  --border: #1e293b;
  --border-light: #0f172a;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-soft: #1e293b;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
}
[data-theme="dark"] body { background: var(--bg); color: var(--text-1); }
[data-theme="dark"] .admin-card,
[data-theme="dark"] .up-card,
[data-theme="dark"] .empty-state { background: var(--bg-card); }

/* ============================================================
   Toast 提示组件 V2.0.2
   顶部居中，圆角矩形，颜色跟随主题色
   ============================================================ */
.toast-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast-item {
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  min-width: 160px;
  max-width: 90vw;
  text-align: center;
  opacity: 0;
  transform: translateY(-12px);
  transition: all 0.25s ease;
  pointer-events: auto;
  word-break: break-all;
  line-height: 1.5;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.toast-item.show {
  opacity: 1;
  transform: translateY(0);
}
.toast-success {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-bg);
}
.toast-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.toast-warning {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}
.toast-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
[data-theme="dark"] .toast-success {
  background: rgba(16,185,129,0.15);
  color: #34d399;
  border-color: rgba(16,185,129,0.3);
}
[data-theme="dark"] .toast-error {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border-color: rgba(239,68,68,0.3);
}
[data-theme="dark"] .toast-warning {
  background: rgba(245,158,11,0.15);
  color: #fbbf24;
  border-color: rgba(245,158,11,0.3);
}
[data-theme="dark"] .toast-info {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
  border-color: rgba(59,130,246,0.3);
}
@media (max-width: 768px) {
  .toast-container { top: 60px; }
  .toast-item { font-size: 13px; padding: 8px 18px; min-width: 120px; }
}
