* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: rgba(61, 116, 245, 0.2);
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #1e3a6e;
  background: #9fd4f0 url("imges/bj.jpg") center center no-repeat;
  background-size: cover;
  overflow-x: hidden;
}

.page {
  height: 100%;
  min-height: 100%;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  width: 94%;
  height: 92%;
  margin: 0 auto;
  background: #fff;
  border-radius: 36px;
  box-shadow: 0 18px 50px rgba(40, 80, 140, 0.18);
  padding: 40px 48px 36px;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.card-header {
  text-align: center;
  margin-bottom: 28px;
  flex-shrink: 0;
}

.card-header h1 {
  font-size: 48px;
  font-weight: 800;
  color: #1a3568;
}

.card-header p {
  margin-top: 12px;
  font-size: 22px;
  color: #8b97a8;
}

.question-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 18px 20px;
}

.q-btn {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 72px;
  padding: 18px 24px;
  border: 1px solid #e8edf4;
  border-radius: 18px;
  background: #f7f9fc;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: #3b6ef0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

.q-btn.help {
  color: #e08a28;
}

.q-btn.wide {
  grid-column: 1 / -1;
}

.q-btn:active {
  background: #e8f0ff;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(16, 36, 72, 0.55);
  z-index: 99999;
  overflow: auto;
}

.modal-overlay.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px;
}

.modal-overlay.open.single-video {
  align-items: center;
  overflow: hidden;
  padding: 12px 16px;
}

.modal {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  background: #fff;
  border-radius: 28px;
  padding: 28px 32px 24px;
  position: relative;
}

.modal.single-video {
  width: 86%;
  max-width: 1440px;
  height: auto;
  max-height: 94vh;
  padding: 22px 28px 18px;
  display: flex;
  flex-direction: column;
}

.modal.single-video .modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: #f2f5f9;
  color: #5b6b82;
  cursor: pointer;
  font-size: 32px;
  line-height: 56px;
  touch-action: manipulation;
}

.modal h2 {
  font-size: 28px;
  padding-right: 56px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.answer-box {
  background: #f3f7ff;
  border: 1px solid #e3ebfb;
  border-radius: 16px;
  padding: 10px 16px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.answer-box .label,
.method-card .label {
  font-size: 14px;
  font-weight: 700;
  color: #3d74f5;
  margin-bottom: 6px;
}

.answer-box p {
  font-size: 22px;
  line-height: 1.7;
  color: #243a63;
}

.video-wrap {
  background: #111;
  border-radius: 16px;
  overflow: hidden;
}

.video-wrap video {
  display: block;
  width: 100%;
  max-height: 52vh;
  background: #111;
}

.modal.single-video .video-wrap {
  flex: 0 0 auto;
  width: 100%;
  background: transparent;
  text-align: center;
}

.modal.single-video .video-wrap video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(94vh - 220px);
  margin: 0 auto;
  background: #000;
  border-radius: 16px;
}

.video-error {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  color: #ffe8e8;
  background: #3a1c22;
}

.methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.method-card {
  background: #fff8f0;
  border: 1px solid #f3e2c8;
  border-radius: 16px;
  padding: 14px;
}

.method-card .label {
  color: #e08a28;
}

.method-card p {
  font-size: 16px;
  line-height: 1.65;
  color: #5a3b16;
  margin-bottom: 12px;
}

@media (max-width: 720px) {
  .card {
    width: 96%;
    height: auto;
    min-height: 92%;
    padding: 26px 18px 22px;
    border-radius: 28px;
  }

  .card-header h1 {
    font-size: 28px;
  }

  .card-header p,
  .q-btn {
    font-size: 16px;
  }

  .question-grid,
  .methods {
    grid-template-columns: 1fr;
  }

  .q-btn.wide {
    grid-column: auto;
  }

  .modal {
    padding: 22px 16px 16px;
  }

  .modal.single-video {
    width: 92%;
    height: auto;
    max-height: 96vh;
    padding: 18px 12px 12px;
  }
}
