* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0a1628, #1a237e, #0d47a1, #0a1628);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  text-align: center;
  padding: 20px;
  font-size: 2rem;
  color: #4fc3f7;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.body-container {
  position: relative;
  width: 600px;
  height: 640px;
  background: #fff;
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 0 40px rgba(79, 195, 247, 0.3);
  margin-bottom: 20px;
}

.body-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.hotspot {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1565c0, #42a5f5);
  border: 2.5px solid #90caf9;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.4);
  line-height: 1;
}

.hotspot:hover {
  background: linear-gradient(135deg, #0d47a1, #1565c0);
  color: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 16px rgba(66, 165, 245, 0.7);
}

.hotspot.active {
  background: linear-gradient(135deg, #0d47a1, #1565c0);
  color: #fff;
  transform: scale(1.2);
}

.hotspot.answered {
  background: #bbb;
  border-color: #999;
  color: #666;
  cursor: default;
  pointer-events: none;
  opacity: 0.6;
}

.hotspot.answered::before {
  display: none;
}

.hotspot::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #42a5f5;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

#hs-brain       { top: 5%;    left: 50%;  transform: translateX(-50%); }
#hs-lungs       { top: 37%;   left: 46%;  transform: translateX(-50%); }
#hs-left-arm    { top: 43%;   left: 14%; }
#hs-right-arm   { top: 43%;   left: 80%; }
#hs-liver       { top: 52%;   left: 44%; }
#hs-stomach     { top: 58%;   left: 56%; }
#hs-intestines  { top: 67%;   left: 44%; }
#hs-bladder     { top: 78%;   left: 50%;  transform: translateX(-50%); }
#hs-left-leg    { top: 91%;   left: 37%; }
#hs-right-leg   { top: 91%;   left: 58%; }

/* Modal overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  justify-content: center;
  align-items: center;
}
.modal-overlay.show { display: flex; }

.modal {
  background: #fff;
  color: #222;
  border-radius: 16px;
  width: 420px;
  padding: 32px 28px 28px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  text-align: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal .modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #1565c0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: #1565c0;
  background: #e8f0fe;
}

.modal .close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
}
.modal .close-btn:hover { color: #333; }

.modal h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #111;
}

.modal .description {
  font-size: 0.92rem;
  color: #555;
  margin-bottom: 18px;
  line-height: 1.5;
}

.modal .question {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 14px;
  text-align: left;
}

.modal .options {
  text-align: left;
  margin-bottom: 20px;
}

.modal .options label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  padding: 6px 0;
  cursor: pointer;
  color: #333;
}

.modal .options input[type="radio"] {
  accent-color: #1565c0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.modal .submit-btn {
  background: linear-gradient(135deg, #1565c0, #42a5f5);
  color: #fff;
  border: none;
  padding: 12px 36px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.modal .submit-btn:hover { background: linear-gradient(135deg, #0d47a1, #1565c0); }

.modal .saved-msg {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #1565c0;
  display: none;
}

/* Check All button wrapper with progress cover */
.check-btn-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
}

.check-all-btn {
  background: linear-gradient(135deg, #1565c0, #42a5f5);
  color: #fff;
  border: none;
  padding: 16px 48px;
  border-radius: 12px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(21, 101, 192, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 1;
}
.check-all-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(66, 165, 245, 0.6);
}

.progress-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(80, 80, 80, 0.85);
  border-radius: 12px;
  z-index: 2;
  pointer-events: none;
  transition: width 0.5s ease;
}

.check-btn-wrapper.unlocked .progress-cover {
  pointer-events: none;
}
.check-btn-wrapper:not(.unlocked) .check-all-btn {
  pointer-events: none;
}

/* Results modal */
.results-list {
  text-align: left;
  margin: 16px 0;
  max-height: 300px;
  overflow-y: auto;
}
.results-list .result-item {
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.results-list .result-item.correct {
  background: #e8f5e9;
  color: #2e7d32;
}
.results-list .result-item.incorrect {
  background: #ffebee;
  color: #c62828;
}
.results-list .result-item strong {
  display: block;
  margin-bottom: 2px;
}

.result-score {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.result-score.perfect { color: #2e7d32; }
.result-score.good { color: #f57f17; }
.result-score.low { color: #c62828; }

/* Results chart */
.results-chart {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 40px;
  margin: 24px 0 20px;
  height: 160px;
}

.chart-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.chart-bar .bar {
  width: 60px;
  border-radius: 8px 8px 0 0;
  transition: height 0.8s ease;
  min-height: 8px;
}

.chart-bar .bar.correct-bar {
  background: linear-gradient(180deg, #66bb6a, #2e7d32);
}

.chart-bar .bar.incorrect-bar {
  background: linear-gradient(180deg, #ef5350, #c62828);
}

.chart-bar .bar-count {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
}

.chart-bar .bar-label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
}

footer {
  text-align: center;
  padding: 20px;
  color: #4fc3f7;
  font-size: 0.85rem;
  opacity: 0.7;
}

.download-btn {
  background: linear-gradient(135deg, #0d47a1, #1565c0) !important;
  margin-top: 10px;
  display: block;
  width: 100%;
}
.download-btn:hover {
  background: linear-gradient(135deg, #0a3270, #0d47a1) !important;
}
