/*
Theme Name: VoidToon
Theme URI: https://example.com/voidtoon
Author: Your Name
Author URI: https://example.com
Description: A dark, purple WordPress theme for manhwa/webtoon sites — solid topbar, auto-sliding hero, trending + popular rankings, multi-chapter Latest Updates with pagination, an Announcements feed, chapter-by-chapter reader with real progress tracking, mobile navigation, and lazy-loaded images throughout.
Version: 1.5.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gutter
*/

:root{
  --ink:#0B0B14;
  --panel:#15131F;
  --card:#1C1929;
  --card-hi:#252032;
  --line:#2D2740;
  --text:#F2F1F7;
  --muted:#948FA3;
  --blue:#8B5CF6;
  --pink:#FF4D8D;
  --amber:#FFB84D;
  --blue-glow: rgba(139,92,246,0.35);
  --pink-glow: rgba(255,77,141,0.35);
  --amber-glow: rgba(255,184,77,0.3);
  --display: 'Unbounded', sans-serif;
  --body: 'Manrope', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  background:var(--ink);
  color:var(--text);
  font-family:var(--body);
  line-height:1.5;
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none;}
img,svg{display:block;max-width:100%;}
::selection{background:var(--pink);color:var(--ink);}

.gutter-line{position:relative;}
.gutter-line::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:3px;
  background:linear-gradient(180deg,var(--blue),var(--pink));
  border-radius:2px;
}

.wrap{max-width:1240px;margin:0 auto;padding:0 32px;}
@media (max-width:640px){.wrap{padding:0 20px;}}

/* ---------- TOPBAR ---------- */
.topbar{
  position:sticky; top:0; z-index:60;
  background:linear-gradient(90deg,#7C3AED,#8B5CF6);
  border-bottom:1px solid rgba(0,0,0,0.15);
}
.topbar nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 32px;
  max-width:1240px; margin:0 auto;
}
.topbar .logo{
  font-family:var(--display);
  font-weight:800;
  font-size:20px;
  letter-spacing:0.5px;
  color:#fff;
  display:flex; align-items:center; gap:8px;
}
.topbar .logo a{display:flex; align-items:center; gap:8px; color:#fff;}
.topbar .logo .mark{
  width:32px;height:32px;
  background:rgba(255,255,255,0.18);
  border-radius:50%;
  display:inline-block;
}
.topbar .nav-links{display:flex; gap:26px; font-size:15px; font-weight:600;}
.topbar .nav-links ul{list-style:none; display:flex; gap:26px;}
.topbar .nav-links a{color:rgba(255,255,255,0.92);}
.topbar .nav-links a:hover{color:#fff;}
@media (max-width:860px){.topbar .nav-links{display:none;}}
.topbar .nav-actions{display:flex; align-items:center; gap:12px;}

.search-form-inline{
  display:flex; align-items:center; gap:8px;
  background:rgba(255,255,255,0.16);
  border:1px solid rgba(255,255,255,0.25);
  border-radius:8px;
  padding:9px 14px;
  color:#fff;
}
.search-form-inline svg{flex-shrink:0; opacity:0.85;}
.search-form-inline input{
  background:none; border:none; outline:none; color:#fff;
  font-family:var(--body); font-size:14px; width:150px;
}
.search-form-inline input::placeholder{color:rgba(255,255,255,0.75);}
@media (max-width:760px){.search-form-inline{display:none;}}

.btn-login{
  display:flex; align-items:center; gap:7px;
  background:rgba(0,0,0,0.28); color:#fff;
  font-weight:700; font-size:14px;
  padding:9px 18px; border-radius:8px; border:1px solid rgba(255,255,255,0.15);
  transition:background .15s ease;
}
.btn-login:hover{background:rgba(0,0,0,0.42);}

.mobile-menu-btn{
  display:none; width:38px; height:38px; border-radius:8px;
  align-items:center; justify-content:center;
  background:rgba(255,255,255,0.14); border:1px solid rgba(255,255,255,0.2);
  color:#fff; cursor:pointer;
}
@media (max-width:860px){
  .mobile-menu-btn{display:flex;}
  .topbar .nav-links{
    display:none;
    position:absolute; top:100%; left:0; right:0;
    background:#2c1a5c; border-bottom:1px solid var(--line);
    padding:12px 20px 20px; z-index:60;
  }
  .topbar .nav-links.is-open{display:block;}
  .topbar .nav-links ul{flex-direction:column; gap:4px;}
  .topbar .nav-links a{display:block; padding:10px 4px;}
}
.topbar nav{position:relative;}

/* generic buttons (used across hero, promo bar, cards) */
.btn{
  font-family:var(--body);
  font-weight:700;
  font-size:14px;
  padding:10px 20px;
  border-radius:8px;
  border:1px solid var(--line);
  cursor:pointer;
  display:inline-block;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover{transform:translateY(-2px);}
.btn-ghost{background:transparent; color:var(--text);}
.btn-ghost:hover{border-color:var(--blue);}
.btn-solid{
  background:linear-gradient(135deg,var(--blue),var(--pink));
  color:#fff;
  border:none;
}
.btn-solid:hover{box-shadow:0 8px 24px var(--pink-glow);}
.icon-btn{
  width:38px;height:38px;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--line); background:transparent; color:var(--muted);
  cursor:pointer;
}
.icon-btn:hover{color:var(--text); border-color:var(--blue);}

/* ---------- PROMO BAR ---------- */
.promo-bar{background:#171325; border-bottom:1px solid var(--line);}
.promo-inner{display:flex; align-items:center; gap:16px; padding:12px 0; flex-wrap:wrap;}
.promo-icon{
  width:40px; height:40px; border-radius:10px; flex-shrink:0;
  background:linear-gradient(135deg,var(--blue),var(--pink));
  display:flex; align-items:center; justify-content:center; color:#fff;
}
.promo-text{flex:1; min-width:200px;}
.promo-title{font-size:14px; font-weight:800; color:var(--amber);}
.promo-sub{font-size:13px; color:var(--muted); margin-top:2px;}
.promo-actions{display:flex; align-items:center; gap:14px; flex-shrink:0;}
.promo-dismiss{background:none; border:none; color:var(--muted); font-size:20px; line-height:1; cursor:pointer;}
.promo-dismiss:hover{color:var(--text);}
@media (max-width:640px){.promo-sub{display:none;}}

/* ---------- HERO ---------- */
.hero{padding:88px 0 60px; position:relative;}
.hero .wrap{display:grid; grid-template-columns:1.05fr 0.95fr; gap:64px; align-items:center;}
@media (max-width:960px){.hero .wrap{grid-template-columns:1fr; gap:48px;}}
.eyebrow{
  font-family:var(--mono); font-size:13px; color:var(--blue);
  letter-spacing:2px; text-transform:uppercase; margin-bottom:18px;
  display:flex; align-items:center; gap:10px;
}
.eyebrow::before{content:"//"; color:var(--pink);}
h1{
  font-family:var(--display); font-weight:900;
  font-size:clamp(40px, 5.6vw, 68px); line-height:1.02; letter-spacing:-0.5px;
}
h1 .accent{
  background:linear-gradient(120deg,var(--blue),var(--pink));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero p{margin-top:22px; font-size:17px; color:var(--muted); max-width:460px;}
.hero-cta{display:flex; gap:14px; margin-top:34px; flex-wrap:wrap;}
.btn-lg{padding:14px 28px; font-size:15px; border-radius:10px;}
.hero-stats{display:flex; gap:36px; margin-top:46px;}
.stat b{display:block; font-family:var(--display); font-size:26px; font-weight:800;}
.stat span{font-size:13px; color:var(--muted);}

.strip{position:relative; display:flex; flex-direction:column; gap:0; perspective:1000px;}
.panel{position:relative; border-radius:14px; border:1px solid var(--line); overflow:hidden; margin-bottom:16px; transition:transform .35s ease;}
.panel:nth-child(1){height:150px; transform:rotate(-1.2deg);}
.panel:nth-child(2){height:190px; transform:rotate(0.8deg); margin-left:22px;}
.panel:nth-child(3){height:150px; transform:rotate(-0.6deg);}
.panel:hover{transform:scale(1.02) rotate(0deg);}
.p1{background:linear-gradient(135deg,#28345f,#5B8CFF 130%);}
.p2{background:linear-gradient(135deg,#5c2340,#FF4D8D 130%);}
.p3{background:linear-gradient(135deg,#5c4419,#FFB84D 130%);}
.panel .tag{
  position:absolute; top:12px; left:14px;
  font-family:var(--mono); font-size:11px; letter-spacing:1px;
  background:rgba(0,0,0,0.35); padding:4px 10px; border-radius:6px; text-transform:uppercase;
}
.panel .glyph{position:absolute; bottom:10px; right:14px; opacity:0.5;}
.scroll-cue{display:flex; align-items:center; gap:8px; font-family:var(--mono); font-size:12px; color:var(--muted); margin-top:6px; margin-left:22px;}
.scroll-cue .arrow{animation:bob 1.6s ease-in-out infinite;}
@keyframes bob{0%,100%{transform:translateY(0);}50%{transform:translateY(5px);}}
@media (prefers-reduced-motion:reduce){.scroll-cue .arrow{animation:none;} .panel{transition:none;}}

/* ---------- GENRE CHIPS ---------- */
.genres{padding:36px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.chip-row{display:flex; gap:12px; overflow-x:auto; scrollbar-width:none;}
.chip-row::-webkit-scrollbar{display:none;}
.chip{
  font-size:14px; font-weight:600; white-space:nowrap;
  padding:9px 18px; border-radius:999px; border:1px solid var(--line); color:var(--muted);
  cursor:pointer; transition:all .15s ease; flex-shrink:0; display:inline-block;
}
.chip.active, .chip:hover{color:var(--ink); background:var(--text); border-color:var(--text);}

/* ---------- SECTION HEADS ---------- */
section{padding:64px 0;}
.sec-head{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:32px; padding-left:16px;}
.sec-head h2{font-family:var(--display); font-weight:800; font-size:28px;}
.sec-head .see-all{font-size:14px; font-weight:700; color:var(--blue);}

/* ---------- GRID / CARDS ---------- */
.grid{display:grid; grid-template-columns:repeat(4,1fr); gap:22px;}
@media (max-width:960px){.grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:520px){.grid{grid-template-columns:1fr;}}
.card{background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden; cursor:pointer; transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;}
.card:hover{transform:translateY(-6px); border-color:var(--blue); box-shadow:0 14px 32px rgba(0,0,0,0.4);}
.card a{color:inherit; text-decoration:none; display:block;}
.cover{height:200px; position:relative; display:flex; align-items:flex-end; padding:14px;}
.cover .rank{position:absolute; top:12px; right:12px; font-family:var(--display); font-size:22px; font-weight:900; opacity:0.85;}
.cover .badge{font-family:var(--mono); font-size:10px; letter-spacing:1px; background:rgba(0,0,0,0.4); padding:4px 8px; border-radius:6px; text-transform:uppercase;}
.card-body{padding:16px;}
.card-body h3{font-size:16px; font-weight:700; margin-bottom:6px;}
.card-body .meta{font-size:13px; color:var(--muted); display:flex; justify-content:space-between;}
.card-body .meta .ep{font-family:var(--mono); color:var(--blue);}

.cv-1{background:linear-gradient(160deg,#1a2550,#3d5bd9);}
.cv-2{background:linear-gradient(160deg,#4a1230,#d92e6e);}
.cv-3{background:linear-gradient(160deg,#4a3410,#d99a2e);}
.cv-4{background:linear-gradient(160deg,#132a2a,#2ea3a3);}
.cv-5{background:linear-gradient(160deg,#2a1345,#8a4fd9);}
.cv-6{background:linear-gradient(160deg,#301313,#d94f4f);}
.cv-7{background:linear-gradient(160deg,#132a1a,#4fd97a);}
.cv-8{background:linear-gradient(160deg,#2a1a13,#d97a4f);}

/* ---------- CHAPTER TICKER (legacy, unused by current templates) ---------- */
.ticker-row{display:flex; gap:16px; overflow-x:auto; padding-bottom:8px; scrollbar-width:thin;}
.ep-tile{flex-shrink:0; width:150px; background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; cursor:pointer; transition:border-color .15s ease;}
.ep-tile:hover{border-color:var(--pink);}
.ep-thumb{height:90px; position:relative;}
.ep-thumb .num{position:absolute; bottom:8px; left:8px; font-family:var(--mono); font-size:12px; font-weight:600; background:rgba(0,0,0,0.5); padding:3px 8px; border-radius:5px;}
.ep-info{padding:10px 12px;}
.ep-info .title{font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.ep-info .sub{font-size:11px; color:var(--muted); margin-top:2px;}

/* ---------- CONTINUE READING ---------- */
.cr-list{display:flex; flex-direction:column; gap:14px;}
.cr-item{display:flex; align-items:center; gap:18px; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px 18px;}
.cr-thumb{width:56px; height:56px; border-radius:8px; flex-shrink:0;}
.cr-mid{flex:1; min-width:0;}
.cr-mid h4{font-size:15px; font-weight:700;}
.cr-mid .cr-sub{font-size:12px; color:var(--muted); margin-top:2px;}
.progress{height:5px; background:var(--line); border-radius:4px; margin-top:8px; overflow:hidden;}
.progress .fill{height:100%; background:linear-gradient(90deg,var(--blue),var(--pink));}
.cr-cta{font-size:13px; font-weight:700; color:var(--amber); flex-shrink:0;}

/* ---------- CTA / FOOTER ---------- */
.cta-band{background:var(--panel); border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:64px 0;}
.cta-inner{display:flex; justify-content:space-between; align-items:center; gap:32px; flex-wrap:wrap;}
.cta-inner h2{font-family:var(--display); font-size:30px; font-weight:800; max-width:480px;}
.cta-form{display:flex; gap:10px;}
.cta-form input{background:var(--card); border:1px solid var(--line); border-radius:8px; padding:13px 16px; color:var(--text); font-family:var(--body); font-size:14px; width:240px;}
.cta-form input:focus{outline:2px solid var(--blue); outline-offset:2px;}

footer{padding:56px 0 40px;}
.foot-grid{display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:32px; padding-bottom:36px; border-bottom:1px solid var(--line); margin-bottom:24px;}
@media (max-width:760px){.foot-grid{grid-template-columns:1fr 1fr;}}
.foot-col h5{font-size:13px; letter-spacing:1px; color:var(--muted); margin-bottom:14px; text-transform:uppercase;}
.foot-col a{display:block; font-size:14px; margin-bottom:10px; color:var(--text);}
.foot-col a:hover{color:var(--blue);}
.foot-bottom{display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--muted); flex-wrap:wrap; gap:12px;}

/* ---------- GENERIC PAGE / SINGLE CONTENT ---------- */
.page-content{padding:64px 0; max-width:820px; margin:0 auto;}
.page-content h1{margin-bottom:24px;}
.page-content p{color:var(--text); margin-bottom:16px; font-size:16px; line-height:1.7;}

.single-series-hero{padding:56px 0; border-bottom:1px solid var(--line);}
.single-series-hero .wrap{display:grid; grid-template-columns:280px 1fr; gap:40px;}
@media (max-width:760px){.single-series-hero .wrap{grid-template-columns:1fr;}}
.single-cover{height:360px; border-radius:16px; border:1px solid var(--line);}
.single-meta{display:flex; gap:10px; margin:18px 0; flex-wrap:wrap;}
.single-meta span{font-family:var(--mono); font-size:12px; background:var(--card); border:1px solid var(--line); padding:5px 12px; border-radius:6px; color:var(--muted);}

/* ---------- CHAPTER LIST (on the series page) ---------- */
.ep-list{display:flex; flex-direction:column; gap:2px; margin-top:24px;}
.ep-row{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px; background:var(--card); border:1px solid var(--line);
  border-radius:10px; margin-bottom:8px; transition:border-color .15s ease;
}
.ep-row:hover{border-color:var(--blue);}
.ep-row .ep-row-num{font-family:var(--mono); color:var(--blue); font-size:13px; width:70px; flex-shrink:0;}
.ep-row .ep-row-title{flex:1; font-size:15px; font-weight:600;}
.ep-row .ep-row-date{font-size:13px; color:var(--muted); flex-shrink:0;}

/* ---------- READER PAGE (immersive — chrome hidden until tapped) ---------- */
body.gutter-reader-mode .topbar,
body.gutter-reader-mode .promo-bar,
body.gutter-reader-mode .site-footer,
body.gutter-reader-mode .back-to-top{display:none !important;}

.reader-header{
  position:fixed; top:0; left:0; right:0; z-index:60;
  background:rgba(11,13,20,0.94); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
  padding:12px 0;
  transform:translateY(-100%); opacity:0; pointer-events:none;
  transition:transform .22s ease, opacity .22s ease;
}
.reader-header.is-visible{transform:translateY(0); opacity:1; pointer-events:auto;}
.reader-topbar-inner{display:flex; align-items:center; gap:12px;}
.reader-home-btn{
  display:flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:8px; flex-shrink:0;
  color:var(--text); border:1px solid var(--line);
}
.reader-home-btn:hover{border-color:var(--blue); color:var(--blue);}
.reader-series-thumb{width:32px; height:32px; border-radius:6px; overflow:hidden; flex-shrink:0;}
.reader-series-thumb img, .reader-series-thumb .thumb-fallback{width:32px; height:32px; display:block; border-radius:6px;}
.reader-titles{flex:1; min-width:0;}
.reader-series-name{display:block; font-size:11.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.reader-series-name:hover{color:var(--blue);}
.reader-chapter-name{font-family:var(--display); font-weight:700; font-size:15px; margin-top:1px;}
.reader-comment-link{display:flex; align-items:center; gap:6px; font-family:var(--mono); font-size:13px; color:var(--muted); flex-shrink:0;}
.reader-comment-link:hover{color:var(--text);}

.reader-content{
  max-width:720px; margin:0 auto; padding:24px 0;
}
.reader-content img{width:100%; display:block; margin:0 0 4px;}
.reader-content p{color:var(--text); font-size:16px; line-height:1.8; margin-bottom:16px;}

.reader-nav{
  position:fixed; bottom:0; left:0; right:0; z-index:60;
  background:rgba(11,13,20,0.94); backdrop-filter:blur(10px);
  border-top:1px solid var(--line);
  padding:14px 0;
  transform:translateY(100%); opacity:0; pointer-events:none;
  transition:transform .22s ease, opacity .22s ease;
}
.reader-nav.is-visible{transform:translateY(0); opacity:1; pointer-events:auto;}
.reader-bottombar-inner{display:flex; align-items:center; justify-content:space-between; gap:14px;}
.reader-nav .nav-btn{
  display:flex; align-items:center; gap:8px;
  font-weight:700; font-size:13px; padding:10px 16px; border-radius:8px;
  border:1px solid var(--line); flex-shrink:0;
}
.reader-nav .nav-btn.next{background:linear-gradient(135deg,var(--blue),var(--pink)); color:var(--ink); border:none;}
.reader-nav .nav-btn.disabled{opacity:0.35; pointer-events:none;}
.chapter-select-wrap{
  display:flex; align-items:center; gap:8px; color:var(--muted);
  background:var(--card); border:1px solid var(--line); border-radius:8px; padding:8px 12px;
  flex:1; max-width:200px; justify-content:center;
}
.chapter-select{
  background:transparent; border:none; color:var(--text); font-family:var(--body);
  font-size:13px; font-weight:600; max-width:150px;
}
.chapter-select:focus{outline:none;}
.reader-nav .ep-progress-text{font-family:var(--mono); font-size:12px; color:var(--muted); flex-shrink:0;}

@media (max-width:640px){
  .reader-series-name{max-width:120px;}
  .chapter-select-wrap{max-width:130px;}
}

/* ---------- ANNOUNCEMENT BAR ---------- */
.announce{
  background:linear-gradient(90deg, rgba(139,92,246,0.14), rgba(255,77,141,0.1));
  border-bottom:1px solid var(--line);
  padding:10px 0;
}
.announce .wrap{display:flex; align-items:center; justify-content:space-between; gap:16px;}
.announce p{font-size:13px; color:var(--text); font-weight:600;}
.announce p span{color:var(--muted); font-weight:500; margin-left:6px;}
.announce .dismiss{background:none; border:none; color:var(--muted); cursor:pointer; font-size:18px; line-height:1; flex-shrink:0;}
.announce .dismiss:hover{color:var(--text);}
.announce.is-dismissed{display:none;}

/* ---------- HERO CAROUSEL (spotlight style) ---------- */
.carousel{
  display:flex; gap:16px; overflow-x:auto; padding:24px 8px 16px;
  scroll-snap-type:x proximity; scrollbar-width:none;
}
.carousel::-webkit-scrollbar{display:none;}
.carousel-card{
  flex-shrink:0; width:190px; aspect-ratio:2/3; scroll-snap-align:center;
  border-radius:14px; overflow:hidden; position:relative;
  transform:scale(0.94); opacity:.75;
  transition:transform .35s ease, opacity .35s ease;
}
.carousel-card.is-active{transform:scale(1); opacity:1;}
.carousel-cover{width:100%; height:100%; position:relative;}
.carousel-cover img{transition:transform .5s ease;}
.carousel-card:hover .carousel-cover img{transform:scale(1.08);}
.carousel-cover .carousel-veil{
  position:absolute; inset:0; background:rgba(0,0,0,0);
  transition:background .3s ease;
}
.carousel-card:hover .carousel-cover .carousel-veil{background:rgba(0,0,0,0.25);}
.carousel-cover .rating-badge{
  position:absolute; top:10px; left:10px;
  font-family:var(--mono); font-size:11px; font-weight:700;
  background:rgba(0,0,0,0.6); padding:3px 7px; border-radius:6px;
  display:flex; align-items:center; gap:3px;
  opacity:0; transition:opacity .3s ease;
}
.carousel-cover .rating-badge svg{width:10px; height:10px; fill:var(--amber);}
.carousel-cover .carousel-title-overlay{
  position:absolute; inset:auto 0 0 0;
  padding:44px 12px 12px;
  background:linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.45) 65%, transparent);
  opacity:0; transition:opacity .3s ease;
}
.carousel-title-overlay .title{
  font-size:13px; font-weight:700; color:#fff; line-height:1.3;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.carousel-card.is-active .rating-badge,
.carousel-card.is-active .carousel-title-overlay,
.carousel-card:hover .rating-badge,
.carousel-card:hover .carousel-title-overlay{
  opacity:1;
}
@media (max-width:640px){.carousel-card{width:130px;}}

/* ---------- TWO-COLUMN: TRENDING + POPULAR ---------- */
.two-col{display:grid; grid-template-columns:2.3fr 1fr; gap:32px; align-items:start;}
@media (max-width:960px){.two-col{grid-template-columns:1fr;}}

.trend-list{display:flex; flex-direction:column; gap:10px;}
.trend-row{
  display:flex; align-items:center; gap:14px;
  background:var(--card); border:1px solid var(--line); border-radius:10px; padding:10px;
  transition:border-color .15s ease;
}
.trend-row:hover{border-color:var(--blue);}
.trend-row .tr-thumb{width:56px; height:72px; border-radius:6px; flex-shrink:0; background-size:cover; background-position:center;}
.trend-row .tr-mid{flex:1; min-width:0;}
.trend-row .tr-mid h4{font-size:14px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.trend-row .tr-mid .tr-genres{font-size:12px; color:var(--muted); margin-top:3px;}
.trend-row .tr-rating{font-family:var(--mono); font-size:13px; font-weight:700; color:var(--amber); flex-shrink:0; display:flex; align-items:center; gap:4px;}

.popular-panel{
  background:var(--card); border:1px solid var(--line); border-radius:14px; padding:18px;
  position:sticky; top:90px;
}
.popular-panel h3{font-family:var(--display); font-size:16px; font-weight:700; margin-bottom:14px;}
.tabs{display:flex; gap:6px; margin-bottom:16px; background:var(--panel); border-radius:8px; padding:4px;}
.tab-btn{
  flex:1; font-size:12px; font-weight:700; padding:8px 6px; border-radius:6px;
  border:none; background:transparent; color:var(--muted); cursor:pointer;
}
.tab-btn.active{background:var(--blue); color:#fff;}
.tab-panel{display:none;}
.tab-panel.active{display:block;}
.ranked-item{display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--line);}
.ranked-item:last-child{border-bottom:none;}
.rank-badge{
  width:24px; height:24px; border-radius:6px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-family:var(--mono); font-size:12px; font-weight:700;
  background:var(--panel); color:var(--muted);
}
.ranked-item:nth-child(1) .rank-badge{background:var(--blue); color:#fff;}
.ranked-item:nth-child(2) .rank-badge{background:var(--pink); color:#fff;}
.ranked-item:nth-child(3) .rank-badge{background:var(--amber); color:#0B0B14;}
.ranked-item .rk-thumb{width:40px; height:52px; border-radius:5px; flex-shrink:0; background-size:cover; background-position:center;}
.ranked-item .rk-mid{flex:1; min-width:0;}
.ranked-item .rk-mid h5{font-size:13px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.ranked-item .rk-mid .rk-genres{font-size:11px; color:var(--muted); margin-top:2px;}
.empty-note{font-size:13px; color:var(--muted); padding:8px 0;}

/* ---------- LATEST UPDATES ---------- */
.lu-list{display:flex; flex-direction:column; gap:2px;}
.lu-row{
  display:flex; align-items:center; gap:16px;
  padding:14px; background:var(--card); border:1px solid var(--line);
  border-radius:10px; margin-bottom:8px; transition:border-color .15s ease;
}
.lu-row:hover{border-color:var(--blue);}
.lu-thumb{width:48px; height:64px; border-radius:6px; flex-shrink:0; background-size:cover; background-position:center;}
.lu-mid{flex:1; min-width:0;}
.lu-mid h4{font-size:14px; font-weight:700;}
.lu-chip{
  display:inline-block; margin-top:6px; font-family:var(--mono); font-size:11px;
  background:var(--panel); border:1px solid var(--line); color:var(--blue);
  padding:3px 9px; border-radius:5px;
}
.lu-time{font-size:12px; color:var(--muted); flex-shrink:0;}

/* real <img> lazy-loading inside cover/thumb containers */
.cover img, .carousel-cover img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; display:block;
}
.cover > *:not(img), .carousel-cover > *:not(img){position:relative; z-index:1;}
.tr-thumb img, .rk-thumb img, .lu-thumb img, .cr-thumb img, .single-cover img, .ep-thumb img{
  width:100%; height:100%; object-fit:cover; display:block;
}
.cover, .carousel-cover, .tr-thumb, .rk-thumb, .lu-thumb, .cr-thumb, .ep-thumb, .single-cover{
  background-color:var(--card-hi); /* low-cost placeholder shown before the image paints */
  overflow:hidden;
}

/* ---------- FOOTER (redesigned) ---------- */
.site-footer{padding:48px 0 40px; border-top:1px solid var(--line); margin-top:24px;}
.footer-inner{display:flex; flex-direction:column; align-items:center; text-align:center; gap:18px;}
.footer-brand{display:flex; align-items:center; gap:10px; font-family:var(--display); font-weight:800; font-size:18px; color:var(--blue);}
.footer-brand .mark{width:28px; height:28px; border-radius:50%; background:linear-gradient(135deg,var(--blue),var(--pink)); display:inline-block;}
.footer-links{display:flex; gap:22px; flex-wrap:wrap; justify-content:center; font-size:14px;}
.footer-links a{color:var(--text);}
.footer-links a:hover{color:var(--blue);}
.footer-socials{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:center;}
.btn-discord{
  display:inline-flex; align-items:center; gap:8px;
  background:linear-gradient(135deg,var(--blue),var(--pink)); color:#fff;
  font-weight:700; font-size:14px; padding:10px 20px; border-radius:999px;
}
.btn-discord:hover{box-shadow:0 8px 20px var(--pink-glow);}
.social-icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:50%;
  background:var(--panel); border:1px solid var(--line); color:var(--text);
}
.social-icon-btn:hover{color:#fff; background:linear-gradient(135deg,var(--blue),var(--pink)); border-color:transparent;}
.footer-bottom{width:100%; padding-top:18px; border-top:1px solid var(--line); font-size:13px; color:var(--muted);}

/* ---------- BACK TO TOP ---------- */
.back-to-top{
  position:fixed; bottom:24px; right:24px; z-index:70;
  width:44px; height:44px; border-radius:50%; border:none;
  background:linear-gradient(135deg,var(--blue),var(--pink)); color:#fff;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  opacity:0; pointer-events:none; transform:translateY(8px);
  transition:opacity .2s ease, transform .2s ease;
  box-shadow:0 8px 20px rgba(0,0,0,0.4);
}
.back-to-top.is-visible{opacity:1; pointer-events:auto; transform:translateY(0);}

/* ---------- LATEST UPDATES (multi-chapter cards) ---------- */
.lu-grid{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
@media (max-width:760px){.lu-grid{grid-template-columns:1fr;}}
.lu-card{
  display:flex; gap:14px; background:var(--card); border:1px solid var(--line);
  border-radius:10px; padding:14px; transition:border-color .15s ease;
}
.lu-card:hover{border-color:var(--blue);}
.lu-card .lu-thumb{width:66px; height:88px; border-radius:7px; flex-shrink:0;}
.lu-card .lu-body{flex:1; min-width:0;}
.lu-card h4{font-size:14px; font-weight:700; margin-bottom:6px;}
.lu-card h4 a{color:var(--text);}
.lu-card h4 a:hover{color:var(--blue);}
.lu-chapter-line{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; font-size:12.5px; padding:4px 0;
}
.lu-chapter-line a{color:var(--muted); display:flex; align-items:center; gap:5px; min-width:0;}
.lu-chapter-line a:hover{color:var(--text);}
.lu-chapter-line.is-newest a{color:var(--blue); font-weight:700;}
.lu-chapter-line .lock-icon{flex-shrink:0; opacity:0.8;}
.lu-chapter-line .lu-time{color:var(--muted); font-size:11.5px; flex-shrink:0;}
.lu-empty-note{font-size:12.5px; color:var(--muted); padding:4px 0;}

/* ---------- PAGINATION ---------- */
.pagination{display:flex; align-items:center; gap:8px; margin-top:28px; justify-content:center;}
.pagination a, .pagination span{
  min-width:36px; height:36px; padding:0 10px;
  display:flex; align-items:center; justify-content:center;
  border-radius:8px; font-size:13px; font-weight:700;
  background:var(--card); border:1px solid var(--line); color:var(--text);
}
.pagination a:hover{border-color:var(--blue);}
.pagination .current{background:var(--blue); border-color:var(--blue); color:#fff;}
.pagination .disabled{opacity:0.35; pointer-events:none;}

/* ---------- ANNOUNCEMENTS ---------- */
.announce-row{display:flex; gap:16px; overflow-x:auto; padding-bottom:6px; scrollbar-width:thin;}
.announce-card{
  flex-shrink:0; width:300px;
  display:flex; gap:12px; align-items:flex-start;
  background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px;
  transition:border-color .15s ease;
}
.announce-card:hover{border-color:var(--blue);}
.announce-card .an-avatar{width:38px; height:38px; border-radius:50%; flex-shrink:0; background:linear-gradient(135deg,var(--blue),var(--pink));}
.announce-card .an-avatar img{width:100%; height:100%; border-radius:50%; object-fit:cover;}
.announce-card h4{font-size:13.5px; font-weight:700; line-height:1.3;}
.announce-card .an-date{font-size:11.5px; color:var(--muted); margin-top:6px; text-transform:uppercase;}

/* focus visibility */
a:focus-visible, button:focus-visible, .chip:focus-visible, .card:focus-visible{outline:2px solid var(--blue); outline-offset:2px;}

/* ---------- SERIES DETAIL PAGE ---------- */
.series-detail-grid{
  display:grid; grid-template-columns:280px 1fr; gap:36px;
  padding:48px 0 36px;
}
@media (max-width:760px){.series-detail-grid{grid-template-columns:1fr;}}

.series-cover-col .single-cover{height:380px; border-radius:16px; border:1px solid var(--line); overflow:hidden;}
.series-cover-col .single-cover img{width:100%; height:100%; object-fit:cover;}

.series-info-col h1{font-family:var(--display); font-size:28px; margin-bottom:14px;}

.series-desc-wrap{margin-bottom:20px;}
.series-desc{color:var(--muted); font-size:14.5px; line-height:1.7; max-height:96px; overflow:hidden; position:relative;}
.series-desc.is-expanded{max-height:none;}
.series-desc p{margin-bottom:10px;}
.desc-toggle{
  display:inline-flex; align-items:center; gap:4px; margin-top:8px;
  background:none; border:none; color:var(--blue); font-size:13px; font-weight:600; cursor:pointer;
}
.desc-toggle:hover{color:var(--pink);}

.series-cta-row{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:20px;}
.series-cta-row .btn{display:inline-flex; align-items:center; gap:7px; font-size:13.5px; padding:11px 18px;}
.btn-bookmark.is-active{background:linear-gradient(135deg,var(--blue),var(--pink)); color:var(--ink);}

.series-stat-row{
  display:flex; border:1px solid var(--line); border-radius:12px; overflow:hidden; margin-bottom:18px;
}
.stat-box{
  flex:1; text-align:center; padding:12px 8px; background:var(--card);
  border-right:1px solid var(--line);
}
.stat-box:last-child{border-right:none;}
.stat-box .stat-value{display:block; font-family:var(--display); font-weight:700; font-size:16px;}
.stat-box .stat-label{display:block; font-size:11px; color:var(--muted); margin-top:2px; text-transform:uppercase; letter-spacing:0.5px;}

.series-facts-row{display:flex; gap:24px; margin-bottom:14px; flex-wrap:wrap;}
.series-facts-row .fact{display:flex; flex-direction:column; gap:3px; min-width:120px;}
.fact-label{font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:0.5px;}
.fact-value{font-size:14px; font-weight:600; display:flex; align-items:center; gap:6px;}
.status-dot{width:8px; height:8px; border-radius:50%; background:var(--blue); display:inline-block;}
.type-value{color:var(--pink);}

.genre-tags{display:flex; gap:8px; flex-wrap:wrap; margin-top:8px;}
.genre-tag{
  font-size:12.5px; padding:6px 14px; border-radius:999px; border:1px solid var(--line); color:var(--muted);
}
.genre-tag:hover{color:var(--text); border-color:var(--blue);}

/* ---------- CHAPTERS PANEL ---------- */
.chapters-panel{margin-bottom:48px;}
.chapters-panel-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:14px;}
.chapters-panel-head h2{font-family:var(--display); font-size:20px;}
.chapter-sort-btn{
  display:inline-flex; align-items:center; gap:6px; background:var(--card); border:1px solid var(--line);
  color:var(--text); border-radius:8px; padding:8px 14px; font-size:13px; font-weight:600; cursor:pointer;
}
.chapter-sort-btn:hover{border-color:var(--blue);}

.chapter-search-wrap{position:relative; margin-bottom:14px;}
.chapter-search{
  width:100%; background:var(--card); border:1px solid var(--line); border-radius:8px;
  padding:11px 14px 11px 38px; color:var(--text); font-family:var(--body); font-size:14px;
}
.chapter-search:focus{outline:none; border-color:var(--blue);}
.chapter-search-wrap svg{position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none;}

.chapters-scroll{max-height:420px; overflow-y:auto; padding-right:6px;}
.chapters-scroll::-webkit-scrollbar{width:6px;}
.chapters-scroll::-webkit-scrollbar-thumb{background:var(--line); border-radius:3px;}

/* ---------- COMMENTS ---------- */
.comments-section{padding-top:8px; padding-bottom:60px; border-top:1px solid var(--line);}
.comments-head{display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin:24px 0 18px;}
.comments-head h3{font-family:var(--display); font-size:18px;}
.comment-sort-tabs{display:flex; gap:6px;}
.comment-sort-tabs a{
  font-size:13px; padding:7px 14px; border-radius:8px; color:var(--muted);
}
.comment-sort-tabs a.active{background:var(--card); color:var(--text); border:1px solid var(--line);}
.comment-sort-tabs a:hover{color:var(--text);}

.comment-form-wrap, .comment-login-box{
  background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:14px;
}
.comment-toolbar{display:flex; gap:6px; margin-bottom:10px;}
.comment-toolbar button{
  width:28px; height:28px; border-radius:6px; border:1px solid var(--line); background:transparent;
  color:var(--text); font-size:12px; cursor:pointer;
}
.comment-toolbar button:hover{border-color:var(--blue); color:var(--blue);}
.comment-toolbar.is-disabled button{opacity:0.4; cursor:not-allowed;}
.comment-textarea{
  width:100%; min-height:70px; background:var(--panel); border:1px solid var(--line); border-radius:8px;
  padding:12px 14px; color:var(--text); font-family:var(--body); font-size:14px; resize:vertical; margin-bottom:10px;
}
.comment-textarea:focus{outline:none; border-color:var(--blue);}
.comment-textarea:disabled{color:var(--muted); cursor:not-allowed;}
.comment-login-box .btn{display:inline-flex; align-items:center; gap:7px;}
.comment-form-wrap .comment-form p{margin-bottom:0;}
.comment-form-wrap .form-submit{margin-top:2px;}

.comment-rules-note{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  font-size:12.5px; color:var(--muted); background:var(--panel); border:1px solid var(--line);
  border-radius:8px; padding:10px 14px; margin-bottom:20px;
}
.rules-dismiss{background:none; border:none; color:var(--muted); font-size:16px; cursor:pointer; line-height:1;}
.rules-dismiss:hover{color:var(--text);}

.comment-list{list-style:none;}
.gutter-comment{margin-bottom:18px;}
.gutter-comment .children{list-style:none; margin-top:14px; padding-left:30px; border-left:1px solid var(--line);}
.comment-body{display:flex; gap:12px;}
.comment-avatar{width:40px; height:40px; border-radius:50%; flex-shrink:0;}
.comment-main{flex:1; min-width:0;}
.comment-meta{display:flex; align-items:center; gap:8px; margin-bottom:4px;}
.comment-author{font-weight:700; font-size:13.5px;}
.comment-time{font-size:12px; color:var(--muted);}
.comment-content p{color:var(--text); font-size:14px; line-height:1.6; margin-bottom:6px;}
.comment-awaiting-moderation{font-size:12.5px; color:var(--amber); font-style:italic;}
.comment-reply-link{font-size:12.5px;}
.comment-reply-link a{color:var(--muted);}
.comment-reply-link a:hover{color:var(--blue);}

/* =========================================================
 * LOGIN / SIGN-UP PAGE (template-login.php)
 * ========================================================= */
body.gutter-auth-page{
  min-height:100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(139,92,246,0.16), transparent 60%),
    repeating-linear-gradient(135deg, transparent 0, transparent 38px, rgba(255,255,255,0.014) 38px, rgba(255,255,255,0.014) 39px),
    var(--ink);
}
.auth-wrap{
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
  padding:48px 20px;
}
.auth-inner{
  width:100%; max-width:440px;
  display:flex; flex-direction:column; align-items:center;
}

/* Brand / welcome header */
.auth-brand{text-align:center; margin-bottom:26px;}
.auth-logo{
  display:inline-flex; align-items:center; justify-content:center;
  width:76px; height:76px; margin:0 auto 18px;
}
.auth-logo svg,
.auth-logo img{width:76px; height:76px; filter:drop-shadow(0 6px 20px var(--blue-glow));}
.auth-welcome-sm{
  font-family:var(--display);
  font-weight:800; font-size:22px; letter-spacing:2px;
  color:var(--text); line-height:1.1;
}
.auth-welcome-lg{
  font-family:var(--display);
  font-weight:900; font-size:32px; letter-spacing:1px;
  margin-top:4px;
  background:linear-gradient(135deg,var(--blue),var(--pink));
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
  text-transform:uppercase;
}
.auth-rule{
  display:block; width:120px; height:2px; margin:14px auto 12px;
  background:linear-gradient(90deg,transparent,var(--blue),var(--pink),transparent);
}
.auth-sub{color:var(--muted); font-size:14.5px;}

/* Card */
.auth-card{
  width:100%;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:28px 26px;
  box-shadow:0 24px 60px rgba(0,0,0,0.45);
}

/* Alerts */
.auth-alert{
  background:rgba(255,77,141,0.12);
  border:1px solid rgba(255,77,141,0.45);
  color:#ffd0e0;
  font-size:13.5px; line-height:1.45;
  padding:11px 14px; border-radius:10px; margin-bottom:16px;
}
.auth-notice{
  background:rgba(139,92,246,0.12);
  border:1px solid rgba(139,92,246,0.45);
  color:#ded2ff;
  font-size:13.5px; padding:11px 14px; border-radius:10px; margin-bottom:16px;
}

/* Google button */
.auth-google{
  display:flex; align-items:center; justify-content:center; gap:10px;
  width:100%; padding:13px 16px;
  background:#fff; color:#1a1a1a;
  font-family:var(--body); font-weight:700; font-size:14.5px;
  border-radius:10px; border:1px solid #e3e3e3;
  transition:transform .15s ease, box-shadow .15s ease;
}
.auth-google:hover{transform:translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,0.35);}
.auth-google svg{width:18px; height:18px;}

/* OR divider */
.auth-or{
  display:flex; align-items:center; gap:14px;
  margin:20px 0;
  color:var(--muted); font-family:var(--mono); font-size:12px; letter-spacing:1px;
}
.auth-or::before,
.auth-or::after{content:""; flex:1; height:1px; background:var(--line);}

/* Fields */
.auth-field{margin-bottom:16px;}
.auth-field > label{
  display:block; font-size:13px; font-weight:600; color:var(--muted); margin-bottom:7px;
}
.auth-label-row{display:flex; align-items:center; justify-content:space-between; margin-bottom:7px;}
.auth-label-row label{font-size:13px; font-weight:600; color:var(--muted);}
.auth-forgot{font-size:12.5px; color:var(--blue); font-weight:600;}
.auth-forgot:hover{color:var(--pink);}
.auth-input{
  display:flex; align-items:center; gap:10px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:10px;
  padding:0 14px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.auth-input:focus-within{border-color:var(--blue); box-shadow:0 0 0 3px var(--blue-glow);}
.auth-input svg{color:var(--muted); flex-shrink:0;}
.auth-input input{
  flex:1; background:none; border:none; outline:none;
  color:var(--text); font-family:var(--body); font-size:14.5px;
  padding:13px 0;
}
.auth-input input::placeholder{color:#6c6780;}

/* Remember me */
.auth-remember{
  display:flex; align-items:center; gap:8px;
  font-size:13px; color:var(--muted); margin-bottom:18px; cursor:pointer;
}
.auth-remember input{width:15px; height:15px; accent-color:var(--blue);}

/* Submit */
.auth-submit{
  width:100%; padding:14px 16px;
  background:linear-gradient(135deg,var(--blue),var(--pink));
  color:#fff; border:none; border-radius:10px;
  font-family:var(--body); font-weight:800; font-size:15px; letter-spacing:.3px;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
}
.auth-submit:hover{transform:translateY(-2px); box-shadow:0 12px 30px var(--pink-glow);}

/* Switch login <-> signup */
.auth-switch{
  text-align:center; margin-top:20px;
  font-size:14px; color:var(--muted);
}
.auth-switch a{color:var(--blue); font-weight:700;}
.auth-switch a:hover{color:var(--pink);}

/* Copyright */
.auth-copy{
  margin-top:26px;
  font-family:var(--mono); font-size:11px; letter-spacing:1px;
  color:var(--muted); text-transform:uppercase;
}

@media (max-width:480px){
  .auth-card{padding:24px 18px;}
  .auth-welcome-lg{font-size:27px;}
}
