/* 星火工坊独立前端样式 */
/* ===== 全局变量 ===== */
:root {
  --c-bg: #f7f8fc;
  --c-surface: #ffffff;
  --c-surface-2: #f0f2f8;
  --c-border: #e4e7f0;
  --c-text: #1a1d2e;
  --c-text-2: #5a607a;
  --c-text-3: #9398ad;
  --c-primary: #6c4dff;
  --c-primary-2: #8b6fff;
  --c-primary-soft: #efeaff;
  --c-accent: #ff6b4a;
  --c-accent-soft: #fff0eb;
  --c-success: #18b583;
  --c-warning: #f5a623;
  --c-danger: #ff4757;
  --c-pink: #ff5e9c;
  --c-cyan: #00b8d4;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(30,35,80,.06);
  --shadow: 0 6px 22px rgba(30,35,80,.08);
  --shadow-lg: 0 18px 50px rgba(30,35,80,.14);
  --maxw: 1200px;
  --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 14px; outline: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: all .2s; border: 1px solid transparent;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-2); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(108,77,255,.35); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover { background: #e63849; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,71,87,.28); }
.btn-ghost { background: var(--c-surface); color: var(--c-text); border-color: var(--c-border); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== 顶部导航 ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 32px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo-mark { font-size: 26px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text small { font-size: 11px; font-weight: 400; color: var(--c-text-3); }
.nav-menu { display: flex; gap: 4px; flex: 1; }
.nav-link {
  padding: 8px 16px; border-radius: 9px; font-size: 14px; font-weight: 500;
  color: var(--c-text-2); transition: all .2s;
}
.nav-link:hover { background: var(--c-surface-2); color: var(--c-text); }
.nav-link.active { background: var(--c-primary-soft); color: var(--c-primary); }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

/* ===== 路由切换 ===== */
.route { display: none; min-height: 60vh; padding-bottom: 48px; }
.route.active { display: block; animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 24px 60px; text-align: center; color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #6c4dff 0%, #8b3fff 30%, #b04dff 60%, #ff5e9c 100%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.15) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.1) 0, transparent 40%);
}
.hero-content { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: rgba(255,255,255,.18); backdrop-filter: blur(8px);
  font-size: 13px; margin-bottom: 24px;
}
.hero-title { font-size: 46px; font-weight: 900; line-height: 1.2; margin-bottom: 20px; }
.hero-title .grad {
  background: linear-gradient(90deg, #ffe0a3, #ffd54a);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub { font-size: 17px; opacity: .92; margin-bottom: 32px; line-height: 1.7; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-bottom: 56px; flex-wrap: wrap; }
.hero-cta .btn-ghost { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); backdrop-filter: blur(8px); }
.hero-cta .btn-ghost:hover { background: rgba(255,255,255,.25); color: #fff; }
.hero-stats { display: flex; gap: 48px; justify-content: center; flex-wrap: wrap; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat b { display: block; font-size: 34px; font-weight: 900; }
.hero-stats .stat span { font-size: 13px; opacity: .85; }

/* ===== Section ===== */
.container { margin-top: 56px; }
.container:first-child { margin-top: 48px; }
.section-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.section-head .section-title { margin-bottom: 0; }
.link-more { font-size: 14px; color: var(--c-primary); font-weight: 500; }
.link-more:hover { text-decoration: underline; }

/* ===== 分类网格 ===== */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-card {
  background: var(--c-surface); border-radius: var(--radius); padding: 24px 16px;
  text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--c-border);
  transition: all .25s; cursor: pointer;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-primary); }
.cat-emoji { font-size: 38px; margin-bottom: 10px; }
.cat-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.cat-count { font-size: 12px; color: var(--c-text-3); }

/* ===== 工具卡片 ===== */
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tool-card {
  background: var(--c-surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--c-border);
  transition: all .25s; cursor: pointer; display: flex; flex-direction: column;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool-cover { height: 120px; position: relative; display: flex; align-items: center; justify-content: center; font-size: 44px; }
.tool-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.15)); }
.tool-cover-icon { position: relative; z-index: 1; font-size: 46px; line-height: 1; filter: drop-shadow(0 3px 5px rgba(20,22,40,.18)); }
.tool-badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,.9); backdrop-filter: blur(4px); color: var(--c-text);
}
.tool-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.tool-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.tool-desc { font-size: 13px; color: var(--c-text-2); line-height: 1.5; margin-bottom: 12px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tool-tag { font-size: 11px; padding: 2px 8px; border-radius: 5px; background: var(--c-surface-2); color: var(--c-text-2); }
.tool-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--c-border); }
.tool-author { font-size: 12px; color: var(--c-text-3); display: flex; align-items: center; gap: 6px; }
.tool-avatar { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.tool-likes { font-size: 12px; color: var(--c-text-2); display: flex; align-items: center; gap: 4px; }
.tool-likes.liked { color: var(--c-accent); font-weight: 600; }
.tool-likes:hover { color: var(--c-accent); }
.tool-date { font-size: 12px; color: var(--c-text-3); white-space: nowrap; }

/* ===== 部署中心 ===== */
.nav-link-deploy { color: var(--c-accent); font-weight: 600; }
.nav-link-deploy.active { background: var(--c-accent-soft); color: var(--c-accent); }
.deploy-banner {
  display: flex; gap: 16px; align-items: center; padding: 20px 24px;
  background: linear-gradient(135deg, var(--c-primary-soft), var(--c-accent-soft));
  border-radius: var(--radius-lg); margin-bottom: 24px; border: 1px solid var(--c-border);
}
.deploy-banner-icon { font-size: 36px; }
.deploy-banner-text { display: flex; flex-direction: column; gap: 4px; }
.deploy-banner-text b { font-size: 16px; }
.deploy-banner-text span { font-size: 13px; color: var(--c-text-2); }
.deploy-banner-text code {
  background: rgba(108,77,255,.1); padding: 1px 6px; border-radius: 4px;
  font-family: 'SF Mono', Consolas, monospace; font-size: 12px; color: var(--c-primary);
}
.deploy-actions { display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.deploy-filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.deploy-list { display: flex; flex-direction: column; gap: 14px; }
.deploy-item {
  background: var(--c-surface); border-radius: var(--radius); padding: 20px 24px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--c-border);
  display: flex; gap: 20px; align-items: center; transition: all .2s;
}
.deploy-item:hover { box-shadow: var(--shadow); border-color: var(--c-primary); }
.deploy-item-status { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; background: var(--c-text-3); }
.deploy-item-status.running { background: var(--c-success); box-shadow: 0 0 0 4px rgba(24,181,131,.15); }
.deploy-item-status.stopped { background: var(--c-text-3); }
.deploy-item-status.building { background: var(--c-warning); box-shadow: 0 0 0 4px rgba(245,166,35,.15); animation: pulse 1.2s infinite; }
.deploy-item-status.failed { background: var(--c-danger); }
@keyframes pulse { 50% { opacity: .4; } }
.deploy-item-main { flex: 1; min-width: 0; }
.deploy-item-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.deploy-item-source { font-size: 11px; padding: 2px 8px; border-radius: 5px; background: var(--c-surface-2); color: var(--c-text-2); font-weight: 500; }
.deploy-item-url {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-primary);
  font-family: 'SF Mono', Consolas, monospace; margin-bottom: 4px; cursor: pointer;
}
.deploy-item-url:hover { text-decoration: underline; }
.deploy-item-meta { font-size: 12px; color: var(--c-text-3); }
.deploy-item-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.deploy-arch { margin-top: 24px; }
.arch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.arch-card { background: var(--c-surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); border: 1px solid var(--c-border); }
.arch-emoji { font-size: 30px; margin-bottom: 10px; }
.arch-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.arch-desc { font-size: 13px; color: var(--c-text-2); line-height: 1.6; }
.arch-desc code { background: var(--c-surface-2); padding: 1px 6px; border-radius: 4px; font-family: 'SF Mono', Consolas, monospace; font-size: 12px; }
.form-hint { display: block; font-size: 12px; color: var(--c-text-3); margin-top: 6px; }
.source-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.source-tab { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text-2); font-size: 13px; font-weight: 500; transition: all .2s; }
.source-tab.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.source-panel { padding: 4px 0; }
.upload-zone { border: 2px dashed var(--c-border); border-radius: var(--radius); padding: 32px 20px; text-align: center; cursor: pointer; transition: all .2s; background: var(--c-surface-2); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--c-primary); background: var(--c-primary-soft); }
.upload-icon { font-size: 38px; margin-bottom: 8px; }
.upload-zone p { font-size: 14px; margin-bottom: 4px; }
.upload-zone small { font-size: 12px; color: var(--c-text-3); }
.upload-file { margin-top: 10px; font-size: 13px; color: var(--c-success); font-weight: 500; }
.deploy-detail-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.deploy-detail-status { padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.deploy-detail-status.running { background: #e8f9f0; color: var(--c-success); }
.deploy-detail-status.stopped { background: var(--c-surface-2); color: var(--c-text-3); }
.deploy-detail-status.building { background: #fff4e0; color: var(--c-warning); }
.deploy-detail-status.failed { background: #ffe8ea; color: var(--c-danger); }
.deploy-detail-url { background: var(--c-surface-2); padding: 14px 18px; border-radius: var(--radius-sm); display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; }
.deploy-detail-url a { color: var(--c-primary); font-family: 'SF Mono', Consolas, monospace; font-size: 14px; word-break: break-all; }
.deploy-detail-url a:hover { text-decoration: underline; }
.deploy-detail-logs { background: #1a1d2e; color: #a8ffd4; padding: 16px; border-radius: var(--radius-sm); font-family: 'SF Mono', Consolas, monospace; font-size: 12px; line-height: 1.7; max-height: 280px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; }

/* ===== 页面标题 ===== */
.page-title { font-size: 32px; font-weight: 900; margin-bottom: 8px; }
.page-desc { font-size: 15px; color: var(--c-text-2); margin-bottom: 32px; }

/* ===== 探索页控件 ===== */
.explore-controls {
  display: flex; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; align-items: center;
}
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.filter-tab {
  padding: 7px 16px; border-radius: 9px; font-size: 13px; font-weight: 500;
  background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text-2);
  transition: all .2s;
}
.filter-tab:hover { border-color: var(--c-primary); color: var(--c-primary); }
.filter-tab.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.search-box { position: relative; }
.search-box input {
  padding: 9px 16px 9px 38px; border-radius: 9px; border: 1px solid var(--c-border);
  background: var(--c-surface); width: 280px; transition: all .2s;
}
.search-box::before { content: '🔍'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; }
.search-box input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.sort-box select {
  padding: 9px 16px; border-radius: 9px; border: 1px solid var(--c-border);
  background: var(--c-surface); cursor: pointer;
}

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 80px 24px; color: var(--c-text-3); }
.empty-icon { font-size: 56px; margin-bottom: 16px; }

/* ===== 许愿池 ===== */
.wish-publish {
  background: var(--c-surface); border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--c-border); margin-bottom: 32px;
}
.wish-publish textarea {
  width: 100%; padding: 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--c-border); resize: vertical; transition: all .2s;
}
.wish-publish textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.wish-publish-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 12px; }
.wish-publish-bottom select { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--c-border); background: var(--c-surface); }
.wish-filters { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.wish-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.wish-card {
  background: var(--c-surface); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-warning); transition: all .25s;
}
.wish-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.wish-card.status-claimed { border-left-color: var(--c-primary); }
.wish-card.status-done { border-left-color: var(--c-success); }
.wish-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px; }
.wish-cat { font-size: 11px; padding: 3px 10px; border-radius: 6px; background: var(--c-primary-soft); color: var(--c-primary); font-weight: 600; }
.wish-status { font-size: 11px; padding: 3px 10px; border-radius: 6px; font-weight: 600; }
.wish-status.open { background: #e8f9f0; color: var(--c-success); }
.wish-status.claimed { background: var(--c-primary-soft); color: var(--c-primary); }
.wish-status.done { background: #e8f9f0; color: var(--c-success); }
.wish-text { font-size: 15px; line-height: 1.6; margin-bottom: 14px; }
.wish-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--c-text-3); }
.wish-author { display: flex; align-items: center; gap: 6px; }
.wish-actions { display: flex; gap: 8px; }
.wish-action-btn { font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text-2); transition: all .2s; }
.wish-action-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.wish-action-btn.claimed { background: var(--c-primary-soft); border-color: var(--c-primary); color: var(--c-primary); }
.wish-strip { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.wish-strip .wish-card { min-width: 320px; }

/* ===== 创作者 ===== */
.creator-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.creator-card {
  background: var(--c-surface); border-radius: var(--radius); padding: 28px 20px;
  text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--c-border);
  transition: all .25s; cursor: pointer;
}
.creator-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-primary); }
.creator-avatar { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.creator-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.creator-bio { font-size: 13px; color: var(--c-text-2); margin-bottom: 16px; min-height: 38px; }
.creator-stats { display: flex; justify-content: center; gap: 24px; font-size: 13px; color: var(--c-text-3); }
.creator-stats b { display: block; font-size: 18px; font-weight: 700; color: var(--c-text); }

/* ===== 学习中心 ===== */
.learn-path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.learn-card {
  background: var(--c-surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--c-border); transition: all .25s; cursor: pointer;
}
.learn-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.learn-cover { height: 140px; display: flex; align-items: center; justify-content: center; font-size: 52px; position: relative; }
.learn-num { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.9); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.learn-body { padding: 18px; }
.learn-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.learn-desc { font-size: 13px; color: var(--c-text-2); line-height: 1.6; margin-bottom: 12px; }
.learn-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.learn-tag { font-size: 11px; padding: 2px 8px; border-radius: 5px; background: var(--c-primary-soft); color: var(--c-primary); }

/* ===== 创作者指南 ===== */
.guide-tabs { display: flex; gap: 10px; margin-bottom: 24px; border-bottom: 1px solid var(--c-border); padding-bottom: 12px; }
.guide-tab { padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--c-text-2); font-weight: 500; cursor: pointer; transition: all .2s; }
.guide-tab:hover { background: var(--c-surface-2); color: var(--c-text); }
.guide-tab.active { background: var(--c-primary-soft); color: var(--c-primary); border-color: var(--c-primary); }
.guide-panel { display: none; }
.guide-panel.active { display: block; animation: fadeIn .3s; }

/* ===== 学习详情弹窗 ===== */
.learn-section { margin-bottom: 22px; }
.learn-section h3 { font-size: 16px; margin-bottom: 10px; color: var(--c-text); }
.learn-section p { color: var(--c-text-2); line-height: 1.8; font-size: 14px; }
.learn-section a { color: var(--c-primary); text-decoration: none; word-break: break-all; }
.learn-section a:hover { text-decoration: underline; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--c-primary); cursor: pointer; font: inherit; }
.link-button:hover { text-decoration: underline; }
.learn-steps { padding-left: 20px; color: var(--c-text-2); line-height: 1.9; font-size: 14px; }
.learn-steps li { margin-bottom: 6px; }
.learn-try { background: var(--c-primary-soft); border-radius: 12px; padding: 16px 18px; color: var(--c-text); line-height: 1.7; font-size: 14px; border-left: 4px solid var(--c-primary); }
.learn-resources { padding-left: 20px; color: var(--c-text-2); line-height: 1.9; font-size: 14px; }

.guide-intro { background: var(--c-surface-2); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.guide-intro h3 { font-size: 18px; margin-bottom: 10px; }
.guide-intro p { color: var(--c-text-2); line-height: 1.7; }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.guide-card { background: var(--c-surface); border-radius: var(--radius); border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); overflow: hidden; transition: all .25s; }
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.guide-head { padding: 18px 18px 12px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--c-border); }
.guide-icon { font-size: 30px; }
.guide-title { font-size: 17px; font-weight: 700; }
.guide-sub { font-size: 12px; color: var(--c-primary); font-weight: 600; margin-top: 2px; }
.guide-body { padding: 18px; }
.guide-section { margin-bottom: 16px; }
.guide-section:last-child { margin-bottom: 0; }
.guide-label { font-size: 12px; font-weight: 700; color: var(--c-text); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.guide-list { list-style: none; }
.guide-list li { font-size: 13px; color: var(--c-text-2); padding: 6px 0; padding-left: 18px; position: relative; line-height: 1.5; }
.guide-list li::before { content: "✓"; position: absolute; left: 0; color: var(--c-success); font-weight: 700; }
.guide-list .optional::before { content: "◆"; color: var(--c-warn); font-size: 10px; top: 8px; }
.guide-note { font-size: 12px; color: var(--c-text-3); background: var(--c-surface-2); padding: 10px 12px; border-radius: 8px; line-height: 1.6; margin-top: 4px; }

.form-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--c-text-3); line-height: 1.5; }
.char-counter { display: block; margin-top: 6px; text-align: right; font-size: 12px; color: var(--c-text-3); }
.char-counter.invalid { color: var(--c-danger); font-weight: 600; }

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; display: none;
  background: rgba(20,22,40,.55); backdrop-filter: blur(4px);
  align-items: flex-start; justify-content: center; padding: 40px 24px; overflow-y: auto;
}
.modal-overlay.active { display: flex; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--c-surface); border-radius: var(--radius-lg); width: 100%; max-width: 560px;
  box-shadow: var(--shadow-lg); animation: popIn .3s; margin: auto;
}
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; border-bottom: 1px solid var(--c-border); }
.modal-head h2 { font-size: 20px; font-weight: 700; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--c-text-2); }
.modal-close:hover { background: var(--c-surface-2); }
.modal-body { padding: 26px; max-height: 60vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 18px 26px; border-top: 1px solid var(--c-border); }

/* ===== 表单 ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--c-text); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--c-border); background: var(--c-surface); transition: all .2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.password-field { position: relative; }
.form-group .password-field input { padding-right: 62px; }
.password-toggle {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  min-width: 44px; padding: 5px 8px; border-radius: 6px;
  color: var(--c-primary); font-size: 12px; font-weight: 600;
}
.password-toggle:hover { background: var(--c-primary-soft); }
.password-toggle:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 1px; }

/* ===== 工具使用入口 ===== */
.tool-use-box { background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.tool-use-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.tool-use-missing { font-size: 13px; color: var(--c-warn); background: rgba(245,166,35,.1); padding: 12px 14px; border-radius: 8px; margin-bottom: 12px; }
.tool-use-tip { font-size: 12px; color: var(--c-text-3); line-height: 1.6; }
.tool-use-code { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 8px; padding: 14px; font-size: 13px; line-height: 1.6; color: var(--c-text-2); max-height: 200px; overflow-y: auto; white-space: pre-wrap; margin-top: 12px; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--c-text); color: #fff; padding: 12px 24px; border-radius: 12px;
  font-size: 14px; z-index: 2000; opacity: 0; transition: all .3s; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.auth-error { min-height: 20px; margin: 2px 0 8px; color: var(--c-danger); font-size: 13px; line-height: 1.5; }

/* ===== Footer ===== */
.footer { background: var(--c-text); color: rgba(255,255,255,.7); margin-top: 80px; }
.footer-inner { display: flex; gap: 60px; padding: 48px 24px 32px; }
.footer-brand { flex: 0 0 280px; }
.footer-brand .logo-mark { font-size: 24px; }
.footer-brand p { font-size: 13px; margin-top: 12px; line-height: 1.6; }
.footer-cols { display: flex; gap: 60px; flex: 1; }
.footer-cols > div h4 { font-size: 14px; color: #fff; margin-bottom: 14px; }
.footer-cols > div a { display: block; font-size: 13px; margin-bottom: 10px; cursor: pointer; }
.footer-cols > div a:hover { color: #fff; }
.footer-bottom { text-align: center; padding: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .tool-grid, .creator-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .learn-path { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .topbar-inner { gap: 12px; }
  .nav-menu { display: none; }
  .hero-title { font-size: 32px; }
  .hero-stats { gap: 24px; }
  .tool-grid, .creator-grid, .wish-grid, .learn-path, .cat-grid, .guide-grid { grid-template-columns: 1fr; }
  .guide-tabs { flex-wrap: wrap; }
  .explore-controls { flex-direction: column; align-items: stretch; }
  .search-box input { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-cols { gap: 32px; flex-wrap: wrap; }
}

/* Spring Boot 业务页面补充 */
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tool-status { padding: 2px 8px; border-radius: 6px; font-size: 11px; white-space: nowrap; }
.tool-status.published { color: var(--c-success); background: rgba(24,181,131,.12); }
.tool-status.draft { color: var(--c-warning); background: rgba(245,166,35,.12); }
.tool-unpublish-reason { margin-top: 10px; padding: 8px 10px; border-radius: 7px; background: var(--c-accent-soft); color: var(--c-accent); font-size: 12px; }
.tool-action-note { align-self: center; color: var(--c-accent); font-size: 12px; }
.profile-panel, .admin-tabs { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.admin-tabs h2 { margin: 26px 0 12px; }
.admin-tabs h2:first-child { margin-top: 0; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.cat-card { text-align: left; }
.cat-card small { display: block; margin-top: 6px; color: var(--c-text-3); }
@media (max-width: 680px) { .admin-row { align-items: flex-start; flex-direction: column; } }
