/* Comic Reader Styles */

.reader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Comic container — holds image + hotspots + CW overlay */
.comic-container {
  position: relative;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.comic-image {
  width: 100%;
  height: auto;
  display: block;
  animation: page-fade-in 0.3s ease;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Respect reduce motion */
body.reduce-motion .comic-image {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .comic-image {
    animation: none;
  }
}

/* Navigation — arrows below comic, spread apart */
.reader-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 920px;
  padding: 0.5rem 0;
}

/* Hide first/last buttons */
.reader-nav button#nav-first,
.reader-nav button#nav-last {
  display: none;
}

.reader-nav button {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  font-size: 1rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.reader-nav button:hover:not(:disabled) {
  border-color: var(--text-dim);
  background: var(--bg-tertiary);
}

.reader-nav button:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Green back arrow */
.reader-nav button#nav-prev {
  color: #22cc22;
}
.reader-nav button#nav-prev:hover:not(:disabled) {
  color: #44ee44;
}

/* Red forward arrow */
.reader-nav button#nav-next {
  color: #dd2222;
}
.reader-nav button#nav-next:hover:not(:disabled) {
  color: #ff4444;
}

/* Page indicator — centered between arrows */
.page-indicator {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
}

/* Page info */
.page-info {
  text-align: center;
  max-width: 600px;
}

.page-title {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.author-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
}

.author-note:empty {
  display: none;
}

/* Chapter title (shown on first page of chapter) */
.chapter-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .reader-nav button {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .page-indicator {
    font-size: 0.8rem;
  }
}
