/* --- Login & Register Page Styles --- */
.login-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--secondary-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.login-container .section-title {
  margin-bottom: 1.5rem;
}

.full-width-btn {
  width: 100%;
  margin-top: 1rem;
}

.login-links {
  text-align: center;
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-around;
  font-size: 0.9rem;
}

.login-links a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: bold;
}

.login-links a:hover {
  text-decoration: underline;
}

.status-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
  display: none; /* Hidden by default */
}

.status-message.info {
  color: #0c5460;
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
}

.status-message.error {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
}


/* --- Login Page Styles --- */
.login-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--secondary-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.login-container .section-title {
  margin-bottom: 1.5rem;
}

.full-width-btn {
  width: 100%;
  margin-top: 1rem;
}

.login-links {
  text-align: center;
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-around;
  font-size: 0.9rem;
}

.login-links a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: bold;
}

.login-links a:hover {
  text-decoration: underline;
}

.status-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
  display: none; /* Hidden by default */
}

.status-message.info {
  color: #0c5460;
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
}

.status-message.error {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
}


:root {
  --bg-color: #f5f5f5;
  --text-color: #1a1a1a;
  --accent-gold: #d4af37;
  --secondary-bg: #e8e8e8;
  --border-color: #ccc;
  --error-color: #D8000C;
  --error-bg-color: #FFD2D2;
  --header-height: 70px;
}

html[data-theme='dark'] {
  --bg-color: #1e1e1e;
  --text-color: #f0f0f0;
  --secondary-bg: #2a2a2a;
  --border-color: #444;
  --error-color: #FFBABA;
  --error-bg-color: #D8000C;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-height);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background-color: var(--bg-color);
  padding: 0 1rem; /* Ensures .container within header doesn't hug edges */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
html[data-theme='dark'] header {
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.header-content { /* This is inside .container for padding */
  display: flex;
  justify-content: space-between; /* Logo left, (Nav or Hamburger) right */
  align-items: center;
  width: 100%;
  height: 100%;
}

.logo {
  font-size: 1rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
  text-transform: uppercase;
  flex-shrink: 0;
}

main {
  flex: 1;
  padding: 2rem 0;
}

/* START: Menu CSS */
.menu-toggle { /* Hamburger button */
  display: none; /* Hidden on desktop by default, shown on mobile by @media query */
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1005; /* Above nav panel when it opens */
}
.menu-toggle:hover {
  color: var(--accent-gold);
}

.main-navigation { /* Container for UL from menu.html */
  display: flex; /* Default for DESKTOP: show nav inline */
  align-items: center;
}

/* Drag and Drop Area Styles */
#drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 40px 20px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  margin-bottom: 1rem;
  text-align: center;
  background-color: var(--bg-color);
}

#drop-zone.dragover {
  border-color: var(--accent-gold);
  background-color: var(--bg-color);
}

#drop-zone p {
  margin: 0;
  color: var(--text-color);
  opacity: 0.8;
}

#preview-container {
  margin-top: 1.5rem;
}

#preview-image {
  max-width: 150px;
  max-height: 150px;
  border-radius: 50%;
  border: 4px solid var(--secondary-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.message {
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.25rem;
  font-weight: bold;
  text-align: center;
  display: none;
}

.message.success {
  color: #155724;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
}

.message.error {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
}

.main-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.main-navigation li { /* Desktop list item spacing */
  margin-left: 1.5rem;
}
 .main-navigation li:first-child { /* No left margin for the very first item in the nav list */
    margin-left: 0;
}

.main-navigation a { /* Styles for actual nav links */
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 0.5rem 0; /* Vertical padding for easier clicking */
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a:focus {
  color: var(--accent-gold);
}

/* Theme toggle button styling (when it's the last li from menu.html) */
.theme-toggle-li-container button { /* Targets the button inside the li */
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem; /* Match other clickable areas */
  display: flex;
  align-items: center;
}
.theme-toggle-li-container button:hover {
  color: var(--accent-gold);
}
.theme-toggle-text-mobile { /* Class for optional text next to mobile theme icon */
    display: none; /* Hidden by default */
    font-size: 1rem; /* Adjust as needed */
    margin-left: 0.5rem;
}


/* Mobile Menu Styles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block; /* Show hamburger icon */
  }
  .main-navigation { /* This is the panel that slides in */
    display: none; /* Initially hidden */
    position: fixed;
    top: var(--header-height); /* Start below the header */
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height)); /* Full remaining height */
    background-color: var(--bg-color);
    flex-direction: column;
    align-items: stretch; /* Stretch li children to full width */
    padding: 1rem 0; /* Padding top/bottom, no side padding for full-width items */
    overflow-y: auto;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform: translateX(-100%); /* Start off-screen to the left */
    opacity: 0;
    border-top: 1px solid var(--border-color);
    z-index: 1001; /* Ensure it's above main content but below menu-toggle if it were to overlap */
  }
  .main-navigation.active {
    display: flex; /* Show the panel */
    transform: translateX(0); /* Slide in */
    opacity: 1;
  }
  .main-navigation ul {
    flex-direction: column; /* Stack list items vertically */
    width: 100%;
  }
  .main-navigation li {
    margin-left: 0; /* Reset desktop margin */
    width: 100%;
  }
  .main-navigation a { /* Full-width tappable links */
    display: block;
    padding: 1rem 1.5rem; /* Generous padding */
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
  }
   .main-navigation li:last-child > a { /* If last child is a link, no bottom border */
        /* This might need adjustment if theme toggle is always last AND is not an <a> */
  }
  .main-navigation li.theme-toggle-li-container {
    margin-top: 1rem; /* Space above theme toggle in the list */
    padding: 0.5rem 1.5rem; /* Padding for the container of the button */
    border-top: 1px solid var(--accent-gold); /* Visual separator */
  }
  .main-navigation li.theme-toggle-li-container button {
    width: 100%;
    justify-content: flex-start; /* Align icon and text to left */
    font-size: 1.1rem; /* Match nav links */
    padding: 0.5rem 0; /* Vertical padding, horizontal handled by li */
  }
  .main-navigation li.theme-toggle-li-container button .fas {
    font-size: 1.3rem; /* Icon size */
  }
  .main-navigation .theme-toggle-text-mobile { /* Show optional text on mobile */
    display: inline;
  }
}
/* END: Menu CSS */

.book-container { display: flex; flex-direction: column; align-items: center; margin-bottom: 3rem; }
.book-title { font-size: 2.5rem; font-weight: 900; text-transform: uppercase; text-align: center; margin-bottom: 1rem; }
.book-subtitle { font-size: 1.5rem; text-transform: uppercase; text-align: center; }
.author { font-size: 1.2rem; text-align: center; margin-bottom: 2rem; }
.bestseller-badge { background-color: var(--accent-gold); color: var(--bg-color); font-weight: bold; padding: 0.5rem 1rem; margin-bottom: 2rem; }
.book-cover-container { display: flex; flex-direction: column; align-items: center; }
.book-cover { max-width: 100%; height: auto; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border-radius: 8px; }
.audio-player-container { margin-top: 1.5rem; margin-bottom: 1rem; width: 100%; max-width: 400px; padding: 1rem; border: 1px solid var(--accent-gold); border-radius: 8px; background-color: var(--secondary-bg); text-align: center; }
.audio-player-invitation { font-size: 0.9rem; margin-bottom: 0.75rem; color: var(--text-color); font-style: italic; }
.audio-player-container audio { width: 100%; border-radius: 5px; }
.arc-button-container { text-align: center; margin-top: 1.5rem; margin-bottom: 2rem; width: 100%; max-width: 400px; }
.arc-button { display: inline-block; background-color: var(--accent-gold); color: #1a1a1a; border: none; padding: 0.8rem 1.8rem; font-size: 1rem; text-transform: uppercase; font-weight: bold; cursor: pointer; border-radius: 0.25rem; text-decoration: none; transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.arc-button:hover, .arc-button:focus { background-color: #c09d2e; color: #000000; transform: translateY(-1px); text-decoration: none; }
html[data-theme='dark'] .arc-button { color: #111111; }
html[data-theme='dark'] .arc-button:hover, html[data-theme='dark'] .arc-button:focus { color: #000000; }
.quote-section { background-color: var(--secondary-bg); padding: 3rem 0; margin: 2rem 0; }
.quote { font-size: 1.4rem; font-style: italic; max-width: 800px; margin: 0 auto 1rem; text-align: center; }
.quote-attribution { text-align: center; font-weight: bold; }
.reviews-section { padding: 3rem 0; }
.section-title { text-align: center; margin-bottom: 2rem; font-size: 1.5rem; font-weight: bold; text-transform: uppercase; }
.reviews { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 900px; margin: 0 auto; }
.review { font-style: italic; text-align: center; padding: 1rem; background-color: var(--secondary-bg); border-radius: 8px; }
.review-source { font-style: normal; font-weight: bold; margin-top: 0.5rem; }
.newsletter-section { background-color: var(--secondary-bg); padding: 3rem 0; margin-top: 2rem; }
.newsletter-container { max-width: 600px; margin: 0 auto; text-align: center; }
.newsletter-description { margin-bottom: 2rem; font-size: 1.1rem; }
.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: bold; color: var(--text-color); }
.form-group input { width: 100%; padding: 1rem; border: 1px solid #ddd; border-radius: 0.25rem; font-size: 1rem; background-color: var(--bg-color); color: var(--text-color); }
html[data-theme='dark'] .form-group input { background-color: #2d2d2d; border-color: #444; color: #f0f0f0; }
html[data-theme='light'] .form-group input { background-color: #fff; border-color: #ccc; }
.captcha-error { color: var(--error-color); background-color: var(--error-bg-color); padding: 0.5rem; border-radius: 0.25rem; margin-top: 0.5rem; font-size: 0.9rem; text-align: center; display: none; }
.form-submit { background-color: var(--text-color); color: var(--bg-color); border: none; padding: 1rem 2rem; font-size: 1rem; text-transform: uppercase; font-weight: bold; cursor: pointer; border-radius: 0.25rem; transition: background-color 0.3s ease, color 0.3s ease; }
.form-submit:hover { background-color: var(--accent-gold); color: #1a1a1a; }
.o-symbol { width: 40px; height: 40px; border: 2px solid var(--accent-gold); border-radius: 50%; display: inline-block; position: relative; margin: 0 5px; vertical-align: middle; }
.o-symbol::after { content: ''; position: absolute; width: 10px; height: 10px; background-color: var(--accent-gold); border-radius: 50%; bottom: 3px; right: 3px; }
footer { padding: 2rem 0; text-align: center; font-size: 0.9rem; margin-top: auto; }
html[data-theme='dark'] .book-cover { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.flash-messages { list-style: none; padding: 0; margin: 0 0 1rem 0; position: fixed; top: calc(var(--header-height) + 1rem); left: 50%; transform: translateX(-50%); z-index: 999; width: auto; min-width: 300px; max-width: 80%; }
.flash-messages li { padding: 0.75rem 1.25rem; margin-bottom: 1rem; border: 1px solid transparent; border-radius: 0.25rem; text-align: center; font-weight: bold; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.flash-messages .success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.flash-messages .error { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
.flash-messages .info { color: #0c5460; background-color: #d1ecf1; border-color: #bee5eb; }

@media (min-width: 769px) { /* Desktop specific adjustments */
  .menu-toggle { display: none !important; } /* Ensure hamburger is hidden on desktop */
  .main-navigation { display: flex !important; } /* Ensure nav is visible and flexed on desktop */

  .book-container { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .book-info { flex: 0 0 45%; }
  .book-cover-container { flex: 0 0 45%; }
  .book-title { font-size: 3.5rem; text-align: left; }
  .book-subtitle, .author { text-align: left; }
  .reviews { grid-template-columns: repeat(3, 1fr); }
}

/* START: CSS for new elements */
.book-info-player {
    margin-top: 1.5rem;
    border: none;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    padding: 1rem; /* Added padding */
}

.book-info-button {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* This is the key change for desktop */
@media (min-width: 769px) {
    .book-info-player,
    .book-info-button {
        max-width: 100%; /* Removes the width limit */
    }
    .book-info-button .arc-button {
        width: 100%; /* Makes the button itself expand */
    }
}
/* END: CSS for new elements */