/* Import Google Font Bona Nova (regular and italic) */
@import url('https://fonts.googleapis.com/css2?family=Bona+Nova:ital,wght@0,400;1,400&display=swap');

body {
  margin: 0;
  padding: 0;
  background-color: #000;
  color: #fff;
  font-family: 'Bona Nova', serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#story {
  max-width: 750px;
  margin-top: 40px;
  /* 10% horizontal padding for mobile-friendly spacing */
  padding: 0 10%;
}

#story p {
  margin-bottom: 1em;
  line-height: 1.5;
}
 

#options {
  max-width: 750px;
  margin: 20px 0;
  /* Align with story padding */
  padding: 0 10%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
/* View count indicator above restart button */
#view-count {
  text-align: center;
  font-size: 0.8em;
  color: #aaa;
  margin: 1.5em 0 0.5em;
}

.choice {
  flex: 0 1 45%;
  max-width: 45%;
  box-sizing: border-box;
  padding: 16px 8px;
  border: 1px solid #fff;
  background: none;
  color: #fff !important;
  cursor: pointer;
  transition: background 0.3s, opacity 0.3s;
}
/* Styling for "none of the above" option */
.choice.none {
  color: #888;
  font-style: italic;
}
/* Remove arrow for none-of-the-above */
.choice.none::before {
  content: "";
}

.choice:hover {
  background: #222;
}

/* Removed pseudo-element arrow; JS now prefixes the arrow in choice text */

#restart {
  /* separate from content and bottom space */
  margin-top: 1.5em;
  margin-bottom: 20px;
}

#restart-btn {
  background: none;
  border: 1px solid #fff;
  color: #fff;
  padding: 8px 16px;
  cursor: pointer;
}

#restart-btn:hover {
  background: #222;
}

/* Share button styling (same as restart) */
#share-btn {
  background: none;
  border: 1px solid #fff;
  color: #fff;
  padding: 8px 16px;
  cursor: pointer;
  margin-left: 8px;
}

#share-btn:hover {
  background: #222;
}

/* Loading indicator */
/* Loading/Writing indicator */
#loading {
  color: inherit;
  font-size: 0.9em;
  margin: 1em 0;
  font-style: italic;
}
/* Admin console styling */
.node-container {
  position: relative;
  max-width: 750px;
  margin-bottom: 1em;
}
/**
 * Admin link styling
 */
.admin-link {
  color: #0f0;
  text-decoration: underline;
  cursor: pointer;
}
.admin-toggle {
  cursor: pointer;
  margin-right: 8px;
  color: #0f0;
  user-select: none;
}
.admin-console {
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  font-size: 0.8em;
  color: #0f0;
  margin-top: 4px;
  white-space: pre-wrap;
}
.hidden {
  display: none;
}

/* Admin editor page explanation text */
.explanation {
  color: #aaa;
  font-size: 0.8em;
  margin-left: 4px;
}
/* Admin editor width and responsiveness */
.admin-editor {
  width: 80%;
  max-width: 800px;
  margin: 1em auto;
}
@media (max-width: 600px) {
  .admin-editor {
    width: 95%;
  }
}

/* Dimmed story blocks: older text fades out */
.node-container.dimmed {
  opacity: 0.5;
}

/* Wrapper for old text within current block */
.old-text {
  opacity: 0.5;
}

/* Chapter title styling */
.chapter-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-top: 1em;
  margin-bottom: 0.5em;
  text-align: center;
}
/* Chapter image styling */
.chapter-image {
  display: block;
  /* Display at 50% of original 1024px width, scale down if needed (max 80% of container) */
  width: 512px;
  max-width: 80%;
  height: auto;
  margin: 1em auto;
}
/* Image loading placeholder styling */
.image-loading {
  font-size: 0.9em;
  font-style: italic;
  text-align: center;
  margin: 1em 0;
  color: #aaa;
}
/* Transparent placeholder for chapter images to reserve space */
.chapter-image-placeholder {
  display: block;
  /* responsive placeholder matching image aspect ratio (1024x1024 at half size) */
  width: 100%;
  max-width: 512px;
  aspect-ratio: 1 / 1;
  margin: 1em auto;
}

/* Header (Title and Author) */
#header {
  text-align: center;
  margin: 20px 0;
}
#header h1 {
  font-size: 2.5em;
  margin: 0.2em 0;
}
#header p {
  font-size: 1em;
  margin: 0;
}
/* Version display */
#version {
  text-align: center;
  font-size: 0.8em;
  color: #aaa;
  margin: 1em 0;
}
