:root {
  --primary: #2f92d0;
  --blue: #2f92d0;
  --bg: #e9eef3;
  --white: #ffffff;
  --text: #123;
  --green: #2ecc71;
  --red: #e74c3c;
}

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, sans-serif;
}
ul{
      text-align: left;
}
.screen{
  text-align: center;
}

body {
  margin: 0;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.app {
  width: 800px;
  max-width: 75%;
  padding: 1rem;
}
#sim-container{
  text-align: center; max-width: 800px; margin: 0 auto; overflow: visible;
}
#drop-zone-B{
  position: absolute; top: 2%; left: 30%; width: 60px; height: 60px; border: 2px dashed rgba(0,0,0,0.2); border-radius: 50%;
}
#drop-zone-D{
  position: absolute; top: 50%; left: 37%; width: 60px; height: 60px; border: 2px dashed rgba(0,0,0,0.2); border-radius: 50%;
}

/* Mobile Drop Zones */
@media only screen and (max-width: 600px) {
    #drop-zone-B, #drop-zone-D {
        border: 2px dashed #007bff; /* Add visible border on mobile */
        background-color: rgba(0, 123, 255, 0.1); /* Slight highlight */
        z-index: 10; /* Ensure they are above the image */
    }

  #sim-container{
    text-align: center; max-width: 100%; margin: 0 auto; overflow: visible; min-width: 90vw; margin-left: auto;
  }
  #drop-zone-B{
    top: 4px;width: 25px;
        height: 25px;
  }
  #drop-zone-D{
    top: 44%;
    width: 25px;
    height: 25px;
  }
}

/* Floating Menu */
.menu-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 2000;
}

.menu-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s, background 0.2s;
}

.menu-btn:hover {
  background: #257aa8; /* darker blue */
  transform: translateY(-2px);
}

.menu-btn:active {
  transform: translateY(0);
}

.menu-dropdown {
  position: absolute;
  top: 110%;
  left: 0;
  width: 220px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  overflow: hidden;
  max-height: 0; /* Hidden by default */
  transition: max-height 0.5s ease-in-out; /* Rolling effect */
}

.menu-dropdown.open {
  max-height: 5400px; /* Adjust based on content height */
}

.menu-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
}

.menu-dropdown a:last-child {
  border-bottom: none;
}

.menu-dropdown a:hover {
  background: #f5f5f5;
  color: var(--primary);
}

.menu-dropdown i {
  width: 20px;
  text-align: center;
  color: var(--primary);
}

/* Common Components */
.btn {
  background: white;
  color: var(--primary);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none; /* In case we use a tags */
}

.btn:active {
  transform: scale(0.96);
}

.card {
  background: var(--primary);
  color: white;
  border-radius: 16px;
  padding: 1.5rem;
  animation: fadeIn 0.4s ease;
  overflow: hidden;
}

.logo-mg {
  width: 120px;
  position: absolute;
  bottom: 12px;
  right: 12px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse {
  animation: pulse 1.6s infinite;
}

/* Index Page Specifics */
.screen {
  display: none;
  background: var(--primary);
  color: white;
  border-radius: 16px;
  padding: 1.5rem;
  animation: fadeIn 0.4s ease;
}

.screen.active {
  display: block;
}

h1, h2 { margin-top: 0; }
p, li { font-size: 1rem; line-height: 1.5; }
ul { padding-left: 1.2rem; }
.note { margin-top: 1rem; font-style: italic; opacity: 0.9; }

/* Quiz Specifics */
.score { text-align: right; font-size: .9rem; opacity: .9; }
.q-number { font-size: 0.9rem; opacity: 0.9; margin-bottom: 0.3rem; }
.option {
  background: rgba(255,255,255,.15);
  padding: .8rem 1rem;
  border-radius: 12px;
  margin-top: .6rem;
  cursor: pointer;
  display: flex;
  gap: .6rem;
  align-items: center;
}
.option:hover { background: rgba(255,255,255,.25); }
.hidden { display: none; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  pointer-events: auto;
}
.modal-box {
  background: var(--primary);
  color: white;
  padding: 1.5rem;
  border-radius: 16px;
  max-width: 320px;
  text-align: center;
}
.correct { color: var(--green); }
.incorrect { color: var(--red); }

/* Hotspots */
.image-wrapper { position: relative; margin-top: 1rem; }
.image-wrapper img { width: 100%; border-radius: 12px; }
.hotspot {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.9);
  background: rgba(255,0,0,0.6);
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.hotspot:active { transform: translate(-50%, -50%) scale(0.9); }
.hotspot::after {
  content: attr(data-label);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.hotspot:hover::after, .hotspot:focus::after { opacity: 1; }

/* Training Specifics */
.scene-img { width: 100%; display: block; }
.scene-text { padding: 1rem; }
.step { font-size: .85rem; opacity: .9; text-align: right; }
.center { text-align: center; font-size: 2.5rem; }
