/* === The Forbidden Card Catalog — Styles === */

/* Ambient Page Aging: paper grain overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(90, 74, 42, 0.03) 3px,
      rgba(90, 74, 42, 0.03) 4px
    ),
    radial-gradient(ellipse at 20% 50%, rgba(212, 168, 85, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(212, 168, 85, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(26, 20, 8, 0.05) 0%, transparent 70%);
}

/* Ambient Page Aging: faint ruled lines */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    180deg,
    transparent,
    transparent 27px,
    rgba(90, 74, 42, 0.06) 27px,
    rgba(90, 74, 42, 0.06) 28px
  );
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: #1a1408;
  color: #d4a855;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.7;
  min-height: 100vh;
}

.page-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* === Header === */
.library-header {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border-bottom: 2px solid #5a4a2a;
  margin-bottom: 2.5rem;
}

.dewey-seal {
  display: inline-block;
  font-size: 1.6rem;
  border: 2px solid #d4a855;
  border-radius: 50%;
  width: 70px; height: 70px;
  line-height: 66px;
  text-align: center;
  margin-bottom: 1rem;
  color: #f5e6c8;
  text-shadow: 0 0 8px rgba(212, 168, 85, 0.4);
}

.library-name {
  font-size: 2.2rem;
  color: #f5e6c8;
  text-shadow: 0 0 20px rgba(212, 168, 85, 0.3);
  margin: 0 0 0.5rem;
  letter-spacing: 2px;
}

.subtitle {
  font-size: 1.1rem;
  color: #d4a855;
  font-style: italic;
  margin: 0 0 0.3rem;
}

.est {
  font-size: 0.8rem;
  color: #8a7a5a;
  margin: 0;
}

/* === Section Headings === */
.section-heading {
  font-size: 1.4rem;
  color: #f5e6c8;
  text-shadow: 0 0 12px rgba(212, 168, 85, 0.25);
  border-bottom: 1px solid #5a4a2a;
  padding-bottom: 0.5rem;
  margin-bottom: 1.2rem;
}

/* === Head Librarian's Notice === */
.notice-section {
  margin-bottom: 3rem;
}

.notice-card {
  background: linear-gradient(135deg, #2a2010, #1e1a0e);
  border: 1px solid #5a4a2a;
  border-left: 4px solid #d4a855;
  padding: 1.5rem;
  border-radius: 3px;
}

.notice-card ul {
  padding-left: 1.5rem;
}

.notice-card li {
  margin-bottom: 0.6rem;
}

.notice-sig {
  text-align: right;
  font-style: italic;
  color: #8a7a5a;
  margin-top: 1rem;
  margin-bottom: 0;
}

/* === Card Catalog === */
.catalog-section {
  margin-bottom: 3rem;
}

.catalog-intro {
  font-size: 0.9rem;
  color: #8a7a5a;
  margin-bottom: 1rem;
}

.catalog-container {
  display: flex;
  gap: 1.2rem;
  min-height: 300px;
}

.drawers {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
}

.drawer {
  width: 60px;
  height: 48px;
  background: linear-gradient(180deg, #3a2e18, #2a2010);
  border: 1px solid #5a4a2a;
  color: #f5e6c8;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
  position: relative;
}

.drawer::after {
  content: '';
  display: block;
  width: 20px;
  height: 4px;
  background: #8a7a5a;
  border-radius: 2px;
  margin: 4px auto 0;
}

.drawer:hover, .drawer.active {
  background: linear-gradient(180deg, #5a4a2a, #3a2e18);
  border-color: #d4a855;
  box-shadow: 0 0 10px rgba(212, 168, 85, 0.2);
}

.drawer.active {
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 0 10px rgba(212, 168, 85, 0.3);
}

.catalog-display {
  flex: 1;
  background: linear-gradient(135deg, #2a2010, #1e1a0e);
  border: 1px solid #5a4a2a;
  border-radius: 3px;
  padding: 1.2rem;
  overflow-y: auto;
}

.catalog-placeholder {
  color: #5a4a2a;
  font-style: italic;
  text-align: center;
  padding-top: 4rem;
}

/* Catalog entry cards */
.catalog-entry {
  background: linear-gradient(135deg, #f5e6c8, #e8d5a8);
  color: #2a2010;
  border: 1px solid #c4a878;
  border-radius: 3px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
  position: relative;
  box-shadow: 1px 2px 4px rgba(0,0,0,0.3);
}

.catalog-entry::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d4a855, #c4a878, #d4a855);
}

.entry-title {
  font-weight: bold;
  font-size: 1.05rem;
  color: #1a1408;
  margin-bottom: 0.3rem;
}

.entry-dewey {
  font-size: 0.8rem;
  color: #5a4a2a;
  margin-bottom: 0.2rem;
}

.entry-status {
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 0.4rem;
}

.entry-status.checked-out { color: #8b4513; }
.entry-status.overdue { color: #a0522d; }
.entry-status.missing { color: #800000; }

.entry-desc {
  font-size: 0.85rem;
  color: #3a2e18;
  line-height: 1.5;
}

.entry-redacted {
  color: #f5e6c8;
  background: #f5e6c8;
  transition: color 0.4s ease, background 0.4s ease;
  cursor: help;
  padding: 0 2px;
  border-radius: 2px;
}

.entry-redacted:hover,
.entry-redacted:focus {
  color: #800000;
  background: #fce8d0;
}

/* === Overdue Section === */
.overdue-section {
  margin-bottom: 3rem;
}

.overdue-card {
  background: linear-gradient(135deg, #2a2010, #1e1a0e);
  border: 1px solid #5a4a2a;
  border-left: 4px solid #a0522d;
  padding: 1.5rem;
  border-radius: 3px;
  text-align: center;
}

.overdue-book-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #f5e6c8;
  font-style: italic;
  margin-bottom: 0.3rem;
}

.overdue-meta {
  font-size: 0.85rem;
  color: #8a7a5a;
  margin-bottom: 0.2rem;
}

.overdue-counter {
  font-size: 1.1rem;
  color: #a0522d;
  font-weight: bold;
  margin: 1rem 0;
  padding: 0.8rem;
  border: 1px dashed #5a4a2a;
  background: rgba(160, 82, 45, 0.08);
  letter-spacing: 1px;
}

.overdue-note {
  font-size: 0.8rem;
  color: #8a7a5a;
  font-style: italic;
  margin-bottom: 0;
}

/* === Banned Authors === */
.banned-section {
  margin-bottom: 3rem;
}

.banned-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.banned-card {
  background: linear-gradient(135deg, #2a2010, #1e1a0e);
  border: 1px solid #5a4a2a;
  padding: 1.2rem;
  border-radius: 3px;
  border-top: 3px solid #800000;
}

.banned-card h3 {
  color: #f5e6c8;
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.banned-reason {
  font-size: 0.85rem;
  color: #a89060;
  line-height: 1.5;
}

/* === Redacted Text (body-level) === */
.redacted {
  color: #1a1408;
  background: #1a1408;
  transition: color 0.5s ease, background 0.5s ease;
  cursor: help;
  padding: 2px 4px;
  border-radius: 2px;
  display: inline;
}

.redacted:hover,
.redacted:focus {
  color: #a0522d;
  background: rgba(160, 82, 45, 0.1);
  outline: 1px dashed #5a4a2a;
}

/* === Rules === */
.rules-section {
  margin-bottom: 3rem;
}

.rules-list {
  padding-left: 1.5rem;
}

.rules-list li {
  margin-bottom: 0.7rem;
  color: #c4a060;
  line-height: 1.6;
}

/* === Staff Picks === */
.picks-section {
  margin-bottom: 3rem;
}

.picks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.pick-card {
  background: linear-gradient(135deg, #2a2010, #1e1a0e);
  border: 1px solid #5a4a2a;
  padding: 1.2rem;
  border-radius: 3px;
  border-left: 4px solid #d4a855;
}

.pick-card h3 {
  color: #f5e6c8;
  font-size: 1rem;
  margin: 0 0 0.3rem;
  font-style: italic;
}

.pick-meta {
  font-size: 0.8rem;
  color: #8a7a5a;
  margin-bottom: 0.5rem;
}

/* === Footer === */
.library-footer {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
}

.footer-divider {
  border-top: 2px solid #5a4a2a;
  margin-bottom: 1.5rem;
}

.footer-note {
  font-size: 0.85rem;
  color: #8a7a5a;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: #5a4a2a;
  margin: 0.3rem 0;
}

/* === Responsive === */
@media (max-width: 700px) {
  .catalog-container {
    flex-direction: column;
  }
  .drawers {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .drawer {
    width: 50px;
    height: 42px;
  }
  .banned-grid {
    grid-template-columns: 1fr;
  }
  .library-name {
    font-size: 1.6rem;
  }
}

/* === Scrollbar styling === */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1a1408;
}
::-webkit-scrollbar-thumb {
  background: #5a4a2a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8a7a5a;
}

/* Webring widget spacing */
#webring {
  margin: 1.5rem 0;
}