/* ============================================================
   NVScomic — Neobrutalism UI
   Putih sebagai warna utama + aksen hitam, kuning, biru, merah
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f2;
  --ink: #111111;
  --accent: #ffd23f;      /* kuning */
  --accent-2: #4d9de0;    /* biru */
  --accent-3: #e15554;    /* merah */
  --accent-4: #3bb273;    /* hijau */
  --border: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --radius: 10px;
  --font: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.reader { background: var(--bg-soft); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Komponen dasar ---------- */
.nb-card {
  background: var(--bg);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.nb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
  user-select: none;
}
.nb-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.nb-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.nb-btn.yellow { background: var(--accent); }
.nb-btn.blue { background: var(--accent-2); color: #fff; }
.nb-btn.red { background: var(--accent-3); color: #fff; }
.nb-btn.green { background: var(--accent-4); color: #fff; }
.nb-btn.black { background: var(--ink); color: #fff; }
.nb-btn.sm { padding: 6px 12px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }
.nb-btn:disabled { opacity: .5; pointer-events: none; }

.nb-input, .nb-select, .nb-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  box-shadow: 3px 3px 0 var(--ink);
}
.nb-input:focus, .nb-select:focus, .nb-textarea:focus {
  background: #fffbe8;
}
.nb-textarea { resize: vertical; min-height: 90px; }

.nb-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  /* warna eksplisit: badge sering dipakai di atas hero gelap
     yang teksnya putih — jangan mewarisi warna induk */
  color: var(--ink);
}
.nb-badge.blue { background: var(--accent-2); color: #fff; }
.nb-badge.red { background: var(--accent-3); color: #fff; }
.nb-badge.green { background: var(--accent-4); color: #fff; }
.nb-badge.white { background: var(--bg); color: var(--ink); }
a.nb-badge.white:hover { background: var(--accent); }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 36px 0 18px;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.section-title .icon-box {
  display: inline-flex;
  padding: 6px;
  background: var(--accent);
  border: var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.section-title .more {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 3px solid var(--accent);
  white-space: nowrap;
}
@media (max-width: 480px) {
  .section-title { font-size: 17px; margin: 28px 0 14px; }
  .section-title .icon-box { padding: 5px; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: var(--border);
}
.site-header .inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
  min-width: 0; /* izinkan item flex menyusut, jangan meluber */
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  flex-shrink: 0;
  white-space: nowrap;
}
.logo .mark {
  display: inline-flex;
  padding: 5px;
  background: var(--accent);
  border: var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.logo span b { background: var(--accent); padding: 0 3px; }

.main-nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
  flex-shrink: 0;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 14px;
  border: 3px solid transparent;
  border-radius: var(--radius);
  white-space: nowrap;
}
.main-nav a:hover { border-color: var(--ink); background: var(--bg-soft); }
.main-nav a.active {
  background: var(--accent);
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Search boleh menyusut sampai 110px sehingga tombol login
   tidak pernah terdorong keluar dari header */
.header-search {
  margin-left: auto;
  position: relative;
  flex: 0 1 220px;
  min-width: 110px;
}
.header-search input {
  width: 100%;
  padding: 9px 12px 9px 38px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
}
.header-search input:focus { background: #fffbe8; }
.header-search .search-icon {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-size: 13px;
  background: var(--bg);
  flex-shrink: 0;
  white-space: nowrap;
}
.user-chip .chip-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-chip img, .avatar-fallback {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  object-fit: cover;
}
/* tombol login & toggle di header tidak boleh ikut menyusut */
.site-header .inner > .nb-btn { flex-shrink: 0; white-space: nowrap; }
.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-2);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

/* mobile nav — breakpoint 1020px: di bawah itu logo + 5 menu +
   search + login sudah tidak muat satu baris */
.mobile-toggle { display: none; }
@media (max-width: 1020px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: var(--border);
    padding: 12px 16px;
    margin: 0;
  }
  .main-nav.open { display: flex; }
  .mobile-toggle { display: inline-flex; flex-shrink: 0; }
  .header-search { flex: 1 1 auto; min-width: 0; }
  .header-search input { width: 100%; }
  .user-chip .chip-name { display: none; }
}
@media (max-width: 480px) {
  .site-header .inner { gap: 8px; height: 60px; }
  .main-nav { top: 60px; }
  .logo { font-size: 18px; }
  .logo .mark { padding: 4px; }
  .header-search input { padding: 8px 10px 8px 34px; font-size: 13px; }
}

/* ---------- Hero banner ---------- */
.hero {
  position: relative;
  margin-top: 24px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--ink);
}
.hero-slide {
  display: none;
  position: relative;
  min-height: 320px;
}
.hero-slide.active { display: block; }
.hero-slide .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  filter: grayscale(35%) brightness(.45);
}
.hero-slide .content {
  position: relative;
  display: flex;
  gap: 24px;
  padding: 28px;
  color: #fff;
  min-height: 320px;
  align-items: center;
}
.hero-slide .cover {
  width: 160px;
  flex-shrink: 0;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--accent);
  overflow: hidden;
  background: #222;
}
.hero-slide .cover img { width: 100%; height: 230px; object-fit: cover; }
.hero-slide h2 {
  margin: 8px 0;
  font-size: clamp(20px, 3.5vw, 34px);
  line-height: 1.15;
}
.hero-slide .synopsis {
  max-width: 640px;
  font-size: 14px;
  opacity: .85;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-nav {
  position: absolute;
  right: 16px; bottom: 16px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.hero-dot {
  width: 14px; height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.hero-dot.active { background: var(--accent); border-color: var(--ink); }
@media (max-width: 640px) {
  .hero-slide .cover { display: none; }
  .hero-slide { min-height: 260px; }
  .hero-slide .content { min-height: 260px; padding: 20px 18px 46px; }
  .hero-slide .synopsis { -webkit-line-clamp: 2; }
}

/* ---------- Grid komik ---------- */
/* Kolom tetap per breakpoint supaya baris selalu rapi di desktop.
   Hanya 6/4/3/2 kolom — semuanya pembagi 12 & 24 (jumlah item per
   section), jadi baris terakhir tidak pernah bolong. */
.comic-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
@media (max-width: 1100px) {
  .comic-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}
@media (max-width: 720px) {
  .comic-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (max-width: 480px) {
  .comic-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

.comic-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .12s, box-shadow .12s;
}
.comic-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.comic-card .cover {
  position: relative;
  aspect-ratio: 3 / 4.2;
  background: var(--bg-soft);
  border-bottom: var(--border);
}
.comic-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.comic-card .fmt {
  position: absolute;
  top: 8px; left: 8px;
}
.comic-card .rate {
  position: absolute;
  bottom: 8px; right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--ink);
  color: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.comic-card .body {
  padding: 10px 12px 12px;
  /* isi kartu jadi kolom flex agar daftar chapter menempel
     di bawah dan tinggi kartu satu baris tampak seragam */
  display: flex;
  flex-direction: column;
  flex: 1;
}
.comic-card .title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.comic-card .chapters { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.comic-card .ch-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 8px;
  background: var(--bg-soft);
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-weight: 600;
}
.comic-card .ch-row:hover { background: var(--accent); }
.comic-card .ch-row .when { opacity: .6; font-weight: 500; }

/* ---------- Ranked list (top page) ---------- */
.rank-list { display: flex; flex-direction: column; gap: 14px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--bg);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .12s;
}
.rank-item:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.rank-num {
  width: 52px;
  flex-shrink: 0;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
}
.rank-item:nth-child(1) .rank-num { color: var(--accent-3); }
.rank-item:nth-child(2) .rank-num { color: var(--accent-2); }
.rank-item:nth-child(3) .rank-num { color: var(--accent-4); }
.rank-item .thumb {
  width: 64px; height: 86px;
  flex-shrink: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
}
.rank-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.rank-item .info { min-width: 0; flex: 1; }
.rank-item .info .t {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-item .info .m {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
  opacity: .75;
}
.rank-item .info .m span { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 560px) {
  .rank-item { gap: 10px; padding: 10px; }
  .rank-num { width: 36px; font-size: 19px; }
  .rank-item .thumb { width: 52px; height: 70px; }
  .rank-item .info .m { gap: 8px; font-size: 11px; }
}

/* ---------- Tabs ---------- */
.nb-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.nb-tab {
  padding: 8px 16px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.nb-tab.active { background: var(--ink); color: var(--accent); }
@media (max-width: 640px) {
  /* di layar sempit tab jadi satu baris yang bisa digeser */
  .nb-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 4px 4px 10px; margin: 0 -4px 16px; }
}

/* ---------- Filter bar ---------- */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 18px;
  margin-bottom: 26px;
}
.filter-bar label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 5px;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 36px 0;
  font-weight: 700;
}
.pagination .page-info {
  padding: 8px 16px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--accent);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}

/* ---------- Series detail ---------- */
.series-hero {
  position: relative;
  margin-top: 24px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.series-hero .backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: grayscale(50%) brightness(.35);
}
.series-hero .inner {
  position: relative;
  display: flex;
  gap: 28px;
  padding: 30px;
  color: #fff;
}
.series-hero .cover {
  width: 200px;
  flex-shrink: 0;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--accent);
  overflow: hidden;
}
.series-hero .cover img { width: 100%; aspect-ratio: 3/4.2; object-fit: cover; }
.series-hero h1 { margin: 10px 0 4px; font-size: clamp(22px, 4vw, 36px); line-height: 1.15; }
.series-hero .native { opacity: .7; font-size: 14px; margin-bottom: 12px; }
.series-hero .badges { display: flex; flex-wrap: wrap; gap: 8px; }
.series-hero .author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  opacity: .85;
}
/* Stats: grid kotak sama lebar — bukan flex-wrap — supaya selalu
   membentuk baris rapi berapa pun jumlah statnya */
.series-hero .stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
  max-width: 520px;
}
.series-hero .stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.4);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.series-hero .stat .lucide { width: 14px; height: 14px; flex-shrink: 0; }
.series-hero .genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  max-width: 520px;
}
.series-hero .genres .nb-badge {
  font-size: 11px;
  padding: 4px 12px;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 2px 2px 0 var(--ink);
}
.series-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.series-hero .actions form { display: contents; }
@media (max-width: 720px) {
  .series-hero .inner { flex-direction: column; align-items: center; text-align: center; padding: 22px 16px; }
  .series-hero .cover { width: 150px; }
  /* badge & author ikut ke tengah saat layout kolom */
  .series-hero .badges { justify-content: center; }
  .series-hero .author { justify-content: center; }
  .series-hero .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 400px; margin-left: auto; margin-right: auto; }
  .series-hero .stat { font-size: 12px; }
  .series-hero .genres { justify-content: center; margin-left: auto; margin-right: auto; }
  .series-hero .actions { justify-content: center; gap: 8px; }
  .series-hero .actions .nb-btn { font-size: 13px; padding: 9px 14px; }
}

.synopsis-box { padding: 20px; margin-top: 26px; font-size: 14.5px; }
.synopsis-box h3 { margin: 0 0 10px; text-transform: uppercase; }

.chapter-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  max-height: 560px;
  overflow-y: auto;
  padding: 4px;
}
.chapter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--bg);
  font-size: 13.5px;
  font-weight: 600;
}
.chapter-item:hover { background: var(--accent); }
.chapter-item.read { background: var(--bg-soft); opacity: .65; }
.chapter-item .when { font-size: 11.5px; opacity: .6; font-weight: 500; }
@media (max-width: 560px) {
  .chapter-list { grid-template-columns: 1fr; max-height: 440px; }
}

/* ---------- Reader ---------- */
.reader-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg);
  border-bottom: var(--border);
  padding: 10px 0;
}
.reader-bar .inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.reader-bar .title {
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
}
.reader-bar .spacer { flex: 1; }
.reader-images {
  max-width: 860px;
  margin: 24px auto;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #fff;
}
.reader-images img { width: 100%; min-height: 80px; background: var(--bg-soft); }
.reader-nav-bottom {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0;
}
@media (max-width: 640px) {
  .reader-bar .title { max-width: 100%; }
  .reader-bar .inner { gap: 8px; }
  .reader-nav-bottom .nb-btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- Comments ---------- */
.comments-section { margin: 40px 0; }
.comments-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.comments-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.comments-head .count { color: var(--accent-3); }
.comments-head select { margin-left: auto; width: auto; }

.comment-form { padding: 18px; margin-bottom: 22px; }
.comment-form .row { display: flex; gap: 12px; }
.comment-form .actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.comment-login-note {
  padding: 18px;
  margin-bottom: 22px;
  text-align: center;
  font-weight: 600;
  background: var(--bg-soft);
}

.comment { padding: 16px 18px; margin-bottom: 14px; }
.comment .head { display: flex; align-items: center; gap: 10px; }
.comment .head .name { font-weight: 800; }
.comment .head .when { font-size: 12px; opacity: .55; }
.comment .content { margin: 8px 0 10px 42px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.comment .foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 42px;
  font-size: 13px;
  font-weight: 600;
}
.comment .foot button, .comment .foot .act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  opacity: .7;
}
.comment .foot button:hover, .comment .foot .act:hover { opacity: 1; }
.comment .foot .like.liked { color: var(--accent-3); opacity: 1; }
.comment .replies {
  margin: 14px 0 0 42px;
  padding-left: 16px;
  border-left: 3px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comment .replies .comment { box-shadow: none; margin-bottom: 0; }
.reply-form { margin: 12px 0 0 42px; }
.comment .avatar, .comment .avatar-fallback { width: 32px; height: 32px; }
@media (max-width: 560px) {
  /* rapatkan indentasi komentar di layar sempit */
  .comment { padding: 13px 14px; }
  .comment .content, .comment .foot, .reply-form { margin-left: 0; }
  .comment .replies { margin-left: 12px; padding-left: 10px; }
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-card { width: 100%; max-width: 420px; padding: 30px; }
.auth-card h1 {
  margin: 0 0 6px;
  font-size: 26px;
  text-transform: uppercase;
}
.auth-card .sub { font-size: 14px; opacity: .7; margin-bottom: 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card label { font-size: 13px; font-weight: 700; text-transform: uppercase; }
.auth-card label .nb-input { margin-top: 6px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: .6;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 3px;
  background: var(--ink);
}
.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; }
.auth-alt a { font-weight: 700; border-bottom: 3px solid var(--accent); }
.btn-google { width: 100%; justify-content: center; }

.flash {
  padding: 12px 16px;
  margin-bottom: 16px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  font-size: 14px;
}
.flash.error { background: #ffe3e3; }
.flash.success { background: #e0f5e9; }

/* ---------- Empty state ---------- */
.empty-state {
  padding: 50px 20px;
  text-align: center;
}
.empty-state .icon-box {
  display: inline-flex;
  padding: 14px;
  background: var(--accent);
  border: var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.empty-state h3 { margin: 0 0 6px; }
.empty-state p { margin: 0 0 18px; opacity: .7; font-size: 14px; }

/* ---------- Saved/History rows ---------- */
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
@media (max-width: 480px) {
  .shelf-grid { grid-template-columns: 1fr; }
}
.shelf-item {
  display: flex;
  gap: 14px;
  padding: 12px;
}
.shelf-item .thumb {
  width: 72px; height: 98px;
  flex-shrink: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
}
.shelf-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.shelf-item .info { min-width: 0; display: flex; flex-direction: column; }
.shelf-item .t {
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shelf-item .m { font-size: 12px; opacity: .65; margin-top: 4px; }
.shelf-item .acts { margin-top: auto; display: flex; gap: 8px; padding-top: 10px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 60px;
  border-top: var(--border);
  background: var(--ink);
  color: #fff;
  padding: 30px 0;
}
.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.site-footer b { background: var(--accent); color: var(--ink); padding: 0 4px; }
.site-footer nav { display: flex; gap: 16px; font-weight: 600; }
.site-footer nav a:hover { border-bottom: 2px solid var(--accent); }

/* Lucide sizing default */
.lucide { width: 18px; height: 18px; stroke-width: 2.4; }
