/* ==================== 全局重置与基础样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --fire-red: #e63946;
  --fire-orange: #f4a261;
  --fire-gold: #ffd700;
  --fire-dark: #1a1a2e;
  --fire-darker: #0d0d1a;
  --fire-card: #16213e;
  --fire-accent: #e94560;
  --fire-blue: #0f3460;
  --text-light: #e0e0e0;
  --text-dim: #a0a0b0;
  --green-ok: #16a34a;
  --red-no: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--fire-darker);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input { font-family: inherit; outline: none; }

/* ==================== 火焰粒子背景 ==================== */
#fireParticles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: rise linear infinite;
  opacity: 0;
}
.particle.orange { background: radial-gradient(circle, var(--fire-orange), transparent); box-shadow: 0 0 8px var(--fire-orange); }
.particle.red { background: radial-gradient(circle, var(--fire-red), transparent); box-shadow: 0 0 10px var(--fire-red); }
.particle.gold { background: radial-gradient(circle, var(--fire-gold), transparent); box-shadow: 0 0 12px var(--fire-gold); }

@keyframes rise {
  0% { transform: translateY(0) translateX(0) scale(0); opacity: 0; }
  20% { opacity: 0.6; }
  80% { opacity: 0.3; }
  100% { transform: translateY(-100vh) translateX(var(--drift)) scale(1.5); opacity: 0; }
}

/* 页面层级 */
main { position: relative; z-index: 1; }

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--fire-red), var(--fire-orange));
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--fire-accent), var(--fire-gold)); }

/* ==================== 顶部导航栏 ==================== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: linear-gradient(135deg, rgba(26,26,46,0.95), rgba(22,33,62,0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,215,0,0.15);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-light);
}

.brand-icon { font-size: 1.2rem; animation: pulse 2s ease-in-out infinite; }
.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--fire-gold);
  box-shadow: 0 0 8px rgba(255,215,0,0.3);
  animation: badgeRotate 20s linear infinite;
}
.brand-text { font-weight: 600; color: var(--fire-gold); }
.brand-dept { color: var(--text-dim); font-size: 0.65rem; }
.brand-admin {
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,215,0,0.15);
  color: var(--fire-gold);
  font-size: 0.55rem;
  font-weight: 700;
  animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.topbar-nav { display: flex; align-items: center; gap: 8px; font-size: 0.7rem; }
.breadcrumb-link { color: var(--text-dim); cursor: pointer; transition: var(--transition); }
.breadcrumb-link:hover { color: var(--fire-gold); }

.topbar-user { display: flex; align-items: center; gap: 10px; }
.user-name { font-size: 0.7rem; color: var(--fire-gold); }

.btn-logout {
  background: rgba(230,57,70,0.2);
  color: #ff6b7a;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  transition: var(--transition);
}
.btn-logout:hover { background: rgba(230,57,70,0.4); }

/* 注册/登录切换 */
.login-switch {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 8px;
}
.login-switch a {
  color: var(--fire-gold);
  font-weight: 600;
  text-decoration: underline;
  transition: var(--transition);
}
.login-switch a:hover { color: var(--fire-orange); }

/* 在线状态 */
.online-status {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(22,163,74,0.1);
  font-size: 0.6rem;
  color: #4ade80;
}
.online-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  animation: pulse 2s ease-in-out infinite;
}
.online-status.offline {
  background: rgba(220,38,38,0.1);
  color: #f87171;
}
.online-status.offline .online-dot {
  background: #f87171;
  box-shadow: 0 0 6px #f87171;
}

/* ==================== 页面通用 ==================== */
.page { min-height: 100vh; animation: fadeIn 0.5s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.content-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.content-header { text-align: center; margin-bottom: 28px; }
.content-header h2 { font-size: 1.5rem; color: var(--fire-gold); margin-bottom: 6px; }
.content-header p { font-size: 0.75rem; color: var(--text-dim); }

/* ==================== 登录页 ==================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0d0d1a 70%);
}

.login-bg-decor { position: absolute; inset: 0; pointer-events: none; }
.decor-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
}
.decor-1 {
  width: 400px; height: 400px;
  background: var(--fire-red);
  top: -100px; left: -100px;
  animation: float 8s ease-in-out infinite;
}
.decor-2 {
  width: 350px; height: 350px;
  background: var(--fire-orange);
  bottom: -80px; right: -80px;
  animation: float 10s ease-in-out infinite reverse;
}
@keyframes float {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(30px,-30px); }
}

.decor-shield {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 12rem;
  opacity: 0.04;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 380px;
  background: rgba(22,33,62,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 100px rgba(230,57,70,0.05);
}

.login-header { text-align: center; margin-bottom: 28px; }
.login-logo-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-aura {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg,
    var(--fire-gold) 60deg,
    transparent 120deg,
    var(--fire-orange) 180deg,
    transparent 240deg,
    var(--fire-red) 300deg,
    transparent 360deg);
  filter: blur(8px);
  opacity: 0.6;
  animation: auraRotate 4s linear infinite;
}
.login-logo {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--fire-gold);
  box-shadow: 0 0 25px rgba(255,215,0,0.35), 0 0 50px rgba(230,57,70,0.2);
  z-index: 1;
}
@keyframes auraRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.login-header h1 { font-size: 1.3rem; color: var(--fire-gold); margin-bottom: 6px; }
.login-header p { font-size: 0.7rem; color: var(--text-dim); }

.login-form { display: flex; flex-direction: column; gap: 16px; }

.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 0.7rem; color: var(--text-dim); font-weight: 600; }
.input-group input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  color: var(--text-light);
  font-size: 0.85rem;
  transition: var(--transition);
}
.input-group input:focus {
  border-color: var(--fire-gold);
  background: rgba(0,0,0,0.5);
  box-shadow: 0 0 20px rgba(255,215,0,0.1);
}
.input-group input::placeholder { color: rgba(255,255,255,0.25); }

.login-options { display: flex; align-items: center; }
.checkbox-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.7rem; color: var(--text-dim);
  cursor: pointer;
}
.checkbox-label input { accent-color: var(--fire-gold); }

.btn-login {
  margin-top: 8px;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--fire-red), var(--fire-orange));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 2px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(230,57,70,0.4);
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(230,57,70,0.5);
}
.btn-login:active { transform: translateY(0); }

.login-error {
  text-align: center;
  font-size: 0.7rem;
  color: var(--red-no);
  min-height: 1rem;
}

/* ==================== 首页 ==================== */
.home-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 16px 20px;
  text-align: center;
  position: relative;
}

/* 首页背景大水印 */
.home-watermark {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 460px;
  height: 460px;
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}
.home-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-hero-text {
  position: relative;
  z-index: 1;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 居中的徽章logo，带光环 */
.home-logo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-logo-aura {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg,
    var(--fire-gold) 60deg,
    transparent 120deg,
    var(--fire-orange) 180deg,
    transparent 240deg,
    var(--fire-red) 300deg,
    transparent 360deg);
  filter: blur(10px);
  opacity: 0.55;
  animation: auraRotate 5s linear infinite;
}
.home-logo {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--fire-gold);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 25px rgba(255,215,0,0.25);
  z-index: 1;
}

/* 主标题 */
.home-main-title {
  font-size: 1.8rem;
  color: var(--text-light);
  line-height: 1.5;
  font-weight: 800;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.home-sub-title {
  font-size: 0.75rem;
  color: var(--fire-orange);
  font-weight: 600;
  letter-spacing: 1px;
}

.fire-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 20px;
  background: rgba(230,57,70,0.12);
  border: 1px solid rgba(230,57,70,0.25);
  color: var(--fire-orange);
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 16px;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(230,57,70,0.1); }
  50% { box-shadow: 0 0 25px rgba(230,57,70,0.25); }
}

.page-title {
  font-size: 1.5rem;
  color: var(--text-light);
  line-height: 1.5;
  font-weight: 800;
  margin-bottom: 10px;
}

.page-subtitle {
  font-size: 0.75rem;
  color: var(--fire-orange);
  font-weight: 600;
}

/* ==================== 首页数据看板 ==================== */
.dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
  animation: slideUp 0.6s ease;
}

.dash-card {
  padding: 18px 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(22,33,62,0.7), rgba(15,52,96,0.3));
  border: 1px solid rgba(255,215,0,0.08);
  text-align: center;
  transition: var(--transition);
}
.dash-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,215,0,0.2);
  box-shadow: var(--shadow);
}

.dash-icon { font-size: 1.6rem; margin-bottom: 6px; }
.dash-value {
  font-size: 1.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--fire-gold), var(--fire-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dash-label { font-size: 0.6rem; color: var(--text-dim); margin-top: 4px; }

/* ==================== 通知横幅 ==================== */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(230,57,70,0.08), rgba(244,162,97,0.04));
  border: 1px solid rgba(230,57,70,0.15);
  margin-bottom: 24px;
  text-align: left;
  animation: slideUp 0.6s ease 0.1s both;
}
.notice-icon { font-size: 1.2rem; flex-shrink: 0; }
.notice-text { font-size: 0.68rem; color: var(--text-light); flex: 1; }
.notice-text strong { color: var(--fire-orange); }

/* ==================== 功能卡片 ==================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}
.card-grid.two-col { grid-template-columns: repeat(2, 1fr); }

.feature-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(22,33,62,0.7), rgba(15,52,96,0.3));
  border: 1px solid rgba(255,215,0,0.08);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(230,57,70,0.05), rgba(255,215,0,0.02));
  opacity: 0;
  transition: opacity 0.35s ease;
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,215,0,0.35);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 40px rgba(230,57,70,0.08);
}

.feature-card .badge-new {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--fire-red);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 700;
  animation: pulse 2s ease-in-out infinite;
}

.card-icon { font-size: 2rem; flex-shrink: 0; transition: transform 0.3s ease; }
.feature-card:hover .card-icon { transform: scale(1.1); }
.btn-text h3 { font-size: 0.95rem; color: var(--fire-gold); margin-bottom: 4px; }
.btn-text p { font-size: 0.65rem; color: var(--text-dim); line-height: 1.4; }
.card-arrow {
  font-size: 0.7rem;
  color: var(--fire-orange);
  margin-top: 6px;
  display: block;
  transition: transform 0.3s ease;
}
.feature-card:hover .card-arrow { transform: translateX(4px); }

.home-footer {
  font-size: 0.65rem;
  color: var(--text-dim);
  line-height: 1.8;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ==================== 理论教学页 ==================== */
.course-list { display: flex; flex-direction: column; gap: 14px; }

.course-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: rgba(22,33,62,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.course-item:hover {
  border-color: rgba(255,215,0,0.25);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.course-item.completed {
  border-color: rgba(22,163,74,0.2);
  background: rgba(22,163,74,0.05);
}
.course-item.completed::after {
  content: "✓";
  position: absolute;
  right: 16px;
  color: #4ade80;
  font-weight: 700;
  font-size: 0.8rem;
}

.course-num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fire-red), var(--fire-orange));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}
.course-item.completed .course-num {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.course-info { flex: 1; }
.course-info h3 { font-size: 0.9rem; color: var(--text-light); margin-bottom: 4px; }
.course-info p { font-size: 0.65rem; color: var(--text-dim); }

.course-tag {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.6rem;
  font-weight: 600;
  background: rgba(22,163,74,0.15);
  color: #4ade80;
}

/* ==================== 课程表页 ==================== */
.schedule-hero {
  text-align: center;
  padding: 40px 16px 20px;
  background: linear-gradient(180deg, rgba(230,57,70,0.06), transparent);
}

.schedule-main-title {
  font-size: 1.4rem;
  color: var(--fire-gold);
  font-weight: 800;
  margin-bottom: 6px;
}
.schedule-sub-title { font-size: 0.85rem; color: var(--text-light); margin-bottom: 10px; }
.schedule-meta { font-size: 0.7rem; color: var(--text-dim); margin-bottom: 4px; }
.schedule-location { font-size: 0.75rem; color: var(--fire-orange); font-weight: 600; }

.schedule-view-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 12px;
}
.view-toggle-btn {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  transition: var(--transition);
}
.view-toggle-btn.active {
  background: linear-gradient(135deg, var(--fire-red), var(--fire-orange));
  color: #fff;
}
.view-toggle-btn:hover:not(.active) { background: rgba(255,255,255,0.12); }

.schedule-body { max-width: 1100px; margin: 0 auto; padding: 0 16px 60px; }

.schedule-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  font-size: 0.65rem;
  color: var(--text-dim);
}
.legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
}
.legend-dot.expanded { background: var(--fire-gold); }
.legend-dot.collapsed { background: #555; }
.legend-dot.ongoing { background: var(--fire-red); box-shadow: 0 0 8px var(--fire-red); animation: pulse 1.5s ease-in-out infinite; }

.day-cards-grid { display: flex; flex-direction: column; gap: 12px; }

.day-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(22,33,62,0.4);
  border: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
}
.day-card.ongoing {
  border-color: rgba(230,57,70,0.4);
  box-shadow: 0 0 20px rgba(230,57,70,0.12);
  background: rgba(22,33,62,0.6);
}

.day-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  transition: var(--transition);
}
.day-card-header:hover { background: rgba(255,255,255,0.03); }

.day-card-left { display: flex; align-items: center; gap: 12px; }
.day-num {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--fire-blue), var(--fire-card));
  color: var(--fire-gold);
  font-size: 0.8rem;
  font-weight: 800;
}
.day-card.ongoing .day-num {
  background: linear-gradient(135deg, var(--fire-red), var(--fire-orange));
  color: #fff;
  animation: pulse 2s ease-in-out infinite;
}

.day-date { font-size: 0.8rem; color: var(--text-light); font-weight: 600; }
.day-topic { font-size: 0.65rem; color: var(--text-dim); margin-top: 2px; }

.day-toggle { font-size: 0.7rem; color: var(--text-dim); transition: var(--transition); }
.day-card.expanded .day-toggle { transform: rotate(180deg); }

.day-sessions {
  display: none;
  padding: 0 18px 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.day-card.expanded .day-sessions { display: block; }

.session-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: var(--transition);
}
.session-row:last-child { border-bottom: none; }
.session-row:hover { background: rgba(255,255,255,0.02); padding-left: 6px; border-radius: 4px; }

.session-time {
  flex-shrink: 0;
  width: 100px;
  font-size: 0.65rem;
  color: var(--fire-orange);
  font-weight: 600;
}
.session-content { flex: 1; }
.session-title { font-size: 0.75rem; color: var(--text-light); margin-bottom: 2px; }
.session-teacher { font-size: 0.6rem; color: var(--text-dim); }

/* ==================== 刷题页 ==================== */
.quiz-page-card {
  width: 100%;
  max-width: 680px;
}

.lb-card { display: block; }
.lb-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(244,162,97,0.04));
  border: 1px solid rgba(255,215,0,0.15);
  transition: var(--transition);
}
.lb-inner:hover {
  border-color: rgba(255,215,0,0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255,215,0,0.08);
}
.lb-icon-row { font-size: 1rem; display: flex; gap: 2px; }
.lb-title { font-size: 0.8rem; font-weight: 700; color: var(--fire-gold); }
.lb-sub { font-size: 0.6rem; color: var(--text-dim); }
.lb-arrow { margin-left: auto; color: var(--fire-orange); font-size: 0.7rem; }

.quiz-hero { text-align: center; margin-bottom: 16px; }
.quiz-hero h2 { font-size: 1.1rem; color: var(--fire-gold); }

/* 快捷键提示 */
.kbd-hint {
  text-align: center;
  font-size: 0.55rem;
  color: rgba(255,255,255,0.2);
  margin-bottom: 10px;
}
.kbd-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  font-family: monospace;
  margin: 0 2px;
}

/* 考试计时器 */
.exam-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.2);
  font-size: 0.8rem;
  font-weight: 700;
}
.exam-timer.warning { background: rgba(230,57,70,0.15); color: var(--fire-red); animation: pulse 1s ease-in-out infinite; }
.exam-timer .timer-icon { font-size: 1rem; }
.exam-timer .timer-value { font-family: monospace; font-size: 1.1rem; }

/* 答题卡 */
.answer-sheet-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(168,85,247,0.15);
  color: #c084fc;
  transition: var(--transition);
}
.answer-sheet-btn:hover { filter: brightness(1.3); }

.answer-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
}
.answer-sheet-overlay.show { display: flex; }

.answer-sheet {
  width: 90%;
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--fire-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,215,0,0.15);
  padding: 24px;
}
.answer-sheet h3 { font-size: 0.95rem; color: var(--fire-gold); margin-bottom: 16px; text-align: center; }
.answer-sheet-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.answer-sheet-item {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(0,0,0,0.2);
  color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: var(--transition);
}
.answer-sheet-item:hover { border-color: var(--fire-gold); }
.answer-sheet-item.current { border-color: var(--fire-gold); color: var(--fire-gold); }
.answer-sheet-item.answered-correct { background: rgba(22,163,74,0.15); color: #4ade80; }
.answer-sheet-item.answered-wrong { background: rgba(220,38,38,0.15); color: #f87171; }
.answer-sheet-close {
  display: block;
  margin: 16px auto 0;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255,255,255,0.08);
  color: var(--text-dim);
  transition: var(--transition);
}
.answer-sheet-close:hover { background: rgba(255,255,255,0.15); }

.mode-switch {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.mode-tab {
  flex: 1;
  padding: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0,0,0,0.2);
  color: var(--text-dim);
  transition: var(--transition);
}
.mode-tab.active.quiz-t { background: rgba(22,163,74,0.2); color: #4ade80; }
.mode-tab.active.memo-t { background: rgba(37,99,235,0.2); color: #60a5fa; }

.cat-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cat-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0,0,0,0.2);
  color: var(--text-dim);
  transition: var(--transition);
  white-space: nowrap;
}
.cat-tab.active { background: var(--fire-red); color: #fff; }
.cat-tab .count {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  font-size: 0.55rem;
}

.qtoolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.tb-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  transition: var(--transition);
}
.tb-btn.restart { background: rgba(37,99,235,0.15); color: #60a5fa; }
.tb-btn.shuffle { background: rgba(168,85,247,0.15); color: #c084fc; }
.tb-btn.test { background: rgba(230,57,70,0.15); color: #ff6b7a; }
.tb-btn.jump { background: rgba(22,163,74,0.15); color: #4ade80; }
.tb-btn:hover { filter: brightness(1.3); transform: translateY(-1px); }
.tb-jump-inp {
  width: 50px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  color: var(--text-light);
  font-size: 0.65rem;
  text-align: center;
}

.q-progress { margin-bottom: 16px; }
.q-progress span { font-size: 0.65rem; color: var(--text-dim); display: block; margin-bottom: 6px; }
.q-progress .bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(0,0,0,0.3);
  overflow: hidden;
}
.q-progress .fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--fire-red), var(--fire-orange));
  transition: width 0.5s ease;
}

.q-card {
  background: rgba(22,33,62,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  transition: var(--transition);
}

.q-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.55rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.q-type-badge.single { background: rgba(37,99,235,0.2); color: #60a5fa; }
.q-type-badge.multi { background: rgba(168,85,247,0.2); color: #c084fc; }
.q-type-badge.truefalse { background: rgba(22,163,74,0.2); color: #4ade80; }

.q-text { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; margin-bottom: 16px; }

.q-options { display: flex; flex-direction: column; gap: 8px; }

.q-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
  border: 1.5px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}
.q-option:hover { border-color: rgba(255,215,0,0.25); background: rgba(0,0,0,0.3); }

.q-option.selected { border-color: var(--fire-gold); background: rgba(255,215,0,0.06); }
.q-option.correct { border-color: var(--green-ok); background: rgba(22,163,74,0.08); animation: correctFlash 0.5s ease; }
.q-option.wrong { border-color: var(--red-no); background: rgba(220,38,38,0.08); animation: shake 0.4s ease; }

@keyframes correctFlash {
  0%, 100% { background: rgba(22,163,74,0.08); }
  50% { background: rgba(22,163,74,0.15); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.q-option-letter {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  font-size: 0.7rem;
  font-weight: 700;
}
.q-option.selected .q-option-letter { background: var(--fire-gold); color: #000; }
.q-option.correct .q-option-letter { background: var(--green-ok); color: #fff; }
.q-option.wrong .q-option-letter { background: var(--red-no); color: #fff; }

.q-option-text { font-size: 0.8rem; color: var(--text-light); flex: 1; }

.q-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.7rem;
  display: none;
}
.q-feedback.show { display: block; animation: slideUp 0.3s ease; }
.q-feedback.ok { background: rgba(22,163,74,0.08); color: #4ade80; border: 1px solid rgba(22,163,74,0.15); }
.q-feedback.no { background: rgba(220,38,38,0.08); color: #f87171; border: 1px solid rgba(220,38,38,0.15); }

.q-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 10px;
}
.q-nav-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  transition: var(--transition);
}
.q-nav-btn.prev { background: rgba(255,255,255,0.08); color: var(--text-dim); }
.q-nav-btn.next { background: var(--fire-red); color: #fff; }
.q-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.q-nav-btn:hover:not(:disabled) { filter: brightness(1.2); transform: translateY(-1px); }

/* 背题模式 */
.memo-answer {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(22,163,74,0.06);
  border: 1px solid rgba(22,163,74,0.15);
  font-size: 0.75rem;
  color: #4ade80;
  display: none;
}
.memo-answer.show { display: block; animation: slideUp 0.3s ease; }
.memo-toggle-btn {
  margin-top: 12px;
  padding: 10px 20px;
  border-radius: 8px;
  background: rgba(37,99,235,0.12);
  color: #60a5fa;
  font-size: 0.7rem;
  font-weight: 600;
  transition: var(--transition);
}
.memo-toggle-btn:hover { filter: brightness(1.3); }

/* 统计行 */
.q-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.q-stats > div {
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
}
.q-stats .val { font-size: 1.2rem; font-weight: 800; transition: all 0.3s ease; }
.q-stats .lbl { font-size: 0.55rem; color: var(--text-dim); margin-top: 4px; }
.q-stats .ok .val { color: #4ade80; }
.q-stats .no .val { color: #f87171; }
.q-stats .done .val { color: #60a5fa; }
.q-stats .pct .val { color: var(--fire-gold); }

/* ==================== 模拟测试结果 ==================== */
.result-card {
  max-width: 600px;
  margin: 40px auto;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: rgba(22,33,62,0.6);
  border: 1px solid rgba(255,215,0,0.1);
  text-align: center;
  animation: scaleIn 0.5s ease;
}
.result-score {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 8px;
  font-family: "Georgia", serif;
}
.result-score.pass { color: #4ade80; text-shadow: 0 0 20px rgba(22,163,74,0.3); }
.result-score.fail { color: #f87171; text-shadow: 0 0 20px rgba(220,38,38,0.3); }
.result-label { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 24px; }
.result-detail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.result-detail-item {
  padding: 14px;
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.04);
}
.result-detail-item .val { font-size: 1.4rem; font-weight: 800; }
.result-detail-item .lbl { font-size: 0.6rem; color: var(--text-dim); margin-top: 4px; }
.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.result-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
}
.result-btn.retry { background: var(--fire-red); color: #fff; }
.result-btn.home { background: rgba(255,255,255,0.08); color: var(--text-dim); }
.result-btn:hover { filter: brightness(1.2); transform: translateY(-2px); }

/* ==================== 排行榜 ==================== */
.ranking-bg {
  min-height: 100vh;
  background: radial-gradient(ellipse at top, rgba(255,215,0,0.04), transparent 60%),
              radial-gradient(ellipse at bottom, rgba(230,57,70,0.04), transparent 60%),
              var(--fire-darker);
  padding: 40px 16px 60px;
}

.ranking-container { max-width: 700px; margin: 0 auto; }

.rk-title-wrap { text-align: center; margin-bottom: 30px; }
.rk-title-svg { width: 100%; max-width: 480px; height: auto; }
.rk-sub { font-size: 0.7rem; color: var(--text-dim); margin-top: 8px; }

.rk-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}
.podium-item {
  text-align: center;
  flex: 1;
  max-width: 180px;
  animation: slideUp 0.5s ease backwards;
}
.podium-item.rank-1 { animation-delay: 0.1s; }
.podium-item.rank-2 { animation-delay: 0s; }
.podium-item.rank-3 { animation-delay: 0.2s; }
.podium-avatar {
  width: 60px; height: 60px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
}
.podium-item.rank-1 .podium-avatar { background: linear-gradient(135deg, #ffd700, #d4a017); color: #1a1a2e; box-shadow: 0 0 20px rgba(255,215,0,0.4); }
.podium-item.rank-2 .podium-avatar { background: linear-gradient(135deg, #c0c0c0, #808080); color: #1a1a2e; box-shadow: 0 0 15px rgba(192,192,192,0.3); }
.podium-item.rank-3 .podium-avatar { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; box-shadow: 0 0 15px rgba(205,127,50,0.3); }

.podium-name { font-size: 0.8rem; font-weight: 700; color: var(--text-light); margin-bottom: 4px; }
.podium-score { font-size: 0.7rem; color: var(--fire-gold); font-weight: 600; margin-bottom: 8px; }
.podium-block {
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.3);
}
.podium-item.rank-1 .podium-block { height: 100px; background: linear-gradient(180deg, rgba(255,215,0,0.3), rgba(255,215,0,0.08)); }
.podium-item.rank-2 .podium-block { height: 75px; background: linear-gradient(180deg, rgba(192,192,192,0.25), rgba(192,192,192,0.06)); }
.podium-item.rank-3 .podium-block { height: 55px; background: linear-gradient(180deg, rgba(205,127,50,0.25), rgba(205,127,50,0.06)); }

.rk-list { display: flex; flex-direction: column; gap: 6px; }
.rk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(22,33,62,0.4);
  border: 1px solid rgba(255,255,255,0.03);
  transition: var(--transition);
}
.rk-row:hover { border-color: rgba(255,215,0,0.12); transform: translateX(4px); }
.rk-row.me { border-color: rgba(255,215,0,0.35); background: rgba(255,215,0,0.04); }

.rk-rank {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
}
.rk-row:nth-child(1) .rk-rank { background: rgba(255,215,0,0.15); color: var(--fire-gold); }
.rk-row:nth-child(2) .rk-rank { background: rgba(192,192,192,0.15); color: #c0c0c0; }
.rk-row:nth-child(3) .rk-rank { background: rgba(205,127,50,0.15); color: #cd7f32; }

.rk-avatar {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  background: linear-gradient(135deg, var(--fire-blue), var(--fire-card));
}
.rk-info { flex: 1; }
.rk-name { font-size: 0.8rem; color: var(--text-light); font-weight: 600; }
.rk-dept { font-size: 0.6rem; color: var(--text-dim); }
.rk-score { font-size: 0.85rem; font-weight: 800; color: var(--fire-gold); }

.rk-footer {
  text-align: center;
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 30px;
  line-height: 1.8;
}

/* ==================== 资料下载 ==================== */
.materials-search {
  margin-bottom: 16px;
  position: relative;
}
.materials-search input {
  width: 100%;
  padding: 12px 16px 12px 38px;
  border-radius: 25px;
  border: 1.5px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.3);
  color: var(--text-light);
  font-size: 0.75rem;
  transition: var(--transition);
}
.materials-search input:focus {
  border-color: var(--fire-gold);
  box-shadow: 0 0 20px rgba(255,215,0,0.08);
}
.materials-search input::placeholder { color: rgba(255,255,255,0.2); }
.materials-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.2);
  pointer-events: none;
}

.materials-count {
  font-size: 0.6rem;
  color: var(--text-dim);
  text-align: right;
  margin-bottom: 8px;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0,0,0,0.2);
  color: var(--text-dim);
  transition: var(--transition);
  white-space: nowrap;
}
.tab.active { background: var(--fire-red); color: #fff; }
.tab .count {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  font-size: 0.55rem;
}

.materials-list { display: flex; flex-direction: column; gap: 10px; }

.material-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(22,33,62,0.4);
  border: 1px solid rgba(255,255,255,0.03);
  transition: var(--transition);
}
.material-item:hover { border-color: rgba(255,215,0,0.15); transform: translateX(4px); }

.material-icon { font-size: 1.6rem; flex-shrink: 0; }
.material-info { flex: 1; }
.material-name { font-size: 0.8rem; color: var(--text-light); font-weight: 600; margin-bottom: 3px; }
.material-meta { font-size: 0.6rem; color: var(--text-dim); }
.material-download {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(22,163,74,0.12);
  color: #4ade80;
  font-size: 0.65rem;
  font-weight: 600;
  transition: var(--transition);
}
.material-download:hover { background: rgba(22,163,74,0.25); transform: scale(1.05); }

/* ==================== 资料上传 ==================== */
.materials-upload {
  margin-top: 28px;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(255,215,0,0.15);
  background: rgba(22,33,62,0.3);
  text-align: center;
  transition: var(--transition);
}
.materials-upload:hover {
  border-color: rgba(255,215,0,0.35);
  background: rgba(22,33,62,0.45);
}
.materials-upload h3 {
  font-size: 0.9rem;
  color: var(--fire-gold);
  margin-bottom: 6px;
}
.materials-upload p {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.upload-btn {
  padding: 12px 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--fire-red), var(--fire-orange));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(230,57,70,0.25);
}
.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(230,57,70,0.4);
}

.upload-preview {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.upload-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
  font-size: 0.7rem;
  text-align: left;
}
.upload-item-name {
  flex: 1;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-item-size {
  flex-shrink: 0;
  color: var(--text-dim);
}
.upload-item-status {
  flex-shrink: 0;
  font-size: 0.65rem;
}
.upload-item-status.ok { color: #4ade80; }
.upload-item-status.err { color: #f87171; }
.upload-item-status.loading { color: var(--fire-gold); }

/* 上传文件列表（资料区） */
.uploaded-file {
  border-left: 3px solid #4ade80 !important;
}

/* ==================== 底部返回栏 ==================== */
.back-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: rgba(13,13,26,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,215,0,0.08);
  z-index: 100;
  display: flex;
  justify-content: center;
}
.back-home-btn {
  padding: 10px 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
}
.back-home-btn:hover { background: rgba(255,215,0,0.12); color: var(--fire-gold); transform: translateY(-1px); }

/* ==================== 滚动回顶按钮 ==================== */
#scrollTopBtn {
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fire-red), var(--fire-orange));
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(230,57,70,0.3);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
  cursor: pointer;
}
#scrollTopBtn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#scrollTopBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(230,57,70,0.45);
}

/* ==================== Toast 通知 ==================== */
.toast-container {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  max-width: 320px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.success { background: rgba(22,163,74,0.9); color: #fff; border: 1px solid rgba(22,163,74,0.5); }
.toast.error { background: rgba(220,38,38,0.9); color: #fff; border: 1px solid rgba(220,38,38,0.5); }
.toast.info { background: rgba(37,99,235,0.9); color: #fff; border: 1px solid rgba(37,99,235,0.5); }
.toast.warning { background: rgba(244,162,97,0.9); color: #1a1a2e; border: 1px solid rgba(244,162,97,0.5); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ==================== 视频弹窗 ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
.modal-content {
  width: 100%;
  max-width: 800px;
  background: var(--fire-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,215,0,0.12);
  overflow: hidden;
  position: relative;
  animation: scaleIn 0.3s ease;
}
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text-light);
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(230,57,70,0.3); transform: rotate(90deg); }
.video-modal h3 { padding: 16px 20px; font-size: 0.9rem; color: var(--fire-gold); }
.video-container { padding: 0 20px 20px; }
.video-container iframe, .video-container video {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
  border: none;
}

/* ==================== 实操视频教学 ==================== */
.video-grid { margin-bottom: 20px; }
.video-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.video-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(22,33,62,0.4);
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.35s ease;
}
.video-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,215,0,0.25);
  box-shadow: 0 12px 35px rgba(0,0,0,0.45);
}
.video-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(230,57,70,0.12), rgba(244,162,97,0.06));
  display: flex; align-items: center; justify-content: center;
}
.video-card-icon { font-size: 3rem; opacity: 0.7; transition: transform 0.3s ease; }
.video-card:hover .video-card-icon { transform: scale(1.1); }
.video-card-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0.8);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(230,57,70,0.8);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff;
  opacity: 0;
  transition: all 0.3s ease;
}
.video-card:hover .video-card-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.video-card-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0,0,0,0.7);
  color: var(--text-light);
  font-size: 0.6rem;
  font-weight: 600;
}
.video-card-body { padding: 14px; }
.video-card-title { font-size: 0.8rem; color: var(--text-light); font-weight: 600; margin-bottom: 4px; }
.video-card-desc { font-size: 0.65rem; color: var(--text-dim); line-height: 1.4; }
.video-tip { opacity: 0.4; }

/* ==================== 学员管理 ==================== */
.admin-add-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(22,33,62,0.6), rgba(15,52,96,0.3));
  border: 1px solid rgba(255,215,0,0.1);
  margin-bottom: 20px;
}
.admin-add-card h3 {
  font-size: 0.95rem;
  color: var(--fire-gold);
  margin-bottom: 6px;
}
.admin-add-card p {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.admin-form {
  display: flex;
  gap: 10px;
}
.admin-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  color: var(--text-light);
  font-size: 0.85rem;
  transition: var(--transition);
}
.admin-form input:focus {
  border-color: var(--fire-gold);
  box-shadow: 0 0 15px rgba(255,215,0,0.08);
}
.admin-form input::placeholder { color: rgba(255,255,255,0.25); }

.admin-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.admin-btn.add { background: var(--fire-red); color: #fff; }
.admin-btn.del { background: rgba(220,38,38,0.12); color: #f87171; padding: 6px 10px; font-size: 0.8rem; }
.admin-btn.del:disabled { opacity: 0.3; cursor: not-allowed; }
.admin-btn:hover:not(:disabled) { filter: brightness(1.2); }

.admin-form-hint {
  font-size: 0.65rem;
  margin-top: 10px;
  min-height: 1.2rem;
}
.admin-form-hint.success { color: #4ade80; }
.admin-form-hint.error { color: #f87171; }

.admin-list-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(22,33,62,0.4);
  border: 1px solid rgba(255,255,255,0.06);
}
.admin-list-card h3 {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 管理员子标签 */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 0;
}
.admin-tab {
  padding: 10px 18px;
  font-size: 0.75rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-dim);
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  transition: var(--transition);
  position: relative;
}
.admin-tab.active {
  background: rgba(22,33,62,0.6);
  color: var(--fire-gold);
  border-color: rgba(255,215,0,0.12);
}
.admin-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--fire-gold);
}
.admin-tab:hover:not(.active) { color: var(--text-light); }

/* 资料管理表单 */
.material-form {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}
.mat-select {
  padding: 12px 10px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  color: var(--text-light);
  font-size: 0.75rem;
  cursor: pointer;
}
.material-form input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  color: var(--text-light);
  font-size: 0.78rem;
  transition: var(--transition);
}
.material-form input:focus {
  border-color: var(--fire-gold);
}
.material-form input::placeholder { color: rgba(255,255,255,0.2); }
.material-form .admin-btn { grid-column: 6; }

.admin-row.mat-row {
  flex-wrap: wrap;
}
.admin-row .mat-name {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-row .mat-meta {
  font-size: 0.65rem;
  color: var(--text-dim);
  background: rgba(0,0,0,0.2);
  padding: 4px 10px;
  border-radius: 8px;
}
.admin-btn.edit {
  background: rgba(37,99,235,0.12);
  color: #60a5fa;
  padding: 6px 10px;
  font-size: 0.75rem;
}
.admin-btn.edit:hover { background: rgba(37,99,235,0.25); }

@media (max-width: 768px) {
  .material-form {
    grid-template-columns: 1fr 1fr;
  }
  .material-form input:first-of-type { grid-column: 1 / -1; }
  .material-form .admin-btn { grid-column: 1 / -1; }
}

/* ==================== 内容管理表单 ==================== */
.course-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.course-form input,
.course-form .mat-select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  color: var(--text-light);
  font-size: 0.75rem;
  transition: var(--transition);
}
.course-form input:focus,
.course-form .mat-select:focus { border-color: var(--fire-gold); }
.course-form input::placeholder { color: rgba(255,255,255,0.2); }

@media (max-width: 768px) {
  .course-form { grid-template-columns: 1fr; }
}

/* 课程管理 */
.course-row .course-title {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.course-tag-mini {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.55rem;
  font-weight: 600;
  background: rgba(22,163,74,0.15);
  color: #4ade80;
}
.course-meta {
  font-size: 0.65rem;
  color: var(--text-dim);
  padding: 3px 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}
.admin-icon-mini {
  font-size: 1.1rem;
  width: 26px;
  text-align: center;
}

/* 题库管理 */
.question-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.question-form textarea,
.question-form input,
.question-form .mat-select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  color: var(--text-light);
  font-size: 0.75rem;
  transition: var(--transition);
  font-family: inherit;
  resize: vertical;
}
.question-form textarea:focus,
.question-form input:focus { border-color: var(--fire-gold); }
.question-form textarea {
  grid-column: 1 / -1;
  min-height: 50px;
}
.question-form #newQAnswer { grid-column: 1 / -1; }

.q-row {
  flex-wrap: wrap;
}
.q-type-badge {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.55rem;
  font-weight: 700;
  flex-shrink: 0;
}
.q-type-badge.single { background: rgba(37,99,235,0.15); color: #60a5fa; }
.q-type-badge.multi { background: rgba(168,85,247,0.15); color: #c084fc; }
.q-type-badge.truefalse { background: rgba(22,163,74,0.15); color: #4ade80; }
.q-text-mini {
  font-size: 0.7rem;
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.q-answer-mini {
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255,215,0,0.15);
  color: var(--fire-gold);
  font-size: 0.6rem;
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .question-form { grid-template-columns: 1fr; }
  .q-text-mini { max-width: 200px; }
}

/* 课程表编辑 */
.schedule-edit-day {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.04);
}
.schedule-edit-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 10px;
}
.day-edit-num {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--fire-red), var(--fire-orange));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}
.day-edit-info {
  font-size: 0.75rem;
  color: var(--text-light);
}
.day-edit-info strong { color: var(--fire-gold); }

.session-edit-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.session-edit-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(0,0,0,0.15);
  font-size: 0.7rem;
}
.session-time-mini {
  color: var(--fire-orange);
  font-weight: 600;
  font-size: 0.65rem;
  min-width: 90px;
  flex-shrink: 0;
}
.session-title-mini {
  flex: 1;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-teacher-mini {
  font-size: 0.6rem;
  color: var(--text-dim);
  flex-shrink: 0;
}
.session-add-btn {
  margin-top: 6px;
  width: 100%;
}

/* ==================== 系统监控 ==================== */
.monitor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.monitor-card {
  padding: 20px 12px;
  border-radius: var(--radius);
  text-align: center;
  background: linear-gradient(135deg, rgba(22,33,62,0.6), rgba(15,52,96,0.3));
  border: 1px solid rgba(255,215,0,0.08);
}
.monitor-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--fire-gold);
}
.monitor-lbl {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 6px;
}
@media (max-width: 500px) {
  .monitor-grid { grid-template-columns: repeat(2, 1fr); }
}

.log-row .log-time {
  font-size: 0.6rem;
  color: var(--text-dim);
  min-width: 120px;
}
.log-row .log-user {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fire-gold);
  min-width: 50px;
}
.log-row .log-action {
  font-size: 0.65rem;
  color: var(--text-light);
}

.admin-btn.reset {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(220,38,38,0.1);
  color: #f87171;
  transition: var(--transition);
}
.admin-btn.reset:hover { background: rgba(220,38,38,0.25); }

.admin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.03);
  transition: var(--transition);
  font-size: 0.75rem;
}
.admin-row:hover { background: rgba(255,255,255,0.03); }

.admin-num {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-dim);
}

.admin-name {
  flex-shrink: 0;
  min-width: 60px;
  font-weight: 600;
  color: var(--text-light);
}

.admin-dept {
  flex: 1;
  font-size: 0.6rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-pwd {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.pwd-val {
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--fire-orange);
  letter-spacing: 1px;
}
.copy-pwd {
  background: none;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 2px;
  opacity: 0.5;
  transition: var(--transition);
}
.copy-pwd:hover { opacity: 1; }

.admin-role {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.55rem;
  font-weight: 600;
  background: rgba(22,163,74,0.12);
  color: #4ade80;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .dashboard { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  html { font-size: 15px; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid.two-col { grid-template-columns: 1fr; }
  .page-title { font-size: 1.2rem; }
  .topbar-brand { font-size: 0.6rem; }
  .brand-dept { display: none; }
  .q-stats { grid-template-columns: repeat(2, 1fr); }
  .result-detail { grid-template-columns: 1fr; }
  .session-time { width: 80px; }
  .dashboard { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

@media (max-width: 400px) {
  .feature-card { flex-direction: column; text-align: center; }
  .quiz-page-card { padding: 0; }
  .dashboard { grid-template-columns: 1fr 1fr; }
  .dash-card { padding: 12px 8px; }
  .dash-value { font-size: 1.1rem; }
}

/* ==================== 曾雄AI学习室 ==================== */
#page-ai-learn .content-container {
  max-width: 700px;
}
#page-ai-learn .content-header h2 {
  font-size: 1.5rem;
}

/* AI Chat Container */
.ai-chat-container {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 450px;
}

/* Messages area */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: slideUp 0.3s ease;
}

.ai-msg-user {
  flex-direction: row-reverse;
}

.ai-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.ai-msg-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.7;
}

.ai-msg-bot .ai-msg-bubble {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #e0e0f0;
}

.ai-msg-user .ai-msg-bubble {
  background: rgba(255, 107, 157, 0.15);
  border: 1px solid rgba(255, 107, 157, 0.3);
  color: #f0d0e0;
}

.ai-msg-bubble p {
  margin: 0 0 6px 0;
}

.ai-msg-bubble p:last-child {
  margin-bottom: 0;
}

.ai-msg-bubble ul {
  margin: 6px 0;
  padding-left: 18px;
}

.ai-msg-bubble li {
  margin: 3px 0;
  font-size: 0.82rem;
}

/* Quick questions */
.ai-quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.ai-quick-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #b0b0d0;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.ai-quick-btn:hover {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.3);
  color: #4ade80;
  transform: translateY(-1px);
}

/* Input area */
.ai-chat-input {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
}

.ai-chat-input input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e0e0f0;
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.ai-chat-input input:focus {
  border-color: rgba(74, 222, 128, 0.4);
}

.ai-chat-input input::placeholder {
  color: #606080;
}

.ai-send-btn {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #0d0d1a;
  border: none;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.ai-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(74, 222, 128, 0.3);
}

.ai-send-btn:active {
  transform: scale(0.95);
}

/* AI learn card glow */
#aiLearnCard {
  border: 1px solid rgba(74, 222, 128, 0.25);
  position: relative;
  overflow: hidden;
}
#aiLearnCard::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(74,222,128,0.08), transparent, rgba(74,222,128,0.08), transparent);
  animation: aiGlow 6s linear infinite;
}
@keyframes aiGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==================== 文件预览与下载操作 ==================== */
.material-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.material-open, .material-download {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.72rem;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: all 0.2s;
}
.material-open {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.2);
}
.material-open:hover {
  background: rgba(74, 222, 128, 0.2);
}
.material-download {
  background: rgba(255, 107, 157, 0.12);
  color: #ff6b9d;
  border: 1px solid rgba(255, 107, 157, 0.2);
}
.material-download:hover {
  background: rgba(255, 107, 157, 0.2);
}

/* File preview modal */
.file-preview-modal {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  min-width: 300px;
  overflow: auto;
}
#filePreviewTitle {
  color: #e0e0f0;
  padding-right: 30px;
}

/* AI thinking dots */
.ai-thinking-dot {
  color: #4ade80;
  animation: dotPulse 0.8s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

