/*
Theme Name: MangaReader
Theme URI: https://example.com/
Author: MangaReader
Description: Online comic reader theme — manga, manhwa, and manhua in English. Dark, lightweight, and mobile-first with a vertical reader. Pairs with the MangaReader Suite plugin.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: mangareader
*/

* { margin:0; padding:0; box-sizing:border-box; }
:root{
  --bg:#0c1017; --bg2:#0a0d13; --panel:#131926; --panel2:#1a2233; --line:#232f47;
  --text:#eef2f9; --muted:#93a1b8; --accent:#2f9bff; --accent2:#37c978; --gold:#ffb02e;
  --radius:12px;
}
html{ scroll-behavior:smooth; }
body{ background:var(--bg); color:var(--text); font-family:'Segoe UI',system-ui,-apple-system,Arial,sans-serif; font-size:15.5px; line-height:1.55; }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
.wrap{ max-width:1180px; margin:0 auto; padding:0 14px; }
.btn{ display:inline-block; background:var(--accent); color:#fff; border:none; padding:10px 20px; border-radius:9px; font-weight:700; font-size:14.5px; cursor:pointer; }
.btn:hover{ filter:brightness(1.12); }
.btn.ghost{ background:var(--panel2); border:1px solid var(--line); color:var(--text); }
.btn.green{ background:var(--accent2); }

/* Header */
.site-header{ position:sticky; top:0; z-index:60; background:rgba(10,13,19,.96); border-bottom:1px solid var(--line); backdrop-filter:blur(8px); }
.hbar{ display:flex; align-items:center; gap:20px; height:60px; }
.logo{ font-size:25px; font-weight:900; letter-spacing:.3px; white-space:nowrap; }
.logo span{ color:var(--accent); }
.main-nav{ display:flex; gap:17px; font-size:14.5px; font-weight:600; color:var(--muted); }
.main-nav a:hover{ color:var(--text); }
.searchbox{ margin-left:auto; position:relative; }
.searchbox input{ background:var(--panel2); border:1px solid var(--line); color:var(--text); border-radius:22px; padding:9px 16px; width:250px; font-size:14px; outline:none; }
.searchbox input:focus{ border-color:var(--accent); }
.live-results{ position:absolute; right:0; top:46px; width:330px; max-height:430px; overflow:auto; background:var(--panel); border:1px solid var(--line); border-radius:12px; box-shadow:0 18px 40px rgba(0,0,0,.5); display:none; }
.live-results a{ display:flex; gap:11px; padding:9px 11px; align-items:center; border-bottom:1px solid var(--line); }
.live-results a:last-child{ border-bottom:none; }
.live-results a:hover{ background:var(--panel2); }
.live-results img{ width:40px; height:54px; object-fit:cover; border-radius:6px; }
.live-results .t{ font-size:14px; font-weight:700; line-height:1.3; }
.live-results .s{ font-size:12px; color:var(--muted); }

/* Sections */
h2.sec{ font-size:20.5px; margin:28px 0 13px; display:flex; align-items:center; gap:10px; }
h2.sec::before{ content:''; width:5px; height:21px; background:var(--accent); border-radius:3px; }
h2.sec .more{ margin-left:auto; font-size:13px; color:var(--accent); font-weight:700; }

/* Hero strip */
.hero-strip{ display:grid; grid-template-columns:repeat(5,1fr); gap:13px; margin-top:18px; }
.hero-card{ position:relative; border-radius:var(--radius); overflow:hidden; aspect-ratio:3/4.1; background:var(--panel2); }
.hero-card img{ width:100%; height:100%; object-fit:cover; }
.hero-card .ov{ position:absolute; inset:auto 0 0 0; padding:26px 11px 11px; background:linear-gradient(transparent,rgba(0,0,0,.92)); }
.hero-card h3{ font-size:15.5px; line-height:1.3; }
.hero-card p{ font-size:12px; color:#c9d4e6; }
.rank{ position:absolute; top:8px; left:8px; background:var(--accent); color:#fff; font-weight:900; font-size:13px; padding:3px 9px; border-radius:14px; }

/* Latest updates */
.updates{ display:grid; grid-template-columns:1fr 1fr; gap:11px; }
.urow{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:11px; display:flex; gap:12px; }
.urow img{ width:58px; height:78px; object-fit:cover; border-radius:8px; flex:none; }
.urow h4{ font-size:15.5px; line-height:1.3; margin-bottom:6px; }
.urow h4 a:hover{ color:var(--accent); }
.chips{ display:flex; gap:6px; flex-wrap:wrap; }
.chip{ background:var(--panel2); border:1px solid var(--line); font-size:12.5px; padding:4px 10px; border-radius:7px; font-weight:600; }
.chip:hover{ border-color:var(--accent); color:var(--accent); }
.chip.new{ border-color:var(--accent2); color:var(--accent2); }
.utime{ margin-left:auto; color:var(--muted); font-size:11.5px; white-space:nowrap; padding-top:2px; }
.utype{ font-size:11px; font-weight:800; color:var(--gold); letter-spacing:.4px; }

/* Cover grid */
.grid{ display:grid; grid-template-columns:repeat(5,1fr); gap:13px; }
.card{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.card .cv{ position:relative; aspect-ratio:3/4.1; background:var(--panel2); }
.card .cv img{ width:100%; height:100%; object-fit:cover; }
.badge{ position:absolute; top:7px; left:7px; background:rgba(0,0,0,.68); color:var(--gold); font-size:11.5px; font-weight:800; padding:3px 8px; border-radius:11px; }
.badge.tp{ left:auto; right:7px; background:var(--accent); color:#fff; }
.card .inf{ padding:9px 11px 11px; }
.card h4{ font-size:14.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card h4 a:hover{ color:var(--accent); }
.card p{ color:var(--muted); font-size:12.5px; margin-top:2px; }

/* Genres */
.genres{ display:flex; flex-wrap:wrap; gap:8px; }
.genres a{ background:var(--panel); border:1px solid var(--line); padding:8px 15px; border-radius:20px; font-size:13.5px; font-weight:600; }
.genres a:hover{ border-color:var(--accent); color:var(--accent); }

/* Filters */
.filters{ display:flex; gap:9px; flex-wrap:wrap; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:12px; margin:16px 0; }
.filters select{ background:var(--panel2); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 10px; font-size:13.5px; }
.pagination{ display:flex; gap:7px; justify-content:center; margin:24px 0; flex-wrap:wrap; }
.pagination a,.pagination span{ background:var(--panel); border:1px solid var(--line); padding:8px 14px; border-radius:8px; font-weight:700; font-size:14px; }
.pagination .current{ background:var(--accent); color:#fff; border-color:var(--accent); }

/* Series page */
.series-head{ display:flex; gap:22px; background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:22px; margin-top:18px; }
.series-head .big-cover{ width:196px; flex:none; }
.series-head .big-cover img{ border-radius:12px; width:100%; aspect-ratio:3/4.1; object-fit:cover; }
.series-head h1{ font-size:27px; line-height:1.25; margin-bottom:4px; }
.alt-title{ color:var(--muted); font-size:13.5px; margin-bottom:10px; }
.rate{ color:var(--gold); font-weight:800; font-size:16px; }
.facts{ display:grid; grid-template-columns:repeat(4,minmax(110px,auto)); gap:10px 28px; margin:14px 0; font-size:13px; color:var(--muted); }
.facts b{ display:block; color:var(--text); font-size:14.5px; }
.syn{ color:#ccd6e6; font-size:14.5px; line-height:1.65; }
.series-actions{ display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }
.chaplist{ margin-top:8px; }
.chap-row{ display:flex; align-items:center; gap:12px; background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:12px 15px; margin-bottom:8px; }
.chap-row:hover{ border-color:var(--accent); }
.chap-row .no{ font-weight:800; font-size:15px; }
.chap-row .dt{ margin-left:auto; color:var(--muted); font-size:12.5px; }

/* Reader */
.reader-bar{ position:sticky; top:60px; z-index:40; background:rgba(10,13,19,.97); border-bottom:1px solid var(--line); padding:10px 0; }
.reader-bar .wrap{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.reader-bar select{ background:var(--panel2); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px; font-size:13.5px; max-width:230px; }
.reader-title{ text-align:center; padding:20px 10px 6px; }
.reader-title h1{ font-size:21px; }
.reader-title p{ color:var(--muted); font-size:13px; }
.reader-pages{ max-width:820px; margin:8px auto 0; background:#000; }
.reader-pages img{ width:100%; height:auto; }
.reader-nav{ display:flex; gap:10px; justify-content:center; padding:20px 10px 6px; flex-wrap:wrap; }
.no-pages{ max-width:820px; margin:20px auto; background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:26px; text-align:center; color:var(--muted); }

/* Footer */
.site-footer{ border-top:1px solid var(--line); margin-top:40px; background:var(--bg2); }
.foot{ padding:24px 0 30px; color:var(--muted); font-size:13.5px; display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.foot b{ color:var(--text); }
.foot nav{ display:flex; gap:15px; flex-wrap:wrap; }

.empty-note{ background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:26px; text-align:center; color:var(--muted); margin-top:16px; }

@media (max-width:900px){
  .hero-strip,.grid{ grid-template-columns:repeat(3,1fr); }
  .updates{ grid-template-columns:1fr; }
  .main-nav{ display:none; }
  .searchbox input{ width:160px; }
  .facts{ grid-template-columns:repeat(2,minmax(110px,auto)); }
}
@media (max-width:560px){
  .hero-strip,.grid{ grid-template-columns:repeat(2,1fr); }
  .series-head{ flex-direction:column; }
  .series-head .big-cover{ width:150px; }
  .logo{ font-size:21px; }
  .searchbox input{ width:120px; }
}
