* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

/* 背景：上浅蓝 → 下中蓝，接近原站 */
body {
  background: linear-gradient(180deg, #b8dff5 0%, #7ec8ef 35%, #4eb0e8 70%, #3aa3e0 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 40px 24px 60px;
}

/* 院校头部：左徽标 + 右校名，比例接近原站 */
.school-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 48px;
}

.school-header__logo img {
  width: 120px;
  height: 120px;
  display: block;
  object-fit: contain;
}

.school-header__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.school-name-img {
  display: block;
  height: 96px;
  width: auto;
  object-fit: contain;
}

/* 主内容区与查询卡片同宽，底部文字左对齐贴卡片左边 */
.main-content {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.query-box {
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 60, 100, 0.12);
}

.query-box__title {
  background: #2196f3;
  color: #fff;
  text-align: center;
  padding: 13px 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
}

.query-form {
  background: #f5f5f5;
  padding: 40px 56px 44px;
}

.form-group {
  margin-bottom: 26px;
}

/* 标签在输入框上方，右对齐（与原站一致） */
.form-group label {
  display: block;
  width: 100%;
  text-align: right;
  font-size: 14px;
  color: #444;
  margin-bottom: 8px;
}

.form-group input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-size: 15px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  border-color: #2196f3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.12);
}

.btn-query {
  display: block;
  width: 148px;
  margin: 30px auto 0;
  padding: 10px 0;
  background: #2980b9;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-size: 16px;
  letter-spacing: 8px;
  text-indent: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-query:hover {
  background: #1f6fa3;
}

.btn-query:active {
  background: #1a6fa0;
}

.query-results {
  margin-top: 24px;
}

.results-title {
  color: #e57373;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-left: 0;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/*
  楼梯状层次（按截图）：
  查询结果（最左）
    → 科目标题（缩进一层）
      → 灰色信息框 + 成绩按钮（再缩进一层）
*/
.result-block {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  overflow: visible;
  /* 相对「查询结果」缩进一层 */
  margin-left: 16px;
}

.result-block__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: none;
  background: transparent;
  padding: 6px 0 10px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #333;
  box-sizing: border-box;
}

.result-block__title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  padding: 0;
  margin: 0;
}

.result-block__chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid #888;
  border-bottom: 2px solid #888;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-top: -3px;
  margin-right: 4px;
}

.result-block.is-open .result-block__chevron {
  transform: rotate(225deg);
  margin-top: 3px;
}

.result-block__body {
  display: none;
  /* 相对科目标题再缩进一层 */
  margin-left: 18px;
  padding: 0;
  box-sizing: border-box;
}

.result-block.is-open .result-block__body {
  display: block;
}

.result-details {
  width: 100%;
  box-sizing: border-box;
  background: #e8e8e8;
  border-radius: 10px;
  margin: 0;
  padding: 14px 16px;
}

.result-row {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 7px 0;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  text-indent: 0;
}

.result-row .label,
.result-row .value {
  display: inline;
  margin: 0;
  padding: 0;
  white-space: normal;
  word-break: break-all;
}

.result-row .label {
  color: #555;
}

.result-row .value {
  color: #222;
  text-align: left;
}

.result-status {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 12px 0 0;
  padding: 12px;
  text-align: center;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: #5cb8d7;
  box-shadow: none;
}

.result-status.pending,
.result-status.passed {
  background: #5cb8d7;
}

/* 页脚：左对齐，贴查询框左边，不居中 */
.page-footer {
  margin-top: 22px;
  text-align: left;
  padding: 0;
}

.page-footer p {
  font-size: 13px;
  color: #2c3e50;
  line-height: 1.85;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.captcha-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 340px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.captcha-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 12px;
}

.captcha-title {
  font-size: 16px;
  color: #666;
  font-weight: 500;
}

.captcha-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #e53935;
  font-size: 14px;
  cursor: pointer;
}

.captcha-tip {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

.captcha-puzzle-wrap {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 16px;
  border-radius: 6px;
  overflow: hidden;
  background: #eee;
}

.captcha-bg {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.captcha-piece {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(54 / 300 * 100%);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.35));
  z-index: 2;
}

.captcha-refresh {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #555;
  font-size: 16px;
  cursor: pointer;
  z-index: 3;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.captcha-refresh:active {
  background: #fff;
}

.captcha-slider-wrap {
  padding: 0 4px;
}

.captcha-slider-track {
  position: relative;
  height: 40px;
  background: #f0f0f0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.captcha-slider-track.success {
  border-color: #52c41a;
}

.captcha-slider-track.fail {
  border-color: #ff4d4f;
}

.captcha-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: #d6ebff;
  border-radius: 20px 0 0 20px;
  pointer-events: none;
}

.captcha-slider-track.success .captcha-slider-fill {
  background: #d9f7be;
}

.captcha-slider-track.fail .captcha-slider-fill {
  background: #ffccc7;
}

.captcha-slider-hint {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #999;
  pointer-events: none;
  padding-left: 36px;
}

.captcha-slider-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 40px;
  background: #2196f3;
  border-radius: 20px;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.captcha-slider-handle:active {
  cursor: grabbing;
  background: #1976d2;
}

.captcha-slider-handle.success {
  background: #52c41a;
}

.captcha-slider-handle.fail {
  background: #ff4d4f;
}

.handle-bars {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 16px;
}

.handle-bars::before,
.handle-bars::after {
  content: '';
  display: block;
  width: 3px;
  background: #fff;
  border-radius: 1px;
}

.handle-bars::before {
  height: 8px;
  box-shadow: 8px 6px 0 #fff, 16px 0 0 #fff;
}

.handle-bars::after {
  height: 14px;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 2000;
  pointer-events: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .page {
    padding: 20px 12px 40px;
  }

  .school-header {
    margin-bottom: 24px;
    gap: 12px;
  }

  .school-header__logo img {
    width: 88px;
    height: 88px;
  }

  .school-name-img {
    height: 68px;
  }

  .query-form {
    padding: 28px 20px 32px;
  }

  .form-group label {
    text-align: left;
  }
}
