body {
  background: #edede9;
  color: white;
  font-family: 'Raleway';
  text-align: center;
  margin: 0;
}

/* Main game section */
.game-section {
  padding: 30px 20px;
  background-color: #2b2d42;
  position: relative;
  width: 90%;
  max-width: 1100px; /* medium size container */
  margin: 50px;   /* center horizontally */
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  box-sizing: border-box;
}

/* Title */
.game-title {
  font-size: 2em;
  font-weight: bold;
  color: #fff;
  margin-bottom: 20px;
}

/* Canvas responsive */
#gameCanvas {
  display: block;
  margin: 15px auto 20px auto;
  border: 3px solid #333;
  border-radius: 8px;
  background: linear-gradient(#2c2c2c 0%, #444 100%);
  max-width: 100%;  /* responsive scaling */
  height: auto;
}

/* Overlay */
#overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.85);
  font-size: 56px;
  color: white;
  z-index: 10;
}
#overlay button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 22px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: linear-gradient(120deg, #16a085 0%, #16a085 50%, #e63946 50%);
  background-size: 200% 100%;
  background-position: left;
  color: white;
  font-weight: bold;
  transition: background-position 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#overlay button:hover {
  background-position: right;  /* slide effect */
  transform: translateY(-3px); /* lift up */
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}


/* HUD */
#hud {
  position: absolute;
  left: 12px;
  top: 8px;
  font-family: 'Raleway';
  font-size: 18px;
  color: white;
  pointer-events: none;
}

/* Controls */
.controller {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 200px;
  margin: 10px auto 20px auto;
}
.controller button {
  width: 100%;
  height: 30px;
  font-size: 18px;
  border-radius: 10px;
  border: none;
  background: #333;
  color: white;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}
.controller button:active {
  background: #666;
}

/* Boost Button */
.boost-control button {
  width: 100%;
  max-width: 250px;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
  background: #333;
  color: white;
  border: none;
}
.boost-control button:active {
  background: #666;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  #overlay {
    font-size: 32px;
  }
  #overlay button {
    font-size: 18px;
    padding: 8px 16px;
  }
  .controller button {
    height: 45px;
    font-size: 16px;
  }
}
 :root {
  --accent:#ef233c;
  --bg: #edede9;
  --panel: #2b2d42;
  --text: #0f1724;
  --muted: white;
}

/* Main container */
.container {
  max-width: 1300px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 360px; /* mas maluwag sa kanan */
  gap: 30px;

  align-items: center;
}
/* Image Card (diagram) */
.diagram-card {
  background: var(--panel);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  padding: 25px;

  /* Bagong idinagdag na controls */
  position: relative; /* pwede ring absolute kung gusto mo fixed position */
  width: 750px;       /* palitan mo para baguhin lapad */
  height: 600px;  
   /* pwede mo rin palitan ng fixed height (e.g. 600px) */
  left: 0;            /* adjust para ilipat sa kaliwa o kanan (px o %) */
  top: 0;             /* adjust para pababain o pataasin */
  margin: 0 auto;     /* center sa container kung gusto mo gitna */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease; /* smooth pag nag-aadjust */
}


.image-wrap {
  position: relative;
  max-width: 700px; /* control width ng image */
  width: 400%;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f6f7fb);
  margin: 0 auto;
}

.image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}

/* Number markers */
.marker {
  --size: 36px;
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(107, 70, 255, 0.18);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 4px solid rgba(255, 255, 255, 0.6);
}

.marker:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.marker.active {
  box-shadow: 0 10px 28px rgba(107, 70, 255, 0.28);
  transform: translate(-50%, -50%) scale(1.12);
}

/* Popup info when hovering on marker */
.info-popup {
  position: absolute;
  top: -120%;
  left: 50%;
  transform: translate(-50%, 0) scale(0.95);
  background: #2b2d42;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: 10px;
  width: 160px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}

.marker:hover .info-popup {
  opacity: 1;
  transform: translate(-50%, -10px) scale(1);
  pointer-events: auto;
}

.info-popup img {
  width: 140px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 6px;
}

.info-popup .title {
  font-weight: 600;
  font-size: 14px;
  color: white;

}

.info-popup .category {
  font-size: 12px;
  color: var(--muted);
}

/* Legend (kanang panel) */
.legend {
  background: var(--panel);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  max-height: 85vh;
  overflow-y: auto;
}

.legend h3 {
  margin: 0 0 14px 0;
  font-size: 18px;
}

.legend-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.legend-item:hover {
  background: #ef233c;
}

.legend-item .badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 36px;
}

.legend-item .meta {
  display: flex;
  flex-direction: column;
}

.legend-item .meta .title {
  font-weight: 600;
  font-size: 14px;
}

.legend-item .meta .desc {
  font-size: 12px;
  color: var(--muted);
}

.caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .diagram-card {
    padding: 15px;
  }

  .legend {
    max-height: none;
  }

  .image-wrap {
    max-width: 100%;
  }
}
/* Title section above the diagram */
.diagram-header {
  grid-column: 1 / -1; /* para nasa ibabaw ng buong layout (diagram + legend) */
  text-align: center;
  margin-top: 100px;
  margin-bottom: 5px;
}

.diagram-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.diagram-header .subtitle {
  font-size: 18px;
  color: black;
}


