/* Function-led visual system for the Gongfa AI teaching product. */
:root {
  --primary: #176b55;
  --primary-dark: #103f34;
  --primary-light: #e5f1ec;
  --gold: #b47c2c;
  --gold-dark: #80551c;
  --gold-light: #f8f0df;
  --coral: #bd5d4a;
  --sky: #357aa4;
  --plum: #725d88;
  --ink: #172a23;
  --text: #32423b;
  --text-light: #708079;
  --bg: #edf2ef;
  --bg-2: #f7f9f8;
  --card: #ffffff;
  --radius: 7px;
  --shadow: 0 5px 18px rgba(25, 54, 44, 0.07);
  --shadow-strong: 0 12px 30px rgba(18, 52, 41, 0.13);
}

body {
  background: #edf2ef;
  color: var(--text);
}

body::before {
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(23, 107, 85, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 107, 85, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
}

button,
select,
input {
  font-family: inherit;
}

button {
  letter-spacing: 0;
}

.topbar {
  min-height: 66px;
  padding: 9px 22px;
  gap: 18px;
  background: #143f34;
  border-bottom: 2px solid #b47c2c;
  box-shadow: 0 5px 20px rgba(14, 47, 38, 0.2);
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
}

.brand-sub {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.68);
  opacity: 1;
}

.nav {
  gap: 2px;
}

.nav button {
  min-height: 38px;
  padding: 7px 13px;
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 600;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav button.active {
  background: #f7faf8;
  color: #154f40;
  box-shadow: inset 0 -2px 0 #b47c2c;
}

.login-entry,
.auth-account-main {
  border-radius: 5px;
}

main {
  width: min(100%, 1340px);
  max-width: 1340px;
  padding: 22px 24px 56px;
}

.page {
  animation-duration: 0.22s;
}

.section-title {
  color: var(--ink);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
}

.section-desc {
  margin-top: 5px;
  margin-bottom: 18px;
  color: var(--text-light);
  font-size: 13px;
}

/* Home: project identity and the 33-joint visual signature. */
#page-home .hero {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  padding: 54px 48px 44px;
  border: 1px solid #285e4f;
  border-bottom: 5px solid #b47c2c;
  border-radius: 8px;
  background: #143f34;
  color: #fff;
  text-align: left;
  box-shadow: var(--shadow-strong);
}

#page-home .hero::after {
  content: "33";
  position: absolute;
  right: 34px;
  top: 50%;
  transform: translateY(-54%);
  color: rgba(255, 255, 255, 0.065);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 250px;
  font-weight: 700;
  line-height: 0.8;
  pointer-events: none;
}

.hero-eyebrow {
  position: relative;
  z-index: 1;
  width: max-content;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-left: 3px solid #d3a558;
  background: rgba(255, 255, 255, 0.07);
  color: #f0d6a7;
  font-size: 12px;
  font-weight: 700;
}

#page-home .hero h1 {
  position: relative;
  z-index: 1;
  max-width: 790px;
  margin: 0 0 15px;
  font-size: 39px;
  line-height: 1.28;
  text-align: left;
}

#page-home .hero p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 0 25px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  text-align: left;
}

.hero-btns {
  position: relative;
  z-index: 1;
  justify-content: flex-start;
}

.hero-btn {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 5px;
}

.hero-btn-primary {
  background: #f5f8f6;
  color: #124c3d;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
}

.hero-stats {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 34px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
}

.hstat {
  text-align: left;
}

.hstat .n {
  font-variant-numeric: tabular-nums;
}

.block {
  margin-top: 34px;
}

.flow,
.feature-grid,
.scene-grid {
  gap: 12px;
}

.flow-step,
.feature,
.scene {
  border: 1px solid #dbe5e0;
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.flow-step {
  border-top: 3px solid #176b55;
}

.flow-step:nth-child(2) {
  border-top-color: #357aa4;
}

.flow-step:nth-child(3) {
  border-top-color: #b47c2c;
}

.feature {
  position: relative;
  min-height: 180px;
  padding: 22px;
  border-top: 3px solid #176b55;
}

.feature:nth-child(2) {
  border-top-color: #357aa4;
}

.feature:nth-child(3) {
  border-top-color: #b47c2c;
}

.feature:nth-child(4) {
  border-top-color: #725d88;
}

.feature-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 5px;
  background: #e6f1ec;
  color: #176b55;
  font-size: 0;
  font-weight: 900;
}

.feature:nth-child(1) .feature-ico::before { content: "评"; font-size: 17px; }
.feature:nth-child(2) .feature-ico::before { content: "库"; font-size: 17px; }
.feature:nth-child(3) .feature-ico::before { content: "档"; font-size: 17px; }
.feature:nth-child(4) .feature-ico::before { content: "轻"; font-size: 17px; }

.scene {
  border-left-width: 3px;
}

.badge {
  border: 1px solid #cfe0d8;
  border-radius: 4px;
  background: #f7faf8;
  font-size: 12px;
}

/* Library: four-way comparison with distinct disciplines. */
#page-library {
  max-width: none;
}

.lib-filter {
  display: inline-flex;
  gap: 0;
  margin-bottom: 16px;
  padding: 3px;
  border: 1px solid #ccd9d3;
  border-radius: 6px;
  background: #fff;
}

.lib-filter button {
  min-height: 34px;
  border-radius: 4px;
}

.lib-grid {
  gap: 12px;
}

.lib-card {
  min-width: 0;
  border: 1px solid #d8e3dd;
  border-radius: 7px;
  box-shadow: 0 4px 14px rgba(28, 58, 48, 0.06);
}

.lib-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(28, 58, 48, 0.12);
}

.lib-head {
  min-height: 88px;
  padding: 17px 18px;
  background: #176b55;
  border-bottom: 3px solid #b47c2c;
}

.lib-card:nth-child(2) .lib-head {
  background: #326b88;
}

.lib-card:nth-child(3) .lib-head {
  background: #6d514c;
}

.lib-card:nth-child(4) .lib-head {
  background: #75622e;
}

.lib-body {
  padding: 16px 18px;
}

.lib-tag,
.lib-move-tag {
  border-radius: 4px;
}

.lib-go {
  min-height: 39px;
  border-radius: 5px;
}

/* Assessment: camera and actions stay visible while feedback scrolls locally. */
#page-assess .assess-head,
#page-assess .student-task-banner,
#page-assess .assess-toolbar {
  max-width: none;
}

#page-assess .assess-head {
  margin-bottom: 10px;
  padding: 0 2px;
}

#page-assess .assess-toolbar {
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid #d6e1db;
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow);
}

#page-assess .assess-toolbar label {
  min-height: 38px;
}

#page-assess .assess-field-gongfa {
  width: 180px;
}

#page-assess .assess-field-form {
  width: min(320px, 32vw);
  max-width: 320px;
}

#page-assess .assess-status {
  border-radius: 5px;
}

.assess-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, 0.78fr);
  gap: 14px;
  align-items: start;
}

.assess-camera-column,
.assess-feedback-column {
  min-width: 0;
}

#page-assess .stage {
  width: 100%;
  max-width: none;
  height: clamp(390px, calc(100vh - 270px), 570px);
  margin: 0;
  aspect-ratio: auto;
  border: 1px solid #2b5c4c;
  border-radius: 7px;
  background: #0d1714;
  box-shadow: 0 14px 30px rgba(17, 43, 34, 0.17);
}

.assess-camera-column::before,
.assess-feedback-column::before {
  display: block;
  margin-bottom: 7px;
  color: #5f7169;
  font-size: 11px;
  font-weight: 800;
}

.assess-camera-column::before {
  content: "实时动作画面";
}

.assess-feedback-column::before {
  content: "AI 评估与纠错";
}

#page-assess .controls {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 8px;
  max-width: none;
  margin: 10px 0 0;
  padding: 0;
}

#page-assess .btn {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 6px;
}

#page-assess .btn-primary {
  background: #176b55;
  box-shadow: 0 6px 14px rgba(23, 107, 85, 0.2);
}

#page-assess .btn-outline {
  background: #fff;
  border-color: #adc4ba;
}

#page-assess .hint {
  max-width: none;
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 3px solid #b47c2c;
  border-radius: 0 5px 5px 0;
  background: #f8f3e8;
  color: #6a604d;
  text-align: left;
  font-size: 11px;
}

.assess-feedback-column {
  height: clamp(453px, calc(100vh - 216px), 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 5px;
  scrollbar-color: #a9beb5 transparent;
  scrollbar-width: thin;
}

.assess-feedback-column::-webkit-scrollbar {
  width: 6px;
}

.assess-feedback-column::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #a9beb5;
}

#page-assess .score-panel {
  position: sticky;
  top: 0;
  z-index: 3;
  max-width: none;
  min-height: 104px;
  margin: 0 0 9px;
  padding: 13px 15px;
  border: 1px solid #28594a;
  border-left: 4px solid #d0a157;
  border-radius: 7px;
  background: #173f34;
  box-shadow: 0 8px 18px rgba(20, 59, 48, 0.16);
}

#page-assess .score-num {
  min-width: 86px;
  font-size: 42px;
}

#page-assess .score-advice {
  font-size: 12px;
  line-height: 1.65;
}

#page-assess .move-panel {
  max-width: none;
  margin: 0 0 9px;
  padding: 0;
}

#page-assess .move-stage {
  border: 1px solid #d4e1db;
  border-radius: 6px;
  background: #f5f9f7;
}

#page-assess .move-stages {
  gap: 6px;
}

#page-assess .mstage {
  padding: 8px;
  border: 1px solid #dbe5e0;
  border-radius: 5px;
  box-shadow: none;
}

#page-assess .core-cards {
  gap: 6px;
}

#page-assess .core-card {
  padding: 10px 7px;
  border-radius: 5px;
  box-shadow: none;
}

#page-assess .core-name {
  font-size: 11px;
}

#page-assess .core-score {
  font-size: 24px;
}

#page-assess .dims {
  grid-template-columns: 1fr;
  gap: 6px;
  max-width: none;
  margin: 0;
  padding: 0;
}

#page-assess .dim {
  padding: 9px 11px;
  border: 1px solid #dce5e1;
  border-radius: 5px;
  box-shadow: none;
}

#page-assess .dim-head {
  margin-bottom: 4px;
}

#page-assess .dim-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-assess .checklist-panel,
#page-assess .teaching-guide {
  max-width: none;
  margin-top: 14px;
}

#page-assess .checklist-panel,
#page-assess .teaching-guide-card {
  border-radius: 7px;
}

/* Student tasks: progress and next action are the primary hierarchy. */
#page-tasks .student-task-page-head {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid #d5e0da;
}

.student-task-summary {
  gap: 9px;
  margin-top: 16px;
}

.student-task-summary-item,
.student-task-page-card,
.class-task-card {
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.student-task-summary-item {
  min-height: 94px;
  padding: 16px;
  border-top: 3px solid #176b55;
  border-left-width: 1px;
}

.student-task-summary-item:nth-child(2) {
  border-top-color: #357aa4;
}

.student-task-summary-item:nth-child(3) {
  border-top-color: #b47c2c;
}

.student-task-page-section {
  margin-top: 22px;
}

.student-task-page-card {
  padding: 17px 18px;
  border-left-width: 3px;
}

.task-primary-btn,
.task-secondary-btn,
.task-delete-btn,
.teacher-action {
  border-radius: 5px;
}

/* Records: an analysis page rather than a loose list. */
#page-records .rec-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

#page-records .rec-stat {
  min-height: 96px;
  padding: 16px;
  border: 1px solid #d9e3de;
  border-top: 3px solid #176b55;
  border-radius: 7px;
  box-shadow: var(--shadow);
}

#page-records .rec-stat:nth-child(2) { border-top-color: #357aa4; }
#page-records .rec-stat:nth-child(3) { border-top-color: #b47c2c; }
#page-records .rec-stat:nth-child(4) { border-top-color: #bd5d4a; }

.trend-shell,
.teacher-records-section {
  border-radius: 7px;
}

#page-records .trend-shell {
  min-height: 290px;
}

#page-records .rec-list {
  margin-top: 14px;
  border: 1px solid #d8e2dd;
  border-radius: 7px;
  box-shadow: var(--shadow);
}

#page-records .rec-row {
  min-height: 72px;
}

/* Teacher workspace: dense, calm, and optimized for scanning. */
#page-teacher .section-desc {
  margin-bottom: 12px;
}

.teacher-context {
  border-radius: 6px;
  background: #f8faf9;
}

.teacher-toolbar {
  position: sticky;
  top: 76px;
  z-index: 8;
  gap: 7px;
  padding: 8px;
  border-radius: 7px;
  box-shadow: 0 7px 18px rgba(27, 57, 47, 0.09);
}

.teacher-toolbar select,
.teacher-action {
  min-height: 36px;
}

.teacher-metrics {
  gap: 9px;
}

.teacher-metric {
  min-height: 100px;
  border-radius: 7px;
  background: #fff;
}

.teacher-panel,
.teacher-table-wrap,
.teacher-records-section {
  border-radius: 7px;
}

.teacher-panel {
  padding: 17px;
}

.teacher-table th,
.teacher-record-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf4f1;
}

.teacher-table td,
.teacher-record-table td {
  line-height: 1.55;
}

/* Dialogs and shared focus states. */
.modal {
  border: 1px solid #d6e1dc;
  border-radius: 7px;
  box-shadow: 0 24px 60px rgba(13, 42, 33, 0.24);
}

.modal-head {
  min-height: 54px;
  background: #f5f8f6;
}

.login-role-card {
  border-radius: 7px;
}

.login-role-icon {
  border-radius: 6px;
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(53, 122, 164, 0.25);
  outline-offset: 2px;
}

footer {
  border-top: 1px solid #d3ded8;
  background: #e8efeb;
}

@media (max-width: 1080px) {
  main {
    padding-inline: 18px;
  }

  .assess-workspace {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  #page-home .hero::after {
    right: 10px;
    font-size: 210px;
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  #page-home .hero {
    min-height: 430px;
    padding: 42px 30px 34px;
  }

  #page-home .hero h1 {
    font-size: 32px;
  }

  #page-home .hero::after {
    top: auto;
    right: 18px;
    bottom: 40px;
    transform: none;
    font-size: 150px;
  }

  .assess-workspace {
    grid-template-columns: 1fr;
  }

  #page-assess .stage {
    height: min(62vw, 520px);
    min-height: 390px;
  }

  .assess-feedback-column {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  #page-assess .score-panel {
    position: static;
  }

  #page-assess .dims {
    grid-template-columns: 1fr 1fr;
  }

  .teacher-toolbar {
    position: static;
  }
}

@media (max-width: 620px) {
  main {
    padding: 16px 10px 42px;
  }

  .section-title {
    font-size: 21px;
  }

  #page-home .hero {
    min-height: 455px;
    padding: 34px 22px 28px;
  }

  #page-home .hero h1 {
    font-size: 28px;
  }

  #page-home .hero p {
    font-size: 13px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .lib-filter {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  #page-assess .assess-toolbar {
    grid-template-columns: 1fr;
  }

  #page-assess .assess-field-gongfa,
  #page-assess .assess-field-form {
    width: 100%;
    max-width: none;
  }

  #page-assess .stage {
    height: 66vw;
    min-height: 310px;
  }

  #page-assess .controls {
    grid-template-columns: 1fr 1fr;
  }

  #page-assess #btnHistory {
    grid-column: 1 / -1;
  }

  #page-assess .dims,
  #page-records .rec-stats {
    grid-template-columns: 1fr 1fr;
  }

  .student-task-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  #page-assess .dims,
  #page-records .rec-stats {
    grid-template-columns: 1fr;
  }

  #page-assess .controls {
    grid-template-columns: 1fr;
  }

  #page-assess #btnHistory {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lib-card,
  .feature,
  .student-task-page-card {
    transition: none;
  }
}
