/* --- General --- */
body {
  font-family: "Times New Roman", serif;
  background-color: #121212;
  color: #ddd;
  margin: 0;
  padding: 0;
}
.no-scroll { overflow: hidden; }

header, footer {
  text-align: center;
  padding: 15px;
}

.site-title {
  font-size: 2.5em;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.subtitle { color: #aaa; font-style: italic; }

/* --- Issue Preview --- */
.issue-preview {
  display: flex;
  align-items: center;
  background-color: #1e1e1e;
  padding: 20px;
  margin: 20px auto;
  max-width: 900px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.issue-preview img {
  width: 250px;
  height: auto;
  border-radius: 5px;
  margin-right: 20px;
}

.preview-text { flex: 1; }
.preview-text h2 { margin-top: 0; }
.preview-text .snippet { color: #bbb; }

.open-issue {
  margin-top: 10px;
  background: #c4a962;
  border: none;
  padding: 8px 15px;
  color: #000;
  cursor: pointer;
  border-radius: 3px;
}
.open-issue:hover { background: #d9bd73; }

/* --- Overlay --- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.hidden { display: none; }

.overlay-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 2vh 0;
  box-sizing: border-box;
}

/* Close button */
#close-overlay {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2em;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 1000;
}

/* --- Newspaper Page --- */
.newspaper-page {
  position: relative;
  width: 800px;
  max-width: 90vw;
  /* A4 aspect ratio (8.27 × 11.7) */
  aspect-ratio: 8.27 / 11.7;
  max-height: 80vh;                /* slightly taller than before */
  background-color: #fdfaf2;
  box-shadow: 0 0 40px rgba(0,0,0,0.8);
  border: 1px solid rgba(0,0,0,0.2);
  overflow-y: auto;
  padding: 40px;
  color: #1b1b1b;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-size: 1.05em;
  line-height: 1.5;
  text-align: justify;
  z-index: 5;
}

/* The paper texture layer (set via JS variable --paper-bg) */
.newspaper-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--paper-bg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 0;
  opacity: 1; /* ensure fully visible texture */
}

/* Text content above texture */
.newspaper-page h3,
.newspaper-page p {
  position: relative;
  z-index: 2;
  color: #1b1b1b;
}

/* --- Page Number --- */
.page-number {
  color: #ccc;
  text-align: center;
  font-style: italic;
  margin-top: 12px;
  z-index: 10;
}

/* --- Navigation Arrows --- */
.nav-arrows {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  z-index: 10;
}

.nav-arrows button {
  background: #c4a962;
  border: none;
  padding: 8px 15px;
  margin: 0 10px;
  cursor: pointer;
  border-radius: 3px;
  font-weight: bold;
  color: #000;
}
.nav-arrows button:hover { background: #d9bd73; }
