/* style.css */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto Slab', serif;
  background-color: black;
  color: white;
  height: 100vh; /* ensures viewport height */
  background-size: 100% 100%; /* prevent zooming */
  background-position: center;
  background-repeat: no-repeat;
}

.page-block {
  background-color: black;
  max-width: 1000px;
  margin: 50px auto;
  padding: 20px;
  border: 2px solid black;
  text-align: center;
}

.comic-img {
  display: block;
  margin: 0 auto;
  height: auto;
}

.narration {
  margin-top: 10px;
  font-size: 1.1rem;
  color: white;
}

/* dialogue-box base style */
.dialogue-box {
  margin-top: 20px;
  background-color: #111;
  border: 1px solid white;
  padding: 15px;
  text-align: left;
  white-space: pre-line;
  font-family: 'Roboto Slab', serif;
  color: inherit; /* allow inner divs to control color */
}

/* Character dialogue colors with higher specificity */
.dialogue-box .grim {
  color: #ff6666 !important; /* red for Grim */
  font-weight: bold;
}

.dialogue-box .me {
  color: #66ff66 !important; /* green for ME */
  font-weight: bold;
}

.dialogue-box .selina {
  color: #66ccff !important; /* blue for Watcher */
  font-weight: bold;
}

.dialogue-box .milo {
  color: #ffcc66 !important; /* yellow/orange for Operator */
  font-weight: bold;
}

/* spacing between lines */
.dialogue-box #dialogue-text div {
  margin-bottom: 8px;
}



.hidden {
  display: none;
}

.show-btn {
  margin-top: 10px;
  padding: 5px 10px;
  font-family: 'Roboto Slab', serif;
  font-size: 1rem;
  cursor: pointer;
}

.nav-buttons {
  margin-top: 20px;
}

.nav-btn {
  background: none;
  border: none;
  color: red;
  font-family: 'Times New Roman', serif;
  font-weight: bold;
  font-size: 2rem;
  cursor: pointer;
  margin: 0 20px;
}

/* =======================
   Mobile-Friendly Adjustments (Enhanced)
   ======================= */
@media (max-width: 600px) {
  /* Center the page block with side padding */
  .page-block {
    margin: 20px auto;
    padding: 12px;
    border-width: 1px;
    max-width: 90%; /*  room from screen edges */
  }


  .comic-img {
    width: 100%;       /* fills most of page-block width */
    max-height: 55vh;  /* prominent but leaves space for dialogue */
    object-fit: contain;
    display: block;
    margin: 0 auto 10px auto; /* bottom margin  spacing */
  }

 
  .narration {
    font-size: 0.8rem;
    margin-top: 6px;
  }

  /* Dialogue box smaller than image */
  .dialogue-box {
    font-size: 0.9rem; /* medium size */
    padding: 8px 10px;
    max-height: 30vh; /* prevents it from overtaking image */
    overflow-y: auto; /* allows scrolling if too much dialogue */
  }

  /* Slight spacing between dialogue lines */
  .dialogue-box #dialogue-text div {
    margin-bottom: 5px;
  }

  /* Show button adjustments */
  .show-btn {
    font-size: 0.75rem;
    padding: 5px 10px;
  }

  /* Navigation adjustments */
  .nav-buttons {
    margin-top: 12px;
  }

  .nav-btn {
    font-size: 1.6rem;
    margin: 0 10px;
  }
}

