﻿[v-cloak] {
  display: none;
}

:root {
  --green: #05b000;
  --green-dark: #069400;
  --green-soft: #2fd048;
  --line: #d9d9d9;
  --line-dark: #858585;
  --text: #222;
  --muted: #7f7f7f;
  --bg: #f2f2f2;
  --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family:
    "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  min-width: 320px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  background: linear-gradient(to bottom, #0aa700 0, #09a400 70%, #079900 100%);
  box-shadow:
    inset 0 4px 8px rgba(255, 255, 255, 0.35),
    0 2px 3px rgba(0, 0, 0, 0.12);
  border-bottom: 3px solid #e5e5e5;
}

.site-header__inner {
  max-width: 980px;
  margin: 0 auto;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 18px 16px;
}

.site-logo {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
}

.site-title {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.32);
  line-height: 1.25;
  letter-spacing: 0;
}

.page-main {
  padding: 28px 16px 18px;
}

.query-card,
.result-card,
.state-card {
  width: min(940px, calc(100vw - 32px));
  margin: 0 auto;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.query-card {
  padding: 34px 40px 38px;
  min-height: 600px;
}

.query-form {
  max-width: 520px;
  margin: 0 auto;
  padding-top: 4px;
}

.query-row {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.query-label {
  text-align: right;
  font-size: 18px;
  color: #333;
}

.query-input {
  width: 100%;
  height: 40px;
  border: 1px solid #dddddd;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 16px;
  color: #333;
  background: linear-gradient(to bottom, #ffffff 0, #fcfcfc 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.query-input::placeholder {
  color: #bdbdbd;
}

.captcha-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.query-input--captcha {
  max-width: 130px;
}

.captcha-image-button {
  padding: 0;
  width: 110px;
  height: 38px;
  border: 1px solid #d8f3f1;
  background: #f2fffd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.captcha-image {
  display: block;
  width: 110px;
  height: 38px;
}

.form-error {
  margin: -6px 0 18px;
  color: #cb2f2f;
  text-align: center;
  font-size: 14px;
}

.query-submit-wrap,
.result-actions,
.admin-submit {
  text-align: center;
}

.query-submit-wrap {
  margin: 0.4rem 0;
}

.primary-button,
.secondary-button,
.danger-button {
  height: 42px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0 22px;
  font-size: 16px;
  letter-spacing: 0;
}

.primary-button {
  min-width: 184px;
  color: #fff;
  background: linear-gradient(to bottom, #09b500 0, #06a900 85%);
  border-color: #068d00;
  box-shadow: 0 2px 4px rgba(0, 88, 0, 0.24);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  opacity: 0.62;
  cursor: default;
}

.secondary-button {
  color: #23592a;
  background: #f2fff2;
  border-color: #bddfbd;
}

.danger-button {
  color: #ad2020;
  background: #fff4f4;
  border-color: #e6bcbc;
}

.query-submit {
  margin: 14px auto 0;
  width: 190px;
  height: 42px;
  font-size: 18px;
}

.notice-box {
  color: #000;
  padding: 0.03rem;
  border-radius: 0.04rem;
  border: 0.03rem solid #00923f;
  margin: 0.4rem 0.3rem 0.3rem;
}

.notice-box__panel {
  margin: 0;
  background: #fff;
  border-radius: 0.04rem;
  line-height: 0.26rem;
  border: 0.01rem solid #00913e;
  font-size: 16px;
  padding-bottom: 0.1rem;
}

.notice-box__title {
  margin: 0.01rem 0 0.05rem 0.015rem;
  background: linear-gradient(#299447, #2eb163, #309f4b);
  display: inline-block;
  padding: 0.01rem 0.2rem;
  border-bottom-left-radius: 0.15rem;
  border-top-right-radius: 0.2rem;
  color: #fff;
  font-size: 16px;
}

.notice-box__item {
  margin: 0;
  padding: 0 0.2rem;
  font-size: 16px;
  line-height: 1.65;
}

.site-footer {
  padding: 12px 16px 36px;
}

.site-footer__inner {
  max-width: 940px;
  margin: 0 auto;
  text-align: center;
  color: #414141;
  font-size: 16px;
  line-height: 1.65;
}

.site-footer__inner p {
  margin: 0;
}

.site-footer__police {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer__police a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #414141;
  text-decoration: none;
}

.site-footer__police img {
  width: 20px;
  height: 20px;
}

.site-footer__admin-note {
  display: none;
}

.state-card {
  padding: 40px 24px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 18px;
}

.state-card--error {
  color: #c12c2c;
}

.result-card {
  position: relative;
  overflow: hidden;
  padding: 0.26rem 0.34rem 0.34rem;
  background: #fff;
}

.result-watermark {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.result-watermark__item {
  position: absolute;
  color: rgba(118, 118, 118, 0.42);
  font-family: Arial, sans-serif;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-12deg);
  transform-origin: left top;
  letter-spacing: 0;
}

.result-card__content {
  position: relative;
  z-index: 1;
}

.result-top {
  display: flex;
  justify-content: flex-start;
  gap: 0.24rem;
  align-items: flex-start;
  margin-bottom: 0.02rem;
  font-size: 0.18rem;
}

.student-basic {
  flex: 1 1 auto;
  padding-top: 0.12rem;
  min-width: 0;
}

.student-basic__line--desktop {
  display: grid;
  grid-template-columns: minmax(3.9em, max-content) minmax(2.2em, max-content);
  justify-content: start;
  column-gap: 1.4em;
  font-size: 1em;
  width: max-content;
  max-width: 100%;
}

.student-basic__mobile {
  display: none;
}

.student-basic__line {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.1rem;
  font-size: 1em;
  font-weight: 400;
  margin-bottom: 0.1rem;
}

.student-basic__label {
  color: #111;
  font-size: 1em;
}

.student-basic__value {
  flex: 1 1 auto;
  font-size: 1em;
  font-weight: 700;
  word-break: break-all;
}

.student-basic__pair {
  display: flex;
  align-items: baseline;
  gap: 0.08rem;
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 400;
  font-size: 1em;
}

.student-basic__pair--name {
  justify-content: flex-start;
}

.student-basic__line--desktop .student-basic__pair:first-child {
  margin-right: 5em;
  margin-left: 7em;
}

.student-basic__line--desktop .student-basic__value {
  flex: 0 1 auto;
}

.result-qr-wrap {
  width: 8.33em;
  flex: 0 0 8.33em;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: relative;
  z-index: 3;
}

.result-qr {
  width: 8.33em;
  height: 8.33em;
  background: #fff;
  display: block;
  object-fit: contain;
}

.result-section {
  margin-top: 0;
}

.result-section + .result-section {
  margin-top: 0.28rem;
}

.section-title {
  margin: 0.02rem 0 0.12rem;
  text-align: center;
  font-size: 0.2rem;
  font-weight: 700;
  position: relative;
  z-index: 3;
}

.section-title span::before,
.section-title span::after {
  content: "";
  display: inline-block;
  width: 0.08rem;
  height: 0.34rem;
  vertical-align: middle;
  background: #2bbf33;
  margin: 0 0.14rem;
}

.section-title span {
  display: inline-flex;
  align-items: center;
}

.table-wrap {
  overflow-x: auto;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: rgba(255, 255, 255, 0.34);
  position: relative;
  z-index: 1;
}

.score-table th,
.score-table td {
  border: 1px solid var(--line-dark);
  text-align: center;
  vertical-align: middle;
  padding: 0.14rem 0.06rem;
  font-size: 0.16rem;
  line-height: 1.35;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.82);
}

.score-table--subject th,
.score-table--subject td {
  font-weight: 800;
  font-size: 0.14rem;
}

.score-table--subject th {
  font-weight: 900;
  font-size: 0.14rem;
}

.score-table--subject tr:first-child th {
  font-weight: 900;
}

.score-table.score-table--subject th {
  font-weight: 900;
}

.score-table th {
  font-size: 0.18rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.9);
}

.score-table--subject th,
.score-table--rank th {
  background: #efefef;
}

.score-table--rank th {
  padding: 0.12rem 0.06rem;
  line-height: 1.25;
  font-size: 0.14rem;
  font-weight: 700;
  text-align: center;
}

.score-table--rank td {
  font-weight: 900;
}

.rank-th-text--mobile {
  display: none;
}

.result-notes {
  margin-top: 0.18rem;
  font-size: 0.14rem;
  line-height: 1.6;
  position: relative;
  z-index: 3;
  color: #111;
  font-weight: 700;
}

.result-notes p {
  margin: 0;
  white-space: pre-line;
}

.notes-mobile-break {
  display: none;
}

.notes-mobile-indent {
  display: inline;
}

.anti-code {
  margin: 0.14rem 0 0.18rem;
  color: #e60000;
  font-size: 0.13rem;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-all;
  position: relative;
  z-index: 3;
  text-align: center;
}

.result-exit {
  width: 1.9rem;
  font-size: 0.18rem;
}

.page-main--admin {
  padding-top: 24px;
}

.admin-page {
  max-width: 1180px;
  margin: 0 auto;
}

.admin-login-card,
.admin-panel {
  background: #fff;
  box-shadow: var(--card-shadow);
}

.admin-login-card {
  width: min(420px, calc(100vw - 32px));
  margin: 40px auto 0;
  padding: 28px;
}

.admin-title {
  margin: 0;
  font-size: 28px;
}

.admin-subtitle {
  margin: 8px 0 0;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

.admin-login-form {
  margin-top: 24px;
}

.admin-field {
  display: block;
  margin-bottom: 16px;
}

.admin-field span {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}

.admin-field input,
.admin-field textarea {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  font-size: 15px;
}

.admin-field textarea {
  resize: vertical;
}

.admin-login-button {
  width: 100%;
}

.admin-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-toolbar__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
}

.admin-panel {
  padding: 20px;
}

.admin-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.admin-panel__header h3 {
  margin: 0;
  font-size: 20px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 650px;
  overflow-y: auto;
}

.student-item {
  width: 100%;
  border: 1px solid #dbe5db;
  border-radius: 6px;
  background: #f8fbf8;
  padding: 12px 14px;
  text-align: left;
}

.student-item--active {
  border-color: #08a100;
  background: #efffed;
}

.student-item__name {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.student-item__meta {
  display: block;
  margin-top: 4px;
  color: #666;
  font-size: 13px;
}

.admin-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.admin-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 14px;
}

.save-message {
  margin: 4px 0 0;
  color: #10731a;
  font-size: 14px;
}

.site-footer--admin {
  padding-top: 22px;
}

@media (max-width: 900px) {
  .site-header__inner {
    min-height: 100px;
  }

  .site-title {
    font-size: 24px;
  }

  .query-card {
    padding: 28px 18px 30px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header__inner {
    justify-content: center;
    min-height: auto;
    gap: 0.14rem;
    padding: 0.42rem 0.22rem;
  }

  .site-header {
    border-bottom-width: 0.03rem;
    box-shadow:
      inset 0 0.04rem 0.08rem rgba(255, 255, 255, 0.22),
      0 0.02rem 0.03rem rgba(0, 0, 0, 0.12);
  }

  .site-logo {
    width: 0.65rem;
    height: 0.65rem;
  }

  .site-title {
    font-size: 0.4rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
  }

  .page-main {
    padding: 0.2rem 0 0.12rem;
  }

  .query-card,
  .result-card,
  .state-card {
    width: 100%;
    box-shadow: none;
  }

  .query-card {
    min-height: 0;
    padding: 0.2rem;
  }

  .query-form {
    max-width: 100%;
    padding: 0.44rem 0.1rem 0;
  }

  .query-row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0.18rem;
  }

  .query-label {
    display: none;
  }

  .query-input {
    height: 0.72rem;
    font-size: 0.34rem;
    padding: 0 0.16rem;
  }

  .query-input::placeholder {
    font-size: 0.3rem;
  }

  .captcha-wrap {
    gap: 0;
    justify-content: space-between;
  }

  .query-input--captcha {
    max-width: none;
    min-width: 0;
    flex: 0 0 63%;
  }

  .captcha-image-button {
    flex: 0 0 35%;
    width: 35%;
    height: 0.72rem;
  }

  .captcha-image {
    width: 100%;
    height: 0.72rem;
  }

  .query-submit {
    margin-top: 0;
    width: 85%;
    height: 0.84rem;
    font-size: 0.42rem;
    font-weight: 700;
  }

  .notice-box {
    margin: 0 0.3rem 0.34rem;
    padding: 0.04rem;
  }

  .notice-box__panel {
    line-height: 0.42rem;
    font-size: 0.3rem;
  }

  .notice-box__title {
    margin: 0.01rem 0 0.06rem 0.015rem;
    padding: 0.02rem 0.22rem;
    font-size: 0.3rem;
  }

  .notice-box__item {
    padding: 0 0.22rem;
    font-size: 0.3rem;
    line-height: 1.56;
  }

  .site-footer {
    padding: 0.08rem 0.16rem 0.3rem;
  }

  .site-footer__inner {
    font-size: 0.29rem;
    line-height: 1.58;
  }

  .site-footer__police {
    gap: 0.1rem 0.18rem;
  }

  .site-footer__police img {
    width: 0.2rem;
    height: 0.2rem;
  }

  .result-card {
    padding: 0.28rem 0.24rem 0.34rem;
  }

  .result-watermark {
  }

  .result-watermark__item {
    color: rgba(96, 96, 96, 0.44);
    font-weight: 700;
  }

  .result-top {
    align-items: flex-start;
    gap: 0.18rem;
    margin-bottom: 0;
    font-size: 0.26rem;
  }

  .result-card__content {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 2.3rem);
  }

  .student-basic {
    padding-top: 0.08rem;
    min-width: 0;
    flex: 1;
  }

  .student-basic__line.student-basic__line--desktop {
    display: none;
  }

  .student-basic__mobile {
    display: block;
    width: 100%;
  }

  .student-basic__line {
    display: flex;
    align-items: baseline;
    gap: 0.08rem;
    margin-bottom: 0;
    font-size: 0.36rem;
    line-height: 1.16;
    font-weight: 900;
  }

  .student-basic__mobile .student-basic__line:first-child {
    margin-bottom: 0.3rem;
  }

  .student-basic__label {
    flex: 0 0 auto;
    letter-spacing: 0;
    font-weight: 900;
  }

  .student-basic__value {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 900;
  }

  .result-qr-wrap {
    width: 2.2rem;
    flex: 0 0 2.2rem;
    align-items: flex-start;
  }

  .result-qr {
    width: 2.08rem;
    height: 2.08rem;
  }

  .result-top + .result-section {
    margin-top: 0.16rem;
  }

  .result-section + .result-section {
    margin-top: 0.38rem;
  }

  .section-title {
    margin: 0.01rem 0 0.18rem;
    font-size: 0.39rem;
    font-weight: 900;
  }

  .section-title span::before,
  .section-title span::after {
    width: 0.1rem;
    height: 0.38rem;
    margin: 0 0.12rem;
  }

  .score-table th,
  .score-table td {
    padding: 0.18rem 0.04rem;
    font-size: 0.25rem;
    line-height: 1.34;
    word-break: normal;
    white-space: normal;
    font-weight: 700;
  }

  .score-table th {
    font-size: 0.25rem;
    font-weight: 900;
  }

  .score-table--subject th,
  .score-table--subject td {
    width: auto;
    font-weight: 900;
    font-size: 0.24rem;
    padding-top: 0.16rem;
    padding-bottom: 0.16rem;
  }

  .score-table--subject th,
  .score-table--subject td,
  .score-table.score-table--subject th,
  .score-table.score-table--subject td {
    font-weight: 900;
  }

  .score-table--rank th,
  .score-table--rank td {
    width: 25%;
    padding-left: 0.06rem;
    padding-right: 0.06rem;
  }

  .score-table--rank th {
    font-size: 0.21rem;
    line-height: 1.34;
    font-weight: 900;
    padding-top: 0.18rem;
    padding-bottom: 0.16rem;
    word-break: break-all;
    white-space: normal;
  }

  .score-table--rank .rank-th-text {
    display: inline-block;
    white-space: normal;
    word-break: break-all;
  }

  .score-table--rank .rank-th-text--desktop {
    display: none;
  }

  .score-table--rank .rank-th-text--mobile {
    display: inline-block;
  }

  .score-table--rank .rank-th-line {
    display: block;
    white-space: nowrap;
    word-break: keep-all;
  }

  .score-table--rank th br {
    display: none;
  }

  .score-table--rank td {
    font-size: 0.27rem;
    font-weight: 900;
    padding-top: 0.18rem;
    padding-bottom: 0.18rem;
  }

  .result-notes {
    margin-top: 0.24rem;
    font-size: 0.24rem;
    line-height: 1.72;
    color: #111;
    font-weight: 900;
  }

  .result-notes p {
    margin: 0;
    white-space: normal;
  }

  .notes-mobile-break {
    display: block;
  }

  .notes-mobile-indent {
    display: inline-block;
    padding-left: 2.95em;
  }

  .anti-code {
    margin-top: auto;
    padding-top: 0.22rem;
    font-size: 0.22rem;
    line-height: 1.42;
    text-align: center;
    word-break: break-all;
    font-weight: 900;
    transform: translateY(-0.6em);
  }

  .result-exit {
    width: 3.6rem;
    min-width: 3.6rem;
    height: 0.62rem;
    font-size: 0.3rem;
    font-weight: 700;
  }

  .result-actions {
    margin-top: 0.3rem;
  }

  .admin-page {
    padding: 0 18px;
  }

  .admin-title {
    font-size: 0.36rem;
  }

  .admin-subtitle {
    font-size: 0.26rem;
  }

  .admin-field span {
    font-size: 0.26rem;
  }

  .admin-field input,
  .admin-field textarea {
    font-size: 0.28rem;
  }

  .student-item__name {
    font-size: 0.3rem;
  }

  .student-item__meta,
  .save-message,
  .form-error {
    font-size: 0.24rem;
  }

  .admin-toolbar,
  .admin-panel__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-toolbar__actions,
  .admin-editor-actions {
    width: 100%;
  }

  .admin-toolbar__actions button,
  .admin-editor-actions button {
    flex: 1;
  }

  .admin-form-grid,
  .admin-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
