/* 青少年创梦家 V1.1 视觉交互升级版样式表 */
/* 科技感深色主题 | 玻璃拟态 | CSP 外联合规 */

:root {
  --bg-deep: #030712;
  --bg-panel: rgba(15, 23, 42, 0.72);
  --bg-card: rgba(30, 41, 59, 0.55);
  --primary: #1a56db;
  --accent: #00c2ff;
  --purple: #7c3aed;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --text: #f8fafc;
  --text2: #94a3b8;
  --border: rgba(148, 163, 184, 0.18);
  --radius: 18px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --glow: 0 0 24px rgba(0, 194, 255, 0.22);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 动态科技背景 ===== */
.bg-universe {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(26, 86, 219, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(124, 58, 237, 0.16) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(0, 194, 255, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #02040a 0%, #0b1220 50%, #02040a 100%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(0, 194, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 194, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 80%);
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
  100% { transform: perspective(500px) rotateX(60deg) translateY(60px); }
}

/* ===== 原子动画 ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 194, 255, 0.2); }
  50% { box-shadow: 0 0 28px rgba(0, 194, 255, 0.45); }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* ===== 玻璃卡片 ===== */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
}

/* ===== 登录遮罩 ===== */
#loginOverlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 10, 0.92);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.6s ease;
}

.login-card {
  width: 420px;
  max-width: 92vw;
  padding: 42px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(0, 194, 255, 0.12), transparent 30%);
  animation: rotate 6s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

.login-logo {
  font-size: 42px;
  margin-bottom: 8px;
}

.login-title {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(90deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.login-sub {
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 28px;
}

.form-group {
  text-align: left;
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.6);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.15);
}

.login-tips {
  font-size: 12px;
  color: var(--text2);
  margin-top: 16px;
  line-height: 1.8;
}

.login-tips code {
  background: rgba(0, 194, 255, 0.12);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: Consolas, monospace;
}

/* ===== 顶部导航 ===== */
#topBar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  transition: var(--transition);
}

#topBar.scrolled {
  background: rgba(3, 7, 18, 0.88);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: var(--glow);
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-btn {
  padding: 8px 16px;
  border-radius: 24px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(26, 86, 219, 0.25), rgba(0, 194, 255, 0.18));
  border-color: rgba(0, 194, 255, 0.35);
  box-shadow: 0 0 16px rgba(0, 194, 255, 0.15);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 13px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

/* ===== 浮动控制条 ===== */
#floatControls {
  position: fixed;
  right: 22px;
  top: 88px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.fab:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.fab-label {
  position: absolute;
  right: 54px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.fab-wrap { position: relative; }
.fab-wrap:hover .fab-label { opacity: 1; transform: translateX(-4px); }

/* ===== 主内容区 ===== */
#mainApp {
  display: none;
  padding-top: 88px;
  padding-bottom: 80px;
  min-height: 100vh;
  animation: fadeIn 0.6s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  display: none;
  animation: fadeInUp 0.5s ease both;
}

.page.active { display: block; }

/* ===== 通用排版 ===== */
.section-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title .line {
  width: 5px;
  height: 26px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--purple));
}

.section-desc {
  color: var(--text2);
  margin-bottom: 26px;
  font-size: 15px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 18px rgba(26, 86, 219, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 194, 255, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid transparent;
}

.btn-ghost:hover { color: var(--text); }

/* ===== 首页英雄区 ===== */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 24px;
  background: rgba(0, 194, 255, 0.1);
  border: 1px solid rgba(0, 194, 255, 0.25);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: 52px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 18px;
  background: linear-gradient(90deg, #fff 0%, #a5f3fc 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 18px;
  color: var(--text2);
  max-width: 680px;
  margin: 0 auto 32px;
}

.typing-wrap {
  display: inline-block;
  min-height: 28px;
}

.typing-text {
  display: inline;
  border-right: 2px solid var(--accent);
  white-space: nowrap;
  overflow: hidden;
  animation: typing 3s steps(24, end) forwards, blink 0.8s step-end infinite;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

/* ===== 2026-08-20 新增：手机实测模式 ===== */
.btn-mobile-test {
  border: 1px dashed var(--accent);
  color: var(--accent);
}
.btn-mobile-test:hover {
  background: rgba(0, 194, 255, 0.12);
  transform: translateY(-2px);
}
.mobile-test-panel {
  margin-bottom: 30px;
  border: 1px solid rgba(0, 194, 255, 0.35);
  box-shadow: 0 12px 40px rgba(0, 194, 255, 0.08);
}
.mobile-test-panel .panel-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 18px;
  line-height: 1.7;
}
.mobile-test-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.mobile-test-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  transition: var(--transition);
  font-family: inherit;
}
.mobile-test-card:hover {
  border-color: var(--accent);
  background: rgba(0, 194, 255, 0.08);
  transform: translateY(-3px);
}
.mobile-test-card .mt-ico { font-size: 20px; }
.mobile-test-card b { font-size: 14px; }
.mobile-test-card small {
  font-size: 11px;
  color: var(--text2);
  line-height: 1.5;
}

/* ===== KPI 统计 ===== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.kpi-card {
  padding: 22px 16px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.7;
}

.kpi-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--glow);
}

.kpi-card .num {
  font-size: 34px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.kpi-card .label {
  font-size: 13px;
  color: var(--text2);
  margin-top: 4px;
}

/* ===== 功能卡片网格 ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.feature-card {
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 194, 255, 0.4);
  box-shadow: 0 12px 40px rgba(0, 194, 255, 0.12);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(26, 86, 219, 0.3), rgba(0, 194, 255, 0.15));
  border: 1px solid rgba(0, 194, 255, 0.25);
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

.feature-card .arrow {
  position: absolute;
  right: 20px;
  top: 24px;
  opacity: 0;
  transition: var(--transition);
  color: var(--accent);
}

.feature-card:hover .arrow { opacity: 1; transform: translateX(4px); }

/* ===== 素材库页面 ===== */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-chip {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover { color: var(--text); border-color: var(--accent); }
.filter-chip.active {
  background: linear-gradient(135deg, rgba(26, 86, 219, 0.3), rgba(0, 194, 255, 0.2));
  border-color: var(--accent);
  color: var(--text);
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.search-box input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.5);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.search-box input:focus { border-color: var(--accent); }

.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.material-card {
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.material-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--glow);
}

/* 筛选后入场动画（V1.2：类控制，避免内联 style） */
.material-card.anim-in {
  animation: fadeInUp 0.4s ease both;
}

.material-cover {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 40px;
  position: relative;
}

.material-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
}

.cover-blue { background: linear-gradient(135deg, #1a56db, #00c2ff); }
.cover-pink { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.cover-cyan { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.cover-green { background: linear-gradient(135deg, #10b981, #06b6d4); }
.cover-orange { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.cover-purple { background: linear-gradient(135deg, #7c3aed, #db2777); }

.material-info { padding: 16px; }
.material-info h4 { font-size: 15px; margin-bottom: 6px; }
.material-meta {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.badge-ok { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warn { background: rgba(245, 158, 11, 0.15); color: var(--warn); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-ai { background: rgba(124, 58, 237, 0.15); color: #c4b5fd; border: 1px solid rgba(124, 58, 237, 0.3); }
.badge-safe { background: rgba(0, 194, 255, 0.12); color: var(--accent); border: 1px solid rgba(0, 194, 255, 0.28); }

/* ===== 表格 ===== */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  margin: 16px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.data-table th {
  background: linear-gradient(90deg, rgba(26, 86, 219, 0.35), rgba(0, 194, 255, 0.18));
  color: var(--text);
  padding: 13px 16px;
  text-align: left;
  font-weight: 700;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.4);
  color: var(--text2);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.04); color: var(--text); }

/* ===== 直播页面 ===== */
.live-hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  margin-bottom: 24px;
}

.live-player {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 16px;
  background:
    linear-gradient(135deg, rgba(26, 86, 219, 0.15), rgba(124, 58, 237, 0.1)),
    var(--bg-card);
}

.live-player .icon { font-size: 56px; opacity: 0.9; }
.live-player h3 { font-size: 22px; }
.live-player p { color: var(--text2); font-size: 14px; }

.live-list { padding: 20px; }
.live-list h4 { margin-bottom: 14px; font-size: 16px; }

.live-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 10px;
  transition: var(--transition);
}

.live-item:hover { background: rgba(255, 255, 255, 0.09); }

.live-time {
  width: 60px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.live-info { flex: 1; }
.live-info .title { font-size: 14px; font-weight: 700; }
.live-info .host { font-size: 12px; color: var(--text2); }

/* ===== 刊物页面 ===== */
.magazine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.magazine-card {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.magazine-card:hover { transform: translateY(-6px); }

.mag-cover {
  height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
  position: relative;
}

.mag-cover::before {
  content: "《中国青少年创梦家》";
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: 12px;
  opacity: 0.8;
  letter-spacing: 1px;
}

.mag-cover h3 { font-size: 24px; font-weight: 900; }
.mag-cover .issue { font-size: 13px; opacity: 0.85; }

.mag-body { padding: 20px; }
.mag-body p { font-size: 13px; color: var(--text2); line-height: 1.7; margin-bottom: 14px; }

/* ===== 技术底座页面 ===== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.tech-card {
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: var(--transition);
}

.tech-card:hover { border-color: rgba(0, 194, 255, 0.4); }

.tech-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.tech-info h4 { font-size: 16px; margin-bottom: 6px; }
.tech-info p { font-size: 13px; color: var(--text2); line-height: 1.7; }

/* ===== Toast ===== */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 2000;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 页脚 ===== */
footer {
  text-align: center;
  padding: 30px 24px;
  color: var(--text2);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero h1 { font-size: 36px; }
  .live-hero { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: grid; }
  #floatControls { right: 14px; top: 82px; }
}

@media (min-width: 901px) {
  .mobile-menu-btn { display: none; }
}

/* 移动端菜单 */
#mobileMenu {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(3, 7, 18, 0.96);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: none;
  flex-direction: column;
  gap: 6px;
}

#mobileMenu.open { display: flex; }

.mobile-nav-btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text2);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}

.mobile-nav-btn.active {
  background: rgba(0, 194, 255, 0.12);
  color: var(--accent);
}

/* ===== 工具类 ===== */
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warn { color: var(--warn); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-2 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }

/* ===== V1.2 新增：登录/注册 ===== */
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text2);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab.active {
  background: linear-gradient(135deg, rgba(26, 86, 219, 0.5), rgba(0, 194, 255, 0.35));
  color: var(--text);
  box-shadow: 0 0 14px rgba(0, 194, 255, 0.2);
}

.auth-form-hidden { display: none; }

.role-select {
  display: flex;
  gap: 10px;
}

.role-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.5);
  color: var(--text2);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.role-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(0, 194, 255, 0.1);
  color: var(--text);
}

.role-option input { accent-color: var(--accent); }

/* ===== V1.2 新增：顶栏用户区 ===== */
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#userChip { display: none; }
#userChip.visible { display: flex; }

.user-meta { min-width: 0; }

.user-name {
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.user-role {
  font-size: 11px;
  color: var(--text2);
}

/* ===== V1.2 新增：通用面板/排版 ===== */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  animation: pulseGlow 1.5s infinite;
  flex-shrink: 0;
}

.btn-block {
  width: 100%;
  margin-top: 6px;
}

.section-panel { padding: 26px; margin-top: 10px; }
.section-panel-mb { padding: 22px; margin-bottom: 20px; }
.panel-title { margin-bottom: 12px; font-size: 18px; }
.panel-title-sm { font-size: 16px; margin-bottom: 14px; }

.protect-list {
  color: var(--text2);
  font-size: 14px;
  line-height: 2;
  padding-left: 20px;
}

.material-desc {
  font-size: 12px;
  color: var(--text2);
}

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

.notice-bar {
  padding: 18px 22px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.notice-icon { font-size: 28px; }
.notice-body { flex: 1; min-width: 220px; }
.notice-title { font-weight: 700; }
.notice-text { font-size: 13px; color: var(--text2); }

/* AI 技术底座状态徽章 */
.tech-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  line-height: 1.5;
}
.tech-badge.badge-ok { background: rgba(16,185,129,.15); color: #10b981; }
.tech-badge.badge-warn { background: rgba(245,158,11,.15); color: #f59e0b; }
.tech-badge.badge-off { background: rgba(239,68,68,.15); color: #ef4444; }
.tech-card .btn-sm { margin-top: 12px; }
.tech-quota-bar .btn { margin-left: auto; }

/* 刊物阅读器 */
.issue-reader {
  max-height: 62vh;
  overflow-y: auto;
  padding: 4px 2px;
}
.issue-head { margin-bottom: 14px; }
.issue-head h4 { font-size: 17px; margin: 0 0 4px; }
.issue-head .issue-meta { font-size: 12px; color: var(--text2); }
.issue-section { margin: 16px 0 10px; }
.issue-section h5 { font-size: 15px; margin: 0 0 8px; color: var(--accent); }
.issue-section p { font-size: 13px; line-height: 1.9; color: var(--text2); margin: 0; }
.issue-section ul { margin: 0; padding-left: 18px; }
.issue-section li { font-size: 13px; line-height: 1.9; color: var(--text2); }
.issue-section-list { margin: 0; padding-left: 18px; }
.issue-section-list li { font-size: 13px; line-height: 1.9; color: var(--text2); }
.issue-footer { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.15); }
.issue-reader .empty-tip { padding: 30px 0; text-align: center; }
.ai-error-tip { margin-top: 10px; padding: 12px; border: 1px dashed rgba(255,209,102,.4); border-radius: 12px; background: rgba(255,209,102,.06); color: #ffd166; font-size: 13px; line-height: 1.8; }
.ai-upgrade-link { color: #ffd166; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* 通用模态框表单 */
.modal-form { display: flex; flex-direction: column; gap: 10px; }
.modal-form label { font-size: 13px; font-weight: 600; color: var(--text2); }
.modal-form .dev-input,
.modal-form .dev-textarea { width: 100%; box-sizing: border-box; }

.mag-cover-teal { background: linear-gradient(135deg, #059669, #0ea5e9); }
.mag-cover-purple { background: linear-gradient(135deg, #7c3aed, #db2777); }

.mag-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kpi-row-mt { margin-top: 30px; }

.footer-sub { margin-top: 6px; }

.card-hidden { display: none !important; }

/* ===== V1.2 新增：收藏按钮 ===== */
.fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.fav-btn:hover {
  border-color: var(--warn);
  color: var(--warn);
}

.fav-btn.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--warn);
}

.fav-btn-mini {
  margin-top: 0;
  padding: 4px 10px;
  flex-shrink: 0;
}

/* ===== V1.2 新增：个人中心 ===== */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: grid;
  place-items: center;
  font-size: 34px;
  box-shadow: var(--glow);
  flex-shrink: 0;
}

.profile-info { flex: 1; min-width: 180px; }
.profile-name { font-size: 22px; font-weight: 800; }
.profile-phone { font-size: 13px; color: var(--text2); margin-top: 2px; }
.profile-role {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 12px;
  border-radius: 20px;
  background: rgba(0, 194, 255, 0.12);
  border: 1px solid rgba(0, 194, 255, 0.3);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.profile-stats {
  display: flex;
  gap: 14px;
}

.stat-box {
  min-width: 92px;
  padding: 14px 18px;
  text-align: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.stat-num {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label { font-size: 12px; color: var(--text2); margin-top: 2px; }

.profile-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.profile-tab {
  padding: 9px 22px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text2);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.profile-tab.active {
  background: linear-gradient(135deg, rgba(26, 86, 219, 0.3), rgba(0, 194, 255, 0.2));
  border-color: var(--accent);
  color: var(--text);
}

.profile-list { display: flex; flex-direction: column; gap: 14px; }
.profile-list-hidden { display: none; }

.empty-tip {
  padding: 36px 20px;
  text-align: center;
  color: var(--text2);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.report-item { padding: 20px 22px; }
.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.report-title { font-size: 16px; font-weight: 800; }
.report-score {
  flex-shrink: 0;
  padding: 3px 12px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}
.report-content { font-size: 14px; color: var(--text2); line-height: 1.7; }
.report-date { margin-top: 10px; font-size: 12px; color: var(--text2); opacity: 0.7; }

.favorite-item { padding: 18px 22px; }
.fav-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.fav-type {
  padding: 2px 10px;
  border-radius: 16px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.fav-title { font-size: 15px; font-weight: 700; }
.fav-note { margin-top: 6px; font-size: 12px; color: var(--text2); }
.fav-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.fav-date { font-size: 12px; color: var(--text2); opacity: 0.7; }
.fav-del {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.fav-del:hover { background: rgba(239, 68, 68, 0.22); }

/* ===== V1.2 新增：Toast 颜色 ===== */
#toast.t-success { border-color: rgba(16, 185, 129, 0.5); }
#toast.t-error { border-color: rgba(239, 68, 68, 0.5); }

/* ===== V1.2 新增：手机端细化（<=480px） ===== */
@media (max-width: 480px) {
  .login-card { padding: 30px 20px; }
  .login-title { font-size: 21px; }
  .login-logo { font-size: 34px; }
  .login-sub { font-size: 12px; margin-bottom: 20px; }

  #topBar { padding: 0 14px; height: 60px; }
  #mainApp { padding-top: 76px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand-icon { width: 34px; height: 34px; font-size: 17px; }
  #mobileMenu { top: 60px; padding: 10px 14px; }

  .container { padding: 0 14px; }

  .hero { padding: 36px 0 28px; }
  .hero h1 { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero p { font-size: 14px; margin-bottom: 24px; }
  .hero-badge { font-size: 11px; padding: 5px 12px; }
  .hero-actions { gap: 10px; margin-bottom: 34px; }
  .hero-actions .btn { padding: 10px 16px; font-size: 13px; }

  .section-title { font-size: 22px; }
  .section-desc { font-size: 13px; margin-bottom: 20px; }

  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 26px; }
  .kpi-card { padding: 16px 10px; }
  .kpi-card .num { font-size: 26px; }

  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .feature-card { padding: 20px; }

  .mobile-test-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .mobile-test-card { padding: 12px 14px; }

  .filter-bar { gap: 8px; }
  .filter-chip { padding: 6px 12px; font-size: 12px; }
  .search-box { flex-direction: column; gap: 8px; }
  .search-box input { width: 100%; }

  .material-grid { grid-template-columns: 1fr; gap: 14px; }
  .material-cover { height: 120px; font-size: 32px; }

  .section-panel { padding: 18px; }
  .section-panel-mb { padding: 18px; }
  .protect-list { font-size: 13px; line-height: 1.9; padding-left: 16px; }

  .live-hero { grid-template-columns: 1fr; }
  .live-player { min-height: 200px; }
  .live-player h3 { font-size: 18px; }

  .magazine-grid { grid-template-columns: 1fr; gap: 14px; }
  .mag-cover { height: 150px; }
  .notice-bar { padding: 14px 16px; }

  .tech-grid { grid-template-columns: 1fr; gap: 12px; }
  .tech-card { padding: 16px; }

  .profile-header { padding: 20px 18px; gap: 14px; }
  .profile-avatar { width: 56px; height: 56px; font-size: 26px; }
  .profile-name { font-size: 18px; }
  .profile-stats { width: 100%; gap: 10px; }
  .stat-box { flex: 1; min-width: 0; padding: 12px 8px; }
  .stat-num { font-size: 22px; }
  .profile-tab { padding: 8px 16px; font-size: 13px; }

  .report-item { padding: 16px; }
  .favorite-item { padding: 14px 16px; }
  .fav-main { gap: 8px; }

  #floatControls { right: 12px; top: 74px; gap: 8px; }
  .fab { width: 40px; height: 40px; font-size: 16px; }

  footer { padding: 22px 14px; font-size: 11px; }
}

/* 平板（481-900px）细化 */
@media (min-width: 481px) and (max-width: 900px) {
  .login-card { width: 420px; }
  .hero h1 { font-size: 36px; }
  .material-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== V1.2 新增：会员订阅卡片 ===== */
.sub-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.sub-badge-free {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text2);
  border: 1px solid var(--border);
}

.sub-active .sub-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.sub-detail { flex: 1; min-width: 180px; }
.sub-name { font-size: 16px; font-weight: 700; }
.sub-desc { font-size: 13px; color: var(--text2); margin-top: 4px; line-height: 1.6; }
.sub-expire { font-size: 13px; color: var(--success); margin-top: 4px; }
.sub-tag {
  padding: 4px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--warn), #f97316);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.sub-inactive {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(0, 194, 255, 0.04));
}

/* ===== V1.2 新增：支付弹窗 ===== */
.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 10, 0.88);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

.pay-modal.show { display: flex; }

.pay-modal-card {
  width: 380px;
  max-width: 92vw;
  padding: 28px 24px;
  text-align: center;
}

.pay-modal-head {
  margin-bottom: 18px;
}

.pay-modal-title {
  font-size: 18px;
  font-weight: 800;
}

.pay-modal-body { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.pay-amount {
  font-size: 42px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pay-plan {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 6px;
}

.pay-qr {
  width: 220px;
  height: 220px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px;
}

.pay-tip {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

.pay-order {
  font-size: 12px;
  color: var(--text2);
  word-break: break-all;
  max-width: 320px;
}

.pay-loading {
  padding: 40px 0;
  font-size: 15px;
  color: var(--text2);
}

.pay-error {
  padding: 30px 0;
  font-size: 14px;
  color: var(--danger);
}

.pay-code-url {
  font-size: 11px;
  color: var(--text2);
  word-break: break-all;
  max-width: 300px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

/* 支付弹窗响应式 */
@media (max-width: 480px) {
  .pay-modal-card { width: 92vw; padding: 22px 16px; }
  .pay-qr { width: 180px; height: 180px; }
  .pay-amount { font-size: 34px; }
  .sub-card { padding: 18px; gap: 12px; }
  .sub-name { font-size: 15px; }
  .sub-desc { font-size: 12px; }
}

/* ===== P1 整改：backdrop-filter 降级保护（不支持的浏览器用实色底） ===== */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass,
  .glass-panel {
    background: rgba(15, 23, 42, 0.96);
  }
  #loginOverlay {
    background: rgba(2, 4, 10, 0.98);
  }
  .pay-modal {
    background: rgba(2, 4, 10, 0.98);
  }
}

/* ===== P1 整改：打印样式 ===== */
@media print {
  body {
    background: #ffffff !important;
    color: #111827 !important;
  }
  .bg-universe, .bg-grid, #topBar, #mobileMenu, #loginOverlay,
  .pay-modal, .mobile-nav, .floating-actions, .filter-chips,
  .nav-side, .side-nav {
    display: none !important;
  }
  .glass, .glass-panel {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
    color: #111827 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .page { display: none !important; }
  .page.active { display: block !important; }
  .material-card, .live-item, .magazine-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  a[href^="/dreammaker/"]::after {
    content: " (" attr(href) ")";
    font-size: 10px;
    color: #6b7280;
  }
}

/* ===== V2.0 全面上线：AI 功能样式 ===== */
.hidden { display: none !important; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* AI 通用卡片 */
.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-top: 8px; }
.ai-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(91, 140, 255, 0.10), rgba(255, 255, 255, 0.03));
}
.ai-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ai-card-icon { font-size: 30px; }
.ai-card-title { font-size: 18px; font-weight: 700; color: #fff; }
.ai-card-desc { font-size: 14px; color: rgba(255, 255, 255, 0.72); margin-bottom: 16px; }
.ai-input-row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ai-input {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 15px;
  outline: none;
}
.ai-input:focus { border-color: #5b8cff; box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.25); }
.ai-textarea { min-height: 110px; resize: vertical; font-family: inherit; line-height: 1.6; }
.ai-answer {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(91, 140, 255, 0.35);
  background: rgba(15, 23, 42, 0.85);
  font-size: 15px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.94);
  white-space: normal;
  word-break: break-word;
}
.ai-thinking { color: #9db9ff; font-size: 14px; }
.ai-error { color: #ff7a85; font-size: 14px; }
.ai-answer.ok { border-color: rgba(16,185,129,.4); }
.ai-answer.err { border-color: rgba(239,68,68,.4); color: #ffb4b4; }
.btn-success { background: linear-gradient(135deg,#10b981,#059669); color:#fff; border:none; padding:9px 22px; border-radius:10px; font-size:14px; font-weight:600; cursor:pointer; }
.btn-success:hover { filter: brightness(1.08); }
.ai-q { color: #9db9ff; font-weight: 600; margin-bottom: 8px; }
.ai-a { color: #e8edff; }
.ai-report-must { color: #ffd166; font-size: 14px; line-height: 1.8; margin-bottom: 12px; }
.ai-report-doc { color: #e8edff; font-size: 14px; line-height: 1.9; }
.ai-report-section { margin-top: 22px; padding: 22px; border-radius: 16px; border: 1px solid rgba(255, 209, 102, 0.25); }

/* 机器人素材课列表 */
.robot-video-list { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }
.robot-video-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(15, 23, 42, 0.6);
}
.robot-video-emoji { font-size: 26px; flex-shrink: 0; }
.robot-video-info { flex: 1; min-width: 0; }
.robot-video-title { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.robot-video-tags { font-size: 12px; color: rgba(255, 255, 255, 0.55); margin-top: 2px; }

/* 数据仪表盘 */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; margin-bottom: 18px; }
.dash-section { margin-bottom: 18px; }
.dash-section h4 { font-size: 15px; color: #fff; margin-bottom: 10px; }
.dash-week { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding: 10px; border-radius: 12px; background: rgba(15, 23, 42, 0.5); }
.dash-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.dash-day-bar {
  width: 22px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #5b8cff, #7c5cff);
  min-height: 4px;
  transition: height 0.4s;
}
.dash-day-label { font-size: 10px; color: rgba(255, 255, 255, 0.55); }
.dash-day-val { font-size: 11px; font-weight: 700; color: #9db9ff; }
.dash-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dash-label { width: 90px; font-size: 13px; color: rgba(255, 255, 255, 0.75); flex-shrink: 0; }
.dash-bar { flex: 1; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.dash-bar-fill { height: 100%; border-radius: 7px; background: linear-gradient(90deg, #5b8cff, #7c5cff); }
.dash-val { width: 30px; text-align: right; font-size: 13px; font-weight: 700; color: #9db9ff; }

/* 成就系统 */
.ach-progress { font-size: 14px; color: rgba(255, 255, 255, 0.75); margin-bottom: 14px; }
.ach-progress b { color: #ffd166; font-size: 18px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.ach-item {
  padding: 16px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(15, 23, 42, 0.6);
  text-align: center;
  opacity: 0.55;
  filter: grayscale(0.7);
}
.ach-unlocked { opacity: 1; filter: none; border-color: rgba(255, 209, 102, 0.4); background: linear-gradient(160deg, rgba(255, 209, 102, 0.12), rgba(15, 23, 42, 0.6)); }
.ach-icon { font-size: 30px; margin-bottom: 8px; }
.ach-name { font-size: 13px; font-weight: 700; color: #fff; }
.ach-desc { font-size: 11px; color: rgba(255, 255, 255, 0.55); margin-top: 4px; }

/* 移动端适配 */
@media (max-width: 600px) {
  .ai-grid { grid-template-columns: 1fr; }
  .dash-cards { grid-template-columns: repeat(2, 1fr); }
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-label { width: 70px; }
}

/* ===== V2.0 整改新增：视频播放弹窗 ===== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 10, 0.92);
  backdrop-filter: blur(14px);
  padding: 20px;
}
.video-modal.show { display: flex; }
.video-modal-card {
  width: 100%;
  max-width: 960px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.video-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.video-modal-title { font-size: 16px; font-weight: 800; }
.video-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
#videoPlayer {
  width: 100%;
  max-height: calc(100vh - 160px);
  border-radius: 12px;
  background: #000;
}
.media-modal-img {
  display: none;
  width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 12px;
  background: #000;
}
.media-modal-img.show { display: block; }
.media-video.hidden { display: none; }
@media (max-width: 600px) {
  .video-modal { padding: 10px; }
  .video-modal-card { padding: 12px; }
  #videoPlayer { max-height: 60vh; }
}

/* ===== V2.0 整改新增：开发者后台 ===== */
.dev-trigger {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  cursor: default;
}
.dev-trigger:hover { background: rgba(0, 194, 255, 0.25); }
.dev-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 10, 0.94);
  backdrop-filter: blur(14px);
  padding: 20px;
}
.dev-modal.show { display: flex; }
.dev-modal-card {
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dev-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dev-modal-title { font-size: 17px; font-weight: 800; }
.dev-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}
.dev-login { display: flex; flex-direction: column; gap: 12px; }
.dev-login p { color: var(--text2); font-size: 14px; margin: 0; }
.dev-hint { font-size: 11px; color: var(--text2); opacity: 0.7; }
.dev-input, .dev-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.6);
  color: var(--text);
  font-size: 14px;
}
.dev-textarea { resize: vertical; }
.dev-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.dev-fields { display: flex; flex-direction: column; gap: 8px; }
.dev-fields label { font-size: 12px; color: var(--text2); }
.dev-preview-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.dev-list { display: flex; flex-direction: column; gap: 10px; }
.dev-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.dev-item-name { flex: 1; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-item-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(16, 185, 129, 0.15); color: var(--success); }
.dev-item-status.pending { background: rgba(245, 158, 11, 0.15); color: var(--warn); }
.dev-item-status.rejected { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.dev-item-btns { display: flex; gap: 6px; }
.dev-item-btns button { padding: 4px 10px; font-size: 11px; }

/* 素材卡片可点击提示 */
.material-card, .robot-video-item { cursor: pointer; }
.material-card:hover, .robot-video-item:hover { border-color: rgba(0, 194, 255, 0.4); }
.material-card .fav-btn { cursor: default; }
.material-card .fav-btn:hover { transform: none; }

/* ===== D2 瀹堕暱閫氱煡涓績锛?026-08-21 D1/D2 瀵规帴鏁存敼鏂板锛?==== */
.top-icon-btn { position: relative; }
.notif-badge { position: absolute; top: -2px; right: -4px; min-width: 17px; height: 17px; line-height: 17px; padding: 0 4px; border-radius: 999px; background: #ff5a5a; color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.notif-list { max-height: 46vh; overflow-y: auto; }
.notif-item { padding: 12px 4px; border-bottom: 1px solid rgba(120,140,255,.12); }
.notif-item.unread { background: rgba(91,140,255,.08); border-radius: 8px; }
.notif-item.unread .notif-title::before { content: "鈼?"; color: #ff5a5a; }
.notif-title { font-size: 14px; font-weight: 600; color: #e8ecf7; }
.notif-body { font-size: 13px; color: #9aa7c7; margin-top: 4px; line-height: 1.5; }
.notif-time { font-size: 11px; color: #6b7899; margin-top: 5px; }
.notif-actions { text-align: right; margin-top: 12px; }
.guardian-status { min-height: 20px; font-size: 14px; }
.guardian-ok { color: #34c77b; font-weight: 600; margin-bottom: 12px; }
.guardian-tip { font-size: 12px; color: #9aa7c7; line-height: 1.6; margin-bottom: 12px; }
.guardian-form { display: flex; flex-direction: column; gap: 10px; }
.guardian-code-row { display: flex; gap: 8px; }
.guardian-code-row .dev-input { flex: 1; }
.guardian-actions { text-align: right; margin-top: 4px; }
#guardianUnbindBtn { margin-top: 10px; }

/* ===== 一键返回产品矩阵总按键（2026-08-23 高可见版）===== */
.dm-back-link,
.dm-matrix-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .5px;
  transition: all .2s;
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.dm-back-link:hover,
.dm-matrix-home:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.55);
  filter: brightness(1.08);
}

/* 顶部主导航里的总按键 */
.nav-links .dm-matrix-home {
  margin-top: 0;
  margin-left: 4px;
  padding: 7px 16px;
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
}

/* 移动端抽屉菜单里的总按键 */
.mobile-nav-btn.dm-matrix-home {
  margin-top: 6px;
  text-align: left;
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
}


/* 2026-08-27 LOOP2 R-3B: source badge + ai review */
.badge-src { background: #e8f4fd; color: #0a66c2; border: 1px solid #bcd9f2; }
.material-review { margin-top: 6px; font-size: 12px; line-height: 1.65; color: #4a5568; background: #f7fafc; border-left: 3px solid #38bdf8; padding: 6px 9px; border-radius: 0 6px 6px 0; }
.material-review b { color: #0284c7; }

/* 2026-08-27 LOOP2 R-4: CSP-safe classes (inline style removed per style-src 'self') */
.dm-fc { justify-content: center; }
.docs-entry { max-width: 1200px; margin: 20px auto 4px; padding: 0 24px; }
.docs-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; background: linear-gradient(135deg, #f0f6ff, #fff8e6); border: 1px solid #d8e4ff; border-radius: 16px; padding: 14px 20px; font-size: 14px; }
.docs-label { font-weight: 700; color: #23449c; margin-right: 4px; }
.docs-link { color: #1a4fd8; text-decoration: none; }

.dm-quiz-link{background:linear-gradient(135deg,#7c5cff,#4dd6ff);color:#fff;font-weight:700;}
