:root{
  --font-family: 'Inter', system-ui, sans-serif;
  --base-font-size: 16px;

  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --link-color: #a78bfa;

  --primary-color: #3b82f6;
  --accent-color: #8b5cf6;

  --panel-bg: rgba(17, 24, 39, 0.7);
  --panel-border: rgba(55, 65, 81, 0.7);
}

body{
  font-family: var(--font-family);
  font-size: var(--base-font-size);
  background:#0a0a0a;
  color:var(--text-primary);
  min-height:100vh;
}

#background-container{
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(1200px circle at 10% -20%, rgba(139,92,246,.25), transparent 50%),
    radial-gradient(1000px circle at 90% 10%, rgba(59,130,246,.25), transparent 55%),
    radial-gradient(800px circle at 40% 110%, rgba(16,185,129,.12), transparent 55%),
    linear-gradient(180deg, #050505, #0a0a0a 40%, #050505);
  filter:saturate(120%);
}

a{
  transition:transform .2s ease-in-out,color .2s ease-in-out,text-shadow .2s ease-in-out;
}
a:hover{
  transform:translateY(-2px);
  color:var(--link-color);
  text-shadow:0 0 8px var(--link-color);
}

.custom-scrollbar::-webkit-scrollbar{width:8px;}
.custom-scrollbar::-webkit-scrollbar-track{background:#1f2937;border-radius:10px;}
.custom-scrollbar::-webkit-scrollbar-thumb{background:var(--accent-color);border-radius:10px;}
.custom-scrollbar{scrollbar-width:thin;scrollbar-color:var(--accent-color) #1f2937;}

.chapter-item{
  position:relative;
  overflow:hidden;
  transition:transform .2s ease-out,box-shadow .2s ease-out,background-image .2s ease-out;
}
.chapter-item:hover{
  transform:translateX(5px);
  box-shadow:inset 4px 0 0 0 var(--accent-color);
  background-image:linear-gradient(to right, rgba(139,92,246,.12), transparent);
}

.panel{
  background:var(--panel-bg);
  border:1px solid var(--panel-border);
  border-radius:1rem;
  backdrop-filter: blur(12px);
  box-shadow:0 20px 60px rgba(0,0,0,.55);
}
/* ===== Sidebar fix (match HTML) ===== */

.sidebar-card{
  padding: 14px;
  border-radius: 18px;
  background: rgba(11,18,32,.75);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 12px 35px rgba(0,0,0,.55);
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* Cover block */
.cover-wrap{
  width:100%;
  aspect-ratio: 3/4;
  border-radius: 14px;
  overflow:hidden;
  background: #0b1220;
  border:1px solid rgba(255,255,255,.08);
}
.cover-wrap img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

/* Stars centered/bigger */
.rating-stars{
  text-align:center;
  font-size:20px;
  letter-spacing:3px;
  margin-top:2px;
}
.rating-stars .star{ color:#4b5563; }
.rating-stars .star.filled{ color:#facc15; }

/* Info box spacing */
.info-box{
  background: rgba(7,10,18,.7);
  border:1px solid rgba(255,255,255,.06);
  padding:10px 12px;
  border-radius:12px;
  font-size:14px;
  color:#cbd5e1;
}
.info-box .row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:6px 0;
  border-bottom:1px dashed rgba(255,255,255,.06);
}
.info-box .row:last-child{ border-bottom:none; }
.info-box span:last-child{
  font-weight:700;
  color:#e5e7eb;
}
.info-box .status{
  color:#22c55e !important;
}

/* Support button full width like HTML */
.support-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:#7c3aed;
  color:white;
  font-weight:800;
  padding:12px 14px;
  border-radius:12px;
  transition:.2s;
  margin-top:4px;
}
.support-btn:hover{
  transform:translateY(-1px);
  opacity:.95;
}
.support-btn .heart{ font-size:18px; }




/* ===== Header navigation styling ===== */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  list-style: none;
}

.main-nav li a,
.main-nav li span,
.main-nav li.menu-item a,
.main-nav li.page_item a {
  position: relative;
  color: #e5e7eb;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.3rem 0;
}

.main-nav li a:hover {
  color: #ffffff;
}

.main-nav li.current-menu-item > a,
.main-nav li.current_page_item > a {
  color: #ffffff;
}

.main-nav li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.2s ease-out;
}

.main-nav li a:hover::after,
.main-nav li.current-menu-item > a::after,
.main-nav li.current_page_item > a::after {
  width: 100%;
}

/* Mobile menu links */
#mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#mobile-menu li a {
  display: block;
  padding: 0.5rem 0;
  color: #e5e7eb;
  font-weight: 500;
}

#mobile-menu li a:hover {
  color: #ffffff;
}


/* ===== Legal / static pages styling ===== */
.legal-panel{
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.legal-content{
  max-width: 900px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #e5e7eb;
}

.legal-content p{
  margin-bottom: 0.9rem;
}

.legal-content h2,
.legal-content h3{
  margin-top: 1.4rem;
  margin-bottom: 0.6rem;
  font-weight: 800;
  color: #ffffff;
}

.legal-content h2{
  font-size: 1.15rem;
}

.legal-content h3{
  font-size: 1.05rem;
}

.legal-content ul,
.legal-content ol{
  margin-bottom: 0.9rem;
  padding-left: 1.3rem;
}

.legal-content li{
  margin-bottom: 0.35rem;
}

.legal-content strong{
  font-weight: 700;
  color: #ffffff;
}


/* Social media pills under sidebar */
.social-pill{
  backdrop-filter: blur(6px);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0.35rem 0.75rem;
  border-radius:9999px;
  border:1px solid rgba(148,163,184,0.6);
  font-size:0.75rem;
  font-weight:600;
  color:#e5e7eb;
  background:rgba(15,23,42,0.7);
  text-decoration:none;
}
.social-pill:hover{
  border-color:var(--accent-color);
  color:#ffffff;
}



/* Rating stars under cover */
.rating-stars-fix{
  display:flex;
  align-items:center;
  gap:4px;
  margin:0.75rem 0 0.5rem;
  font-size:0.95rem;
}
.rating-stars-fix .star{
  color:#4b5563;
  position: relative;
  display:inline-block;
  line-height:1;
}
.rating-stars-fix .star.filled{
  color:#facc15;
}
/* Half star: left half yellow, right half gray */
.rating-stars-fix .star.half{
  color:#4b5563;
}
.rating-stars-fix .star.half::before{
  content:"★";
  position:absolute;
  left:0;
  top:0;
  width:50%;
  overflow:hidden;
  color:#facc15;
}

/* Social links pills */
.social-pill{
  backdrop-filter: blur(6px);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0.25rem 0.7rem;
  border-radius:9999px;
  font-size:0.75rem;
  font-weight:600;
  background:rgba(15,23,42,0.9);
  border:1px solid rgba(148,163,184,0.6);
  color:#e5e7eb;
  text-decoration:none;
}
.social-pill:hover{
  background:rgba(59,130,246,0.8);
  border-color:rgba(129,140,248,1);
  color:#ffffff;
}


/* Back to top floating button */
.back-to-top{
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: rgba(59,130,246,0.9);
  border: 1px solid rgba(147,197,253,0.6);
  color: #fff;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.5);
}
.back-to-top:hover{
  background: rgba(139,92,246,0.95);
}
