/* Modern Elegant High School Campus & Humanities Design System */
:root {
  /* Campus & Academic Cultural Palette */
  --primary: #1e3a8a;          /* 典雅书香藏青 */
  --primary-light: #2563eb;    /* 活力学府蓝 */
  --primary-soft: #eff6ff;     /* 晨曦微蓝纸韵 */
  --primary-deep: #0f172a;     /* 深邃墨色 */
  
  --academic-red: #991b1b;     /* 朱砂红 · 批注权威之色 */
  --academic-gold: #b45309;    /* 金石黄 · 硕果与标兵 */
  --academic-teal: #0f766e;    /* 墨绿 · 思政树人 */
  
  --accent: #d97706;           /* 典雅丹枫 */
  --accent-soft: #fffbeb;
  
  --success: #059669;          /* 竹青生机 */
  --success-soft: #ecfdf5;
  --warning: #d97706;          /* 杏黄提醒 */
  --warning-soft: #fffbeb;
  --danger: #dc2626;           /* 赭石警示 */
  --danger-soft: #fef2f2;
  
  --bg-main: #f8fafc;          /* 清雅素白背景 */
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  
  --text-main: #1e293b;        /* 雅正墨黑 */
  --text-muted: #64748b;       /* 儒雅铅灰 */
  
  --font-serif: -apple-system, "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, STSong, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 20px 40px -8px rgba(30, 58, 138, 0.16);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(180, 83, 9, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Typography Enhancements */
h1, h2, h3, .academic-heading {
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
}

/* Top Campus Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  border-radius: 12px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
  transition: transform 0.2s ease;
}

.brand-icon:hover {
  transform: scale(1.04) rotate(-2deg);
}

.brand-title h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-deep);
  line-height: 1.25;
}

.brand-title p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Nav Menu Tabs */
.nav-menu {
  display: flex;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 0.3rem;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.6);
}

.nav-link.active {
  color: var(--primary);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.model-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
}

.btn-logout {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: background 0.15s;
}

.btn-logout:hover {
  background: var(--danger-soft);
}

/* Notice Banner */
.notice-banner {
  background: linear-gradient(90deg, #eff6ff 0%, #f0fdfa 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.notice-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
  color: #1e40af;
  font-weight: 600;
}

/* Layout Cards */
.main-wrapper {
  max-width: 1280px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

.flow-step-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-header {
  padding: 1.15rem 1.5rem;
  background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-deep);
}

.card-body {
  padding: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--primary);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* Forms & Textareas */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Sample Bar */
.sample-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.sample-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-pill);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.sample-tag:hover {
  background: var(--primary-soft);
  border-color: #bfdbfe;
  transform: translateY(-1px);
}

/* Points Breakdown Cards */
.point-chip-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.point-chip-card:hover {
  border-color: #cbd5e1;
  border-left-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.point-chip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 0.4rem;
}

.textbook-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Batch Dropzone & Grid */
.batch-dropzone {
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.batch-dropzone:hover {
  border-color: var(--primary);
  background: #f8fafc;
}

.batch-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.batch-file-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.batch-file-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.batch-thumb {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.4rem;
}

.batch-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.batch-name-input {
  width: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.2rem 0;
  border-radius: 4px;
  color: var(--text-main);
}

.batch-name-input:focus {
  border-color: var(--border-focus);
  background: #ffffff;
}

.batch-status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  margin-top: 0.3rem;
}

.status-pending { background: #f1f5f9; color: #475569; }
.status-grading { background: #eff6ff; color: #1d4ed8; animation: pulse 1.5s infinite; }
.status-done { background: #ecfdf5; color: #047857; }

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* Progress Bar */
.progress-container {
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #059669);
  width: 0%;
  transition: width 0.3s ease;
}

/* Student Result Accordion Card */
.student-result-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.2s ease;
}

.student-result-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.student-result-header {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: #ffffff;
  user-select: none;
}

.student-result-header:hover {
  background: #f8fafc;
}

.student-score-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.score-pill {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
}

.student-result-detail {
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid var(--border);
}

/* Diagnostic Sections */
.diag-section {
  margin-bottom: 1.25rem;
}

.diag-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.diag-card {
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.6;
}

.diag-pros {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.diag-cons {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.diag-advice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* Tables */
.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.log-table th {
  background: #f8fafc;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.log-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}

.log-table tr:hover td {
  background: #f8fafc;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  border: 1px solid var(--border);
}

.modal-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.5rem;
}

/* Knowledge Tree */
.knowledge-tree {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  min-height: 480px;
}

.book-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.book-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.book-item:hover {
  background: #f8fafc;
  color: var(--primary);
}

.book-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #bfdbfe;
}

.book-content {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: #ffffff;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Utilities */
.hidden {
  display: none !important;
}

.svg-icon {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.15em;
  fill: currentColor;
  display: inline-block;
}
