/* Library of Dreams — page-specific styles */
body.library {
  background: #070708;
  color: #e6e6e6;
  font-family: 'Orbitron', sans-serif;
  min-height: 100vh;
}

.library-content {
  max-width: 920px;
  margin: 64px auto;
  padding: 28px 20px;
}

.page-header {
  text-align: center;
  margin-bottom: 28px;
}

.page-header h2 {
  color: #b077ff;
  text-shadow: 0 0 20px #b077ff;
  font-size: 2rem;
  margin: 0 0 8px 0;
}

.page-header p {
  color: #cfcfcf;
  margin: 0;
}

/* post listing styles moved to css/post.css for reuse */

.back-home {
  text-align: center;
  margin: 36px 0 80px;
  border-top: none !important;
  border: none !important;
}

.back-home a {
  color: #00ffff;
  text-decoration: none;
  transition: text-shadow 0.3s ease;
}

.back-home a:hover {
  text-shadow: 0 0 12px #00ffff, 0 0 24px #00ffff;
}

/* Tag styles */
.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 234, 255, 0.2);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0, 234, 255, 0.1);
  border: 1px solid #00eaff;
  border-radius: 16px;
  color: #00eaff;
  font-size: 0.85rem;
  text-shadow: 0 0 6px rgba(0, 234, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tag:hover {
  background: rgba(0, 234, 255, 0.2);
  box-shadow: 0 0 12px rgba(0, 234, 255, 0.4);
}

/* Archive link styles */
.archive-link-container {
  text-align: center;
  margin: 48px 0 24px;
  padding-top: 24px;
  border-top: 2px solid #b077ff;
}

.archive-link {
  color: #b077ff;
  text-decoration: none;
  font-size: 1.1rem;
  text-shadow: 0 0 12px #b077ff;
  transition: all 0.3s ease;
}

.archive-link:hover {
  text-shadow: 0 0 20px #b077ff, 0 0 30px #b077ff;
}

/* Keep Archer's library scene anchored while the posts scroll. */
body.library > .reading-corner-bubble,
body.library > .lamp-scene,
body.library > .character-image {
  position: fixed !important;
  z-index: 1000 !important;
}

/* Post title styling for library listing */
.post-title a.nav-glitch {
  position: relative;
  color: #00f7ff;
  transition: color 0.3s ease;
  text-shadow: 0 0 8px rgba(0, 247, 255, 0.4);
  z-index: 1;
  text-decoration: none;
  font-size: 1.5rem;
}

.post-title a.nav-glitch::before,
.post-title a.nav-glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  color: #00ffff;
  opacity: 0;
}

.post-title a.nav-glitch:hover {
  color: #00ffff;
  text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff;
}

.post-title a.nav-glitch:hover::before {
  animation: glitchTop 0.5s infinite linear alternate-reverse;
  opacity: 1;
}

.post-title a.nav-glitch:hover::after {
  animation: glitchBottom 0.5s infinite linear alternate-reverse;
  opacity: 1;
}

@keyframes glitchTop {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, -2px); }
  40% { transform: translate(-3px, 2px); }
  60% { transform: translate(2px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}

@keyframes glitchTop {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, -2px); }
  40% { transform: translate(-3px, 2px); }
  60% { transform: translate(2px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}
@keyframes glitchBottom {
  0% { transform: translate(0); }
  20% { transform: translate(2px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, 1px); }
  80% { transform: translate(-1px, -1px); }
  100% { transform: translate(0); }
}