body {
  margin: 0;
  font-family: system-ui, Arial;
  background: #eef2f5;
}

.app {
  display: flex;
  min-height: calc(100vh - 80px);
  /* Adjust for header */
}


.topBar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

#mapLayer {
  position: relative;
  width: 100%;
}

select {
  padding: 4px 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.progress {
  margin-left: auto;
  font-weight: 600;
}

#mapWrap {
  position: relative;
  /* display: inline-block;
  padding: 0;
  margin: 0; */
}

.hint-text {
  font-size: 13px;
  margin-bottom: 4px;
}

.hint-disable {
  font-size: 11px;
  color: #607d8b;
  cursor: pointer;
  text-decoration: underline;
}

.hint-disable:hover {
  color: #263238;
}

#mapHintBox {
  position: absolute;
  /* 👇 adjust these two values once */
  left: 46%;
  bottom: 16%;
  width: 180px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  display: none; /* hidden by default */
}

#indiaMap {
  display: block;
  width: 100%;
  height: auto;
}

.marker {
  position: absolute;
  width: 14px;
  height: 14px;
  background: orange;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.infoPanel {
  flex: 1.2;
  background: #fff;
  padding: 16px;
  border-left: 1px solid #ddd;
}

.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  /* background: #ff6f00; */
  display: none;
  cursor: pointer;
  pointer-events: auto;
}

.hotspot.locked {
  pointer-events: auto; /* 🔑 allow revisits */
  opacity: 1;
}

/* v1: Question Overlay */
.questionOverlay {

  /* background: rgba(0, 0, 0, 0.7); */
  color: #d2e848;
  display: none;
}


.control-group {
  margin: 5px 0;
  height: 25px;
}

/* Controls Overlay - Top Left */
.controls-overlay {
  position: absolute;
  top: 4%;
  left: 75%;
  z-index: 20;
  /* On top of map */
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-family: 'Inter', sans-serif;
  /* width: 240px; */
  /* Compact width */
  max-width: calc(100% - 30px);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transform: translateX(-50%);
  /* background: rgba(0, 0, 0, 0.7); */
  color: #fff;
  /* padding: 8px 8px; */
  border-radius: 8px;
}


/* Header of the Card (Always Visible) */
.controls-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 5px 5px;
  background: white;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  /* Hidden unless expanded */
}

.controls-overlay.expanded .controls-header {
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.current-topic-text {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.controls-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: transform 0.3s;
}

.controls-overlay.expanded .controls-toggle {
  transform: rotate(180deg);
}

/* Content (Hidden by default) */
.controls-content {
  display: flex;
  padding: 5px;
  /* background: white; */
  flex-direction: column;
}

.controls-overlay.expanded .controls-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}


.mode-toggle {
  display: inline-flex;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
}

.mode-toggle input {
  display: none;
}

.mode-pill {
  padding: 6px 14px;
  cursor: pointer;
  font-size: 14px;
  background: #f5f5f5;
  color: #333;
  transition: all 0.2s ease;
}

.mode-toggle input:checked + .mode-pill {
  background: #1e88e5; /* Learn default */
  color: #fff;
}

#modeExam:checked + .mode-pill {
  background: #37474f; /* Exam seriousness */
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.progress-count {
  min-width: 42px;      /* 🔑 ensures 4/5 never collapses */
  text-align: right;
  font-size: 12px;
  font-weight: 500;
  color: #263238;
  flex-shrink: 0;       /* 🔑 never let it disappear */
}

.progress-bar {
  position: relative;
  flex: 1;
  height: 25px;
  background: #eee;
  border-radius: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
}

.progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
}


.celebrate {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  background: radial-gradient(circle, #66bb6a 35%, rgba(102,187,106,0.2) 60%, transparent 70%);
  animation: celebratePulse 700ms ease-out forwards;
}

@keyframes celebratePulse {
  0% {
    transform: scale(0.4);
    opacity: 1;
  }
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}

.place-popup {
  position: absolute;
  background: rgba(33, 150, 243, 0.95);
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 40;
  transform: translate(-50%, -120%);
  opacity: 0.7;
  transition: opacity 0.25s ease;
}

/* Dock container */
.learning-dock {
  position: absolute;
  top: 66%;
  left: 50%;
  width: 220px;
  height: auto;
  background: rgba(0, 0, 0, 0.7);     /* sea tone */
  border-radius: 8px;
  /* padding: 8px; */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-family: system-ui, sans-serif;
  /* position: absolute; */
  z-index: 20;
  border-radius: 8px;
}

/* Hidden in Exam mode */
.learning-dock.hidden {
  display: none;
}

/* Inner board */
.learning-board {
  background: #ffffff;
  border-radius: 8px;
  padding: 5px;
}

/* Title */
.dock-title {
  font-size: 12px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;

}

/* Content */
.dock-content {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}

/* Idle state */
.dock-idle {
  color: #666;
}

/* Recall line */
.dock-ncert {
  font-weight: 600;
  margin: 6px 0;
}

/* Why here */
.dock-why {
  margin-top: 6px;
  padding-left: 16px;
}

.place-popup {
  opacity: 1;
  transition: opacity 0.25s ease;
}

.place-popup.fading {
  opacity: 0;
}

