body {
    padding: 0;
    line-height: 1.4em;
    overflow-x: hidden;
    font-family: Liberation, sans-serif;
    font-weight: normal;
    margin: 2rem 4rem;
    background-color: #FAF9F6; /* Added explicit background */
}

div.top, div.bottom {
  background: #FAF9F6;
  color: #000;
  font-weight: normal;
  font-style: italic;
  font-size: 14px;
  border-top: 6px dashed #FAF9F6;
  border-bottom: 6px dashed #FAF9F6;
  padding: 4px 7px 4px 7px;
  text-align: right;
}

div.top {
  margin: 8px -10px 0 50%;
}

div.bottom {
  margin: 12px 50% 8px -10px;
  color: #FAF9F6;
}

div.rest {
  margin: 0 16px 0 16px;
  padding-bottom: 30px;
}

h1, h2, h3, h5, h6 {
  font-weight: normal;
}

h1 {
  margin-top: 1em;
  margin-bottom: 0;
  padding-bottom: 0;
  line-height: 1.5em;
}

h2 {
  font-size: 140%;
  margin-top: 25px;
}

h1 + h2 {
  margin-top: 2px;
}

p.update {
  text-align: right;
  font-size: 60%;
  margin-right: 1em;
}

p.attribution {
  text-align: right;
}

p.headmatter {
  font-style: italic;
  color: #333;
}

p.headleft {
  text-align: left;
  margin-top: 1px;
}

p.smallnote {
  color: #888;
  font-size: 75%;
  margin: 2em 33% 00 33%;
}

p.smallnote a:link {
  color: #339;
}

p.nextarrow {
  font-size: 200%;
  text-align: center;
}

p.slidehead {
  color: #000;
  text-align: right;
  font-size: small;
  font-weight: bold;
  margin-top: 100%;
}

p.leftinset {
  color: #333;
  width: 25%;
  float: left;
  margin-right: 2em;
  font-size: 120%;
}

p.rightinset {
  color: #333;
  width: 25%;
  float: right;
  margin-left: 2em;
  font-size: 120%;
}

p.endmark {
  text-align: center;
  margin-bottom: 110%;
}

.indent-1 { margin-left: 1rem; }
.indent-2 { margin-left: 2rem; }
.indent-3 { margin-left: 3rem; }

img {
    border: none;
}

img.left {
  border-left: 3px solid #333;
  margin-right: 15px;
  float: left;
}

img.right {
  border-right: 3px solid #333;
  margin-left: 15px;
  float: right;
}

img.if {
border: thin solid #333;
}

div.center {
margin-left: auto;
margin-right: auto;
}

li + li {
margin-top: .5em;
}

a {
  text-decoration: none;
  padding: 2px;
}

a:link {
  color: rgb(122, 6, 97);
}

a:visited {
  color: rgb(122, 6, 97);
}

a:active {
  color: #000;
  background: #888;
}

a:hover {
  background: #ccc;
}

.menu, .menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: #ddd;
  border: 1px solid #ddd;
  margin-top: 0.25rem;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}
.dropdown-menu li a:hover {
  background: #eee;
}

html, body {
  height: 100%;
  margin: 0; padding: 0;
  background-color: #FAF9F6; /* Added explicit background */
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.wrapper {
  flex: 1;
  width: 90%;           /* or 100% minus some gutter */
  max-width: none;
  margin: 2rem auto;    /* keeps moderate centering but much wider */
  padding: 0 1rem;
}
footer {
  margin-top: auto;
  text-align: center;
}

#mobile-menu-toggle {
  background: rgb(122, 6, 97); /* your purple link color */
  color: #FAF9F6;                 /* white text for contrast */
  border: 2px outset #ccc;     /* light gray bevel */
  padding: 4px 8px;
  font-size: 1rem;
  cursor: pointer;
}

/* Optional hover/active states */
#mobile-menu-toggle:hover {
  background: rgba(122, 6, 97, 0.85);
}
#mobile-menu-toggle:active {
  background: rgba(122, 6, 97, 0.7);
}

/* Make all nav links inherit your page's link color */
.menu > li > a,
.nav-root > a,
#mobile-menu-toggle {
  color: inherit !important;
}

/* If you want the "Navigate" button to use your purple link color: */
#mobile-menu-toggle {
  color: rgb(122, 6, 97);
}

/* Tuck dropdown panels flush with the page */
.dropdown-menu {
  background: #FAF9F6;  /* Changed from white */
  border: none;
  box-shadow: none;
}

/* Hover state just gives a very light highlight */
.menu > li:hover > a,
.dropdown-menu li a:hover {
  background: rgba(122, 6, 97, 0.1);
}

/* ========== new.css ========== */

/* Reset & Base Styles */
html, body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Liberation, sans-serif;
  line-height: 1.4em;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background-color: #FAF9F6; /* Added explicit background */
}
*, *::before, *::after {
  box-sizing: inherit;
}
.wrapper {
  flex: 1;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  text-align: left;
}

/* Site Header */
.site-header {
  margin-bottom: 1.5rem;
}
.site-title {
  font-size: 1rem;
  font-weight: bold;
  text-align: left;
  margin: 1rem 0;
}

/* Two-Column Layout */
#two-column-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.column {
  flex: 1;
  min-width: 250px;
}

/* Details/Summary */
details summary {
  cursor: pointer;
  font-weight: bold;
  margin-top: 1rem;
}
details ul {
  margin: 0.5rem 0 1rem 1rem;
}

/* Level 0 - Base details (flush with container) */
.win95-details {
  border: none;
  background: transparent;
  margin: 1rem 0;
  font-family: Liberation, sans-serif;
  font-size: 16px;
  line-height: 1.4em;
}

.win95-details summary {
  background: transparent;
  padding: 4px 0;
  border: none;
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  color: #000;
  margin-bottom: 0.5rem;
}

.win95-details summary:hover {
  background: rgba(122, 6, 97, 0.1);
  padding: 4px 2px;
}

.win95-details[open] summary {
  margin-bottom: 0.5rem;
}

/* Level 0 content - indent content by .25" */
.win95-details > *:not(summary) {
  padding: 0;
  background: transparent;
  border: none;
  margin: 0 0 0 18px; /* .25" indent for level 0 content */
  color: #000;
}

/* Level 1 nesting - summary stays flush, only content indents */
.win95-details .win95-details {
  margin: 1rem 0; /* No left margin on the details element */
  background: transparent;
}

.win95-details .win95-details summary {
  background: transparent;
  padding: 4px 0;
  border: none;
  cursor: pointer;
  user-select: none;
  font-weight: normal; /* Less emphasis for nested */
  color: #000;
  margin-bottom: 0.5rem;
  font-size: 15px;
}

.win95-details .win95-details summary:hover {
  background: rgba(122, 6, 97, 0.08);
  padding: 4px 2px;
}

/* Level 1 content - keep same .25" indent as level 0 */
.win95-details .win95-details > *:not(summary) {
  background: transparent;
  border: none;
  margin: 0 0 0 18px; /* Same .25" indent as level 0 */
  padding: 0;
}

/* Level 2 nesting - summary gets .25" indent, content gets .50" */
.win95-details .win95-details .win95-details {
  margin: 1rem 0 1rem 18px; /* .25" indent for the whole details element */
  background: transparent;
}

.win95-details .win95-details .win95-details summary {
  background: transparent;
  font-size: 14px;
  font-style: italic;
  padding: 2px 0;
  margin-bottom: 0.3rem;
  font-weight: normal;
}

.win95-details .win95-details .win95-details summary:hover {
  background: rgba(122, 6, 97, 0.06);
  padding: 2px 2px;
}

/* Level 2 content - additional indent on content */
.win95-details .win95-details .win95-details > *:not(summary) {
  background: transparent;
  margin: 0 0 0 18px; /* Additional .25" indent for level 2 content */
  padding: 0;
}

/* Level 3 nesting - summary gets .50" indent, content gets .75" */
.win95-details .win95-details .win95-details .win95-details {
  margin: 1rem 0 1rem 18px; /* Additional .25" indent (total .50" for summary) */
  background: transparent;
}

.win95-details .win95-details .win95-details .win95-details summary {
  background: transparent;
  font-size: 13px;
  text-decoration: underline;
  padding: 2px 0;
  margin-bottom: 0.2rem;
  font-weight: normal;
}

.win95-details .win95-details .win95-details .win95-details summary:hover {
  background: rgba(122, 6, 97, 0.04);
  padding: 2px 2px;
}

/* Level 3 content - additional indent on content */
.win95-details .win95-details .win95-details .win95-details > *:not(summary) {
  background: transparent;
  margin: 0 0 0 18px; /* Additional .25" indent for level 3 content */
  padding: 0;
  font-size: 14px;
}

/* List styling - precise control over indentation */
.win95-details ul {
  margin: 0 0 0 18px; /* .25" left margin for the list */
  padding: 0; /* Remove all default padding */
}

.win95-details li {
  margin: 0;
  padding: 0;
  margin-bottom: 1.0rem;
  list-style-position: inside; /* Bullets inside the content area */
}

.win95-details li:last-child {
  margin-bottom: 0;
}

.win95-details ul:last-child {
  margin-bottom: 0;
}

/* Optional: Simple text indicators for nesting depth */
/* Removed - keeping default triangle markers */

/* Responsive behavior */
@media (max-width: 768px) {
  .win95-details .win95-details,
  .win95-details .win95-details .win95-details {
    margin-left: 1rem;
  }
  
  .win95-details .win95-details .win95-details .win95-details {
    margin-left: 1.5rem;
  }
}

/* Footer */
footer {
  margin-top: auto;
  text-align: center;
  padding: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
  .menu {
    display: none;
  }
}

/* Navbar */
#navbar-container {
  text-align: center;
  margin-bottom: 2rem;
}
.menu, .menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu {
  display: inline-flex;
  gap: 1rem;
}
.menu > li {
  position: relative;
}
.menu > li > a {
  padding: 0.5rem 1rem;
  background: #ddd;
  color: #000;
  text-decoration: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}
/* "Navigate" button matching page background */
.menu > li.nav-root > a {
  background: inherit;
  color: inherit;
}
.menu > li:hover > a,
.menu > li:focus-within > a {
  background: rgba(122, 6, 97, 0.1);
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #FAF9F6;
  border: 1px solid #FAF9F6;
  margin-top: 0.25rem;
  z-index: 10;
  min-width: 150px;
}
.menu > li:hover > .dropdown-menu,
.menu > li:focus-within > .dropdown-menu {
  display: block;
}
.dropdown-menu li {
  position: relative;
}
.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  color: #000;
  text-decoration: none;
}
.dropdown-menu li a:hover {
  background: #FAF9F6;
}

#canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;  /* Adjust the width automatically based on the image */
    height: auto; /* Adjust the height automatically based on the image */
    border: 2px solid #FAF9F6;
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.1);
    overflow: hidden; /* Prevent image from overflowing */
}

#message-container {
    flex: 1; /* Ensure it takes equal width in two-column layout */
    color: #000000; /* White text to make it visible on black background */
    background-color: #FAF9F6; /* Set the background color to match */
    padding: 20px; /* Padding for readability */
    border-radius: 5px; /* Rounded edges */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); /* Add shadow for consistency */
}

.parent-element, p {
  column-count: initial;
  column-width: initial;
}

.survey-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #FAF9F6;
    border-radius: 10px;
    background-color: #111111;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#book-list {
    margin-bottom: 20px; /* Add space below book list */
}

.book-container {
    margin-bottom: 15px; /* Add space between each book container */
    padding: 10px;
    border-bottom: 1px solid #ddd; /* Optional: add a light border to separate each book */
}

#progress-bar-container {
    margin-bottom: 20px; /* Add space below progress bar container */
}

button {
    display: block; /* Ensure each button is on a separate line */
    margin: 10px 0; /* Add space above and below each button */
}

#rating-summary {
    margin-top: 20px;
}

#top-genres {
    margin-top: 20px;
}

#recommendation {
    margin-top: 20px;
}

/* Game Specific Styling */
#game-container {
    max-width: 1000px;
    margin: 0 auto; /* Center the container */
    padding: 0; /* Remove extra padding if not needed */
    height: auto; /* Let height adjust based on content */
    background-color: #FAF9F6; /* Matching container color with the rest of the site */
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

 #message-container 
 {background-color: #000;
  color: #FAF9F6;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: bold;
    margin-bottom: 15px;
    color: #000000; /* Ensure consistent color for headings */
}

p {
    margin-bottom: 15px;
    color: #000000; /* Light grey for readability on black background */
    font-size: 16px; /* Set the font size for all paragraphs */
    line-height: 1.5; /* Add line height for readability */
    column-count: initial !important;
    column-width: initial !important;
    float: none !important;
    display: block !important;
    flex: initial !important;
    text-align: left !important; /* Align text to the left */
}

/* Buttons */
button {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #FAF9F6;
    background-color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px; /* Adds space above the button */
}

button:hover {
    background-color: #555555;
    transform: scale(1.05);
}

.reset-button {
    margin-top: 20px;
    background-color: #ff5555; /* Different color for visibility */
    color: #000000; /* Black text for contrast */
}

.reset-button:hover {
    background-color: #ff7777;
}

/* Carousel Container */

.carousel-container {
    position: relative;
    width: 600px; /* Adjust as needed */
    margin: 0 auto; /* Center the container */
    overflow: hidden; /* Hide images that are not active */
}

.carousel-wrapper {
    display: flex; /* Align all images in a row */
    transition: transform 0.5s ease-in-out;
}

.carousel-image {
    width: 100%; /* Ensure each image takes up the full container width */
    flex-shrink: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #FAF9F6; /* Changed from white */
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.carousel-btn.left {
    left: 10px;
}

.carousel-btn.right {
    right: 10px;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 3000; /* Ensure modal appears above all other elements */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.9); /* Black with opacity */
}
.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px; /* Optional: rounded edges */
    transition: transform 0.3s ease-in-out;
}
.close {
    position: absolute; /* Fixed syntax error */
    top: 15px;
    right: 35px;
    color: #FAF9F6;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
.close:hover,
.close:focus {
    color: #bbbbbb;
}

/* Additional Modal Styling to Prevent Last Image from Appearing Outside the Carousel */
.carousel-wrapper img {
    display: block;
}

/* Image Gallery 2*/

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.image-gallery img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  transition: transform 0.3s ease;
}

.image-gallery img:hover {
  transform: scale(1.05);
}