/* AI万象 - Core Styles */
/* 高级灰风格 | 默认亮色，html.dark 切换暗色 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

/* CSS Variables — 默认亮色（高级灰） */
:root {
  /* 背景色系 - 暖灰 */
  --bg-primary: #f5f5f5;
  --bg-secondary: #eeeeee;
  --bg-card: #ffffff;
  --bg-hover: #f0f0f0;
  --bg-input: #fafafa;

  /* 文字色系 - 深灰 */
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;

  /* 强调色 - 保持蓝 */
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-light: rgba(0, 113, 227, 0.10);

  /* 边框 & 阴影 */
  --border: #e0e0e0;
  --border-light: #eaeaea;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);

  /* 圆角 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* 渐变（暗色模式覆盖） */
  --gradient-blue: linear-gradient(135deg, #0071e3, #42a5f5);
  --gradient-purple: linear-gradient(135deg, #7c4dff, #b388ff);
  --gradient-green: linear-gradient(135deg, #00c853, #69f0ae);
  --gradient-orange: linear-gradient(135deg, #ff6d00, #ffab40);

  /* 字体 & 动画 */
  --font: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --transition: 0.2s ease;
  --header-height: 64px;
  --subnav-height: 48px;
}

/* 暗色模式（高级灰暗色） */
html.dark {
  --bg-primary: #111111;
  --bg-secondary: #1a1a1a;
  --bg-card: #222222;
  --bg-hover: #2a2a2a;
  --bg-input: #222222;

  --text-primary: #e8e8e8;
  --text-secondary: #999999;
  --text-muted: #666666;

  --accent: #42a5f5;
  --accent-hover: #64b5f6;
  --accent-light: rgba(66, 165, 245, 0.12);

  --border: #333333;
  --border-light: #3d3d3d;
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);

  --gradient-blue: linear-gradient(135deg, #1565c0, #42a5f5);
  --gradient-purple: linear-gradient(135deg, #6a1b9a, #ab47bc);
  --gradient-green: linear-gradient(135deg, #2e7d32, #66bb6a);
  --gradient-orange: linear-gradient(135deg, #e65100, #ffa726);
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.5px;
}
.logo span {
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Primary Nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.primary-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.nav-btn.active {
  color: var(--accent);
  background: var(--accent-light);
}

/* Bookmark Star */
.bm-star {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}
.bm-star:hover {
  background: var(--bg-hover);
  color: #f5a623;
}
.bm-star.active {
  color: #f5a623;
}

.tutorial-card-top {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}
.tutorial-card-top .tutorial-card-title {
  flex: 1;
  margin-bottom: 0;
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  font-size: 18px;
}
.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Login Button */
.login-btn {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
  white-space: nowrap;
}
.login-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-light);
}
.login-btn.logged-in {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  gap: 6px;
}
.login-user {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Auth Modal (Login/Register) */
.auth-modal {
  max-width: 420px;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
}
.auth-tab {
  padding: 8px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.auth-tab:hover:not(.active) {
  color: var(--text-secondary);
}

/* Auth Form */
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
}

.auth-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.auth-required {
  color: #e74c3c;
}

.auth-input {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: all var(--transition);
  margin-bottom: 14px;
}
.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.auth-input::placeholder {
  color: var(--text-muted);
}

.auth-submit {
  width: 100%;
  padding: 11px 0;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  transition: all var(--transition);
  margin-top: 4px;
}
.auth-submit:hover {
  background: var(--accent-hover);
}

.auth-switch {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.auth-switch a:hover {
  text-decoration: underline;
}

.auth-guest-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}
.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tools Layout: Sidebar + Main */
.tools-layout {
  display: flex;
  gap: 0;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 48px;
}

/* Sidebar */
.tools-sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-height) + 24px);
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
  padding: 16px 0;
  border-right: 1px solid var(--border);
  margin-right: 32px;
  scrollbar-width: none;
}
.tools-sidebar::-webkit-scrollbar { display: none; }

.sidebar-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
  padding: 0 14px 16px;
}

.sidebar-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 1px;
  border-left: 2px solid transparent;
}
.sidebar-cat:hover {
  color: var(--text-primary);
  background: transparent;
}
.sidebar-cat.active {
  color: var(--text-primary);
  background: transparent;
  border-left: 2px solid var(--accent);
  font-weight: 600;
}
.sidebar-cat-icon {
  display: none;
}
.sidebar-cat-count {
  display: none;
}
.sidebar-cat.active .sidebar-cat-count {
  color: rgba(255,255,255,0.7);
}

/* Tools Main Content Area */
.tools-main {
  flex: 1;
  min-width: 0;
}

.tools-subnav {
  margin-bottom: 24px;
}

/* Tool logo from favicon */
.tool-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

/* Tool icon fallback */
.tool-icon-fallback {
  font-size: 16px;
  font-weight: 700;
  color: #333;
}
.main-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px;
}

/* Pages without subnav need top padding to clear fixed header */
#page-news .subnav-sticky {
  display: none;
}

#page-news .main-container,
#page-daily-trend .main-container,
#page-about .main-container,
#page-community .main-container {
  padding-top: 32px;
}

/* Tools main content area - overrides main-container for tools page */
.tools-main .main-container {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Page Container */
.page {
  display: none;
  padding-bottom: 60px;
}
.page.active {
  display: block;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 24px 40px;
}
.hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -1px;
  line-height: 1.3;
}
.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Category Subnav */
.subnav-sticky {
  position: sticky;
  top: var(--header-height);
  z-index: 999;
  background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.subnav-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--subnav-height);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }

.subnav-pill {
  padding: 7px 16px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
}
.subnav-pill:hover {
  color: var(--text-primary);
  background: transparent;
}
.subnav-pill.active {
  color: var(--text-primary);
  background: transparent;
  border-bottom: 2px solid var(--accent);
  font-weight: 600;
}
.pill-count {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 4px;
}

/* Tool Section */
.tool-section {
  margin-bottom: 40px;
  scroll-margin-top: calc(var(--header-height) + var(--subnav-height) + 16px);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--bg-card);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.section-count {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 10px;
  border-radius: 12px;
  flex-shrink: 0;
}

.section-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-left: auto;
}

/* Subcategory heading above tool grids */
.subcat-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 20px 0 10px;
  padding: 0 4px;
  text-transform: none;
  letter-spacing: 0;
}
.subcat-tool-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 6px;
}

/* Tool Grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

/* Tool Card */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.tool-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  overflow: hidden;
}
.tool-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.tool-info {
  flex: 1;
  min-width: 0;
}

.tool-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.tool-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
  white-space: nowrap;
}

.tool-action {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-action a {
  color: var(--accent);
  font-weight: 500;
}
.tool-action a:hover {
  text-decoration: underline;
}

/* Detail Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 16px 24px 24px;
}
.modal-body p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.modal-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}
.modal-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* News Page */
.news-date-divider {
  position: sticky;
  top: calc(var(--header-height) + var(--subnav-height));
  z-index: 10;
  background: var(--bg-primary);
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.news-date-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}
.news-date-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

/* Daily Trend Promo Banner */
.trend-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(0,113,227,0.12), rgba(124,77,255,0.12));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 32px;
  margin-bottom: 28px;
  gap: 24px;
}
.trend-promo-text {
  flex: 1;
}
.trend-promo-text h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.trend-promo-text p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}
.trend-promo-btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.2s;
}
.trend-promo-btn:hover {
  opacity: 0.85;
}
.trend-promo-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.trend-promo-qr-placeholder {
  width: 120px;
  height: 120px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
}
.trend-promo-qr p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
@media (max-width: 768px) {
  .trend-promo {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .trend-promo-text h2 {
    font-size: 18px;
  }
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
}
.news-card:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.news-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}
.news-card-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.news-source {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* News Detail Overlay */
.news-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.news-detail-overlay.open { display: flex; }

.news-detail {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
}

.news-detail h2 {
  font-size: 20px;
  margin-bottom: 12px;
}
.news-detail-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.news-detail-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Tutorial Page */
.tutorial-section {
  margin-bottom: 32px;
  scroll-margin-top: calc(var(--header-height) + var(--subnav-height) + 16px);
}

.tutorial-section-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tutorial-section-icon {
  font-size: 20px;
}

.tutorial-section-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 8px;
}

.tutorial-section-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.tutorial-level-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.lv-btn {
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.lv-btn:hover { color: var(--text-primary); }
.lv-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.lv-btn em {
  font-style: normal;
  opacity: 0.7;
  margin-left: 2px;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1100px) {
  .tutorial-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .tutorial-grid { grid-template-columns: 1fr; }
}

.tutorial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
}
.tutorial-card:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  border-color: var(--border-light);
}

.tutorial-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tutorial-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tutorial-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.tutorial-source {
  color: var(--text-muted);
}

.tutorial-img-badge {
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

/* Recruit Page */
.recruit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.recruit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.recruit-card h3 {
  font-size: 15px;
  margin-bottom: 8px;
}
.recruit-card .company {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
}
.recruit-card .location {
  font-size: 12px;
  color: var(--text-muted);
}

/* Placeholder */
.placeholder-section {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.placeholder-section h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}
.placeholder-section p {
  font-size: 15px;
}

/* About Page */
.about-section {
  padding: 40px 0;
  max-width: 880px;
  margin: 0 auto;
}
.about-hero {
  text-align: center;
  margin-bottom: 40px;
}
.about-hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}

.about-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 20px;
}
.about-block h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.about-icon {
  font-size: 22px;
}
.about-block p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}
.about-block p:last-child {
  margin-bottom: 0;
}

/* About Features */
.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.about-feature-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 24px 20px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.about-feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.about-feature-icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.about-feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.about-feature-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* About Cooperation */
.about-coop {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.about-coop-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 20px;
  border: 1px solid var(--border);
}
.about-coop-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.about-coop-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* About Contact */
.about-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.about-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
}
.about-contact-item svg {
  flex-shrink: 0;
  color: var(--accent);
}

/* About Disclaimer */
.about-disclaimer {
  border-color: var(--accent);
  background: var(--accent-light);
}
.about-disclaimer ul {
  list-style: none;
  padding: 0;
}
.about-disclaimer li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 4px;
}
.about-disclaimer li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: bold;
}

/* Community Page */
.community-section {
  padding: 40px 0;
  max-width: 1000px;
  margin: 0 auto;
}
.community-hero {
  text-align: center;
  margin-bottom: 36px;
}
.community-hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.community-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}

/* Community Cards */
.community-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
.community-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.community-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.community-card.vip {
  border-color: rgba(168, 85, 247, 0.3);
}
.community-card.vip:hover {
  border-color: #a855f7;
  box-shadow: 0 4px 20px rgba(168,85,247,0.15);
}

.community-card-header {
  padding: 24px 24px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.community-card-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.community-card-badge.free {
  background: var(--accent-light);
  color: var(--accent);
}
.community-card-badge.vip-badge {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
}
.community-card-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}
.community-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.community-card-body {
  padding: 20px 24px;
}
.community-features {
  list-style: none;
  padding: 0;
}
.community-feature {
  position: relative;
  padding-left: 28px;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.community-feature:last-child {
  margin-bottom: 0;
}
.community-feature.yes::before {
  content: '✅';
  position: absolute;
  left: 0;
  font-size: 14px;
}
.community-feature.no::before {
  content: '❌';
  position: absolute;
  left: 0;
  font-size: 14px;
}

.community-card-footer {
  padding: 16px 24px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.community-qrcode-placeholder {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.community-qrcode-placeholder svg {
  color: var(--text-muted);
  opacity: 0.5;
}

.community-tip {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.community-tip strong {
  color: var(--accent);
}

.community-vip-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.6;
}

.community-note {
  text-align: center;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.community-note p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

/* Responsive: About & Community */
@media (max-width: 768px) {
  .about-features {
    grid-template-columns: 1fr;
  }
  .about-coop {
    grid-template-columns: 1fr;
  }
  .community-cards {
    grid-template-columns: 1fr;
  }
  .about-block {
    padding: 20px 20px;
  }
  .about-hero h1,
  .community-hero h1 {
    font-size: 26px;
  }
  .community-qrcode-placeholder {
    width: 140px;
    height: 140px;
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* Loading */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* Error state fallback */
.page.error-fallback {
  display: block;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
    --subnav-height: 42px;
  }
  .header-inner {
    padding: 0 12px;
    gap: 8px;
  }
  .primary-nav {
    gap: 0;
  }
  .nav-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  .logo {
    font-size: 18px;
  }
  .hero {
    padding: 40px 16px 24px;
  }
  .hero h1 {
    font-size: 24px;
  }
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .tutorial-grid {
    grid-template-columns: 1fr;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .main-container {
    padding: 0 12px;
  }
  .subnav-inner {
    padding: 0 12px;
  }
  .tools-layout {
    padding: 0;
    flex-direction: column;
  }
  .tools-sidebar {
    display: none;
  }
  .tools-main {
    width: 100%;
  }
}
