/* 从 ahjxjy.user.js ensurePanelStyles 摘录，用于静态演示；类名与脚本内一致 */
.site-demo-bg #jxjy-auto-panel,
.site-demo-bg #jxjy-exam-assist-panel,
.site-demo-bg .jxjy-panel-shell {
  position: relative !important;
  right: auto !important;
  top: auto !important;
  left: auto !important;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18) !important;
}
.site-demo-bg #jxjy-exam-assist-panel {
  max-width: 560px;
  width: 100%;
}
.site-demo-bg #jxjy-auto-panel,
.site-demo-bg .jxjy-panel-shell {
  max-width: 420px;
  width: 100%;
}

.site-two-panels {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  /* 左栏随内容增高；勿 stretch + body flex:1，否则会在按钮与底栏之间撑出大块留白 */
  align-items: flex-start;
  padding: 0 16px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.site-two-panels #jxjy-auto-panel,
.site-two-panels #jxjy-exam-assist-panel {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.site-exam-anchor {
  scroll-margin-top: 88px;
  max-width: 560px;
  width: 100%;
  box-sizing: border-box;
}

/* 演示页：右栏高度由脚本对齐左栏；内层 flex + 列表滚动，不拉高左栏 */
.site-demo-bg .site-two-panels > #exam-assist.site-exam-anchor {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.site-demo-bg .site-two-panels #jxjy-exam-assist-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: none;
  position: relative !important;
  right: auto !important;
  top: auto !important;
}
.site-demo-bg .site-two-panels #jxjy-exam-assist-header,
.site-demo-bg .site-two-panels #jxjy-exam-assist-hint {
  flex-shrink: 0;
}
.site-demo-bg .site-two-panels #jxjy-exam-assist-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
}

.jxjy-course-badge.done {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.45);
}

#jxjy-auto-panel,
.jxjy-panel-shell {
  position: fixed;
  right: 20px;
  top: 80px;
  z-index: 999999;
  width: 420px;
  background: #f4f7fb;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #0f172a;
  overflow: hidden;
}
.site-demo-bg .jxjy-panel-shell {
  position: relative !important;
  right: auto !important;
  top: auto !important;
  left: auto !important;
  z-index: 1;
}
#jxjy-panel-header {
  padding: 10px 12px;
  background: linear-gradient(180deg, #f8ecd5, #f4e8cf);
  border-bottom: 1px solid #e5dbc6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#jxjy-panel-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
#jxjy-panel-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fff;
}
#jxjy-panel-title {
  font-size: 16px;
  font-weight: 900;
  color: #b45309;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#jxjy-panel-sub {
  font-size: 12px;
  color: #475569;
  margin-top: 1px;
}
.jxjy-panel-version {
  font-size: 11px;
  font-weight: 900;
  color: #64748b;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
#jxjy-toggle {
  border: none;
  background: #fff;
  color: #64748b;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}
#jxjy-panel-body {
  padding: 9px;
  position: relative;
}
#jxjy-cloud-toast {
  display: none !important;
}
.jxjy-card {
  background: #fff;
  border: 1px solid #d9e2ee;
  border-radius: 14px;
  padding: 9px 10px;
  margin-bottom: 9px;
}
.jxjy-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 12px;
  color: #334155;
}
.jxjy-progress-num {
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
}
.jxjy-progress-num small {
  font-size: 16px;
  color: #64748b;
}
.jxjy-progress-pct {
  font-size: 22px;
  font-weight: 900;
  color: #0369a1;
}
.jxjy-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.jxjy-progress-bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #22d3ee, #2563eb);
  transition: width 0.2s ease;
}
.jxjy-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 5px;
}
.jxjy-meta-label {
  color: #64748b;
}
.jxjy-meta-value {
  font-weight: 700;
  color: #0f172a;
  text-align: right;
}
.jxjy-btn-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.jxjy-btn-row-nowrap {
  flex-wrap: nowrap;
}
.jxjy-btn-action {
  min-width: 0 !important;
  flex: 1 1 0 !important;
}
.jxjy-btn {
  flex: 1;
  border: none;
  color: #fff;
  padding: 8px 10px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 800;
  min-width: 84px;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.jxjy-btn-ghost {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fff;
  color: #0f172a;
}
.jxjy-btn-start {
  background: #16a34a;
}
.jxjy-btn-stop {
  background: #ef4444;
}
.jxjy-btn-face {
  background: #0284c7;
}
.jxjy-btn-pro {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
#jxjy-course-list,
#jxjy-chapter-preview,
#jxjy-run-log {
  max-height: 170px;
  overflow-y: auto;
  background: #f8fafc;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 6px;
}
#jxjy-run-log {
  max-height: 150px;
}
.jxjy-tabbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.jxjy-tab-btn {
  flex: 1;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}
.jxjy-tab-btn.active {
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}
.jxjy-pane {
  display: none;
}
.jxjy-pane.active {
  display: block;
}
.jxjy-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.jxjy-list-title {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}
.jxjy-list-tag {
  font-size: 11px;
  color: #92400e;
  background: #ffedd5;
  border: 1px solid #fdba74;
  border-radius: 999px;
  padding: 2px 8px;
}
.jxjy-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.45);
}
#jxjy-auto-status {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-weight: 900;
  font-size: 12px;
  background: #fff;
}
#jxjy-auto-status.jxjy-status-running {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
  color: #059669;
}
.jxjy-course-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
}
.jxjy-course-card.selected {
  border-color: #2563eb;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.16);
}
.jxjy-course-card-left {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.jxjy-course-card-title {
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jxjy-course-badge {
  font-size: 10px;
  font-weight: 900;
  border-radius: 999px;
  padding: 2px 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #334155;
  background: #fff;
}
.jxjy-course-badge.todo {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.45);
}
.jxjy-chapter-course {
  margin-bottom: 8px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}
.jxjy-chapter-title {
  padding: 7px 10px;
  background: #eaf1ff;
  border-bottom: 1px solid #dbe4f0;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}
.jxjy-chapter-item {
  padding: 5px 10px;
  font-size: 12px;
  color: #334155;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.jxjy-log-row {
  padding: 4px 6px;
  border-bottom: 1px dashed #d4deea;
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
}
.jxjy-log-ts {
  font-weight: 900;
  color: #64748b;
  margin-right: 6px;
}
.jxjy-log-filter-btn {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fff;
  color: #0f172a;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}
.jxjy-log-filter-btn-active {
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  border-color: transparent;
  color: #fff;
}
.jxjy-settings-group {
  background: #f8fafc;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
}
.jxjy-settings-title {
  font-size: 12px;
  color: #64748b;
  font-weight: 900;
  margin-bottom: 8px;
}
.jxjy-toggle-on {
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.jxjy-empty-state {
  padding: 14px 8px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
}
.jxjy-footer-extra {
  padding: 0 10px 10px;
}
.jxjy-qq-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
}
.jxjy-qq-text {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.jxjy-qq-title {
  font-size: 11px;
  color: #64748b;
}
.jxjy-qq-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
}
#jxjy-panel-footer {
  padding: 8px 12px;
  background: #eef2f7;
  border-top: 1px solid #dbe4f0;
  color: #334155;
  font-size: 12px;
}

/* 考试辅助面板 */
#jxjy-exam-assist-panel {
  position: fixed;
  right: 450px;
  top: 90px;
  z-index: 999998;
  width: 560px;
  max-height: 94vh;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #cfe1ff;
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}
#jxjy-exam-assist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, #1e40af, #0284c7);
  border-bottom: 1px solid rgba(191, 219, 254, 0.5);
  cursor: default;
  font-size: 16px;
  color: #fff;
}
#jxjy-exam-assist-toggle {
  border: 1px solid rgba(191, 219, 254, 0.65);
  background: rgba(255, 255, 255, 0.92);
  color: #1d4ed8;
  border-radius: 10px;
  padding: 5px 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
#jxjy-exam-assist-hint {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff7e6, #fffbeb);
  color: #9a3412;
  font-size: 13px;
  line-height: 1.6;
}
#jxjy-exam-assist-list {
  max-height: calc(94vh - 42px);
  overflow: auto;
  padding: 10px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}
.jxjy-exam-detail {
  padding: 12px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  min-height: 120px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.jxjy-exam-detail-title {
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 6px;
}
.jxjy-exam-detail-q {
  font-size: 15px;
  line-height: 1.55;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.jxjy-exam-detail-a {
  font-size: 15px;
  line-height: 1.55;
  color: #166534;
  background: linear-gradient(180deg, #f0fdf4, #ecfdf5);
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 8px 10px;
}
