/* 📜 Base Layout & Typography */
body {
  background-color: #f8f2e8;
  font-family: 'comic sans ms', 'Comic Sans', 'Comic Sans MS', Arial, sans-serif;
  color: #2a2a2a;
  text-align: center;
  margin: 0;
  padding-top: 60px;
  padding-left: 10px;
  padding-right: 10px;
  background-image: radial-gradient(circle at 50% 50%, #e4dccc 5%, transparent 6%);
  background-size: 150px 150px;
  font-size: 1rem;
  line-height: 1.6;
}

html, body {
  overflow-x: hidden;
}

a {
  font-weight: bold;
  color: #39454e;
  text-decoration: underline;
}

a:hover {
  color: #2a2a2a;
}

.spacer {
  height: 2rem;
}

.spacer-lg {
  height: 5rem;
}

/* 🪧 Scrolling Marquee */
.scrolling-wrapper {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  height: 40px;
  background-color: #f2e4b8;
  z-index: 1000;
  overflow: hidden;
}

.scrolling-text {
  display: inline-block;
  white-space: nowrap;
  font-size: 24px;
  font-weight: bold;
  color: #880e4f;
  padding-left: 100%;
  animation: scroll-across 15s linear infinite;
}

@keyframes scroll-across {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* 🎆 Flashing Title & Effects */
h1 {
  font-size: 2.4rem;
  color: #880e4f;
  margin-top: 30px;
}

.flashing-title {
  animation: flash 1.5s infinite alternate;
}

@keyframes flash {
  from { opacity: 1; }
  to   { opacity: 0.25; }
}

.rainbow-text {
  background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hue-shift 5s linear infinite;
}

@keyframes hue-shift {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* 🎵 Soundtrack Buttons */
.buttons {
  margin: 20px;
}

.buttons button {
  background-color: skyblue;
  border: 3px solid black;
  font-size: 1.1rem;
  margin: 10px;
  padding: 10px 30px;
  cursor: pointer;
}

/* 📚 Book Image */
.book-container img {
  width: 42vw;
  max-width: 360px;
  border: 4px dotted #880e4f;
  padding: 4px;
  background: white;
  margin: 20px auto;
  display: block;
}

/* 🖼️ Directions Placeholder Image */
#placeholder-image {
  display: block;
  margin: 20px auto;
  width: 100%;
  max-width: 400px;
  height: auto;
  border: 4px dotted #880e4f;
  padding: 4px;
  background-color: white;
  border-radius: 12px;
  box-sizing: border-box;
}

/* 👻 Floating Twain Ghost */
.ghost-twain {
  position: fixed;
  top: 30%;
  left: 5%;
  width: 120px;
  opacity: 0.9;
  z-index: -1;
  pointer-events: none;
  animation: float-twain 25s infinite alternate ease-in-out;
}


@keyframes float-twain {
  0%   { top: 10%; left: 0%; transform: rotate(0deg); }
  25%  { top: 5%; left: 40%; transform: rotate(5deg); }
  50%  { top: 50%; left: 80%; transform: rotate(-3deg); }
  75%  { top: 70%; left: 40%; transform: rotate(3deg); }
  100% { top: 30%; left: 0%; transform: rotate(0deg); }
}

/* 📖 Description Box */
.description {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1rem;
  padding: 10px;
  color: #39454e;
}

/* 🧰 Web Dev Message */
.web-dev-message {
  max-width: 700px;
  margin: 20px auto;
  padding: 10px;
  background: #fff3cd;
  border: 2px dashed red;
  color: black;
}

.web-dev-message h3 {
  color: red;
  font-size: 1.1rem;
}

/* 🚧 Construction Cone */
.construction {
  margin: 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.construction img {
  width: 30px;
}

.construction span {
  font-size: 1rem;
  color: rgb(138, 105, 255);
}

/* 👣 Directions Output */
.directions-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

#directions-output {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
  background: #fffefc;
  border: 2px dashed #880e4f;
  border-radius: 12px;
  font-family: Georgia, serif;
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
}

#directions-output ol {
  padding-left: 1.5rem;
}

#directions-output li {
  margin-bottom: 0.5rem;
}

/* 📨 Email Signup Form – Booktrovert Style */

.signup-box {
  background-color: #fdf6f0;
  border: 2px dashed #880e4f;
  border-radius: 12px;
  padding: 2rem;
  max-width: 660px;
  margin: 0 auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.signup-box h3 {
  font-size: 2rem;
  color: #880e4f;
  font-family: 'Comic Sans MS', 'Comic Sans', Arial, sans-serif;
  margin-bottom: 0.5rem;
}

.signup-box p {
  margin: 0.5rem 0 1.2rem;
  color: #39454e;
  font-style: italic;
  font-size: 1rem;
}

.signup-box small {
  display: block;
  margin-top: 1rem;
  color: #999;
  font-size: 0.8rem;
  font-style: italic;
}

#signup-confirmation {
  background: #fffdf8;
  border: 2px dashed #880e4f;
  color: #39454e;
  font-family: Georgia, serif;
  font-size: 1rem;
  padding: 1.5rem;
  max-width: 400px;
  margin: 2rem auto 1rem auto;
  box-shadow: 4px 4px 0 black;
  border-radius: 8px;
  line-height: 1.6;
  text-align: center;
}

#signup-confirmation::before {
  content: "📬";
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.signup-form {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.signup-form .form-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
  width: 100%;
}

.signup-form input[type="text"],
.signup-form input[type="email"] {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid #d5cbb8;
  font-family: Georgia, serif;
  font-size: 1rem;
  background: #fffefc;
  color: #2a2a2a;
  border-radius: 8px;
  box-sizing: border-box;
}

.signup-form button {
  display: block;
  width: 100%;
  padding: 0.8rem 1.4rem;
  background-color: #fff570;
  color: #000;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  font-size: 1rem;
  border: 2px solid black;
  cursor: pointer;
  box-shadow: 3px 3px 0 black;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  line-height: 1.2;
  margin-top: 0.5rem;
}

.signup-form button:hover {
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 black;
  background-color: #fffa9e;
}

.signup-form input[type="email"] {
  width: 100% !important;
  max-width: none !important;
  display: block;
}


/* 📱 Mobile Tweaks */
@media (max-width: 600px) {
  .signup-box {
    padding: 1.5rem 1rem;
  }

  .signup-form .form-group {
    gap: 0.75rem;
  }

  .signup-form input[type="text"],
  .signup-form input[type="email"],
  .signup-form button {
    width: 100%;
  }

  .signup-form button {
    margin-top: 0rem;
  }
}



/* 📝 Read a Sample Formatting */
.sample-container {
  max-width: 750px;
  margin: 60px auto;
  padding: 20px;
  background: #fffefc;
  border: 2px dashed #880e4f;
  font-family: Georgia, serif;
  font-size: 1.1rem;
  line-height: 2;
  text-align: left;
}

.sample-container .chapter-title,
.sample-container h1 {
  text-align: center;
  color: #880e4f;
  margin-top: 3rem;
  font-size: 1.3rem;
  font-weight: bold;
}

.sample-container p {
  text-indent: 2em;
  margin-bottom: 1.5em;
}

.sample-container p.first-line {
  text-indent: 0;
  font-weight: bold;
  font-variant: small-caps;
  margin-top: 3em;
}

.chapter-divider {
  text-align: center;
  font-size: 1.5rem;
  color: #880e4f;
  margin: 5rem 0;
}

/* 📖 Archive Grid */
.archive {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fffdf8;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  height: 100%;
  min-height: 260px;
  transition: transform 0.2s ease;
  position: relative;
}

.entry a {
  display: flex;
  justify-content: center;
}

.entry img {
  height: 220px;
  width: auto;
  object-fit: contain;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f8f8f8;
  transition: transform 0.2s ease;
  margin-top: 10px;
}

.entry .date {
  font-size: 0.9rem;
  margin-top: 0.4rem;
  color: #39454e;
}

.entry input[type="radio"] {
  margin-bottom: 8px;
}

.date {
  margin-top: auto;
  margin-bottom: auto;
  padding-top: 10px;
  font-size: 0.9rem;
  color: #555;
  text-align: center;
  max-width: 140px;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 📣 Archive Promo Button */
.archive-promo {
  text-align: center;
  margin-top: 2rem;
}

.archive-promo a {
  display: inline-block;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  background-color: #fff570;
  color: black;
  padding: 0.75rem 1.25rem;
  border: 2px solid black;
  text-decoration: none;
  box-shadow: 3px 3px 0 black;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.archive-promo a:hover {
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 black;
  background-color: #fffa9e;
}

/* 🕸️ Flicker effect */
.flicker {
  animation: flickerText 0.15s steps(2, end) infinite;
}

@keyframes flickerText {
  0%, 100% { opacity: 1; }
  50%     { opacity: 0.3; }
}

/* 📖 Bracket */

body.bracket-page {
  background: white;
  font-family: Georgia, serif;
  color: #2a2a2a;
  text-align: center;
  margin: 0;
  padding-top: 10px;
  font-size: 1rem;
  line-height: 1.6;
}

/* .bracket-gallery {
  background: white;
  border: none;
  padding: 1.5rem 2rem;
  border-radius: 0;
  max-width: 1200px;
  margin: 2rem auto 1rem auto;
  box-shadow: none;
} */

.bracket-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem 2.5rem;
  padding: 0;
  margin-top: -1rem;
  justify-items: center;
  align-items: start;
}

label.entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: none;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

label.entry::-moz-focus-inner {
  border: 0;
}

label.entry .cover-wrapper {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1.2rem;
}

label.entry img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* ✅ ALIGN TEXT BLOCK */
.text-block {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  height: 7.2rem;
  gap: 3rem;
  padding: 0;
  margin: 0;
}

.text-block .date {
  height: 1.6rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  line-height: 1.3;
}

.text-block .date span {
  display: inline-block;
  line-height: 1.3;
  white-space: nowrap; /* 🔑 force one line */
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
}

.text-block strong {
  height: 5.6rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.3;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0;
  margin: 0;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}



/* Hide default radio buttons */
label.entry input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ✨ Divine Glow for Selected Entry */
label.entry input[type="radio"]:checked ~ .cover-wrapper .cover-inner img {
  transform: translateY(-6px) scale(1.03);
  box-shadow:
    0 0 0 6px #fff,
    0 0 10px 5px rgba(255, 233, 133, 0.8),
    0 0 25px 10px rgba(255, 205, 0, 0.7),
    0 0 50px 20px rgba(255, 160, 0, 0.6);
  animation: divine-pulse 2.5s linear infinite;
  border-radius: 4px;
  position: relative;
  z-index: 10;
}


@keyframes divine-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px #fff,
      0 0 30px 10px rgba(255, 200, 50, 0.65);
  }
  50% {
    box-shadow:
      0 0 0 3px #fff,
      0 0 60px 20px rgba(255, 240, 120, 0.85);
  }
}

.cover-inner,
.cover-wrapper {
  overflow: visible !important;
}



/* Hover state */
label.entry:hover .cover-wrapper {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

/* Active state */
label.entry:active .cover-wrapper {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.vote-submit {
  font-size: 1.1rem;
  color:#000;
  padding: 10px 20px;
  margin: -20px auto 20px auto; /* Raised by 20px */
  border: 2px solid #000;
  background-color: #fff570;
  cursor: pointer;
  box-shadow: 3px 3px 0 black;
  font-family: 'Courier New', Courier, monospace;
  display: inline-block;
  text-align: center;
  max-width: 90vw;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: normal; /* explicitly allow line wrapping */
  border-radius: 10px; /* gives room for shadows on wrapped lines */
  box-sizing: border-box; /* prevents overflow from padding */
}

.vote-submit:hover {
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 black;
  background-color: #fffa9e;
}

#vote-confirmation a {
  color: #39454e;
  font-weight: bold;
  font-size: 1rem;
  text-decoration: underline dotted;
  animation: fadeIn 1.2s ease forwards;
  opacity: 0;
}
@keyframes fadeIn {
  to { opacity: 1; }
}

#vote-confirmation a:hover {
  color: #000;
  text-decoration-style: solid;
}

#vote-confirmation {
  max-width: 500px;
  margin: 2rem auto;
}

/* --- confirmation cover grid --- */
#vote-confirmation .buy-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;                  /* consistent spacing */
  justify-content: center;
  align-items: flex-end;      /* align all bottoms */
}

/* anchor block that wraps each image */
#vote-confirmation .buy-grid a {
  text-decoration: none;
  color: #39454e;
  font-weight: 600;
  display: block;
  text-align: center;         /* centers image horizontally */
  padding: 0.5rem;
  box-sizing: border-box;
}

/* image inside each book anchor */
#vote-confirmation .buy-grid img {
  height: 180px;              /* consistent height */
  width: auto;                /* natural width */
  object-fit: contain;        /* avoids cropping */
  border: 1px solid #d5cbb8;
  background: #fffdf8;
  display: block;
  margin: 0 auto;
}


/* 🧳 Blog Post Wrapper */
.blog-wrapper {
  max-width: 800px;
  margin: 60px auto;
  padding: 40px 20px;
  background-color: #fffdf8;
  border: 2px dashed #880e4f;
  font-family: Georgia, serif;
  text-align: left;
  line-height: 1.7;
  font-size: 1.1rem;
}

.blog-wrapper h1 {
  text-align: center;
  font-family: 'Comic Sans MS', 'Comic Sans', Arial, sans-serif;
  font-size: 2.2rem;
  color: #880e4f;
  margin-bottom: 0.5rem;
}

.blog-wrapper h2 {
  text-align: center;
  font-family: 'Comic Sans MS', 'Comic Sans', Arial, sans-serif;
  font-style: italic;
  font-size: 1rem;
  color: #555;
  margin-bottom: 2rem;
}

.blog-wrapper p:first-of-type {
  margin-top: 1rem;
}


/* 📱 Mobile Adjustments */
@media (max-width: 768px) {
  /* GENERAL */
  body {
    font-size: 1.05rem;
    padding-top: 30px;
  }

  h1 {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
  }

  .scrolling-text {
    font-size: 18px;
  }

  /* IMAGE SIZING */
  .book-container img,
  #placeholder-image {
    width: 90vw;
  }

  .ghost-twain {
    width: 90px;
  }

  /* TEXT BLOCKS */
  .description,
  .web-dev-message,
  #directions-output,
  .sample-container {
    font-size: 1rem;
    padding: 1rem;
  }

  /* GRID TWEAKS */
  .bracket-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem;
    padding: 0 1rem;
  }

  label.entry {
    width: 100%;
    padding: 1.2rem 0.8rem;
    border-radius: 12px;
    transition: background 0.2s ease;
  }

  label.entry:active {
    background-color: rgba(255, 215, 0, 0.1);
  }

  .cover-wrapper {
    max-width: 100%;
    padding: 0;
  }

  .bracket-grid .entry img {
    height: auto;
    width: 100%;
    max-height: 300px;
    aspect-ratio: 2 / 3;
  }

  /* VOTE BUTTON */
  .vote-submit {
    width: 90%;
    max-width: 400px;
    font-size: 1.2rem;
    padding: 14px 24px;
    border-radius: 10px;
    margin: 0 auto 1rem auto;
  }

  /* CONFIRMATION AREA */
  #vote-confirmation {
    font-size: 0.95rem;
    padding: 0;
    margin: 0.5rem auto 2rem auto;
  }

  #vote-confirmation h2 {
    font-size: 1.5rem;
  }

  /* FOOTER */
  footer p {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1.4;
  }

  footer a {
    display: inline-block;
    padding: 2px 6px;
  }
}

/* 🏛️ Hall of Eternal Enshrinement */
body.hall-page {
  background-color: #000 !important;
  background-image: none !important;
  color: #fff;
  font-family: 'EB Garamond', serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hall-title {
  margin-top: -3rem;
  font-size: 2.2rem;
  font-weight: bold;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-align: center;
  color: #ffffff;
  z-index: 2;
  position: relative;
}

/* 🌟 Spotlight Section */
.spotlight {
  position: relative;
  flex: initial;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 2rem;
  padding-bottom: 1rem;
  overflow: hidden;
}

.spotlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 600px;
  background: radial-gradient(ellipse at center top, rgba(255, 255, 255, 0.25) 0%, rgba(0, 0, 0, 1) 70%);
  z-index: 0;
}

.spotlight-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(7%);
}

/* 🏛️ Pedestal & Cover */
.pedestal-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12rem;
}

.pedestal-wrapper .book-link {
  position: absolute;
  bottom: 100%;
  transform: translateY(14%);
  transform-origin: bottom center;
  z-index: 2;
  transition: transform 0.8s ease;
  display: inline-block;
  width: 80px;
  height: auto;
}

.pedestal-wrapper .book-link:hover .winner-cover {
  transform: translateY(14%) scale(2);
}

.pedestal-wrapper .winner-cover {
  width: 80px;
  height: auto;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  transform: translateY(14%) scale(1);
  transform-origin: bottom center; /* ⭐️ move it here permanently */
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
  transition: transform 0.8s cubic-bezier(.4, 0, .2, 1), box-shadow 0.8s cubic-bezier(.4, 0, .2, 1);
  display: block;
  will-change: transform;
}

.pedestal-wrapper .pedestal-img {
  width: 240px;
  display: block;
}

/* 🕯️ Enshrined Caption */
.enshrined-title {
  margin-bottom: 10rem;
  font-size: 1.3rem;
  font-style: italic;
  color: #ffcc00;
  text-align: center;
}

.return-button {
  display: inline-block;
  background: transparent;
  color: #c2b280; /* parchment gold */
  padding: 0.4rem 1.2rem;
  font-size: 1.05rem;
  font-family: 'EB Garamond', serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid #c2b280;
  border-radius: 0;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: 3rem;
}

.return-button::before {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: #c2b280;
  transition: transform 0.3s ease;
  transform: scaleX(0);
  transform-origin: left;
}

.return-button:hover {
  color: #ffffff;
  border-color: #ffffff;
}

.return-button:hover::before {
  transform: scaleX(1);
  background: #ffffff;
}


/* 🖼️ Overlay Modal */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.5s ease;
  animation: fadeInOverlay 0.5s forwards;
}

.expanded-cover {
  width: auto;
  max-width: 90vw;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  transition: transform 0.5s ease, opacity 0.5s ease;
  transform: scale(0.95);
  opacity: 0;
  animation: expandIn 0.5s forwards;
  cursor: pointer;
  background-color: transparent; /* ⬅️ Prevent unwanted fill */
}


/* ❌ Close Button */
#close-button {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001;
}

#close-button:hover {
  opacity: 0.7;
}

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85); /* dark but not black fill */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 0;     /* ✅ Ensure no padding */
  margin: 0;      /* ✅ Ensure no margin */
}


@keyframes expandIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeInOverlay {
  to {
    opacity: 1;
  }
}


/* 📱 Smaller phones (≤ 600 px): two-up grid */
@media (max-width: 600px) {
  .bracket-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;       /* a little tighter side-to-side */
    padding: 0 .5rem;
  }

  .entry {
    max-width: 260px;       /* scales nicely in two-up */
    margin: 0 auto;
  }

  .vote-submit {
    width: 100%;
    max-width: 400px;
    font-size: 1.1rem;
    padding: 14px 20px;
    margin: 1.5rem auto;
    border-radius: 10px;
    line-height: 1.5;
  }

  #vote-confirmation .buy-grid{
    /* grid is simplest: two equal columns */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;               /* space between covers */
    justify-items: center;   /* centers each anchor */
  }

  /* stretch each anchor to the full column width */
  #vote-confirmation .buy-grid a{
    width: 100%;             /* overrides the fixed 110 px */
    max-width: 160px;        /* optional cap so they don't balloon on tablets */
  }

  .hall-title {
    font-size: clamp(1.6rem, 6vw, 2rem);
    letter-spacing: 0.2em;
    text-align: center;
    padding: 0 1rem;
    word-break: break-word;
    margin-top: 0rem;
  }

  .pedestal-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15rem; /* ✨ Add margin-top to push down */
  }
}

/* 📱 Tiny phones (≤ 400 px): single column */
@media (max-width: 400px) {
  .bracket-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* Remove hover effects on mobile */
@media (hover: none) {
  .entry:hover .cover-wrapper {
    transform: none;
    box-shadow: none;
  }
}

/* 🧘 Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* 📱 Smaller phones (≤ 600 px): two-up grid */
@media (max-width: 600px) {
  .bracket-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;       /* a little tighter side-to-side */
    padding: 0 .5rem;
  }

  .entry {
    max-width: 260px;       /* scales nicely in two-up */
    margin: 0 auto;
  }

  #vote-confirmation .buy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-items: center;
  }

  #vote-confirmation .buy-grid a {
    width: 100%;
    max-width: 160px;
  }

  .vote-confirmed-title {
    font-size: 1.5rem;
    color: #90ee90;
    margin-bottom: 0.5rem;
  }
  
  .vote-confirmed-subtitle {
    font-weight: bold;
    margin-bottom: 2rem;
  }
  
  body.dark-theme .meet-bracketeer-link a {
    color: #fff570 !important;
    text-decoration: underline dotted;
    font-weight: bold;
  }
  
  body.dark-theme .meet-bracketeer-link a:hover {
    color: white !important;
  }
  

  /* ✨ New: Spotlight container refinement */
  .spotlight {
    max-width: 90vw;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  /* ✨ New: Spotlight content move */
  .spotlight-content {
    transform: translateY(0%);
  }

  /* ✨ New: Pedestal and cover shrink */
  .pedestal-wrapper img.winner-cover {
    width: 160px;
    transform: translateY(-2%);
  }

  .pedestal-wrapper img.pedestal-img {
    width: 200px;
  }

  .pedestal-wrapper .book-link {
    width: 160px; /* match new winner-cover width */
  }
}

/* 📱 Tiny phones (≤ 400 px): single column */
@media (max-width: 400px) {
  .bracket-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* 📱 Remove hover effects on mobile */
@media (hover: none) {
  .entry:hover .cover-wrapper {
    transform: none;
    box-shadow: none;
  }
}

/* 📱 Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* 📱 Mobile-only fix for book cover cropping and removing outlines */
@media (max-width: 768px) {
  label.entry .cover-wrapper {
    aspect-ratio: unset;
    height: auto;
    max-width: 100%;
    box-shadow: none;
    border: none;
    background: none;
  }

  label.entry .cover-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border: none;
    box-shadow: none;
    background: none;
  }

  .text-block {
    gap: 0.8rem;
    height: auto;
    padding-top: 0.5rem;
  }

  .text-block .date {
    height: auto;
    margin-bottom: 0.25rem;
  }

  .text-block strong {
    height: auto;
    margin-top: 0.25rem;
  }

  /* ✨ New: Smaller Spotlight Downshift for Tablet-ish Screens */
  .spotlight-content {
    transform: translateY(3%);
  }
}

/* 🌱 Ultra-mobile refinements — directions */
@media (max-width: 600px) {
  /* 1. Global trim */
  body {
    padding-top: 20px;
    background: none;
    font-size: 1rem;
  }

  /* 2. Page wrapper */
  .directions-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  /* 3. Form (centered stack) */
  #directions-form {
    width: 100%;
    max-width: 18rem;
    margin: 1.2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
  }

  #user-address,
  #directions-form button {
    width: 100%;
    box-sizing: border-box;
    font-size: 1.05rem;
    padding: .9rem 1rem;
    border-radius: 10px;
  }

  /* 4. Placeholder image */
  #placeholder-image {
    max-width: 90vw;
    border: 2px dotted #880e4f;
  }

  /* 5. Directions card */
  #directions-output {
    font-size: .95rem;
    padding: 1rem;
  }

  /* 6. Decorative ghost – hidden on tiny screens */
  .ghost-twain {
    display: none;
  }

  /* 7. Footer links wrap neatly */
  footer p {
    flex-direction: column;
    gap: 0.25rem;
  }
} /* end ultra-mobile block */

/* 🌒 Dark Theme – Book Jacket Bracket Enhancements */
body.dark-theme {
  background-color: #111;
  background-image: none;
  color: #f0e6d2;
}

/* Headings */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3 {
  color: #fff570;
  font-family: 'EB Garamond', serif;
}

/* Vote Header */
body.dark-theme #vote-header {
  color: #f0e6d2;
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0 0 4rem;
}

/* Vote Button */
body.dark-theme .vote-submit,
body.dark-theme .signup-box button {
  background-color: #fff570;
  color: #000;
  border: 2px solid black;
  box-shadow: 3px 3px 0 black;
}

body.dark-theme .vote-submit:hover,
body.dark-theme .signup-box button:hover {
  background-color: #fffa9e;
  box-shadow: 5px 5px 0 black;
}

/* Inputs */
body.dark-theme input[type="email"],
body.dark-theme #user-address {
  background: #222;
  color: #f0e6d2;
  border: 2px solid #555;
}

/* Entry Cards */
body.dark-theme .entry {
  background: transparent;
  color: #f0e6d2;
  box-shadow: none;
  border: none;
  padding: 1rem;
  transition: box-shadow 0.2s ease;
}

body.dark-theme .entry:hover .cover-wrapper {
  box-shadow: 0 0 10px rgba(255,255,255,0.15);
}

/* Cover Styling (Equal Height) */
body.dark-theme .cover-wrapper,
body.dark-theme .cover-inner {
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.dark-theme .cover-inner img {
  height: 100%;
  width: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
  background: none;
  border: none;
  box-shadow: none;
  outline: none;
  will-change: transform, box-shadow;
}

/* Bracket Layout */
body.dark-theme .bracket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem 2rem;
  justify-items: center;
  padding: 0 2rem;
  margin-bottom: 3rem;
}

/* Vote Button Placement */
body.dark-theme .vote-submit {
  margin: 0 auto 3.5rem;
}

/* Footer Styling */
body.dark-theme footer,
body.dark-theme .bracket-footer {
  background: #111;
  color: #f0e6d2;
  font-size: 0.9rem;
  padding: 40px 20px 30px;
  letter-spacing: 0.3px;
}

body.dark-theme footer a,
body.dark-theme .bracket-footer a {
  color: #fff570;
  font-weight: bold;
  text-decoration: underline;
}

body.dark-theme footer a:hover {
  color: #fff;
}

/* Misc containers */
body.dark-theme .signup-box,
body.dark-theme .sample-container,
body.dark-theme #signup-confirmation,
body.dark-theme #vote-confirmation,
body.dark-theme .description,
body.dark-theme .web-dev-message {
  background-color: #1a1a1a;
  color: #f0e6d2;
  border-color: #fff570;
}

/* Focus Handling */
body.dark-theme label.entry input[type="radio"]:focus + .cover-wrapper,
body.dark-theme label.entry:focus-within {
  outline: none;
  box-shadow: none;
}

/* 🧼 Cleanup Vote Confirmation Section */
body.dark-theme #vote-confirmation {
  background: none;
  border: none;
  box-shadow: none;
  padding: 2rem 1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* 🌟 Refined signup box for dark theme */
body.dark-theme .signup-box {
  background-color: #fdfaf6; /* soft parchment tone */
  color: #222;
  border: 1px solid #e0dbc8;
  border-radius: 10px;
  padding: 1.5rem;
  max-width: 440px;
  margin: 1rem auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  text-align: center;
}

body.dark-theme .signup-box h3 {
  color: #222;
  font-size: 1.6rem;
  font-family: 'EB Garamond', serif;
  margin-bottom: 2rem;
  margin-top: 0;
}

body.dark-theme .signup-box p {
  color: #444;
  font-style: italic;
  font-size: 1rem;
  margin: 0.5rem 0;
}

body.dark-theme .signup-box small {
  color: #777;
  font-style: italic;
  font-size: 0.85rem;
  margin-top: 1.2rem;
  display: block;
}

body.dark-theme .signup-box input[type="email"] {
  background-color: #fffefc;
  border: 1px solid #ccc;
  color: #333;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 6px;
  width: 100%;
  max-width: 320px;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

body.dark-theme .signup-box button {
  background-color: #fff570;
  color: #000;
  border: 2px solid black;
  box-shadow: 2px 2px 0 black;
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  font-family: 'Courier New', Courier, monospace;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 8px;
}

body.dark-theme .signup-box button:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 black;
  background-color: #fffa9e;
}



/* --- Mobile Tweaks --- */
@media (max-width: 600px) {
  body.dark-theme .bracket-grid {
    gap: 2rem 1.2rem;
  }

  body.dark-theme label.entry {
    padding: 1.2rem 1rem;
  }

  body.dark-theme .vote-submit {
    width: 100%;
    max-width: 400px;
  }

  body.dark-theme footer {
    padding: 2rem 1rem;
  }
}

@media (max-width: 600px) {
  label.entry .cover-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
    background: transparent;
    overflow: visible;
  }

  label.entry .cover-inner {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
  }

  label.entry .cover-inner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: transparent;
    border: none;
  }

  .entry {
    padding-left: 0;
    padding-right: 0;
  }

  .bracket-grid {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  label.entry .cover-wrapper {
    aspect-ratio: auto !important;
    height: auto;
    max-width: 100%;
    background: none;
    padding: 0;
    display: flex;
    justify-content: center;
  }

  label.entry .cover-wrapper img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  label.entry input[type="radio"]:checked ~ .cover-wrapper .cover-inner img {
    box-shadow:
      0 0 0 3px white,
      0 0 10px 5px rgba(255, 233, 133, 0.8),
      0 0 25px 10px rgba(255, 205, 0, 0.7),
      0 0 50px 20px rgba(255, 160, 0, 0.6);
  }
}

  /* ✅ Only apply glow to selected entry */
  label.entry input[type="radio"]:checked ~ .cover-wrapper .cover-inner img {
    box-shadow:
      0 0 0 4px white,
      0 0 15px 6px rgba(255, 233, 133, 0.8),
      0 0 30px 12px rgba(255, 205, 0, 0.7),
      0 0 60px 24px rgba(255, 160, 0, 0.6);
  }

  #vote-confirmation .meet-bracketeer-link a {
    color: #fff570 !important;
    text-decoration: underline;
    font-weight: bold;
    font-size: 1.05rem;
    opacity: 1 !important;
    animation: none !important;
  }
  
  #vote-confirmation .meet-bracketeer-link a:hover {
    color: white !important;
  }

/* Only affects the winner image */
.winner-glow {
  animation: glow 1.8s ease-in-out infinite alternate;
  box-shadow: 0 0 20px 6px #FEFCA9, 0 0 40px 12px #FEFCA9;
  border-radius: 4px;
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.winner-label {
  text-align: center;
  color: gold;
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 0.5rem;
  text-decoration: underline;
}


.winner-entry {
  text-decoration: none; /* Prevent underline around image */
}


/* Preserve aspect ratio and inner sizing */
label.entry .cover-wrapper,
a.entry .cover-wrapper {
  width: 100%;
  overflow: hidden;
  margin-bottom: 1.2rem;
}

label.entry .cover-inner,
a.entry .cover-inner {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

label.entry .cover-inner img,
a.entry .cover-inner img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

label.entry .cover-inner {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Only used for glowing animation */
@keyframes glow {
  from {
    box-shadow: 0 0 10px 3px #FEFCA9;
  }
  to {
    box-shadow: 0 0 28px 10px #FEFCA9;
  }
}
/* --- Bracket Gallery --- */
.bracket-gallery {
  background-color: transparent; /* <-- changed from white */
  padding: 2rem 1rem;
  border-radius: 0;
  max-width: 1200px;
  margin: 2rem auto 1rem auto;
  box-shadow: none;
}

body.dark-theme .bracket-gallery {
  background-color: transparent; /* ensure it stays dark */
}

/* Lower the `.date` label on desktop for better visual balance */
@media (min-width: 768px) {
  .bracket-grid .entry .date {
    margin-top: 1.25rem !important;
  }
}