/* Tohkaya Komik — shared theme */
:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel2: #1c2330;
  --border: #2b3342;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #f78166;
  --accent2: #ffa657;
  --star: #f7b500;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Navbar */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 17, 23, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 28px; height: 60px;
}
.logo { font-size: 20px; font-weight: 800; letter-spacing: .5px; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 600; padding: 6px 2px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { border-bottom: 2px solid var(--accent); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; width: 100%; flex: 1; }

/* Hero */
.hero {
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  display: grid; grid-template-columns: 220px 1fr; background: var(--panel);
  margin-bottom: 36px;
}
.hero img { width: 220px; height: 100%; object-fit: cover; }
.hero-body { padding: 28px 30px; display: flex; flex-direction: column; justify-content: center; }
.eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 10px;
}
.hero h1 { font-size: 32px; line-height: 1.2; margin-bottom: 10px; }
.hero p { color: var(--muted); font-size: 15px; margin-bottom: 20px; max-width: 640px; }
.btn {
  display: inline-block; background: var(--accent); color: #0d1117; font-weight: 700;
  padding: 11px 26px; border-radius: 9px; font-size: 15px; border: none; cursor: pointer;
  width: fit-content;
}
.btn:hover { background: var(--accent2); }
.btn-ghost {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Section titles */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 16px; }
.sec-head h2 { font-size: 21px; }
.sec-head a.more { color: var(--accent); font-size: 14px; font-weight: 600; }

/* Comic grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card .cover { aspect-ratio: 3/4; overflow: hidden; background: var(--panel2); }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card .meta { padding: 10px 12px 12px; }
.card .meta h3 { font-size: 14px; line-height: 1.35; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta .sub { font-size: 12px; color: var(--muted); }
.stars { color: var(--star); font-size: 12px; }

/* Update list */
.updates { display: flex; flex-direction: column; gap: 10px; }
.update-row {
  display: flex; align-items: center; gap: 14px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
}
.update-row img { width: 44px; height: 58px; object-fit: cover; border-radius: 6px; }
.update-row .t { flex: 1; min-width: 0; }
.update-row .t b { font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.update-row .t span { font-size: 12px; color: var(--muted); }
.update-row .time { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Toolbar (search/filter) */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.toolbar input[type="search"] {
  flex: 1; min-width: 200px; background: var(--panel); border: 1px solid var(--border);
  color: var(--text); border-radius: 9px; padding: 10px 14px; font-size: 14px;
}
.toolbar select {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 10px 12px; font-size: 14px;
}
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* Detail page */
.detail { display: grid; grid-template-columns: 230px 1fr; gap: 28px; margin-bottom: 30px; }
.detail .cover img { border-radius: 12px; border: 1px solid var(--border); width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.detail h1 { font-size: 28px; margin-bottom: 8px; }
.genres { margin: 10px 0 14px; }
.genre {
  display: inline-block; font-size: 12px; background: var(--panel2); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; margin: 0 6px 6px 0;
}
.info-table { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.info-table b { color: var(--text); }
.synopsis { color: #c9d1d9; font-size: 15px; margin-bottom: 18px; }
.chapter-list { display: flex; flex-direction: column; gap: 8px; }
.chapter-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; font-size: 14px;
}
.chapter-row:hover { border-color: var(--accent); }
.chapter-row .cnum { color: var(--muted); font-size: 12px; }

/* Reader */
.reader-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.reader-nav h1 { font-size: 18px; }
.pages { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pages img { width: 100%; max-width: 760px; border-radius: 6px; }
.reader-bottom { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.notice {
  background: var(--panel); border: 1px dashed var(--border); border-radius: 12px;
  padding: 34px 24px; text-align: center; color: var(--muted); max-width: 640px; margin: 30px auto;
}

/* About */
.prose { max-width: 720px; }
.prose h1 { font-size: 28px; margin-bottom: 16px; }
.prose p { color: #c9d1d9; margin-bottom: 14px; font-size: 15px; }
.prose ul { margin: 0 0 14px 20px; color: #c9d1d9; font-size: 15px; }

footer {
  border-top: 1px solid var(--border); text-align: center; color: var(--muted);
  font-size: 13px; padding: 26px 20px;
}
footer .flinks { margin-bottom: 8px; }
footer .flinks a { margin: 0 10px; color: var(--muted); }
footer .flinks a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  .hero img { width: 100%; height: 200px; }
  .detail { grid-template-columns: 140px 1fr; gap: 16px; }
  .detail h1 { font-size: 20px; }
  .nav-links { gap: 12px; }
}
