/* books.css — Frosted Glass design */

:root {
  --ink: #1a212b;
  --muted: #454f5d;
  --faint: #69727f;
  --lede: #3a4350;
  --glass: rgba(255,255,255,.66);
  --glass-2: rgba(255,255,255,.78);
  --line: rgba(255,255,255,.70);
  --hair: rgba(30,42,60,.12);
  --blue: #41617f;
  --blue-deep: #32506c;
  --amber: #c98a3c;
  --shadow: 0 2px 8px rgba(30,44,66,.06), 0 18px 40px -18px rgba(30,44,66,.28);
}

body {
  font-family: 'Hanken Grotesk', sans-serif;
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
  position: relative;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(65,97,127,.12) 0%, rgba(201,138,60,.06) 100%);
  pointer-events: none;
}

.bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .7;
}

/* Layout */
.main-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
}

.feed-col {
  position: sticky;
  top: 60px;
  align-self: start;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.content-col { min-width: 0; }

@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .feed-col { order: 2; position: static; max-height: none; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--hair); }
}

/* Page header */
.page-header { margin-bottom: 3.5rem; }
.page-header h1 { font-size: 2.5rem; font-weight: 700; color: var(--ink); margin: 0 0 .5rem; }
.page-header p { color: var(--muted); font-size: .95rem; margin: 0; }
.page-header a { color: var(--blue); text-decoration: none; }
.page-header a:hover { text-decoration: underline; }

/* Sections */
.section { margin-bottom: 3.5rem; }
.section-head { display: flex; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { font-size: 1.4rem; font-weight: 600; color: var(--ink); margin: 0; white-space: nowrap; }
.section-line { height: 1px; background: var(--hair); flex-grow: 1; margin-bottom: .35rem; }

/* Currently reading cards */
.currently-list { display: flex; flex-direction: column; gap: 1rem; }
.current-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.current-card img { width: 80px; height: 120px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.current-card .fallback-cover { width: 80px; height: 120px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: var(--glass-2); border-radius: 6px; flex-shrink: 0; }
.current-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.current-card h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .25rem; color: var(--ink); }
.current-card h3 a { color: inherit; text-decoration: none; }
.current-card h3 a:hover { color: var(--blue); }
.current-card .author { font-size: .85rem; color: var(--muted); margin: 0; }
.current-card .author a { color: var(--muted); text-decoration: none; }
.current-card .author a:hover { color: var(--blue); }
.current-card .series { font-size: .7rem; font-weight: 600; color: var(--amber); text-transform: uppercase; letter-spacing: .05em; margin-top: .25rem; }
.current-card .note { font-size: .8rem; color: var(--faint); font-style: italic; margin-top: .5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Progress bar */
.progress-bar { height: 3px; background: var(--hair); border-radius: 2px; margin-top: .75rem; }
.progress-fill { height: 3px; background: var(--amber); border-radius: 2px; }
.progress-label { font-size: .7rem; color: var(--faint); margin-top: .25rem; }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 1rem 0; margin-bottom: 1.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font-family: 'Hanken Grotesk', sans-serif; font-size: .7rem; font-weight: 600; padding: .3rem .7rem; border: 1px solid var(--hair); border-radius: 6px; color: var(--muted); cursor: pointer; background: transparent; transition: all .15s; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.search-input { width: 100%; max-width: 220px; padding: .4rem .6rem; background: transparent; border: none; border-bottom: 1px solid var(--hair); font-family: inherit; font-size: .85rem; color: var(--ink); outline: none; }
.search-input:focus { border-color: var(--blue); }
.search-input::placeholder { color: var(--faint); }

/* Book grid rows */
.year-group { margin-bottom: 2rem; }
.year-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--amber); margin-bottom: .75rem; padding-bottom: .5rem; border-bottom: 1px solid var(--hair); }
.book-row { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--hair); }
.book-row:last-child { border-bottom: none; }
.book-row.clickable { cursor: pointer; }
.book-row.clickable:hover .book-title { color: var(--blue); }
.book-cover { width: 36px; height: 52px; flex-shrink: 0; overflow: hidden; border-radius: 4px; border: 1px solid var(--hair); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover .fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: .8rem; background: var(--glass-2); }
.book-info { flex: 1; min-width: 0; }
.book-title { font-size: .85rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; margin: 0; }
.book-author { font-size: .75rem; color: var(--muted); margin: .1rem 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-end { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.book-date { font-size: .7rem; color: var(--faint); }
.review-arrow { font-size: 1rem; color: var(--faint); opacity: .4; transition: opacity .15s; }
.book-row.clickable:hover .review-arrow { opacity: 1; }

/* Stars */
.stars { font-size: .7rem; color: var(--amber); letter-spacing: .03em; }

/* Feed sidebar */
.feed-heading { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--hair); }
.feed-list { display: flex; flex-direction: column; gap: .75rem; }
.feed-card {
  padding: .75rem;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.feed-card .feed-type { font-size: .6rem; font-weight: 700; text-transform: uppercase; color: var(--faint); margin-bottom: .25rem; }
.feed-card .feed-title { font-size: .85rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-card .feed-author { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-card .feed-text { font-size: .75rem; color: var(--faint); margin-top: .35rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feed-card .feed-more { font-size: .72rem; font-weight: 600; color: var(--blue); cursor: pointer; margin-top: .3rem; display: inline-block; border: none; background: none; padding: 0; font-family: inherit; }
.feed-card .feed-more:hover { color: var(--blue-deep); }

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(40,52,70,.34);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.lightbox-overlay.open { opacity: 1; pointer-events: auto; }
.lightbox-modal {
  position: fixed;
  z-index: 51;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.95);
  width: calc(100% - 2rem);
  max-width: 520px;
  max-height: 84vh;
  overflow-y: auto;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.lightbox-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 2rem; height: 2rem; border: none; background: var(--hair); border-radius: 50%; font-size: 1.1rem; cursor: pointer; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: var(--ink); color: #fff; }
.lightbox-body {}
.lightbox-top { display: flex; gap: 1rem; margin-bottom: 1.25rem; }
.lb-cover { width: 84px; height: 122px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
.lb-cover img { width: 100%; height: 100%; object-fit: cover; }
.lb-cover .fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: var(--glass-2); border-radius: 8px; }
.lb-meta { flex: 1; min-width: 0; }
.lb-type { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: .3rem; }
.lb-title { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: 0 0 .25rem; }
.lb-author { font-size: .85rem; color: var(--muted); margin: 0; }
.lb-series { font-size: .7rem; font-weight: 600; color: var(--amber); text-transform: uppercase; letter-spacing: .04em; margin: .2rem 0 0; }
.lb-stars { margin-top: .4rem; }
.lb-review { font-size: .88rem; color: var(--lede); line-height: 1.7; border-top: 1px solid var(--hair); padding-top: 1rem; margin-top: .5rem; }
.lb-review p { margin: 0 0 .75rem; }
.lb-review p:last-child { margin-bottom: 0; }
.lb-link { display: inline-block; font-size: .75rem; font-weight: 500; color: var(--blue); text-decoration: none; margin-top: 1rem; border-top: 1px solid var(--hair); padding-top: .75rem; }
.lb-link:hover { color: var(--blue-deep); }

/* Reading pace chart */
.pace-subtitle { font-size: .8rem; color: var(--muted); margin: 0 0 1rem; }
.pace-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.pace-labels { display: flex; gap: 3px; margin-top: 4px; }

/* No results */
.empty-msg { font-size: .85rem; color: var(--faint); padding: 2rem 0; }

/* Reading Pace */
.pace-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.pace-chart {
  display: flex; align-items: flex-end; gap: 3px; height: 120px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  box-shadow: var(--shadow);
}
.pace-labels { display: flex; gap: 3px; margin-top: 6px; padding: 0 16px; }
