* { box-sizing: border-box; }

.hidden { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f4f5f7;
  color: #1d1f23;
}

.topbar {
  background: #1d2733;
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar h1 {
  font-size: 1.2rem;
  margin: 0;
}

.topbar-stats {
  font-size: 0.9rem;
  opacity: 0.85;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

.view.hidden { display: none; }

.card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.card h2 {
  margin-top: 0;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 6px;
}

select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  background: white;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.88; }

.btn-big { font-size: 1.1rem; padding: 16px; }

.btn-primary { background: #2f6fed; color: white; }
.btn-secondary { background: #e7e9ec; color: #1d1f23; }
.btn-danger { background: #fde8e8; color: #b3261e; }

.rate-buttons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.rate-buttons.hidden { display: none; }
.rate-buttons .btn { margin-top: 0; }

.btn-know { background: #d8f3dc; color: #1b4332; flex: 1; }
.btn-dontknow { background: #ffd6d6; color: #7a1f1f; flex: 1; }

.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #555;
}

.badge {
  background: #e7e9ec;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
}

.question-id {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 6px;
}

.question-text {
  font-size: 1.2rem;
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 20px;
}

.btn-simple {
  background: #fff4d6;
  color: #6b4d00;
  border: 1px dashed #e0b94d;
}

.simple-box {
  background: #fff9ec;
  border: 1px dashed #e0b94d;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 10px 0 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.simple-box p { margin: 0; }

.simple-examples {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e0b94d;
}
.simple-examples.hidden { display: none; }
.examples-label {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #6b4d00;
}
.simple-examples ul {
  margin: 0;
  padding-left: 20px;
}
.simple-examples li {
  margin-bottom: 6px;
  line-height: 1.45;
}

.answer-box {
  background: #f0f4ff;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.answer-box.hidden { display: none; }

.answer-intro {
  margin-top: 0;
  font-weight: 600;
}

.answer-points {
  margin: 0;
  padding-left: 20px;
}
.answer-points li {
  margin-bottom: 8px;
  line-height: 1.45;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.summary-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}
.summary-list .result-know { color: #1b7a37; font-weight: 600; }
.summary-list .result-dontknow { color: #b3261e; font-weight: 600; }

.overall-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.overall-stats .stat-box {
  flex: 1;
  min-width: 100px;
  background: #f4f5f7;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.overall-stats .stat-box .num {
  font-size: 1.6rem;
  font-weight: 700;
}
.overall-stats .stat-box .label {
  font-size: 0.78rem;
  color: #666;
}

.subject-stats {
  margin-bottom: 16px;
}
.subject-row {
  margin-bottom: 10px;
}
.subject-row .subject-name {
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.subject-bar-track {
  background: #eee;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.subject-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2f6fed, #5fa8ff);
  border-radius: 999px;
}
