/* ===== CSS Reset & Variables ===== */
:root {
  --primary: #FF6B9D;
  --primary-dark: #E0568F;
  --gradient: linear-gradient(135deg, #FF6B9D, #A8E6CF);
  --gradient-r: linear-gradient(135deg, #A8E6CF, #FF6B9D);
  --bg: #FFF5E4;
  --bg-2: #FFE3E0;
  --card-bg: #FFFAF5;
  --text: #4A3F3F;
  --text-muted: #8B7E7E;
  --text-light: #B0A3A3;
  --border: #E8D5D5;
  --border-strong: #4A3F3F;
  --shadow: 0 4px 0 #4A3F3F, 0 6px 16px rgba(74,63,63,0.12);
  --shadow-sm: 0 3px 0 #E8D5D5, 0 4px 8px rgba(74,63,63,0.08);
  --shadow-chat: 3px 3px 0 #E8D5D5;
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 12px;
  --radius-card: 28px;
  --success: #A8E6CF;
  --warning: #FFD3B6;
  --danger: #FFAAA5;
  --pink: #FFB5C2;
  --mint: #A8E6CF;
  --cream: #FFF8E7;
  --font: 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', -apple-system, 'Microsoft YaHei', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, #FFF5E4 0%, #FFE3E0 100%);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }
img { max-width: 100%; }

/* ===== App Shell ===== */
.app-container {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  position: relative;
  background: linear-gradient(180deg, #FFF5E4 0%, #FFE3E0 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ===== Screen Management ===== */
.screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}
.screen.active { display: flex; z-index: 10; }

/* ===== Welcome Splash ===== */
#welcome {
  background: var(--gradient);
  z-index: 100;
}
.welcome-slides {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.welcome-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  color: #fff;
}
.welcome-slide.active { opacity: 1; transform: translateX(0); }
.welcome-slide.prev { opacity: 0; transform: translateX(-100%); }

/* CSS Logo */
.ai-logo {
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.2);
  border-radius: 30px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  background: rgba(255,255,255,0.85);
  border: 2px solid rgba(255,255,255,0.3);
}
.ai-logo-face {
  width: 60px; height: 60px;
  position: relative;
}
.ai-logo-face .face {
  width: 50px; height: 50px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 5px; left: 5px;
}
.ai-logo-face .eye {
  width: 8px; height: 10px;
  background: var(--primary-dark);
  border-radius: 50%;
  position: absolute;
  top: 22px;
}
.ai-logo-face .eye.left { left: 14px; }
.ai-logo-face .eye.right { left: 28px; }
.ai-logo-face .mouth {
  width: 18px; height: 9px;
  border-bottom: 3px solid var(--primary-dark);
  border-radius: 0 0 10px 10px;
  position: absolute;
  bottom: 12px; left: 16px;
}
.ai-logo-cap {
  width: 40px; height: 12px;
  background: var(--warning);
  border-radius: 6px 6px 0 0;
  position: absolute;
  top: 0; left: 10px;
}
.ai-logo-cap::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  background: var(--warning);
  border-radius: 50%;
  top: -4px; right: 2px;
}
.welcome-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.welcome-desc {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.7;
  max-width: 280px;
}
.feature-icons {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0;
}
.feature-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.feature-icon-circle {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.2);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.3);
}
.feature-icon-label { font-size: 0.8rem; opacity: 0.9; }

.welcome-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 1.5rem;
}
.welcome-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s;
}
.welcome-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}
.welcome-btn {
  margin: 0 2rem 2rem;
  padding: 1rem;
  background: #fff;
  color: var(--primary-dark);
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.welcome-btn:active { transform: scale(0.97); }
.welcome-skip {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  background: none;
  z-index: 5;
  padding: 0.25rem 0.75rem;
}

/* ===== Login Screen ===== */
#login {
  background: var(--bg);
}
.login-header {
  background: var(--gradient);
  padding: 3rem 2rem 2rem;
  text-align: center;
  color: #fff;
  border-radius: 0 0 24px 24px;
}
.login-header h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.login-header p { font-size: 0.9rem; opacity: 0.9; }
.login-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}
.login-form {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.guide-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.guide-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--bg);
  transition: border-color 0.3s;
  color: var(--text);
}
.form-input:focus { border-color: var(--primary); }
.form-row {
  display: flex;
  gap: 0.75rem;
}
.form-row .form-input { flex: 1; }
.btn-primary {
  width: 100%;
  padding: 0.95rem;
  background: var(--pink);
  color: #fff;
  border: 3px solid var(--border-strong);
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 0 var(--border-strong);
  transition: transform 0.15s, opacity 0.15s, background-color 0.15s;
}
.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--border-strong);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.login-error {
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 0.5rem;
  text-align: center;
}

/* Register */
.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.register-grid .full { grid-column: 1 / -1; }
.register-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.register-section h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.goal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.goal-chip {
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg);
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s;
  cursor: pointer;
}
.goal-chip.selected {
  border-color: var(--primary);
  background: rgba(14,165,233,0.1);
  color: var(--primary);
  font-weight: 600;
}
.goal-chip.chip-error {
  border-color: #ef4444 !important;
  animation: shake 0.3s ease;
}
.input-error {
  border-color: #ef4444 !important;
}
.field-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.3rem;
  line-height: 1.4;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* ===== Main App Layout ===== */
.app-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.app-header {
  background: var(--gradient);
  padding: 0.75rem 1rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top, 0));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  z-index: 5;
}
.app-header-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.app-header-actions {
  display: flex;
  gap: 0.5rem;
}
.header-icon-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1rem;
  background: rgba(14,165,233,0.9);
}

/* ===== Tab Pages ===== */
.tab-page {
  flex: 1;
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.tab-page.active { display: flex; }

/* ===== Bottom Navigation ===== */
.bottom-nav {
  display: flex;
  background: var(--card-bg);
  border-top: 3px solid var(--border-strong);
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 50;
  box-shadow: 0 -4px 0 #E8D5D5;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem 0 0.5rem;
  gap: 2px;
  color: var(--text-light);
  font-size: 0.7rem;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s;
  background: none;
  position: relative;
}
.nav-item.active { color: var(--primary); }
.nav-item.active .nav-icon-wrap {
  background: rgba(255,107,157,0.15);
  border-radius: 12px;
  transform: scale(1.1);
  padding: 0.25rem;
}
.nav-icon-wrap {
  font-size: 1.25rem;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
}
.nav-label { font-weight: 500; }
.nav-item.center-btn .nav-icon-wrap {
  width: 48px; height: 48px;
  background: var(--pink) !important;
  border: 3px solid var(--border-strong);
  border-radius: 50%;
  margin-top: -20px;
  box-shadow: 0 4px 0 #E8D5D5;
  color: #fff;
  font-size: 1.3rem;
  transform: none !important;
  padding: 0;
}

/* ===== Chat Page ===== */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg);
}
.chat-message {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  animation: msgIn 0.3s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-message.user { flex-direction: row-reverse; }
.chat-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
}
.chat-avatar.ai-avatar {
  background: var(--mint);
  color: #fff;
  border: 3px solid var(--border-strong);
  position: relative;
}
.chat-avatar.ai-avatar .mini-face {
  width: 24px; height: 24px;
  position: relative;
}
.mini-face .mf-eye {
  width: 4px; height: 5px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 8px;
}
.mini-face .mf-eye.l { left: 5px; }
.mini-face .mf-eye.r { left: 15px; }
.mini-face .mf-mouth {
  width: 10px; height: 5px;
  border-bottom: 2px solid #fff;
  border-radius: 0 0 6px 6px;
  position: absolute;
  bottom: 4px; left: 7px;
}
.chat-bubble {
  max-width: 78%;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.6;
  word-break: break-word;
}
.chat-message.ai .chat-bubble {
  background: var(--cream);
  color: var(--text);
  border: 3px solid var(--border-strong);
  border-radius: 24px 24px 24px 6px;
  box-shadow: 3px 3px 0 #E8D5D5;
  position: relative;
}
.chat-message.user .chat-bubble {
  background: var(--pink);
  color: #fff;
  border: 3px solid var(--border-strong);
  border-radius: 24px 24px 6px 24px;
  box-shadow: 3px 3px 0 #E8D5D5;
}

/* Rich Media Card in Chat */
.chat-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.chat-card-header {
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.chat-card-body { padding: 0.85rem; }
.chat-card-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.chat-card-item:last-child { border-bottom: none; }
.chat-card-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.chat-card-footer {
  padding: 0.5rem 0.85rem;
  border-top: 1px solid var(--border);
}
.chat-card-btn {
  padding: 0.4rem 0.85rem;
  background: var(--gradient);
  color: #fff;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Quick Reply Chips */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.quick-chip {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--primary);
  border-radius: 50px;
  font-size: 0.78rem;
  color: var(--primary);
  background: rgba(14,165,233,0.06);
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s;
}
.quick-chip:active {
  background: var(--primary);
  color: #fff;
}

/* Chat Input */
.chat-input-area {
  padding: 0.5rem 0.75rem;
  background: var(--card-bg);
  border-top: 3px solid var(--border-strong);
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.chat-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 2px solid var(--border-strong);
  border-radius: 20px;
  font-size: 0.9rem;
  background: var(--card-bg);
  color: var(--text);
}
.chat-input:focus { border-color: var(--primary); }
.chat-send-btn {
  width: 40px; height: 40px;
  background: var(--pink);
  border: 3px solid var(--border-strong);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s;
  box-shadow: 0 3px 0 var(--border-strong);
  flex-shrink: 0;
}
.chat-send-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--border-strong); }
.chat-photo-btn {
  width: 36px; height: 36px;
  background: var(--card-bg);
  border: 3px solid var(--border-strong);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}
.chat-photo-btn:active { transform: translateY(2px); }
.chat-photo-btn:hover { border-color: var(--primary); }
.chat-interview-btn {
  width: 36px; height: 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}
.chat-interview-btn:active { transform: scale(0.9); }
.chat-interview-btn:hover { border-color: var(--primary); }
.chat-interview-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}
.typing-indicator span {
  width: 6px; height: 6px;
  background: var(--text-light);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ===== Enroll Module ===== */
.module-page {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg);
}
.module-title-bar {
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.module-title-bar h2 {
  font-size: 1.15rem;
  color: var(--text);
}
.school-tag {
  font-size: 0.78rem;
  color: var(--primary);
  background: rgba(14,165,233,0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  font-weight: 600;
}
.enroll-article-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 0.75rem;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s;
}
.enroll-article-item:active {
  transform: scale(0.98);
  border-color: var(--primary);
}
.enroll-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
}
.enroll-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 1.25rem 0.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
}
.enroll-card:active {
  transform: scale(0.97);
  border-color: var(--primary);
}
.enroll-card-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  margin: 0 auto 0.6rem;
}
.enroll-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.enroll-card-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===== Module Tabs ===== */
.module-tabs {
  display: flex;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
.module-tab {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  position: relative;
  background: none;
  font-weight: 500;
  transition: color 0.3s;
  border: 3px solid var(--border-strong);
  border-radius: 20px;
  background: var(--card-bg);
  color: var(--text);
}
.module-tab.active {
  font-weight: 700;
  background: var(--pink);
  color: #fff;
}
.module-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0.5rem; right: 0.5rem;
  height: 3px;
  background: var(--gradient);
  border-radius: 3px 3px 0 0;
}
.tab-content {
  display: none;
  overflow-y: auto;
  flex: 1;
  background: var(--bg);
}
.tab-content.active { display: block; }
.tab-content-inner { padding: 1rem; }

/* ===== Exam Module (Civil Service) ===== */
.filter-bar {
  background: var(--card-bg);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}
.filter-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.filter-row:last-child { margin-bottom: 0; }
.filter-select {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  background: var(--bg);
  color: var(--text);
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}
.job-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.6rem;
  box-shadow: var(--shadow-sm);
}
.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}
.job-card-title { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.job-card-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
  font-weight: 600;
}
.badge-hot { background: #fef2f2; color: var(--danger); }
.badge-new { background: #ecfdf5; color: var(--success); }
.job-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.job-card-meta span { display: flex; align-items: center; gap: 0.25rem; }

/* Quiz */
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.quiz-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 4px;
  transition: width 0.5s;
}
.quiz-progress-text { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.quiz-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.quiz-number {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.quiz-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; }
.quiz-option {
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s;
  text-align: left;
  background: var(--card-bg);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.quiz-option:active { transform: scale(0.98); }
.quiz-option.selected { border-color: var(--primary); background: rgba(14,165,233,0.06); }
.quiz-option.correct { border-color: var(--success); background: rgba(16,185,129,0.08); }
.quiz-option.wrong { border-color: var(--danger); background: rgba(239,68,68,0.08); }
.quiz-option-letter {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.quiz-option.correct .quiz-option-letter { background: var(--success); color: #fff; }
.quiz-option.wrong .quiz-option-letter { background: var(--danger); color: #fff; }
.quiz-explanation {
  margin-top: 1rem;
  padding: 0.85rem;
  background: #fffbeb;
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--warning);
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
}
.quiz-submit-btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--gradient);
  color: #fff;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 1rem;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s;
}
.quiz-submit-btn:active { transform: scale(0.97); }

/* 直接渲染的题目样式 */
.quiz-q-num { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 600; }
.quiz-q-text { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 1rem; line-height: 1.6; }
.quiz-option-text { flex: 1; }
.quiz-mark { font-size: 1rem; font-weight: 700; }
.quiz-mark.correct { color: var(--success); }
.quiz-mark.wrong { color: var(--danger); }
.quiz-explain { margin-top: 1rem; padding: 0.85rem; background: #fffbeb; border-radius: var(--radius-xs); border-left: 3px solid var(--warning); font-size: 0.82rem; color: var(--text); line-height: 1.6; }
.quiz-explain-title { font-weight: 700; margin-bottom: 0.3rem; }
.quiz-explain-text { color: var(--text-muted); }
.quiz-actions { margin-top: 1rem; display: flex; justify-content: center; }
.quiz-actions .btn-primary { width: auto; padding: 0.7rem 2.5rem; border-radius: 50px; font-size: 0.88rem; font-weight: 700; background: var(--gradient); color: #fff; border: none; }
.quiz-actions .btn-primary:disabled { opacity: 0.5; }

/* Policy Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 1.25rem;
}
.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 3px solid var(--primary);
  z-index: 1;
}
.timeline-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.timeline-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  box-shadow: var(--shadow-sm);
}
.timeline-card h4 { font-size: 0.88rem; margin-bottom: 0.25rem; color: var(--text); }
.timeline-card p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* ===== Kaoyan Module ===== */
.school-tier {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tier-badge {
  padding: 0.4rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.tier-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.tier-sprint { background: #fef2f2; color: var(--danger); }
.tier-sprint .dot { background: var(--danger); }
.tier-stable { background: #fffbeb; color: var(--warning); }
.tier-stable .dot { background: var(--warning); }
.tier-safe { background: #ecfdf5; color: var(--success); }
.tier-safe .dot { background: var(--success); }

.school-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.6rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--border);
}
.school-card.sprint { border-left-color: var(--danger); }
.school-card.stable { border-left-color: var(--warning); }
.school-card.safe { border-left-color: var(--success); }
.school-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.school-card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.school-card-info span {
  background: var(--bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Study Plan */
.plan-phase {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}
.plan-phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.plan-phase-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.plan-phase-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  font-weight: 600;
}
.tag-current { background: rgba(14,165,233,0.1); color: var(--primary); }
.tag-pending { background: rgba(139,126,126,0.1); color: var(--text-muted); }
.tag-done { background: rgba(16,185,129,0.1); color: var(--success); }
.tag-future { background: var(--bg); color: var(--text-muted); }
.plan-phase-dates {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.task-list { list-style: none; }
.task-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.task-item:last-child { border-bottom: none; }
.task-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s;
  font-size: 0.7rem;
  color: transparent;
}
.task-check.done {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.task-text.done { text-decoration: line-through; color: var(--text-muted); }
.task-edit-input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
}

/* Heatmap */
.heatmap-container {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.75rem;
}
.heatmap-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--bg);
}
.heatmap-cell.level-1 { background: rgba(14,165,233,0.2); }
.heatmap-cell.level-2 { background: rgba(14,165,233,0.4); }
.heatmap-cell.level-3 { background: rgba(14,165,233,0.6); }
.heatmap-cell.level-4 { background: var(--primary); }
.heatmap-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Radar Chart (CSS) */
.radar-container {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.75rem;
}
.radar-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.75rem; }
.radar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.radar-svg { width: 180px; height: 180px; }
.radar-legend { display: flex; flex-direction: column; gap: 0.4rem; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ===== Profile Page ===== */
.profile-header {
  background: var(--gradient);
  padding: 2rem 1.25rem 1.5rem;
  text-align: center;
  color: #fff;
  position: relative;
}
.profile-settings-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
.profile-settings-btn:hover { background: rgba(255,255,255,0.25); }
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  margin: 0 auto 0.75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  border: 3px solid rgba(255,255,255,0.4);
  position: relative;
}
.avatar-edit-hint {
  position: absolute;
  bottom: 0; right: 0;
  width: 24px; height: 24px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  border: 2px solid #fff;
  opacity: 0;
  transition: opacity 0.2s;
}
.profile-avatar:hover .avatar-edit-hint { opacity: 1; }
.profile-name { font-size: 1.2rem; font-weight: 700; }
.profile-school { font-size: 0.85rem; opacity: 0.9; margin-top: 0.25rem; }
.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
}
.profile-stat {
  text-align: center;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.6rem 0.4rem;
}
.profile-stat-num { font-size: 1.3rem; font-weight: 700; }
.profile-stat-label { font-size: 0.72rem; opacity: 0.8; margin-top: 0.15rem; }
.profile-menu {
  padding: 0.75rem;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.75rem;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  color: var(--text);
}
.profile-menu-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.profile-menu-arrow {
  margin-left: auto;
  color: var(--text-light);
  font-size: 0.85rem;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  width: 100%;
  max-width: 430px;
  max-height: 85vh;
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  animation: modalUp 0.3s ease;
}
.modal-content {
  width: 100%;
  max-width: 430px;
  max-height: 85vh;
  background: var(--card-bg);
  border: 3px solid var(--border-strong);
  border-radius: 28px;
  overflow-y: auto;
  animation: modalUp 0.3s ease;
}
@keyframes modalUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.modal-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 1;
}
.modal-header h3 { font-size: 1.05rem; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
}
.modal-body { padding: 1.25rem; }
.modal-section {
  margin-bottom: 1.25rem;
}
.modal-section h4 {
  font-size: 0.92rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.modal-section p, .modal-section li {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.7;
}
.modal-section ul { padding-left: 1.25rem; }
.modal-section li { margin-bottom: 0.3rem; }
.faq-item {
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.faq-question {
  padding: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  background: var(--bg);
}
.faq-answer {
  padding: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  z-index: 9999;
  text-align: center;
  max-width: 280px;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== Utility ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }

/* ===== 日系装饰元素 ===== */
.app-decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.decor-star {
  position: absolute;
  opacity: 0.3;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.9); }
  50% { opacity: 0.5; transform: scale(1.1); }
}
.decor-cloud {
  position: absolute;
  opacity: 0.25;
}
/* 全局粗描边风格 */
.card, .info-card, .module-card {
  border: 3px solid var(--border-strong) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: 0 4px 0 #E8D5D5 !important;
}
/* 表单输入框 */
.form-input {
  border: 2px solid var(--border-strong) !important;
  border-radius: 16px !important;
  background: var(--card-bg) !important;
}
.form-label {
  font-weight: 700;
  color: var(--text);
}
/* 语音消息相关 */
@keyframes voicePulse { 0% { opacity:1; } 50% { opacity:0.7; } 100% { opacity:1; } }
.chat-voice-btn { background:none; border:none; font-size:22px; cursor:pointer; padding:4px 6px; line-height:1; }
.chat-voice-btn:active { transform:scale(0.9); }
.voice-message:hover { background:rgba(255,255,255,0.3) !important; }
/* 防止页面闪烁 */
body { background: linear-gradient(180deg, #FFF5E4 0%, #FFE3E0 100%) !important; min-height: 100vh; }
#app { min-height: 100vh; }
