/* ==================================================
   GLOBAL
================================================== */

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}
body {
  margin: 0;
  color: #000;
  font-family: "Courier New", monospace;
  min-height: 100vh;

  display: flex;
  flex-direction: column;
}

/* DEFAULT fallback background */
body {
  background-color: #623a6a;
}

/* reusable background system */
body.chapter-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.title,
.button-bar,
.nav-btn,
#site-footer footer {
  font-family: "Courier New", monospace;
}
.title,
.button-bar,
#site-footer {
  width: 100%;
}

/* ==================================================
   SITE HEADER
================================================== */

.title {
  background-image: url('images/Nah_Header4.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 60px 20px;
  text-align: center;
  font-size: 48px;
  color: #fff;
}

.title span {
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

/* ==================================================
   NAVIGATION
================================================== */

.button-bar {
  background: #000;
  color: #fff;
  padding: 20px;
  text-align: center;
  font-size: 24px;
  letter-spacing: 1px;
}

.nav-btn {
  display: inline-block;
  background: #222;
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 20px;
  transition: 0.2s ease;
}

.nav-btn:hover {
  background: #444;
  transform: translateY(-2px);
}

/* ==================================================
   PAGE CONTENT
================================================== */

.page-content {
  margin: 20px auto 80px;
  width: 70%;
  max-width: 800px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  font-size: 16px;
  line-height: 1.5;
}
main {
  flex: 1;
}

/* ==================================================
   FOOTER
================================================== */

#site-footer footer {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 40px 20px;
  font-size: 18px;
  line-height: 1.6;
  font-family: "Courier New", monospace;
}

/* ==================================================
   CHAPTER PAGE
================================================== */

details {
  margin: 0;
}

summary {
  cursor: pointer;
  font-weight: bold;
  list-style: none;
  display: flex;
  align-items: center;
  padding: 12px 0;
}

summary::-webkit-details-marker {
  display: none;
}

.arrow {
  width: 20px;
  display: inline-block;
  text-align: center;
  margin-right: 10px;
}

details summary .arrow::before {
  content: "▶";
}

details[open] summary .arrow::before {
  content: "▼";
}

.scene-link {
  display: block;
  margin-left: 30px;
  margin-bottom: 5px;
  color: #623a6a;
  text-decoration: none;
}

.scene-link:hover {
  color: #a8c6dd;
}
.chapter-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid #ccc;

  max-width: 720px;
  margin-left: auto;
  margin-right: auto;

  font-family: "Courier New", monospace;
}

/* left */
.chapter-nav .prev {
  justify-self: start;
}

/* center */
.chapter-nav .index {
  font-size: 0.9em;
  justify-self: center;
  text-align: center;
}

/* right */
.chapter-nav .next {
  justify-self: end;
}

.chapter-nav a {
  text-decoration: none;
  color: #623a6a;
  font-weight: bold;
  transition: 0.2s ease;
}

.chapter-nav a:hover {
  color: #a8c6dd;
}
.screenplay .character,
.stageplay .stage-character {
  margin-top: 1.5em;
}
/* ==================================================
   SCREENPLAY
================================================== */
.screenplay {
  max-width: 720px;
  margin: 0 auto;
  font-family: "Courier New", monospace !important;
  font-size: 15px;
  letter-spacing: 0.2px;
  line-height: 1.5;
}

.screenplay .slugline {
  text-align: left;
  margin: 0.5em 0;
}

.screenplay .action {
  text-align: left;
  margin: 0;
  font-style: italic;
}

.screenplay .transition {
  text-align: right;
  margin: 0.6em 0; /* one consistent space before + after */
}

.screenplay .character {
  margin-left: 38%;
  margin-top: 0.4em;
  margin-bottom: 0;
}

.screenplay .parenthetical-tone {
  margin-left: 38%;
  margin-top: 0;
  margin-bottom: 0;
}

/* dialogue = slightly larger break UNDER it */
.screenplay .dialogue {
  margin-left: 25%;
  max-width: 50%;
  margin-top: 0.15em;
  margin-bottom: 0.45em; /* <-- extra line break effect */
}

/* ==================================================
   STAGEPLAY
================================================== */
.stageplay {
  max-width: 720px;
  margin: 0 auto;
  font-family: "Roboto Mono", monospace !important;
  font-size: 13.5px;
  letter-spacing: -0.3px;
  line-height: 1.5;
}
.stageplay .stage-action {
  margin: 0;
}

.stageplay .stage-slugline {
  margin: 0.5em 0;
}

/* transitions if you use them in stageplay (safe to include) */
.stageplay .stage-transition {
  margin: 0.6em 0;
}

.stageplay .stage-character {
  margin-left: 6%;
  margin-top: 0.4em;
  margin-bottom: 0;
}

.stageplay .stage-dialogue {
  margin-left: 25%;
  max-width: 50%;
  margin-top: 0.15em;
  margin-bottom: 0.45em; /* same rule as screenplay */
}

.stageplay .stage-parenthetical {
  margin-left: 12%;
  margin-top: 0;
  margin-bottom: 0;
}
/* ==================================================
   META
================================================== */

   .meta {
  font-family: Arial, sans-serif !important;
  font-size: 15px;
  margin: 0;
  padding: 0;
}

.meta.inline {
  display: inline;
  line-height: inherit;
}

.meta.block {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.2;
}

.meta.orange {
  color: #ff9900;
}

.meta.purple {
  color: #9900ff;
}

/* ==================================================
   TEXT ADVENTURE
================================================== */

.game,
.player {
  font-family: "VT323", monospace;
  font-size: 18px;
  letter-spacing: 1px;
  line-height: 1.2;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
  color: black;
}

.game {
  font-weight: 700;
}

.player {
  font-weight: 400;
}

/* ==================================================
   PROSE
================================================== */

.prose {
  max-width: 650px;
  margin: 0 auto;
  font-family: "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.6;
}

.prose p {
  margin: 0;
  text-indent: 2em;
}

/* ==================================================
   TRANSCRIPT
================================================== */

.transcript {
  max-width: 720px;
  margin: 0 auto;
  font-family: "Special Elite", cursive;
  font-size: 15px;
  line-height: 1.5;
}

.transcript-line {
  margin: 0.15em 0;
}

.transcript-bold {
  font-weight: 700;
}

.transcript-italic {
  font-style: italic;
}

/* ==================================================
   TEXT MESSAGES
================================================== */

.text-thread {
  max-width: 720px;
  margin: 1.5em auto;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

.text-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.2em;
}

.text-row.new-speaker {
  margin-top: 0.8em;
}

.text-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.text-row.no-avatar .text-avatar {
  visibility: hidden;
}

.text-content {
  max-width: 75%;
}

.text-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.text-bubble {
  display: inline-block;
  background: #f7f7f7;
  padding: 4px 8px;
  border-radius: 8px;
  word-break: break-word;
}
.avatar-noga {
  background-image: url("images/avatars/noga-avatar.png");
}

.avatar-theo {
  background-image: url("images/avatars/theo-avatar.png");
}

.avatar-sulo {
  background-image: url("images/avatars/sulo-avatar.png");
}

.avatar-santiago {
  background-image: url("images/avatars/santiago-avatar.png");
}

/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 768px) {
  .title {
    font-size: 36px;
    padding: 40px 15px;
  }

  .button-bar {
    font-size: 20px;
    padding: 15px;
  }

  .nav-btn {
    font-size: 18px;
    padding: 8px 14px;
    margin: 5px;
  }

  .page-content {
    width: 90%;
    font-size: 15px;
    padding: 25px 18px;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 28px;
    padding: 30px 10px;
  }

  .page-content {
    width: 95%;
    font-size: 14px;
    padding: 20px 15px;
  }
}