body {
  font-family: "Microsoft YaHei", sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f4f4;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* 顶部固定栏 */
.header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #2a5d9f;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header img {
  width: 33px;
  height: 33px;
  margin-right: 8px;
  border-radius: 4px;
}

.header-title {
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* 中间内容区域 */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.card {
  background: #fff;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.school {
  font-size: 16px;
  color: #333;
  margin-bottom: 6px;
  font-weight: 500;
}

.school a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.highlight {
  color: #F44336;
  font-weight: 600;
}

.major-line {
  font-size: 16px;
  font-weight: 600;
  color: #2a5d9f;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.major {
  display: inline-block;
}

.score-rank {
  margin-left: 8px;
  font-weight: normal;
  font-size: 15px;
  white-space: nowrap;
}

.score-rank span {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 2px;
  color: #222;
}

.c0 {
  background: #f1f1f1;
}

.c1 {
  background: #d0f0c0;
}

.c2 {
  background: #cce5ff;
}

.c3 {
  background: #ffe5b4;
}

.history {
  font-size: 14px;
  color: #666;
  margin-top: 6px;
}

.history-title {
  margin-bottom: 2px;
}

.history-data span {
  display: inline-block;
  /* background: #f1f1f1; */
  padding: 2px 5px;
  margin: 2px 2px 0 0;
  border-radius: 4px;
  color: #333;
}

/* 底部固定栏 */
.footer {
  flex-shrink: 0;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid #ddd;
  position: sticky;
  bottom: 0;
  z-index: 1000;
}

.footer form {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.footer .left-column {
  flex: 3;
  display: flex;
  flex-direction: column;
}

.footer select,
.footer textarea {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  margin-bottom: 6px;
  box-sizing: border-box;
}

.footer textarea {
  height: 60px;
  resize: vertical;
}

.footer select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  margin-bottom: 6px;
}

.footer .row {
  display: flex;
  gap: 6px;
}

.footer input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  flex: 1;
  min-width: 0;
}

.footer .input-score {
  flex: none;
  width: 20%;
}

.footer input:focus,
.footer select:focus,
.footer textarea:focus {
  outline: none;
  border-color: #2a5d9f;
}

.footer button {
  flex: 1;
  background: #2a5d9f;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.footer button:hover {
  background: #244b7d;
}

/* 说明文字 */
.info-text {
  background: #fff;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-size: 16px;
  color: #444;
  line-height: 1.8;
}

.info-text a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.login-box {
  background: #fff;
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  width: 240px;
  margin: 0 auto 20px auto;
  text-align: center;
}

.login-title {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #2a5d9f;
}

.login-box input,
.login-box button {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.login-box input {
  border: 1px solid #ccc;
}

.login-box button {
  border: none;
  background: #2a5d9f;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

.login-box button:hover {
  background: #244b7d;
}

.error-message {
  color: #F44336;
  font-size: 13px;
  margin-bottom: 10px;
  text-align: left;
  display: none;
}

.flash-message {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.error {
  background-color: #f8d7da;
  color: #721c24;
}

.success {
  background-color: #d4edda;
  color: #155724;
}

.report-link {
  margin-left: 10px;
  font-size: 14px;
}

.report-link a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.report-link a:hover {
  color: #e0e0e0;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #2a5d9f;
  cursor: pointer;
}

.modal-close:hover {
  color: #244b7d;
}

.modal-title {
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 18px;
  font-weight: bold;
  color: #2a5d9f;
  margin-bottom: 15px;
}

.modal-qr {
  width: 300px;
  height: 300px;
  margin: 0 auto 15px;
  display: block;
}

.modal-info {
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 16px;
  color: #333;
  word-break: break-word;
}

@media (max-width: 480px) {
  .header-title {
    font-size: 18px;
  }

  .footer select,
  .footer input,
  .footer button,
  .footer textarea {
    font-size: 16px;
    padding: 6px;
  }

  .footer .input-score {
    width: 20%;
  }

  .footer .left-column {
    flex: 4;
  }

  .footer button {
    flex: 1;
  }

  .footer textarea {
    height: 50px;
  }

  .report-link {
    font-size: 13px;
    margin-left: 8px;
  }

  .modal-content {
    padding: 15px;
    max-width: 90%;
  }

  .modal-title {
    font-size: 18px;
  }

  .modal-qr {
    width: 200px;
    height: 200px;
  }

  .modal-info {
    font-size: 16px;
    line-height: 1.8;
  }

  .modal-close {
    font-size: 24px;
    top: 8px;
    right: 12px;
  }

.major-name-trigger:hover {
  /* 可以轻微提示可点击，但不要改变颜色/下划线 */
  filter: brightness(1.08);
  transition: filter 0.2s;
}

/* 如果你希望内容区域支持更好的排版 */
#coursesContent br {
  margin-bottom: 0.6em;
  display: block;
  content: "";
}

}