/* ========== 灯塔题库 - 响应式样式表 ========== */
:root {
  --primary: #4a6fa5;
  --primary-light: #6b8fc5;
  --primary-dark: #3a5a8a;
  --success: #38a169;
  --success-light: #68d391;
  --danger: #e53e3e;
  --danger-light: #fc8181;
  --warning: #d69e2e;
  --warning-light: #f6e05e;
  --bg: #f4f6f9;
  --white: #ffffff;
  --text: #2d3748;
  --text-light: #718096;
  --border: #e2e8f0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* ========== 通用组件 ========== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 48px;
  font-family: var(--font);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #2f8a5a; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c53030; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-block { display: flex; width: 100%; }

.input-group {
  margin-bottom: 16px;
}
.input-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.input-group input, .input-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  transition: border-color 0.2s;
  min-height: 48px;
}
.input-group input:focus, .input-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-error { background: #fed7d7; color: var(--danger); }
.alert-success { background: #c6f6d5; color: var(--success); }
.alert-info { background: #bee3f8; color: var(--primary); }

/* ========== 登录/注册页 ========== */
.auth-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo h1 {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 8px;
}
.auth-logo p {
  color: var(--text-light);
  font-size: 15px;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px 24px;
  width: 100%;
  max-width: 400px;
}
.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-form .hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ========== 导航栏 ========== */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}
.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.navbar-user {
  font-size: 14px;
  color: var(--text-light);
}
.navbar-btn {
  padding: 8px 16px;
  font-size: 13px;
  min-height: 36px;
}

/* ========== 主页 - 科目网格 ========== */
.subject-group {
  margin-bottom: 24px;
}
.group-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.subject-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.subject-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.subject-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.subject-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.badge-free {
  display: inline-block;
  padding: 2px 8px;
  background: #c6f6d5;
  color: var(--success);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.badge-vip {
  display: inline-block;
  padding: 2px 8px;
  background: #fefcbf;
  color: #b7791f;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 3px;
  transition: width 0.3s;
}
.progress-text {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
}

/* ========== 模式选择弹窗 ========== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.active { display: flex; }

.modal-content {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}
.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
}

.mode-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mode-btn {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--white);
  min-height: 56px;
}
.mode-btn:hover {
  border-color: var(--primary);
  background: #f0f5ff;
}
.mode-btn-icon {
  font-size: 24px;
  margin-right: 14px;
}
.mode-btn-info h4 {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 2px;
}
.mode-btn-info p {
  font-size: 12px;
  color: var(--text-light);
}

/* ========== 练习页 ========== */
.practice-header {
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.practice-header .back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  background: none;
  border: none;
  font-family: var(--font);
}
.practice-header .title-area {
  text-align: center;
}
.practice-header .title-area h3 {
  font-size: 15px;
  color: var(--text);
}
.practice-header .title-area .subtitle {
  font-size: 12px;
  color: var(--text-light);
}
.practice-header .progress-indicator {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}

.question-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  margin: 16px;
}
.question-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 24px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  overflow-x: hidden;
}
.question-text p { margin-bottom: 8px; }
.question-text img { max-width: 100%; border-radius: 8px; }

.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.option-item {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  min-height: 52px;
  font-size: 15px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  overflow-x: hidden;
}
.option-item:hover { border-color: var(--primary-light); background: #f8faff; }
.option-item.selected { border-color: var(--primary); background: #ebf2ff; }
.option-item.correct { border-color: var(--success); background: #f0fff4; color: var(--success); }
.option-item.wrong { border-color: var(--danger); background: #fff5f5; color: var(--danger); }
.option-item.disabled { pointer-events: none; }

.option-label {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  font-weight: 600;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
}
.option-item.selected .option-label { background: var(--primary); color: #fff; }
.option-item.correct .option-label { background: var(--success); color: #fff; }
.option-item.wrong .option-label { background: var(--danger); color: #fff; }

.answer-reveal {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}
.answer-reveal.correct { background: #f0fff4; color: var(--success); }
.answer-reveal.wrong { background: #fff5f5; color: var(--danger); }

.nav-buttons {
  display: flex;
  gap: 12px;
  padding: 16px;
  justify-content: center;
}
.nav-buttons .btn { flex: 1; max-width: 160px; }

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-light);
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.stats-bar span { font-weight: 500; }

/* ========== 考试模式 ========== */
.exam-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}
.exam-timer.warning { color: var(--danger); }

.exam-progress {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  padding: 12px 16px;
}
.exam-progress .q-dot {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--white);
  transition: all 0.2s;
}
.exam-progress .q-dot.answered { background: var(--primary); color: #fff; border-color: var(--primary); }
.exam-progress .q-dot.current { border-color: var(--warning); background: #fffff0; }

.exam-result {
  text-align: center;
  padding: 40px 24px;
}
.exam-result .score-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border: 6px solid var(--primary);
  background: #f0f5ff;
}
.exam-result .score-circle .score-num {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.exam-result .score-circle .score-label {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}
.exam-result .result-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 24px 0;
}
.exam-result .result-stats .stat-item {
  text-align: center;
}
.exam-result .result-stats .stat-item .num {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}
.exam-result .result-stats .stat-item .label {
  font-size: 13px;
  color: var(--text-light);
}
.exam-result .result-details {
  margin-top: 24px;
  text-align: left;
}
.exam-result .result-details .detail-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.exam-result .result-details .detail-item .icon-correct { color: var(--success); }
.exam-result .result-details .detail-item .icon-wrong { color: var(--danger); }

/* ========== 管理后台 ========== */
.admin-nav {
  background: var(--primary-dark);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-nav h2 { font-size: 18px; }
.admin-nav .admin-logout {
  color: #fff;
  background: rgba(255,255,255,0.15);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.admin-content { padding: 20px; max-width: 1200px; margin: 0 auto; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
}
.stat-card .stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}
.stat-card .stat-label {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

.data-table {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.data-table table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.data-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text);
}
.data-table td { color: var(--text); }
.data-table .actions { display: flex; gap: 8px; }
.data-table .btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 32px;
  border-radius: 6px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  gap: 12px;
}
.table-toolbar input {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  min-width: 200px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}
.pagination .page-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  background: var(--white);
}
.pagination .page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ========== Toast 通知 ========== */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
}
.toast.info { background: var(--primary); color: #fff; }
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes toastIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ========== Loading ========== */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.7);
  z-index: 9998;
  align-items: center;
  justify-content: center;
}
.loading-overlay.active { display: flex; }
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== 错题本入口 ========== */
.wrong-book-entry {
  background: linear-gradient(135deg, #fff5f5, #ffe0e0);
  border: 2px solid #fc8181;
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.2s;
}
.wrong-book-entry:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.wrong-book-entry .wb-left { display: flex; align-items: center; gap: 12px; }
.wrong-book-entry .wb-icon { font-size: 28px; }
.wrong-book-entry .wb-title { font-size: 16px; font-weight: 600; color: var(--danger); }
.wrong-book-entry .wb-count { font-size: 13px; color: var(--text-light); }
.wrong-book-entry .wb-arrow { font-size: 20px; color: var(--text-light); }

/* ========== 答案解析区域 ========== */
.note-section {
  margin-top: 16px;
}
.note-toggle-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 0;
  font-weight: 500;
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 6px;
}
.note-toggle-btn:hover { text-decoration: underline; }
.note-content {
  display: none;
  margin-top: 12px;
  padding: 16px 20px;
  background: #ebf8ff;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  overflow-x: hidden;
}
.note-content.active { display: block; }
.note-content .note-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}
.note-content .note-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
}

/* ========== 停留时间提示弹窗 ========== */
.hint-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.hint-modal.active { display: flex; }
.hint-modal-content {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  animation: modalIn 0.2s ease;
}
.hint-modal-content .hint-icon { font-size: 40px; margin-bottom: 12px; }
.hint-modal-content .hint-text { font-size: 15px; color: var(--text); margin-bottom: 20px; line-height: 1.6; }
.hint-modal-content .hint-actions { display: flex; gap: 12px; justify-content: center; }
.hint-modal-content .hint-actions .btn { flex: 1; font-size: 14px; }

/* ========== 科目分区标题 ========== */
.subject-section { margin-bottom: 24px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  padding: 0 4px;
}
.section-icon { font-size: 18px; }
.section-count {
  font-size: 12px;
  font-weight: 400;
  color: #999;
  margin-left: auto;
}

/* 已开通科目卡片 */
.subject-card-active {
  border: 1px solid #c6f6d5;
}
.subject-card-active:hover {
  border-color: #68d391;
  box-shadow: 0 4px 12px rgba(72,187,120,0.15);
}

/* 未开通科目卡片 */
.subject-card-locked {
  opacity: 0.65;
  border: 1px dashed #e2e8f0;
}
.subject-card-locked:hover {
  opacity: 0.85;
  border-color: #cbd5e0;
}

/* VIP角标 */
.card-vip-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.card-vip-unlocked {
  background: #f0fff4;
  border: 1px solid #c6f6d5;
}
.card-vip-locked {
  background: #fff8e1;
  border: 1px solid #ffeeba;
}

/* 解锁/锁定 badge */
.badge-unlocked {
  display: inline-block;
  padding: 2px 8px;
  background: #c6f6d5;
  color: #276749;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.badge-expired {
  display: inline-block;
  padding: 2px 8px;
  background: #fed7d7;
  color: #c53030;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.badge-locked {
  display: inline-block;
  padding: 2px 8px;
  background: #fefcbf;
  color: #b7791f;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* ========== 科目卡片额外统计 ==========  */
.subject-card-stats {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-light);
}
.subject-card-stats .stat-accuracy { color: var(--success); font-weight: 500; }
.subject-card-stats .stat-wrong { color: var(--danger); font-weight: 500; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .container { padding: 12px; }
  .subject-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .exam-progress { grid-template-columns: repeat(5, 1fr); }
  .data-table { overflow-x: auto; }
  .table-toolbar { flex-direction: column; }
  .table-toolbar input { min-width: unset; width: 100%; }
  .navbar-user { display: none; }
}
@media (min-width: 769px) {
  .auth-card { padding: 40px 32px; }
  .question-card { margin: 24px auto; max-width: 720px; }
  .nav-buttons { max-width: 720px; margin: 0 auto; }
}

/* ========== 游客模式弹窗 ========== */
.guest-modal-overlay {
  display: flex; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 9999; align-items: center; justify-content: center;
  padding: 16px; opacity: 0; transition: opacity 0.25s;
}
.guest-modal-overlay.active { opacity: 1; }
.guest-modal-card {
  background: var(--white); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  padding: 32px 24px; text-align: center; max-width: 360px; width: 100%;
  animation: modalIn 0.3s ease;
}
.guest-modal-card .guest-modal-title {
  font-size: 20px; font-weight: 700; margin-bottom: 12px; color: var(--text);
}
.guest-modal-card .guest-modal-body {
  font-size: 15px; color: var(--text-light); margin-bottom: 24px; line-height: 1.6;
}
.guest-modal-card .guest-modal-actions {
  display: flex; gap: 12px; justify-content: center;
}
.guest-modal-card .guest-modal-actions .btn { min-width: 100px; }

/* 游客欢迎弹窗 */
.welcome-modal-overlay {
  display: flex; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 9998; align-items: center; justify-content: center;
  padding: 16px; opacity: 0; transition: opacity 0.25s;
}
.welcome-modal-overlay.active { opacity: 1; }
.welcome-modal-card {
  background: var(--white); border-radius: 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  padding: 36px 28px; text-align: center; max-width: 380px; width: 100%;
  animation: modalIn 0.3s ease;
}
.welcome-modal-card h2 {
  font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 12px;
}
.welcome-modal-card p {
  font-size: 15px; color: var(--text-light); margin-bottom: 28px; line-height: 1.6;
}
.welcome-modal-card .welcome-actions {
  display: flex; flex-direction: column; gap: 12px;
}
.welcome-modal-card .welcome-actions .btn { width: 100%; min-height: 44px; font-size: 15px; }

/* 游客锁定标记 */
.feature-card.locked { opacity: 0.6; position: relative; }
.feature-card.locked::after {
  content: '🔒'; position: absolute; top: 6px; right: 6px; font-size: 14px;
}
.mode-btn.locked { opacity: 0.6; position: relative; }
.mode-btn.locked::after {
  content: '🔒'; position: absolute; top: 8px; right: 8px; font-size: 14px;
}

/* ========== 智能复习计划卡片 ========== */
.smart-plan-card {
  max-width: 500px; margin: 40px auto; padding: 30px;
  background: var(--white); border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
}
.smart-plan-card h3 { font-size: 20px; margin-bottom: 24px; color: var(--text); }
.plan-stats { display: flex; gap: 16px; justify-content: center; margin: 20px 0; }
.plan-stat-item {
  flex: 1; padding: 16px; border-radius: 12px; text-align: center;
}
.plan-stat-item.overdue { background: #fff5f5; border: 1px solid #fed7d7; }
.plan-stat-item.weak { background: #fffaf0; border: 1px solid #feebc8; }
.plan-stat-item.new { background: #f0fff4; border: 1px solid #c6f6d5; }
.stat-number { font-size: 28px; font-weight: bold; display: block; color: var(--text); }
.plan-stat-item .stat-label { font-size: 13px; color: #666; margin-top: 4px; display: block; }
.plan-summary { margin: 20px 0; color: #555; }
.plan-summary p { margin: 6px 0; font-size: 14px; }
.start-smart-btn {
  padding: 14px 40px; background: linear-gradient(135deg, #667eea, #764ba2);
  color: white; border: none; border-radius: 25px;
  font-size: 16px; cursor: pointer; margin-top: 16px;
  font-family: var(--font); transition: all 0.2s;
}
.start-smart-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.start-smart-btn:active { transform: scale(0.97); }

@media (max-width: 768px) {
  .smart-plan-card { margin: 20px 16px; padding: 20px; }
  .smart-plan-card .stat-number { font-size: 24px; }
  .plan-stats { gap: 10px; }
  .plan-stat-item { padding: 12px 8px; }
}

/* ========== VIP百度网盘SVIP风格样式 ========== */
/* VIP科目网格布局 */
.vip-subjects-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

/* 百度网盘风格土豪金卡片 */
.vip-subject-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 8px 12px;
    background: linear-gradient(180deg, #fffaf2 0%, #fff3e0 100%);
    border-radius: 12px;
    border: 1px solid #f5deb3;
    box-shadow: 0 1px 4px rgba(212, 160, 50, 0.1);
    color: #5c3d10;
    transition: transform 0.2s, box-shadow 0.2s;
}

.vip-subject-item:active {
    transform: scale(0.97);
    box-shadow: 0 1px 2px rgba(212, 160, 50, 0.15);
}

/* 覆盖之前的级别颜色 - 全部百度网盘风格 */
.vip-subject-item.vip-level-1,
.vip-subject-item.vip-level-2,
.vip-subject-item.vip-level-3,
.vip-subject-item.vip-level-4,
.perm-item.vip-level-1,
.perm-item.vip-level-2,
.perm-item.vip-level-3,
.perm-item.vip-level-4 {
    background: linear-gradient(180deg, #fffaf2 0%, #fff3e0 100%) !important;
    border-color: #f5deb3 !important;
    color: #5c3d10 !important;
    box-shadow: 0 1px 4px rgba(212, 160, 50, 0.1) !important;
}

/* 科目名称 */
.vip-subject-item .vip-subject-name,
.vip-subject-item .vip-subject-info .vip-subject-name {
    font-size: 12px;
    font-weight: 600;
    color: #4a3520;
    line-height: 1.4;
    margin-bottom: 4px;
    word-break: break-all;
}

/* 到期时间 */
.vip-subject-item .vip-expire,
.vip-subject-item .vip-subject-info .vip-expire {
    font-size: 10px;
    color: #b8860b;
}

/* 皇冠/钻石图标 */
.vip-subject-item .vip-diamond {
    font-size: 20px;
    margin-bottom: 6px;
}

/* 已过期样式 */
.vip-subject-item.expired,
.vip-subject-item.expired.vip-level-1,
.vip-subject-item.expired.vip-level-2,
.vip-subject-item.expired.vip-level-3,
.vip-subject-item.expired.vip-level-4 {
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%) !important;
    border-color: #e5e5e5 !important;
    opacity: 0.7;
    box-shadow: none !important;
}
.vip-subject-item.expired .vip-subject-name {
    color: #999 !important;
    text-decoration: line-through;
}
.vip-subject-item.expired .vip-diamond {
    filter: grayscale(1);
}
.vip-subject-item.expired .vip-expire {
    color: #999 !important;
}
