/* === Mobile Optimized Dark Theme === */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&amp;display=swap');

:root {
  --background: #121212;
  --main-bg: #1e1e1e;
  --text: #e0e0e0;
  --border: #333333;
  --header-bg: #1b1b1b;
  --footer-bg: #1b1b1b;

  --link: #4da6ff;
  --link-hover: #80c0ff;

  --table-bg: #1a1a1a;
  --table-header: #2a2a2a;
  --quote-bg: #2a2a2a;
  --gallery-caption-bg: #2a2a2a;
}

body {
  margin: 0;
  background: var(--background);
  font-family: 'Atkinson Hyperlegible', sans-serif;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

/* Wrapper */
.wrapper {
  max-width: 900px;
  margin: 20px auto;
  border: 2px solid var(--border);
  background: var(--main-bg);
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  padding: 10px;
}

/* Header/Footer */
header, footer {
  background: var(--header-bg);
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding: 15px;
  text-align: center;
}
footer { border-top: 2px solid var(--border); }

/* Main */
main { padding: 15px; }

/* Headings */
h1, h2, h3 {
  border-bottom: 2px solid var(--border);
  padding-bottom: 5px;
  color: var(--text);
}

/* Links */
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* Breadcrumbs */
.breadcrumb { color: var(--text); font-size: 14px; }

/* Info Table */
.infotable {
  float: right;
  width: 260px;
  font-size: 14px;
  background: var(--table-bg);
  border: 1px solid var(--border);
  margin-left: 15px;
  border-radius: 5px;
}
.infotable th, .infotable td { padding: 8px; border-bottom: 1px solid var(--border); }
.infotable th { background: var(--table-header); text-align: left; }

/* Center text */
#centertext { text-align: center !important; }

/* Quote Box */
.quotebox {
  background: var(--quote-bg);
  padding: 12px;
  font-style: italic;
  border-left: 4px solid #4da6ff;
  margin: 20px 0;
  border-radius: 5px;
}

/* Reveal Box */
.reveal {
  background: var(--quote-bg);
  padding: 12px;
  border: 1px solid var(--border);
  text-align: center;
  margin-top: 10px;
  border-radius: 5px;
}
.revealsummary {
  font-weight: bold;
  cursor: pointer;
  color: #4da6ff;
}

/* Gallery */
.gallery-container { position: relative; max-width: 100%; margin: auto; }
.gallery-slide { display: none; text-align: center; }
.gallery-slide img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  background-color: var(--table-bg);
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.caption {
  background-color: var(--gallery-caption-bg);
  color: var(--text);
  padding: 8px;
  font-size: 14px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 5px 5px;
}

/* Gallery Arrows */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 40%;
  padding: 12px;
  font-size: 28px;
  background: rgba(70,70,70,0.6);
  border-radius: 50%;
  user-select: none;
  transition: 0.3s;
  color: #fff;
}
.prev { left: 5px; }
.next { right: 5px; }
.prev:hover, .next:hover { background-color: var(--border); color: #fff; }

/* Fade effect */
.fade { animation: fadeEffect 0.5s ease-in-out; }
@keyframes fadeEffect { from {opacity: 0.4;} to {opacity: 1;} }

/* Lightbox overlay */
#lightboxOverlay {
  position: fixed;
  display: none;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: rgba(0,0,0,0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
#lightboxImg {
  max-width: 95%;
  max-height: 80%;
  border: 4px solid #4da6ff;
  box-shadow: 0 0 30px black;
  border-radius: 5px;
}
#lightboxClose {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 32px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
}

/* Side Ads */
.side-ad {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 600px;
  z-index: 9999;
}
.side-ad img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 5px;
}
.left-ad { left: 0; }
.right-ad { right: 0; }

/* === Dark Mode Infotable === */
.infotable {
  float: right;
  width: 320px; /* can shrink on mobile */
  margin-left: 20px;
  margin-bottom: 30px;
  background-color: #1e1e1e; /* dark background */
  color: #e0e0e0; /* light text */
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid #444;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.infotable th, .infotable td {
  border: 1px solid #444;
  padding: 10px;
}

.infotable th {
  background-color: #2a2a2a;
  color: #fff;
  text-align: left;
}

.infotable td {
  background-color: #1e1e1e;
  color: #ccc;
}

/* Center table header */
.infotable th[colspan="2"] {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
}

/* Captions inside table */
.infotable .caption {
  font-size: 12px;
  color: #aaa;
  text-align: center;
  margin-top: 4px;
}

/* Make the text section adjust on mobile */
@media screen and (max-width: 1024px) {
  .infotable {
    float: none;
    width: 100%;
    margin: 0 0 20px 0;
  }
  .content-left.clear-section {
    margin-right: 0;
  }
}

/* Small mobile tweaks */
@media screen and (max-width: 480px) {
  .infotable th, .infotable td {
    padding: 8px;
    font-size: 13px;
  }
}


/* === Responsive === */
@media screen and (max-width: 1400px) {
  .side-ad { display: none; }
}
@media (max-width: 1024px) {
  .wrapper { width: 95%; padding: 10px; }
  .infotable { float: none; width: 100%; margin: 0 0 15px 0; }
  .gallery-slide img { cursor: default; }
  .prev, .next { padding: 8px; font-size: 24px; }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  header, footer { padding: 12px; }
  .caption { font-size: 13px; padding: 6px; }
  .quotebox, .reveal { padding: 10px; }
  .prev, .next { font-size: 22px; padding: 6px; }
}
@media (max-width: 480px) {
  body { font-size: 14px; }
  .prev, .next { font-size: 20px; padding: 5px; }
}
