@import url("./reading-test.css");

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.result-card-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.results-title {
  font-size: 22px;
  font-weight: 900;
}

.results-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.main {
  margin: 12px 14px 84px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 10px;
}

.main.single-layout {
  display: flex;
  flex-direction: column;
}

.single-pane {
  width: 100%;
  height: 100%;
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}

.pane-body {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

#questionsPane {
  position: relative;
}

#questionsPane .questions-section {
  max-width: 900px;
  margin: 0 auto;
}

.results-panel {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.72);
  z-index: 9999;
  padding: 20px;
}

.results-content {
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
  padding: 20px 22px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.results-close {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 900;
  cursor: pointer;
}

.results-overview,
.results-part-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.results-overview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.results-part-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.result-card,
.results-part-card,
.results-review-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
}

.result-card {
  background: #f8fafc;
}

.result-card-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 900;
}

.results-review-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.results-footer {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.results-review-item {
  cursor: pointer;
}

.results-review-item:hover {
  background: #f8fafc;
}

.results-review-item.is-correct {
  border-left: 4px solid var(--correct);
}

.results-review-item.is-incorrect {
  border-left: 4px solid var(--incorrect);
}

.results-review-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 900;
}

.results-answer-row {
  margin-top: 6px;
  font-size: 14px;
}

.results-answer-row .correct {
  color: var(--correct);
}

.results-answer-row .incorrect,
.timer-danger {
  color: var(--incorrect);
}

.timer-warning {
  color: #c2410c;
}

.notes {
  bottom: 96px;
}

#toast {
  bottom: 94px;
}

.bottombar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 68px;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.06);
  z-index: 8000;
}

.bottom-part-nav {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.bottom-part-btn {
  min-width: 118px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  flex: 0 0 auto;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.bottom-part-btn.is-active {
  border-color: #93c5fd;
  background: #e0e7ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.bottom-part-btn.is-done {
  border-color: var(--green);
  background: var(--green-bg);
  color: #065f46;
}

.bottom-part-btn.is-audio {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.bottom-part-label {
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.bottom-part-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.qnums {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow: auto;
  margin-left: auto;
  padding-bottom: 2px;
}

.floating-part-arrows {
  position: fixed;
  right: 18px;
  bottom: 90px;
  display: flex;
  gap: 10px;
  z-index: 8200;
}

.part-arrow-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.part-arrow-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 1080px) {
  .topbar {
    height: auto;
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .brand {
    min-width: 0;
    width: 100%;
  }

  .audiobar {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .bottombar {
    flex-direction: column;
    align-items: stretch;
  }

  .results-overview,
  .results-part-grid {
    grid-template-columns: 1fr;
  }

  .main {
    margin-bottom: 130px;
  }

  .qnums {
    margin-left: 0;
  }

  .floating-part-arrows {
    right: 14px;
    bottom: 146px;
  }
}
