/*
Theme Name: ShadowScans
Theme URI: https://shadowscans.com
Author: ShadowScans Team
Author URI: https://shadowscans.com
Description: ثيم عربي احترافي لقراءة المانغا والمانهوا والمانهوا والروايات الخفيفة - Arabic RTL Premium Manga Reading Theme
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shadowscans
Tags: dark, rtl-language, manga, reading, arabic, entertainment

ShadowScans WordPress Theme
Copyright (C) 2024 ShadowScans
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  --bg-primary:   #07080c;
  --bg-secondary: #0d0f17;
  --bg-card:      #111520;
  --bg-hover:     #181d2e;
  --bg-glass:     rgba(13,15,23,0.85);

  --accent:        #c8102e;
  --accent-2:      #ff2442;
  --accent-hover:  #e8213e;
  --accent-glow:   rgba(200, 16, 46, 0.28);
  --accent-glow-strong: rgba(200, 16, 46, 0.55);
  --accent-subtle: rgba(200, 16, 46, 0.10);

  --gold:      #d4a847;
  --gold-glow: rgba(212, 168, 71, 0.3);

  --text-primary:   #f0f2f8;
  --text-secondary: #9ba3bb;
  --text-muted:     #525870;

  --border:        rgba(255, 255, 255, 0.06);
  --border-accent: rgba(200, 16, 46, 0.35);
  --border-gold:   rgba(212, 168, 71, 0.35);

  --success: #00d68f;
  --warning: #ffb300;
  --danger:  #ff3d71;
  --info:    #0095ff;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;

  --shadow-sm:     0 2px 10px rgba(0,0,0,0.5);
  --shadow-md:     0 6px 24px rgba(0,0,0,0.55);
  --shadow-lg:     0 12px 48px rgba(0,0,0,0.65);
  --shadow-accent: 0 0 24px var(--accent-glow), 0 4px 16px rgba(0,0,0,0.4);
  --shadow-gold:   0 0 20px var(--gold-glow);

  --font-arabic: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
  --font-en:     'Sora', 'Inter', sans-serif;

  --transition:        all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.light-mode {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f5f7fa;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #9ca3af;
  --border: rgba(0,0,0,0.08);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle noise texture on background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

body.ltr-mode {
  direction: ltr;
  text-align: left;
  font-family: var(--font-en);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* ============================================
   LAYOUT WRAPPERS
   ============================================ */
.ss-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.ss-container-fluid {
  width: 100%;
  padding: 0 20px;
}

.ss-grid {
  display: grid;
  gap: 20px;
}

.ss-flex {
  display: flex;
  align-items: center;
}

.ss-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================
   HEADER
   ============================================ */
#ss-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  background: rgba(15, 17, 21, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  height: 70px;
}

#ss-header.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.site-logo .logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.main-nav .has-dropdown {
  position: relative;
}

.main-nav .dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 200px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 100;
}

.main-nav .has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav .dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Search Bar */
.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 0.875rem;
  padding: 8px 40px 8px 16px;
  width: 240px;
  transition: var(--transition);
  outline: none;
}

.header-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  width: 280px;
}

.header-search input::placeholder {
  color: var(--text-muted);
}

.header-search .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1rem;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.search-suggestions.active {
  display: block;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  transition: var(--transition);
  cursor: pointer;
}

.search-suggestion-item:hover {
  background: var(--bg-hover);
}

.search-suggestion-item img {
  width: 36px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.search-suggestion-item .info .title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.search-suggestion-item .info .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Header Buttons */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 1rem;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 9px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
}

.user-avatar:hover {
  box-shadow: 0 0 12px var(--accent-glow);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 200px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 100;
}

.user-menu.active .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: var(--transition);
}

.user-dropdown a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.user-dropdown .divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text-primary);
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  right: -100%;
  left: auto;
  width: 280px;
  height: calc(100vh - 70px);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: 999;
  padding: 20px;
  overflow-y: auto;
  transition: var(--transition-slow);
}

.mobile-nav.active {
  right: 0;
}

body.ltr-mode .mobile-nav {
  right: auto;
  left: -100%;
  border-left: none;
  border-right: 1px solid var(--border);
}

body.ltr-mode .mobile-nav.active {
  left: 0;
}

/* Announcement Bar */
.announcement-bar {
  background: linear-gradient(135deg, var(--accent), #b84dff);
  color: white;
  text-align: center;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  position: relative;
  z-index: 1001;
}

.announcement-bar .close-bar {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.8;
}

body.ltr-mode .announcement-bar .close-bar {
  left: auto;
  right: 16px;
}

/* ============================================
   HERO SLIDER
   ============================================ */
.hero-slider {
  position: relative;
  height: 520px;
  overflow: hidden;
  margin-top: 70px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4);
  transform: scale(1.05);
  transition: transform 8s ease;
}

.hero-slide.active .hero-slide-bg {
  transform: scale(1);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(15, 17, 21, 0.3) 0%,
    rgba(15, 17, 21, 0.65) 40%,
    rgba(15, 17, 21, 0.92) 75%,
    rgba(15, 17, 21, 0.97) 100%
  );
}

body.ltr-mode .hero-slide-overlay {
  background: linear-gradient(
    to right,
    rgba(15, 17, 21, 0.05) 0%,
    rgba(15, 17, 21, 0.6) 50%,
    rgba(15, 17, 21, 0.95) 100%
  );
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 60px;
}

.hero-info {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
  color: white;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hero-meta span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-rating {
  color: #fbbf24 !important;
  font-weight: 700;
}

.hero-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Slider Controls */
.slider-controls {
  position: absolute;
  bottom: 24px;
  right: 50%;
  transform: translateX(50%);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  padding: 0;
}

.slider-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
  box-shadow: 0 0 10px var(--accent-glow);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,17,21,0.7);
  border: 1px solid var(--border);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.1rem;
  z-index: 10;
}

.slider-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.slider-arrow.prev { right: 24px; }
.slider-arrow.next { left: 24px; }

body.ltr-mode .slider-arrow.prev { right: auto; left: 24px; }
body.ltr-mode .slider-arrow.next { left: auto; right: 24px; }

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--accent), var(--accent-hover));
  border-radius: 2px;
  box-shadow: 0 0 10px var(--accent-glow);
}

.section-title .icon {
  color: var(--accent);
  font-size: 1.1rem;
}

.section-view-all {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.section-view-all:hover {
  color: var(--accent-hover);
  gap: 10px;
}

/* ============================================
   SERIES CARD
   ============================================ */
.series-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.series-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(124,77,255,0.15);
}

.series-card-thumb {
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
}

.series-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.series-card:hover .series-card-thumb img {
  transform: scale(1.07);
}

.series-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  z-index: 2;
}

.series-card-badge.new { background: var(--success); }
.series-card-badge.hot { background: var(--danger); }
.series-card-badge.completed { background: var(--info); }

body.ltr-mode .series-card-badge { right: auto; left: 8px; }

.series-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,17,21,0.95) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.series-card:hover .series-card-overlay {
  opacity: 1;
}

.series-card-overlay .btn-read {
  width: 100%;
  text-align: center;
  padding: 10px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  display: block;
  transition: var(--transition);
}

.series-card-overlay .btn-read:hover {
  background: var(--accent-hover);
}

.series-card-info {
  padding: 12px;
}

.series-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.series-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.series-card-chapter {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.series-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: #fbbf24;
  font-weight: 600;
  flex-shrink: 0;
}

/* ============================================
   SERIES GRID LAYOUTS
   ============================================ */
.series-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.series-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.series-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.series-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ============================================
   TRENDING / POPULAR TABS
   ============================================ */
.tab-nav {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 4px;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 10px var(--accent-glow);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================
   TRENDING LIST ITEM (rank style)
   ============================================ */
.trending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trending-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
}

.trending-item:hover {
  border-color: var(--border-accent);
  background: var(--bg-hover);
  transform: translateX(-2px);
}

body.ltr-mode .trending-item:hover {
  transform: translateX(2px);
}

.trending-rank {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-muted);
  min-width: 32px;
  text-align: center;
  line-height: 1;
}

.trending-rank.rank-1 { color: #fbbf24; }
.trending-rank.rank-2 { color: #b8bcc8; }
.trending-rank.rank-3 { color: #cd7c34; }

.trending-thumb {
  width: 48px;
  height: 68px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.trending-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending-info {
  flex: 1;
  min-width: 0;
}

.trending-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.trending-meta span {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.trending-views {
  color: var(--accent) !important;
  font-weight: 600;
}

/* ============================================
   LATEST UPDATES
   ============================================ */
.update-item {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 12px;
  transition: var(--transition);
  text-decoration: none;
  align-items: flex-start;
}

.update-item:hover {
  border-color: var(--border-accent);
  background: var(--bg-hover);
}

.update-thumb {
  width: 56px;
  height: 78px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.update-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-info {
  flex: 1;
  min-width: 0;
}

.update-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.update-chapters {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.update-chapter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.update-chapter a {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.update-chapter a:hover {
  color: var(--accent-hover);
}

.update-chapter .time {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ============================================
   GENRE TAGS
   ============================================ */
.genres-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.genre-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.genre-tag:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 15px var(--accent-glow);
  transform: translateY(-2px);
}

.genre-tag .count {
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-xl);
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.genre-tag:hover .count {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* ============================================
   MAIN CONTENT LAYOUT
   ============================================ */
.main-layout {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

.content-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  align-items: start;
}

body.ltr-mode .content-sidebar {
  grid-template-columns: 1fr 320px;
}

.page-section {
  padding: 40px 0;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 90px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.sidebar-widget-title {
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-widget-title .icon {
  color: var(--accent);
}

.sidebar-widget-body {
  padding: 16px 20px;
}

/* ============================================
   SERIES DETAIL PAGE
   ============================================ */
.series-detail {
  padding-top: 30px;
}

.series-header {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 1px solid var(--border);
}

.series-cover {
  flex-shrink: 0;
  width: 220px;
}

.series-cover img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.series-cover .cover-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.series-info {
  flex: 1;
  min-width: 0;
}

.series-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124,77,255,0.15);
  color: var(--accent);
  border: 1px solid rgba(124,77,255,0.3);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.series-title-main {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 8px;
}

.series-alt-title {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Star Rating */
.star-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.stars {
  display: flex;
  gap: 4px;
}

.star {
  font-size: 1.1rem;
  color: #fbbf24;
  cursor: pointer;
  transition: var(--transition);
}

.star.empty { color: var(--bg-hover); }

.star-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.series-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.meta-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.meta-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-item .value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.meta-item .value a {
  color: var(--accent);
  text-decoration: none;
}

.series-genres-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.small-tag {
  padding: 5px 12px;
  border-radius: var(--radius-xl);
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(124,77,255,0.1);
  color: var(--accent);
  border: 1px solid rgba(124,77,255,0.25);
  text-decoration: none;
  transition: var(--transition);
}

.small-tag:hover {
  background: var(--accent);
  color: white;
}

.series-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-bookmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-bookmark:hover,
.btn-bookmark.bookmarked {
  border-color: #fbbf24;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

/* Series Description */
.series-description {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.series-description h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.series-description .text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.description-toggle {
  color: var(--accent);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 10px;
  display: inline-block;
}

/* ============================================
   CHAPTER LIST
   ============================================ */
.chapter-list-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.chapter-list-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chapter-list-title {
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chapter-list-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chapter-search {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
  width: 150px;
}

.chapter-search:focus {
  border-color: var(--accent);
}

.chapters-list {
  max-height: 500px;
  overflow-y: auto;
}

.chapter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}

.chapter-item:last-child { border-bottom: none; }

.chapter-item:hover {
  background: var(--bg-hover);
}

.chapter-item.read {
  opacity: 0.6;
}

.chapter-item .chapter-num {
  font-size: 0.9rem;
  font-weight: 700;
}

.chapter-item .chapter-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1;
  padding: 0 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-item .chapter-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.chapter-item .chapter-new {
  background: var(--accent);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xl);
  margin-right: 10px;
  flex-shrink: 0;
}

/* ============================================
   MANGA READER
   ============================================ */
.reader-container {
  min-height: 100vh;
  background: var(--bg-primary);
}

.reader-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 56px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  gap: 16px;
}

.reader-title {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.reader-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.reader-chapter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.reader-pages {
  padding-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.reader-page {
  max-width: 900px;
  width: 100%;
  display: block;
}

.reader-page img {
  width: 100%;
  height: auto;
  display: block;
}

.reader-controls-bar {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  background: rgba(24, 27, 34, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 1000;
}

.reader-progress {
  flex: 1;
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
}

.reader-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Reader Settings Panel */
.reader-settings {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: none;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
  z-index: 999;
  box-shadow: var(--shadow-md);
}

.reader-settings.active {
  display: flex;
}

.setting-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.setting-slider {
  width: 120px;
  accent-color: var(--accent);
}

/* ============================================
   NOVEL READER
   ============================================ */
.novel-reader {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 30px 120px;
}

.novel-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border);
  line-height: 1.9;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.novel-content h1, .novel-content h2, .novel-content h3 {
  color: var(--text-primary);
  margin: 1.5em 0 0.8em;
}

.novel-content p {
  margin-bottom: 1.2em;
}

.novel-settings {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* ============================================
   SEARCH & FILTER PAGE
   ============================================ */
.filter-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 30px;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: var(--radius-xl);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ============================================
   USER PROFILE
   ============================================ */
.profile-header {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 30px;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  overflow: hidden;
  box-shadow: 0 0 20px var(--accent-glow);
}

.profile-info .name {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.profile-info .bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.profile-stats {
  display: flex;
  gap: 20px;
}

.profile-stat {
  text-align: center;
}

.profile-stat .num {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
}

.profile-stat .lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================
   RATING STARS (Interactive)
   ============================================ */
.rate-stars {
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
}

.rate-stars input { display: none; }

.rate-stars label {
  font-size: 1.8rem;
  color: var(--bg-hover);
  cursor: pointer;
  transition: var(--transition);
}

.rate-stars label:hover,
.rate-stars label:hover ~ label,
.rate-stars input:checked ~ label {
  color: #fbbf24;
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.comment-form textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.comment-form textarea:focus {
  border-color: var(--accent);
}

.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.comment-item:last-child { border-bottom: none; }

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}

.comment-author { font-weight: 700; font-size: 0.9rem; }
.comment-date { font-size: 0.78rem; color: var(--text-muted); }
.comment-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }

/* ============================================
   ADS PLACEHOLDERS
   ============================================ */
.ad-container {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  overflow: hidden;
}

.ad-banner { height: 90px; width: 100%; }
.ad-rectangle { height: 250px; width: 300px; }
.ad-sidebar { height: 250px; width: 100%; }

/* ============================================
   FOOTER
   ============================================ */
#ss-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 1rem;
}

.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 10px var(--accent-glow);
}

.footer-widget h4 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-widget ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-widget ul li a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-widget ul li a:hover {
  color: var(--accent);
  padding-right: 5px;
}

body.ltr-mode .footer-widget ul li a:hover {
  padding-right: 0;
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   MOBILE BOTTOM NAV
   ============================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  background: rgba(24, 27, 34, 0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 900;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
}

.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  background: none;
  border: none;
}

.bottom-nav-item .icon {
  font-size: 1.3rem;
  transition: var(--transition);
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--accent);
}

.bottom-nav-item.active .icon {
  text-shadow: 0 0 12px var(--accent-glow);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumbs a:hover { color: var(--accent); }

.breadcrumbs .separator {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 30px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ============================================
   LOADING & SKELETONS
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   NOTICES & ALERTS
   ============================================ */
.notice {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.notice-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: var(--success); }
.notice-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); }
.notice-info { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: var(--info); }

/* ============================================
   MODAL / POPUP
   ============================================ */
.ss-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.ss-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ss-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 440px;
  width: 100%;
  transform: scale(0.95);
  transition: var(--transition);
}

.ss-modal-overlay.active .ss-modal {
  transform: scale(1);
}

.ss-modal h2 {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 24px;
  text-align: center;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ============================================
   CONTINUE READING BAR
   ============================================ */
.continue-reading-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  transition: var(--transition);
  text-decoration: none;
}

.continue-reading-bar:hover {
  background: var(--bg-hover);
  box-shadow: 0 0 20px rgba(124,77,255,0.1);
}

.continue-reading-bar .thumb {
  width: 48px;
  height: 68px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.continue-reading-bar .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.continue-reading-bar .info { flex: 1; }
.continue-reading-bar .title { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.continue-reading-bar .chapter { font-size: 0.82rem; color: var(--accent); }
.continue-reading-bar .progress { height: 3px; background: var(--bg-secondary); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.continue-reading-bar .progress-fill { height: 100%; background: var(--accent); border-radius: 2px; box-shadow: 0 0 6px var(--accent-glow); }

/* ============================================
   STATISTICS WIDGET
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.stat-card .num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================
   SHARE BUTTONS
   ============================================ */
.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  color: white;
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.facebook { background: #1877f2; }
.share-btn.telegram { background: #0088cc; }
.share-btn.copy { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); }

.share-btn:hover { opacity: 0.85; transform: translateY(-1px); color: white; }
.share-btn.copy:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   NOTIFICATION BADGE
   ============================================ */
.notif-badge {
  position: relative;
}

.notif-badge .badge {
  position: absolute;
  top: -4px;
  left: -4px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}

body.ltr-mode .notif-badge .badge {
  left: auto;
  right: -4px;
}

/* ============================================
   LIGHT NOVEL CARD (Special)
   ============================================ */
.novel-card {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: var(--transition);
  text-decoration: none;
}

.novel-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.novel-card .cover {
  width: 70px;
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.novel-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.novel-card .info { flex: 1; }
.novel-card .info .title { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.novel-card .info .author { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.novel-card .info .desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================
   DARK/LIGHT TOGGLE
   ============================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 6px 12px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   RESPONSIVE — TABLETS
   ============================================ */
@media (max-width: 1200px) {
  .series-grid-6 { grid-template-columns: repeat(5, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
  .content-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .series-grid-6 { grid-template-columns: repeat(4, 1fr); }
  .series-grid-5 { grid-template-columns: repeat(4, 1fr); }
  .series-meta-grid { grid-template-columns: repeat(2, 1fr); }
  .series-header { flex-direction: column; }
  .series-cover { width: 160px; align-self: center; }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .mobile-nav { display: block; }
  .header-search input { width: 160px; }
  .header-search input:focus { width: 180px; }

  .hero-slider { height: 380px; }
  .hero-content { padding: 0 24px; }
  .hero-title { font-size: 1.6rem; }
  .hero-description { display: none; }
  .hero-actions { gap: 8px; }

  .series-grid-6,
  .series-grid-5,
  .series-grid-4 { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .series-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .updates-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .bottom-nav { display: block; }
  #ss-footer { padding-bottom: 80px; }

  .novel-reader { padding: 70px 16px 100px; }
  .novel-content { padding: 24px 20px; }

  .reader-header { padding: 0 12px; gap: 8px; }
  .reader-settings { padding: 12px 16px; gap: 16px; }
  .reader-pages { padding-top: 56px; }

  .ss-container { padding: 0 14px; }

  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
  .series-grid-6,
  .series-grid-5,
  .series-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .updates-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 10px; }
  .hero-title { font-size: 1.4rem; }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-stats { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-search { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .series-detail .series-header { padding: 20px; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 10px var(--accent-glow); }
  50% { box-shadow: 0 0 25px var(--accent-glow-strong); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.glow-pulse {
  animation: glowPulse 2s infinite;
}

.loading-spin {
  animation: spin 0.8s linear infinite;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.fw-bold { font-weight: 700; }
.fw-black { font-weight: 900; }
.d-none { display: none !important; }
.d-flex { display: flex; }
.gap-10 { gap: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.w-full { width: 100%; }

/* ============================================
