/*
 * DIODEX THEME - Complete Design System
 * WuxiaWorld-inspired dark theme
 * Version 2.0
 */

/* ========================================
   CSS VARIABLES & DESIGN TOKENS
   ======================================== */
:root {
  /* Colors - Dark Theme (Default) */
  --color-bg-primary: #0d0d0f;
  --color-bg-secondary: #141416;
  --color-bg-tertiary: #1a1a1e;
  --color-bg-card: #1e1e22;
  --color-bg-hover: #252529;
  --color-bg-input: #1a1a1e;
  --color-surface: #1a1a1e; /* Added for mobile responsiveness */
  --color-surface-alt: #252529; /* Added for mobile responsiveness */

  --color-border: #2a2a2e;
  --color-border-light: #333338;

  --color-text-primary: #ffffff;
  --color-text-secondary: #a0a0a8;
  --color-text-muted: #6b6b73;
  --color-text-disabled: #4a4a52;
  --color-text-tertiary: #3a3a40; /* Added for notifications */

  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-accent-light: rgba(59, 130, 246, 0.1);
  --color-accent-rgb: 59, 130, 246;

  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #06b6d4;

  /* Status Colors */
  --color-ongoing: #3b82f6;
  --color-completed: #22c55e;
  --color-hiatus: #f59e0b;

  /* Typography */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-reading: "Merriweather", "Georgia", serif;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  --line-height-reading: 1.9;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-base: 0.2s ease; /* Added for hover effects */

  /* Layout */
  --container-max: 1280px;
  --header-height: 60px;
  --sidebar-width: 280px;

  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* Dark Theme */
/* CHANGE: Added complete dark theme CSS variables (was missing, only light and sepia were defined) */
[data-theme="dark"] {
  --color-bg-primary: #0f0f0f;
  --color-bg-secondary: #1a1a1a;
  --color-bg-tertiary: #252525;
  --color-bg-card: #1a1a1a;
  --color-bg-hover: #2a2a2a;
  --color-bg-input: #252525;
  --color-surface: #1a1a1a;
  --color-surface-alt: #252525;

  --color-border: #333333;
  --color-border-light: #404040;

  --color-text-primary: #e8e8e8;
  --color-text-secondary: #a8a8a8;
  --color-text-muted: #808080;
  --color-text-disabled: #555555;
  --color-text-tertiary: #707070;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* Light Theme */
[data-theme="light"] {
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8f9fa;
  --color-bg-tertiary: #f1f3f4;
  --color-bg-card: #ffffff;
  --color-bg-hover: #e8eaed;
  --color-bg-input: #f1f3f4;
  --color-surface: #ffffff;
  --color-surface-alt: #e8eaed;

  --color-border: #dadce0;
  --color-border-light: #e8eaed;

  --color-text-primary: #202124;
  --color-text-secondary: #5f6368;
  --color-text-muted: #80868b;
  --color-text-disabled: #bdc1c6;
  --color-text-tertiary: #adb5bd;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Sepia Theme */
[data-theme="sepia"] {
  --color-bg-primary: #f4ecd8;
  --color-bg-secondary: #ebe3cf;
  --color-bg-tertiary: #e2d9c5;
  --color-bg-card: #f4ecd8;
  --color-bg-hover: #d9cfbb;
  --color-bg-input: #e2d9c5;
  --color-surface: #f4ecd8;
  --color-surface-alt: #d9cfbb;

  --color-border: #d9c9a3;
  --color-border-light: #c9b993;

  --color-text-primary: #5b4636;
  --color-text-secondary: #7a6652;
  --color-text-muted: #998872;
  --color-text-tertiary: #8a7862;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
}

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

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

ul,
ol {
  list-style: none;
}

/* ========================================
   LAYOUT & CONTAINERS
   ======================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.main-content {
  min-height: calc(100vh - var(--header-height) - 300px);
  padding: var(--spacing-xl) 0;
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--spacing-lg);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.site-logo svg {
  width: 28px;
  height: 28px;
  fill: var(--color-accent);
}

/* Main Navigation */
.main-nav {
  display: none;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
  }
}

.main-nav a {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  padding: var(--spacing-sm) 0;
  position: relative;
}

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

.main-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.nav-dropdown-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  padding: var(--spacing-sm) 0;
  margin-top: var(--spacing-sm);
}

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

.nav-dropdown-menu a {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
}

.nav-dropdown-menu a:hover {
  background: var(--color-bg-hover);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* Search Box */
.search-box {
  position: relative;
  display: none;
}

@media (min-width: 640px) {
  .search-box {
    display: block;
  }
}

.search-box input {
  width: 200px;
  padding: var(--spacing-sm) var(--spacing-md);
  padding-left: 36px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-accent);
  width: 260px;
}

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

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

/* Header Icons */
.header-icons {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.header-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

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

.header-icon svg {
  width: 20px;
  height: 20px;
}

.header-icon .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
}

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

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

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

.user-dropdown-header img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.user-dropdown-header .name {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.user-dropdown-header .email {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

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

.user-dropdown a svg {
  width: 16px;
  height: 16px;
}

.user-dropdown .logout {
  color: var(--color-error);
  border-top: 1px solid var(--color-border);
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-md);
}

.user-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  border-top: 1px solid var(--color-border);
  margin-top: var(--spacing-sm);
}

.mode-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.theme-toggle-switch {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--color-bg-tertiary);
  border-radius: 12px;
  transition: background 0.2s;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

[data-theme="dark"] .toggle-thumb {
  transform: translateX(20px);
}

[data-theme="dark"] .toggle-track {
  background: var(--color-accent);
}

.theme-toggle-switch .moon-icon {
  color: var(--color-accent);
  width: 16px;
  height: 16px;
}

.menu-badge {
  background: var(--color-accent);
  color: white;
  font-size: 0.6875rem;
  padding: 0.125rem 0.375rem;
  border-radius: 10px;
  margin-left: auto;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none; /* Hidden by default on desktop */
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.mobile-menu-toggle.active svg line {
  transition: all var(--transition-fast);
}

.mobile-menu-toggle.active svg line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active svg line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active svg line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex; /* Show only on mobile */
  }

  .main-nav,
  .header-icons .btn {
    display: none; /* Hide desktop nav on mobile */
  }
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile Menu - Complete Styles */
.mobile-menu {
  position: fixed;
  top: var(--header-height, 64px);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg-primary);
  z-index: var(--z-modal, 1000);
  padding: 0;
  transform: translateX(-100%);
  transition: transform var(--transition-normal, 0.3s ease);
  overflow-y: auto;
  visibility: hidden;
}

.mobile-menu.active {
  transform: translateX(0);
  visibility: visible;
}

/* Added body scroll lock */
body.mobile-menu-open {
  overflow: hidden;
}

/* Mobile Menu Header with Search */
.mobile-menu-header {
  padding: var(--spacing-md, 16px);
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
  background: var(--color-bg-secondary, #1a1a1f);
}

.mobile-menu-header .search-box {
  display: flex;
  align-items: center;
  background: var(--color-bg-tertiary, #252530);
  border-radius: var(--radius-lg, 12px);
  padding: var(--spacing-sm, 8px) var(--spacing-md, 16px);
  gap: var(--spacing-sm, 8px);
}

.mobile-menu-header .search-box svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted, #666);
  flex-shrink: 0;
}

.mobile-menu-header .search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--color-text-primary, #fff);
  font-size: var(--font-size-base, 16px);
  outline: none;
}

.mobile-menu-header .search-box input::placeholder {
  color: var(--color-text-muted, #666);
}

/* Mobile Navigation Links */
.mobile-nav {
  padding: var(--spacing-sm, 8px) 0;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: var(--spacing-md, 16px);
  padding: var(--spacing-md, 16px) var(--spacing-lg, 24px);
  font-size: var(--font-size-base, 16px);
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-text-primary, #fff);
  text-decoration: none;
  transition: all var(--transition-fast, 0.15s ease);
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.05));
}

.mobile-nav a:hover,
.mobile-nav a:active {
  background: var(--color-bg-secondary, #1a1a1f);
  color: var(--color-accent, #6366f1);
}

.mobile-nav a svg {
  width: 22px;
  height: 22px;
  color: var(--color-text-muted, #888);
  flex-shrink: 0;
}

.mobile-nav a:hover svg,
.mobile-nav a:active svg {
  color: var(--color-accent, #6366f1);
}

/* Mobile Auth Buttons */
.mobile-auth {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm, 12px);
  padding: var(--spacing-lg, 24px);
  margin-top: var(--spacing-md, 16px);
  border-top: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
}

.mobile-auth .btn {
  width: 100%;
  justify-content: center;
  padding: var(--spacing-md, 14px);
  font-size: var(--font-size-base, 16px);
}

.mobile-auth .btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* Announcement Bar */
.announcement-bar {
  background: var(--color-bg-tertiary);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.announcement-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.announcement-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex: 1;
  min-width: 0;
}

.announcement-content .icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-accent);
}

.announcement-content p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcement-content a {
  color: var(--color-accent);
}

.announcement-close {
  flex-shrink: 0;
  color: var(--color-text-muted);
  padding: var(--spacing-xs);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: white;
}

.btn-secondary {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-light);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

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

.btn-sm {
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-base);
}

.btn-block {
  width: 100%;
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ========================================
   CARDS
   ======================================== */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-body {
  padding: var(--spacing-lg);
}

/* Novel Card - Grid Style */
.novel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.novel-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.novel-card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.novel-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.novel-card:hover .novel-card-cover img {
  transform: scale(1.05);
}

.novel-card-status {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  padding: 2px 8px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
  text-transform: capitalize;
}

.novel-card-status.ongoing {
  background: var(--color-ongoing);
  color: white;
}

.novel-card-status.completed {
  background: var(--color-completed);
  color: white;
}

.novel-card-status.hiatus {
  background: var(--color-hiatus);
  color: white;
}

.novel-card-rating {
  position: absolute;
  bottom: var(--spacing-sm);
  left: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  color: white;
}

.novel-card-rating svg {
  width: 12px;
  height: 12px;
  color: var(--color-warning);
}

.novel-card-bookmark {
  position: absolute;
  bottom: var(--spacing-sm);
  right: var(--spacing-sm);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-full);
  color: white;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.novel-card:hover .novel-card-bookmark {
  opacity: 1;
}

.novel-card-bookmark svg {
  width: 14px;
  height: 14px;
}

.novel-card-bookmark.active {
  color: var(--color-accent);
}

.novel-card-body {
  padding: var(--spacing-sm);
}

.novel-card-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--spacing-xs);
}

.novel-card-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Novel Card - Horizontal/List Style */
.novel-card-horizontal {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.novel-card-horizontal:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-light);
}

.novel-card-horizontal .cover {
  flex-shrink: 0;
  width: 100px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

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

.novel-card-horizontal .content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.novel-card-horizontal .title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.novel-card-horizontal .title:hover {
  color: var(--color-accent);
}

.novel-card-horizontal .rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
}

.novel-card-horizontal .rating svg {
  width: 14px;
  height: 14px;
  color: var(--color-warning);
}

.novel-card-horizontal .description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

.novel-card-horizontal .tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-top: auto;
}

/* ========================================
   TAGS & BADGES
   ======================================== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  /* Added cursor pointer and text-decoration for clickable tags */
  cursor: pointer;
  text-decoration: none;
}

.tag:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
  border-color: var(--color-border-light);
}

.tag.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
}

.badge-primary {
  background: var(--color-accent);
  color: white;
}

.badge-success {
  background: var(--color-success);
  color: white;
}

.badge-warning {
  background: var(--color-warning);
  color: white;
}

.badge-vip {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: var(--spacing-2xl) 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
}

.section-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.section-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--spacing-xs);
}

.section-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.section-link:hover {
  color: var(--color-accent);
}

.section-link svg {
  width: 16px;
  height: 16px;
}

/* ========================================
   HERO SLIDER
   ======================================== */
.hero-section {
  padding: var(--spacing-xl) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* Thinner design with pagination at bottom */
.hero-slider-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 21 / 9;
}

@media (min-width: 768px) {
  .hero-slider {
    aspect-ratio: 21 / 8;
  }
}

@media (min-width: 1024px) {
  .hero-slider {
    aspect-ratio: 21 / 7;
  }
}

/* Mobile card-style slider - moved AFTER base styles with higher specificity */
@media (max-width: 767px) {
  .hero-slider-container {
    border-radius: 0;
  }

  .hero-slider {
    aspect-ratio: unset !important;
    display: flex !important;
    gap: var(--spacing-sm);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: var(--spacing-xs);
    border-radius: 0;
  }

  .hero-slider::-webkit-scrollbar {
    display: none;
  }

  .hero-slide {
    position: relative !important;
    inset: unset !important;
    flex: 0 0 calc(50% - var(--spacing-xs));
    min-width: calc(50% - var(--spacing-xs));
    opacity: 1 !important;
    scroll-snap-align: start;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--color-bg-secondary);
  }

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

  .hero-slide-bg {
    position: relative !important;
    inset: unset !important;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto !important;
  }

  .hero-slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hero-slide-bg::after {
    display: none !important;
  }

  .hero-slide-content {
    position: relative !important;
    bottom: unset !important;
    left: unset !important;
    max-width: 100% !important;
    padding: var(--spacing-sm) !important;
    background: var(--color-bg-secondary);
    flex: 1;
  }

  .hero-slide-title {
    font-size: var(--font-size-sm) !important;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-xs);
    -webkit-line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-slide-rating {
    font-size: 11px;
    margin-bottom: 2px;
  }

  .hero-slide-rating svg {
    width: 12px;
    height: 12px;
  }

  .hero-slide .status-badge {
    font-size: 10px;
    padding: 2px 6px;
    margin-bottom: var(--spacing-xs);
  }

  .hero-slide-desc {
    display: -webkit-box;
    font-size: 11px;
    color: var(--color-text-muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
  }

  /* Hide arrows on mobile, show dots below */
  .hero-slider-container .hero-slider-arrow {
    display: none !important;
  }

  .hero-slider-container .hero-slider-dots {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    justify-content: center;
    margin-top: var(--spacing-md);
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

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

.hero-slide-bg {
  position: absolute;
  inset: 0;
}

.hero-slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gradient overlay from left */
.hero-slide-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.5) 40%,
    rgba(0, 0, 0, 0.2) 70%,
    transparent 100%
  );
}

.hero-slide-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--spacing-lg) var(--spacing-xl);
  max-width: 55%;
  text-decoration: none;
}

.hero-slide-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
}

.hero-slide-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: white;
  margin-bottom: var(--spacing-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-slide-title {
    font-size: var(--font-size-2xl);
  }
}

.hero-slide-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-sm);
  color: var(--color-success);
  margin-bottom: var(--spacing-xs);
}

.hero-slide-rating svg {
  color: var(--color-success);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  text-transform: capitalize;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  margin-bottom: var(--spacing-sm);
  width: fit-content;
}

.status-badge.ongoing {
  background: rgba(234, 88, 12, 0.9);
}

.status-badge.completed {
  background: rgba(34, 197, 94, 0.9);
}

.hero-slide-desc {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.75);
  line-height: var(--line-height-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

@media (max-width: 640px) {
  .hero-slide-content {
    max-width: 70%;
    padding: var(--spacing-md);
  }

  .hero-slide-title {
    font-size: var(--font-size-lg);
  }

  .hero-slide-desc {
    display: none;
  }
}

/* Slider arrows on sides */
.hero-slider-container .hero-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.hero-slider-container .hero-slider-arrow:hover {
  background: rgba(0, 0, 0, 0.6);
}

.hero-slider-container .hero-slider-arrow.prev {
  left: var(--spacing-sm);
}

.hero-slider-container .hero-slider-arrow.next {
  right: var(--spacing-sm);
}

.hero-slider-container .hero-slider-arrow svg {
  width: 18px;
  height: 18px;
}

/* Dots at bottom center */
.hero-slider-container .hero-slider-dots {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  z-index: 10;
}

.hero-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hero-slider-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.hero-slider-dot.active {
  width: 24px;
  background: white;
}

/* Announcements Sidebar */
.announcements-sidebar {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  display: none;
}

@media (min-width: 1024px) {
  .announcements-sidebar {
    display: block;
  }
}

.announcements-sidebar .section-header {
  margin-bottom: var(--spacing-md);
}

.announcement-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.announcement-item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

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

.announcement-item .icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
}

.announcement-item .icon img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.announcement-item .content {
  flex: 1;
  min-width: 0;
}

.announcement-item .title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.announcement-item .date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ========================================
   POPULAR SECTION (Popular This Week + Trending)
   ======================================== */
/* Updated popular section with 2-column grid layout (1fr 430px) */
.popular-section {
  padding: var(--spacing-xl) 0;
}

.popular-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

@media (min-width: 1024px) {
  .popular-grid {
    grid-template-columns: 1fr 430px;
    gap: var(--spacing-2xl);
  }
}

.popular-main {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.popular-block {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* Novel Slider Wrapper with pagination */
.novel-slider-wrapper {
  position: relative;
  overflow: hidden;
}

.novel-slider {
  display: flex;
  gap: var(--spacing-md);
  transition: transform 0.3s ease-out;
}

/* Novel cards without background - clean style like BYR section */
.pop-novel-card {
  flex-shrink: 0;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.pop-novel-card:hover {
  transform: translateY(-4px);
}

.pop-novel-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-tertiary);
  margin-bottom: var(--spacing-sm);
}

.pop-novel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.pop-novel-card:hover .pop-novel-cover img {
  transform: scale(1.05);
}

.pop-novel-cover .placeholder-cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-secondary));
}

/* Rank badge - large number overlay */
.pop-rank-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  font-size: 4rem;
  font-weight: var(--font-weight-bold);
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
  font-style: italic;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* Status badge */
.pop-status-badge {
  position: absolute;
  top: var(--spacing-xs);
  left: var(--spacing-xs);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  text-transform: capitalize;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  backdrop-filter: blur(4px);
}

.pop-status-badge.ongoing {
  background: rgba(234, 88, 12, 0.9);
}

.pop-status-badge.completed {
  background: rgba(34, 197, 94, 0.9);
}

.pop-status-badge.hiatus {
  background: rgba(161, 161, 170, 0.9);
}

/* Cover icon (bottom-right) */
.pop-cover-icon {
  position: absolute;
  bottom: var(--spacing-xs);
  right: var(--spacing-xs);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.pop-cover-icon svg {
  color: #fff;
  opacity: 0.9;
}

/* Novel info */
.pop-novel-info {
  padding: 0;
}

.pop-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.pop-rating svg {
  color: var(--color-success);
}

.pop-novel-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* Slider Controls */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.slider-arrow {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-arrow:hover:not(:disabled) {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.slider-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.slider-arrow svg {
  width: 16px;
  height: 16px;
}

.slider-dots {
  display: flex;
  gap: var(--spacing-xs);
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-dot:hover {
  background: var(--color-text-muted);
}

.slider-dot.active {
  background: var(--color-text-secondary);
  width: 20px;
}

/* Trending Sidebar - Redesigned with rank badges */
.trending-sidebar {
  height: fit-content;
  position: sticky;
  top: calc(var(--header-height) + var(--spacing-lg));
}

/* Show trending sidebar on mobile as horizontal scroll */
@media (max-width: 1023px) {
  .trending-sidebar {
    display: block;
    position: relative;
    top: auto;
    margin-top: var(--spacing-xl);
  }

  .trending-list {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: var(--spacing-sm);
    -webkit-overflow-scrolling: touch;
  }

  .trending-list::-webkit-scrollbar {
    display: none;
  }

  .trending-item {
    flex: 0 0 280px;
    min-width: 280px;
    scroll-snap-align: start;
  }
}

/* ========================================
   POPULAR GENRES SECTION
   ======================================== */
.genres-section {
  padding: var(--spacing-xl) 0;
}

.genres-section .section-header {
  margin-bottom: var(--spacing-md);
}

.genres-section .section-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin: 0;
}

/* Genre Tabs */
.genre-tabs {
  display: flex;
  flex-wrap: nowrap; /* tek satırda kalması için */
  gap: var(--spacing-xs);
  overflow-x: auto;
  padding-bottom: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch; /* mobilde smooth scroll */
}

/* Genre Panels */
.genre-panel {
  display: none;
}

.genre-panel.active {
  display: block;
}

/* Genre Novels - Horizontal Scroll */
.genre-novels {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  padding-bottom: var(--spacing-sm);
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.genre-novels::-webkit-scrollbar {
  display: none;
}

/* Novel Card */
.genre-novel {
  flex-shrink: 0;
  width: 120px;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.genre-novel:hover {
  transform: translateY(-4px);
}

/* Novel Cover */
.genre-novel-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-tertiary);
  margin-bottom: var(--spacing-xs);
}

.genre-novel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.genre-novel:hover .genre-novel-cover img {
  transform: scale(1.05);
}

.genre-novel-cover .placeholder-cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-secondary));
}

/* Status Badge */
.genre-status {
  position: absolute;
  top: var(--spacing-xs);
  left: var(--spacing-xs);
  padding: 3px 6px;
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  text-transform: capitalize;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

.genre-status.ongoing {
  background: rgba(234, 88, 12, 0.9);
}

.genre-status.completed {
  background: rgba(34, 197, 94, 0.9);
}

.genre-status.hiatus {
  background: rgba(161, 161, 170, 0.9);
}

/* Novel Info */
.genre-novel-info {
  padding: 0;
}

.genre-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.genre-rating svg {
  color: var(--color-success);
}

.genre-novel-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* Responsive */
@media (min-width: 481px) {
  .genre-novel {
    width: 130px;
  }
}

@media (min-width: 768px) {
  .genre-novel {
    width: 140px;
  }

  .genres-section .section-title {
    font-size: var(--font-size-2xl);
  }
}

@media (min-width: 1024px) {
  .genres-section {
    padding: var(--spacing-2xl) 0;
  }

  .genre-novel {
    width: 150px;
  }
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.genre-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-lg);
}

.genre-tab {
  padding: 6px 14px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.genre-tab:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.genre-tab.active {
  background: var(--color-text-primary);
  border-color: var(--color-text-primary);
  color: var(--color-bg-primary);
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.trending-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) 0;
  transition: opacity var(--transition-fast);
  text-decoration: none;
}

.trending-item:hover {
  opacity: 0.8;
}

/* Rank badge with colors for top 3 */
.trending-rank {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-sm);
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
}

.trending-rank.top-1 {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000;
}

.trending-rank.top-2 {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #000;
}

.trending-rank.top-3 {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #fff;
}

.trending-cover {
  flex-shrink: 0;
  width: 50px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

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

.trending-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trending-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.trending-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.trending-chapters {
  color: var(--color-accent);
}

.trending-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.trending-rating svg {
  color: var(--color-success);
}

/* ========================================
   NOVEL SCROLL SECTION
   ======================================== */
.novel-scroll-section {
  padding: var(--spacing-xl) 0;
}

.novel-scroll-wrapper {
  position: relative;
  overflow: hidden;
}

.novel-scroll {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: var(--spacing-sm) 0;
  margin: 0 calc(-1 * var(--spacing-md));
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

.novel-scroll::-webkit-scrollbar {
  display: none;
}

.novel-scroll .novel-card {
  flex-shrink: 0;
  width: 130px;
  scroll-snap-align: start;
}

@media (min-width: 480px) {
  .novel-scroll .novel-card {
    width: 140px;
  }
}

@media (min-width: 640px) {
  .novel-scroll .novel-card {
    width: 150px;
  }
}

@media (min-width: 768px) {
  .novel-scroll .novel-card {
    width: 160px;
  }
}

/* Novel Card in scroll */
.novel-card .novel-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

.novel-card .novel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.novel-card:hover .novel-cover img {
  transform: scale(1.05);
}

.novel-card .rank-badge {
  position: absolute;
  top: var(--spacing-xs);
  left: var(--spacing-xs);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: white;
}

.novel-card .status-badge {
  position: absolute;
  top: var(--spacing-xs);
  left: var(--spacing-xs);
  padding: 2px 6px;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
  text-transform: capitalize;
}

.novel-card .status-badge.ongoing {
  background: var(--color-ongoing);
  color: white;
}

.novel-card .status-badge.completed {
  background: var(--color-completed);
  color: white;
}

.novel-card .status-badge.hiatus {
  background: var(--color-warning);
  color: white;
}

.novel-card .novel-info {
  padding: var(--spacing-sm) 0;
}

.novel-card .novel-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xs);
}

.novel-card .novel-rating svg {
  color: var(--color-warning);
}

.novel-card .novel-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

/* Scroll Arrows */
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-70%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-primary);
  z-index: 10;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.scroll-arrow:hover {
  background: var(--color-bg-hover);
}

.scroll-arrow-left {
  left: 0;
}

.scroll-arrow-right {
  right: 0;
}

.scroll-arrow svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .scroll-arrow {
    display: none;
  }
}

/* ========================================
   TABS
   ======================================== */
.tabs {
  display: flex;
  gap: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--spacing-lg);
}

.tab {
  padding: var(--spacing-md) 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  position: relative;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.tab:hover {
  color: var(--color-text-primary);
}

.tab.active {
  color: var(--color-text-primary);
}

.tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
}

.tab-content {
  display: none;
}

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

/* ========================================
   FILTER BAR
   ======================================== */
.filter-bar {
  background: var(--color-bg-secondary);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-xl);
}

.filter-group {
  margin-bottom: var(--spacing-md);
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

/* Ensure filter option tags (links) are properly clickable */
.filter-options .tag,
.filter-options a.tag {
  cursor: pointer;
  text-decoration: none;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.filter-options .tag:active {
  transform: scale(0.98);
}

.filter-select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* ========================================
   NOVEL GRID
   ======================================== */
.novel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

@media (min-width: 640px) {
  .novel-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .novel-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .novel-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1280px) {
  .novel-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.novel-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

@media (min-width: 1024px) {
  .novel-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   UPDATES TABLE
   ======================================== */
/* Redesigned updates section with table format and dot pagination */
.updates-section {
  padding: var(--spacing-2xl) 0;
}

.updates-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.updates-table {
  flex-direction: column;
}

.updates-table.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Update row is now a container, not a link */
.update-row {
  display: grid;
  grid-template-columns: 36px 1fr 1fr auto;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: center;
}

.update-row:last-child {
  border-bottom: none;
}

@media (min-width: 768px) {
  .update-row {
    grid-template-columns: 36px 200px 1fr 140px 100px;
    gap: var(--spacing-md);
  }
}

@media (min-width: 1024px) {
  .update-row {
    grid-template-columns: 36px 240px 1fr 160px 100px;
  }
}

.update-cover {
  width: 36px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg-tertiary);
  flex-shrink: 0;
  display: block;
}

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

.update-cover .placeholder-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  color: var(--color-text-muted);
}

/* Novel and chapter are now separate clickable links */
.update-novel {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.update-chapter {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* Hide author on mobile, show on desktop */
.update-author {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
}

@media (min-width: 768px) {
  .update-author {
    display: block;
  }
}

.update-time {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  text-align: right;
}

/* Updates Pagination with dots */
.updates-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
}

.pagination-arrow {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-arrow:hover:not(:disabled) {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.pagination-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-arrow svg {
  width: 16px;
  height: 16px;
}

.pagination-dots {
  display: flex;
  gap: var(--spacing-xs);
}

.pagination-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-dot:hover {
  background: var(--color-text-muted);
}

.pagination-dot.active {
  background: var(--color-text-secondary);
}

/* Updates Footer */
.updates-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--spacing-sm);
}

.updates-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.updates-link:hover {
  color: var(--color-accent);
}

/* ========================================
   SINGLE NOVEL PAGE
   ======================================== */
.novel-hero {
  background: var(--color-bg-secondary);
  padding: var(--spacing-2xl) 0;
}

.novel-hero-inner {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

@media (min-width: 768px) {
  .novel-hero-inner {
    flex-direction: row;
  }
}

.novel-cover {
  flex-shrink: 0;
  width: 180px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .novel-cover {
    width: 200px;
    margin: 0;
  }
}

.novel-cover-image {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

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

.novel-info {
  flex: 1;
}

.novel-status-badge {
  margin-bottom: var(--spacing-sm);
}

.novel-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

@media (min-width: 768px) {
  .novel-title {
    font-size: var(--font-size-3xl);
  }
}

.novel-rating {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.novel-rating .score {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.novel-rating .score svg {
  width: 20px;
  height: 20px;
  color: var(--color-warning);
}

.novel-rating .reviews {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.novel-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
}

.novel-meta a {
  color: var(--color-accent);
}

.novel-synopsis {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-lg);
}

.novel-synopsis.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.novel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.btn-bookmark {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.btn-bookmark svg {
  transition: fill var(--transition-fast);
}

.btn-bookmark.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.btn-bookmark.active svg {
  fill: currentColor;
}

.btn-bookmark.loading {
  pointer-events: none;
  opacity: 0.7;
}

.novel-subscribe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
}

.novel-subscribe-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* Novel Content Tabs */
.novel-content {
  padding: var(--spacing-2xl) 0;
}

.novel-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

@media (min-width: 768px) {
  .novel-details {
    grid-template-columns: repeat(4, 1fr);
  }
}

.detail-item .label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.detail-item .value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.novel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

/* Chapter List */
.chapter-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.chapter-list-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.chapter-list-sort {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.chapter-list {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 500px;
  overflow-y: auto;
}

.chapter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

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

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

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

.chapter-item .chapter-title {
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
}

.chapter-item .chapter-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ========================================
   CHAPTER READER
   ======================================== */
.chapter-header {
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-md) 0;
}

.chapter-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chapter-back {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-text-secondary);
}

.chapter-back svg {
  width: 20px;
  height: 20px;
}

.chapter-back .novel-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.chapter-nav-arrows {
  display: flex;
  gap: var(--spacing-sm);
}

.chapter-nav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--primary-color);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.chapter-nav-btn:hover:not(:disabled) {
  background: var(--color-bg-hover);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.chapter-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chapter-nav-btn svg {
  width: 18px;
  height: 18px;
}

/* Reader Content */
.reader-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-2xl) var(--spacing-md);
}

.reader-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

.reader-content {
  font-family: var(--font-family-reading);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-reading);
  color: var(--color-text-primary);
}

.reader-content p {
  margin-bottom: var(--spacing-lg);
}

.reader-content .translator-note {
  background: var(--color-bg-secondary);
  border-left: 3px solid var(--color-accent);
  padding: var(--spacing-md) var(--spacing-lg);
  margin: var(--spacing-xl) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.reader-content .translator-note .note-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent);
  margin-bottom: var(--spacing-sm);
}

.reader-content .translator-note p {
  font-size: var(--font-size-sm);
  font-style: italic;
  margin-bottom: 0;
}

/* Reader Actions */
.reader-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  margin: var(--spacing-xl) 0;
  padding: var(--spacing-lg);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
}

.reader-action-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.reader-action-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.reader-action-btn.active {
  color: var(--color-accent);
}

.reader-action-btn svg {
  width: 18px;
  height: 18px;
}

/* Chapter Read Status */
.chapter-read-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  margin: var(--spacing-lg) 0;
}

.chapter-read-status .status {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.chapter-read-status .status svg {
  width: 18px;
  height: 18px;
  color: var(--color-success);
}

.chapter-read-status .undo {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.chapter-read-status .undo:hover {
  color: var(--color-text-primary);
}

/* Subscribe CTA */
.subscribe-cta {
  background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-secondary));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin: var(--spacing-xl) 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.subscribe-cta-content {
  flex: 1;
}

.subscribe-cta-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.subscribe-cta-title span {
  color: var(--color-accent);
}

.subscribe-cta-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* Chapter Navigation */
.chapter-navigation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  margin: var(--spacing-2xl) 0;
}

/* ========================================
   COMMENTS SECTION
   ======================================== */
.comments-section {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-2xl);
  border-top: 1px solid var(--color-border);
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
}

.comments-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.comments-sort {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.comments-sort select {
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

/* Comment Form */
.comment-form {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.comment-form textarea {
  width: 100%;
  min-height: 100px;
  padding: var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  resize: vertical;
  margin-bottom: var(--spacing-md);
}

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

.comment-form textarea::placeholder {
  color: var(--color-text-muted);
}

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-form-note {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.comment-form-note a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Comment List */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.comment {
  display: flex;
  gap: var(--spacing-md);
}

.comment-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
}

.comment-author {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.comment-badges {
  display: flex;
  gap: 4px;
}

.comment-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.comment-content {
  background: var(--color-bg-secondary);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
}

.comment-content p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.comment-action {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.comment-action:hover {
  color: var(--color-text-primary);
}

.comment-action.active {
  color: var(--color-accent);
}

.comment-action svg {
  width: 14px;
  height: 14px;
}

/* Comment Replies */
.comment-replies {
  margin-top: var(--spacing-md);
  margin-left: var(--spacing-xl);
  padding-left: var(--spacing-md);
  border-left: 2px solid var(--color-border);
}

.comment-replies .comment {
  margin-bottom: var(--spacing-md);
}

.view-replies-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  margin-top: var(--spacing-sm);
}

.view-replies-btn.expanded svg {
  transform: rotate(180deg);
}

/* Reply Form */
.reply-form {
  margin-top: var(--spacing-md);
  margin-left: var(--spacing-xl);
  padding-left: var(--spacing-md);
  border-left: 2px solid var(--color-accent);
}

.reply-form textarea {
  width: 100%;
  min-height: 80px;
  padding: var(--spacing-sm);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  resize: none;
}

.reply-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.reply-form-actions {
  display: flex;
  gap: var(--spacing-sm);
}

/* Comments Pagination */
.comments-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-xl);
  flex-wrap: wrap;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.pagination-btn,
.pagination-num {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.pagination-btn:hover:not(:disabled),
.pagination-num:hover:not(.active) {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.pagination-num.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn svg {
  width: 16px;
  height: 16px;
}

/* ========================================
   REVIEWS SECTION
   ======================================== */
.reviews-section {
  margin-top: var(--spacing-2xl);
}

.review-form-box {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.review-form-title {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}

.review-form-question {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-lg);
}

.review-rating-select {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.rating-btn {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  cursor: pointer;
}

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

.rating-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.rating-btn[data-rating="up"].active {
  background: var(--color-success);
  border-color: var(--color-success);
}

.rating-btn[data-rating="down"].active {
  background: var(--color-error);
  border-color: var(--color-error);
}

.review-form {
  text-align: left;
}

.review-form textarea {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  resize: vertical;
  min-height: 100px;
}

.review-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.review-form textarea::placeholder {
  color: var(--color-text-muted);
}

.review-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-md);
}

.word-count {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.login-prompt {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.login-prompt a {
  color: var(--color-accent);
}

/* Rating Summary */
.rating-summary {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.rating-big {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
}

.rating-big svg {
  color: var(--color-warning);
}

.rating-count {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Reviews List */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.review-item {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.review-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

.review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-meta {
  flex: 1;
}

.review-author {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.review-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-left: var(--spacing-sm);
}

.review-badge {
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
}

.review-badge.recommended {
  background: rgba(34, 197, 94, 0.2);
  color: var(--color-success);
}

.review-badge.not-recommended {
  background: rgba(239, 68, 68, 0.2);
  color: var(--color-error);
}

.review-content {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-md);
}

.review-actions {
  display: flex;
  gap: var(--spacing-md);
}

.review-actions .action-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  cursor: pointer;
}

.review-actions .action-btn:hover {
  color: var(--color-text-primary);
}

/* ========================================
   RELATED NOVELS
   ======================================== */
.related-novels {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-2xl);
  border-top: 1px solid var(--color-border);
}

/* ========================================
   NOTIFICATIONS DROPDOWN
   ======================================== */
.notification-trigger {
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* Add invisible padding between trigger and dropdown to maintain hover */
.notification-trigger::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 12px;
  background: transparent;
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  z-index: 9999;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.notifications-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 10;
  pointer-events: auto;
  flex-shrink: 0;
}

.notifications-header h3 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.notifications-header .mark-read {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.notifications-header .mark-read:hover {
  background: var(--color-bg-hover);
  text-decoration: underline;
}

.notifications-list {
  flex: 1;
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notifications-list .notification-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  color: inherit;
  position: relative;
}

.notifications-list .notification-item:hover {
  background: var(--color-bg-hover);
}

.notifications-list .notification-item:active {
  background: var(--color-bg-tertiary);
}

.notifications-list .notification-item:last-child {
  border-bottom: none;
}

.notifications-list .notification-item.unread {
  background: var(--color-bg-tertiary);
}

.notifications-list .notification-item.unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-accent);
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-text-secondary);
}

.notification-icon.new_chapter {
  background: rgba(var(--color-accent-rgb), 0.15);
  color: var(--color-accent);
}

.notification-icon.comment_like,
.notification-icon.review_like {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.notification-icon.comment_reply,
.notification-icon.review_reply {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-time {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  margin-top: 4px;
}

.notification-empty {
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--color-text-secondary);
}

.notification-loading {
  padding: var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fixed notifications footer - now properly clickable */
.notifications-footer {
  padding: var(--spacing-sm) var(--spacing-md);
  border-top: 1px solid var(--color-border);
  text-align: center;
  background: var(--color-bg-card);
  flex-shrink: 0;
}

.notifications-footer .view-all-link {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  text-decoration: none;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
}

.notifications-footer .view-all-link:hover {
  background: var(--color-bg-hover);
  text-decoration: underline;
}

.notifications-footer .view-all-link:active {
  background: var(--color-bg-tertiary);
  transform: scale(0.98);
}

/* Mobile responsive styles for notifications dropdown */
@media (max-width: 480px) {
  .notifications-dropdown {
    position: fixed;
    top: 60px;
    left: 8px;
    right: 8px;
    width: auto;
    max-height: calc(100vh - 80px);
    border-radius: var(--radius-lg);
  }

  .notifications-list {
    max-height: calc(100vh - 200px);
  }

  .notification-item {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .notification-icon {
    width: 32px;
    height: 32px;
  }

  .notification-text {
    font-size: var(--font-size-xs);
  }
}

@media (max-width: 768px) {
  .notifications-dropdown {
    width: 320px;
    right: -60px;
  }
}

/* ========================================
   BOOKMARKS
   ======================================== */
.bookmarks-section {
  padding: var(--spacing-2xl) 0;
}

.bookmarks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

@media (min-width: 640px) {
  .bookmarks-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .bookmarks-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .bookmarks-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.bookmark-card {
  position: relative;
}

.bookmark-card .novel-card-cover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.bookmark-card .progress {
  position: absolute;
  bottom: var(--spacing-sm);
  left: var(--spacing-sm);
  right: var(--spacing-sm);
}

.bookmark-card .progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 4px;
}

.bookmark-card .progress-bar-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

/* Continue reading link in bookmark cards */
.bookmark-card .progress-text {
  font-size: var(--font-size-xs);
  color: white;
}

.bookmark-card a.continue-reading-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  color: var(--color-accent);
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(var(--color-accent-rgb), 0.1);
}

.bookmark-card a.continue-reading-link:hover {
  color: #fff;
  background: var(--color-accent);
  transform: translateX(3px);
}

.bookmark-card a.continue-reading-link svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.bookmark-card a.continue-reading-link:hover svg {
  opacity: 1;
}

.bookmark-remove {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-full);
  color: white;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.bookmark-card:hover .bookmark-remove {
  opacity: 1;
}

.bookmark-remove:hover {
  background: var(--color-error);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-2xl) 0 var(--spacing-xl);
  margin-top: var(--spacing-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
}

.footer-logo svg {
  width: 28px;
  height: 28px;
  fill: var(--color-accent);
}

.footer-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-lg);
}

.footer-apps {
  display: flex;
  gap: var(--spacing-sm);
}

.app-badge {
  height: 40px;
}

.app-badge img {
  height: 100%;
  width: auto;
}

.footer-column h4 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-text-primary);
}

.footer-social {
  display: flex;
  gap: var(--spacing-sm);
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--color-accent);
  color: white;
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-copyright {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.footer-legal {
  display: flex;
  gap: var(--spacing-lg);
}

.footer-legal a {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.footer-legal a:hover {
  color: var(--color-text-primary);
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-xl);
  flex-wrap: wrap;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.pagination-btn,
.pagination-num {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.pagination-btn:hover:not(:disabled),
.pagination-num:hover:not(.active) {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.pagination-num.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn svg {
  width: 16px;
  height: 16px;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.form-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

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

/* ========================================
   UTILITIES
   ======================================== */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

.text-primary {
  color: var(--color-text-primary);
}
.text-secondary {
  color: var(--color-text-secondary);
}
.text-muted {
  color: var(--color-text-muted);
}
.text-accent {
  color: var(--color-accent);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}
.font-semibold {
  font-weight: var(--font-weight-semibold);
}
.font-bold {
  font-weight: var(--font-weight-bold);
}

.mt-0 {
  margin-top: 0;
}
.mt-sm {
  margin-top: var(--spacing-sm);
}
.mt-md {
  margin-top: var(--spacing-md);
}
.mt-lg {
  margin-top: var(--spacing-lg);
}
.mt-xl {
  margin-top: var(--spacing-xl);
}

.mb-0 {
  margin-bottom: 0;
}
.mb-sm {
  margin-bottom: var(--spacing-sm);
}
.mb-md {
  margin-bottom: var(--spacing-md);
}
.mb-lg {
  margin-bottom: var(--spacing-lg);
}
.mb-xl {
  margin-bottom: var(--spacing-xl);
}

.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-sm {
  gap: var(--spacing-sm);
}
.gap-md {
  gap: var(--spacing-md);
}
.gap-lg {
  gap: var(--spacing-lg);
}

.hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-light);
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-tertiary) 25%,
    var(--color-bg-hover) 50%,
    var(--color-bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

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

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  z-index: var(--z-toast);
  transform: translateX(120%);
  transition: transform var(--transition-normal);
  max-width: 300px;
}

.toast-notification.show {
  transform: translateX(0);
}

.toast-notification.toast-success {
  border-left: 4px solid var(--color-success);
}

.toast-notification.toast-error {
  border-left: 4px solid var(--color-error);
}

.toast-notification.toast-warning {
  border-left: 4px solid var(--color-warning);
}

.toast-notification.toast-info {
  border-left: 4px solid var(--color-info);
}

@media (max-width: 480px) {
  .toast-notification {
    left: var(--spacing-md);
    right: var(--spacing-md);
    bottom: var(--spacing-md);
    max-width: none;
  }
}

/* ========================================
   BOOKMARKS PAGE
   ======================================== */
/* Adding bookmark page styles */
.page-header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

@media (min-width: 768px) {
  .page-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.page-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.page-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.bookmarks-tabs {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  overflow-x: auto;
  padding-bottom: var(--spacing-sm);
}

.bookmark-tab {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.bookmark-tab:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.bookmark-tab.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.bookmarks-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--spacing-lg);
}

@media (min-width: 640px) {
  .bookmarks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .bookmarks-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bookmark-card {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.bookmark-card:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-light);
}

.bookmark-cover {
  flex-shrink: 0;
  width: 80px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

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

.reading-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
}

.reading-progress-bar .progress-fill {
  height: 100%;
  background: var(--color-accent);
  transition: width var(--transition-normal);
}

.bookmark-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.bookmark-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-xs);
}

.bookmark-title a {
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.bookmark-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
}

.bookmark-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bookmark-rating svg {
  color: var(--color-warning);
}

.bookmark-progress-text {
  font-size: var(--font-size-xs);
  color: var(--color-accent);
  margin-bottom: var(--spacing-sm);
}

.bookmark-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: auto;
}

.remove-bookmark {
  color: var(--color-text-muted);
}

.remove-bookmark:hover {
  color: var(--color-error);
}

/* ========================================
   NOTIFICATIONS PAGE
   ======================================== */
.notification-filters {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  overflow-x: auto;
  padding-bottom: var(--spacing-sm);
}

.filter-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

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

.filter-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

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

.notification-item.unread {
  border-left: 3px solid var(--color-accent);
}

.notification-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-bg-tertiary);
}

.notification-icon.chapter {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.notification-icon.like {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

.notification-icon.reply {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
}

.notification-icon.follow {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-xs);
}

.notification-text strong {
  font-weight: var(--font-weight-semibold);
}

.notification-time {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.notification-link {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.notification-link:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-accent);
}

.notification-dismiss {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  opacity: 0;
  transition: all var(--transition-fast);
}

.notification-item:hover .notification-dismiss {
  opacity: 1;
}

.notification-dismiss:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-error);
}

/* Notification Dropdown */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

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

.notification-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

.notification-dropdown-header h4 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.notification-dropdown-body {
  max-height: 360px;
  overflow-y: auto;
}

.notification-dropdown-item {
  display: block;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.notification-dropdown-item:hover {
  background: var(--color-bg-hover);
}

.notification-dropdown-item.unread {
  background: var(--color-accent-light);
}

.notification-dropdown-item p {
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.notification-dropdown-item .notification-time {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.notification-dropdown-footer {
  padding: var(--spacing-sm) var(--spacing-md);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.notification-dropdown-footer a {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
}

.notification-empty {
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--color-text-muted);
}

/* ========================================
   CHAPTER PAGE STYLES
   ======================================== */
/* Adding chapter page styles */
.chapter-reader-header {
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-md) 0;
}

.chapter-reader-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chapter-back-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-text-secondary);
}

.chapter-back-link:hover {
  color: var(--color-text-primary);
}

.chapter-novel-thumb {
  width: 32px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.chapter-novel-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .chapter-novel-title {
    display: none;
  }
}

.chapter-nav-buttons {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.chapter-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.chapter-nav-btn:hover:not(.disabled) {
  background: var(--color-bg-hover);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.chapter-nav-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chapter-main {
  padding: var(--spacing-xl) 0;
}

.container-narrow {
  max-width: 800px;
}

.chapter-header {
  margin-bottom: var(--spacing-xl);
}

.chapter-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: var(--line-height-tight);
}

.chapter-content {
  font-family: var(--font-family-reading);
  font-size: 18px;
  line-height: 1.9;
  color: var(--color-text-primary);
}

.chapter-content p {
  margin-bottom: var(--spacing-lg);
}

.chapter-content h2,
.chapter-content h3 {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  font-family: var(--font-family);
}

/* Translator Notes */
.translator-notes {
  margin: var(--spacing-xl) 0;
  padding: var(--spacing-lg);
  background: var(--color-bg-tertiary);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.translator-notes-header {
  margin-bottom: var(--spacing-sm);
}

.translator-notes-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent);
}

.translator-notes-content {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* Chapter Actions */
.chapter-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin: var(--spacing-xl) 0;
  padding: var(--spacing-md) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.chapter-action-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.chapter-action-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

/* Read Status */
.chapter-read-status {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-xl);
}

.chapter-read-status svg {
  color: var(--color-success);
  flex-shrink: 0;
}

.chapter-read-status span {
  font-size: var(--font-size-sm);
  color: var(--color-success);
}

.undo-btn {
  margin-left: auto;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-decoration: underline;
}

/* Subscribe CTA */
.subscribe-cta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  padding: var(--spacing-xl);
  background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-card));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-bottom: var(--spacing-xl);
}

@media (min-width: 640px) {
  .subscribe-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.subscribe-cta-content h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.subscribe-highlight {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
}

.subscribe-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--spacing-xs);
}

.subscribe-cta-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-2xl);
  background: var(--color-accent);
  border-radius: var(--radius-md);
  color: white;
  font-weight: var(--font-weight-semibold);
  transition: background var(--transition-fast);
}

.subscribe-cta-btn:hover {
  background: var(--color-accent-hover);
  color: white;
}

.subscribe-cta-btn span {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal);
  opacity: 0.9;
}

/* Chapter Bottom Nav */
.chapter-bottom-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-2xl);
}

.chapter-prev-link {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-decoration: underline;
}

.chapter-prev-link:hover {
  color: var(--color-text-primary);
}

/* ========================================
   COMMENTS SECTION
   ======================================== */
/* Adding comment section styles */
.comments-section {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-2xl);
  border-top: 1px solid var(--color-border);
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-xl);
}

.comments-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.comments-sort select {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.comments-sort select:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* Comment Form */
.comment-form-wrapper {
  margin-bottom: var(--spacing-xl);
}

.comment-form textarea {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  resize: vertical;
  min-height: 100px;
  transition: border-color var(--transition-fast);
}

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

.comment-form textarea::placeholder {
  color: var(--color-text-muted);
}

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--spacing-md);
}

.comment-policy {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.comment-policy a {
  color: var(--color-accent);
  text-decoration: underline;
}

.comment-login-prompt {
  padding: var(--spacing-lg);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.comment-login-prompt a {
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
}

/* Comments List */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.comment-item {
  display: flex;
  gap: var(--spacing-md);
}

.comment-avatar {
  flex-shrink: 0;
}

.comment-avatar img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--color-bg-tertiary);
}

.reply-item .comment-avatar img {
  width: 32px;
  height: 32px;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
}

.comment-author {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.comment-badge {
  padding: 1px 6px;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.comment-badge.vip {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.comment-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.comment-content {
  padding: var(--spacing-md);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-sm);
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.comment-action {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.comment-action:hover {
  color: var(--color-text-primary);
}

.comment-action.active {
  color: var(--color-accent);
}

.comment-action svg {
  width: 14px;
  height: 14px;
}

.like-btn.active svg {
  fill: var(--color-accent);
}

/* Reply Form */
.reply-form-wrapper {
  margin-top: var(--spacing-md);
  padding-left: var(--spacing-xl);
}

.reply-form textarea {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  resize: none;
}

.reply-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

/* Comment Replies */
.comment-replies {
  margin-top: var(--spacing-md);
  padding-left: var(--spacing-xl);
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  border-left: 2px solid var(--color-border);
  padding-left: var(--spacing-md);
}

/* Comments Pagination */
.comments-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-xl);
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

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

.pagination-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.pagination-ellipsis {
  color: var(--color-text-muted);
}

/* ========================================
   READER SETTINGS PANEL
   ======================================== */
/* Adding reader settings styles */
.reader-settings-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 320px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-xl);
  transform: translateY(100%);
  transition: transform var(--transition-normal);
  z-index: var(--z-modal);
}

.reader-settings-panel.active {
  transform: translateY(0);
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
}

.settings-panel-header h4 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

.settings-close {
  color: var(--color-text-muted);
}

.settings-close:hover {
  color: var(--color-text-primary);
}

.settings-panel-body {
  padding: var(--spacing-lg);
}

.setting-item {
  margin-bottom: var(--spacing-lg);
}

.setting-item:last-child {
  margin-bottom: 0;
}

.setting-item label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
}

.setting-control {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.setting-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
}

.setting-btn:hover {
  background: var(--color-bg-hover);
}

.setting-control input[type="range"] {
  flex: 1;
  height: 4px;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  appearance: none;
}

.setting-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  cursor: pointer;
}

.theme-buttons {
  display: flex;
  gap: var(--spacing-sm);
}

.theme-btn {
  flex: 1;
  padding: var(--spacing-sm);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.theme-btn[data-theme="dark"] {
  background: #1a1a1e;
  color: white;
  border: 1px solid var(--color-border);
}

.theme-btn[data-theme="light"] {
  background: #f8f9fa;
  color: #202124;
  border: 1px solid #dadce0;
}

.theme-btn[data-theme="sepia"] {
  background: #f4ecd8;
  color: #5b4636;
  border: 1px solid #d9c9a3;
}

.theme-btn.active {
  box-shadow: 0 0 0 2px var(--color-accent);
}

/* SCROLL TO TOP BUTTON */
.scroll-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-sticky);
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top-btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.scroll-to-top-btn svg {
  width: 20px;
  height: 20px;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .scroll-to-top-btn {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

/*CHAPTERREADER - SETTINGS IN NAV*/
.chapter-nav-buttons {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.chapter-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.chapter-nav-btn:hover:not(.disabled) {
  background: var(--color-bg-hover);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.chapter-nav-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Hide floating settings button since it's now in nav */
.floating-settings-btn {
  display: none;
}

/* ========================================
   RELATED NOVELS SECTION
   ======================================== */
/* Adding related novels styles */
.related-novels {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-2xl);
  border-top: 1px solid var(--color-border);
}

.related-novels .section-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-lg);
}

.related-novels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

@media (min-width: 640px) {
  .related-novels-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .related-novels-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.related-novel-card {
  display: block;
}

.related-novel-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

.related-novel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.related-novel-card:hover .related-novel-cover img {
  transform: scale(1.05);
}

.novel-status-badge {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  padding: 2px 8px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
}

.novel-status-badge.devam-ediyor,
.novel-status-badge.ongoing {
  background: var(--color-ongoing);
  color: white;
}

.novel-status-badge.tamamlandi,
.novel-status-badge.completed {
  background: var(--color-completed);
  color: white;
}

.novel-quick-actions {
  position: absolute;
  bottom: var(--spacing-sm);
  right: var(--spacing-sm);
  display: flex;
  gap: var(--spacing-xs);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.related-novel-card:hover .novel-quick-actions {
  opacity: 1;
}

.quick-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-full);
  color: white;
}

.related-novel-info {
  padding: 0 var(--spacing-xs);
}

.related-novel-info .novel-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xs);
}

.related-novel-info .novel-rating svg {
  color: var(--color-warning);
}

.related-novel-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   EMPTY STATE
   ======================================== */
/* Adding empty state styles */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-3xl) var(--spacing-xl);
  text-align: center;
}

.empty-state svg {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
}

.empty-state h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.empty-state p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
  max-width: 400px;
}

/* ========================================
   ANNOUNCEMENT BAR (Chapter Page)
   ======================================== */
/* Adding announcement bar styles */
.announcement-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.announcement-badge {
  padding: 2px 8px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.announcement-bar-inner a {
  flex: 1;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcement-bar-inner a:hover {
  color: var(--color-accent);
}

/* ========================================
   GLOBAL RESPONSIVE FIXES
   ======================================== */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }

  .section-title {
    font-size: var(--font-size-lg);
  }

  .hero-slide-content {
    padding: var(--spacing-md);
    max-width: 100%;
  }

  .hero-slide-title {
    font-size: var(--font-size-xl);
  }

  .hero-slider-nav {
    bottom: var(--spacing-md);
    left: var(--spacing-md);
  }

  .hero-slider-arrows {
    bottom: var(--spacing-md);
    right: var(--spacing-md);
  }
}

/* Spinner for loading states */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Text utilities */
.text-muted {
  color: var(--color-text-muted);
}

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

/* ========================================
   THEME TOGGLE SWITCH (New checkbox style)
   ======================================== */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 26px;
  transition: .3s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.theme-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: .3s;
  z-index: 2;
}

.theme-switch input:checked + .theme-slider {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

.theme-switch input:checked + .theme-slider:before {
  transform: translateX(24px);
}

.theme-slider .sun-icon,
.theme-slider .moon-icon {
  z-index: 1;
  opacity: 0.6;
}

.theme-slider .sun-icon {
  color: var(--color-warning);
}

.theme-slider .moon-icon {
  color: var(--color-text-muted);
}

/* ========================================
   LIVE SEARCH DROPDOWN
   ======================================== */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 320px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
  max-height: 400px;
  overflow-y: auto;
}

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

.search-results-list {
  padding: var(--spacing-sm) 0;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  transition: background var(--transition-fast);
}

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

.search-result-cover {
  flex-shrink: 0;
  width: 40px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

.search-result-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.search-result-title {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-status {
  display: inline-block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.search-no-results {
  padding: var(--spacing-lg);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.search-results-footer {
  padding: var(--spacing-sm) var(--spacing-md);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.search-results-footer a {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
}

/* ========================================
   RANKINGS PAGE
   ======================================== */
.rankings-page {
  padding: var(--spacing-xl) 0;
}

.rankings-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

.rankings-tabs .tabs-nav {
  display: flex;
  gap: var(--spacing-sm);
}

.rankings-tabs .tab {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.rankings-tabs .tab:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.rankings-tabs .tab.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.rankings-tabs .tab svg {
  width: 18px;
  height: 18px;
}

.rankings-filter select {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.rankings-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.ranking-item:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-light);
}

.ranking-position {
  flex-shrink: 0;
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-muted);
}

.ranking-position.gold {
  color: #ffd700;
}

.ranking-position.silver {
  color: #c0c0c0;
}

.ranking-position.bronze {
  color: #cd7f32;
}

.ranking-position svg {
  margin-bottom: var(--spacing-xs);
}

.ranking-cover {
  flex-shrink: 0;
  width: 60px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

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

.ranking-cover .status-badge {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  padding: 2px 8px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
}

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

.ranking-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

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

.ranking-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.ranking-stats {
  display: flex;
  gap: var(--spacing-lg);
}

.ranking-stats .stat {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.ranking-stats .stat svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .rankings-tabs {
    flex-direction: column;
    align-items: stretch;
  }

  .rankings-tabs .tabs-nav {
    flex-wrap: wrap;
  }

  .ranking-item {
    flex-wrap: wrap;
  }

  .ranking-stats {
    width: 100%;
    justify-content: flex-start;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
  }
}

/* ========================================
   SYNOPSIS TOGGLE FIX
   ======================================== */
.novel-synopsis {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.novel-synopsis.collapsed {
  max-height: 150px;
  position: relative;
}

.novel-synopsis.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--color-bg-primary));
  pointer-events: none;
}

.synopsis-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  z-index: var(--z-toast);
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-notification.toast-success {
  border-left: 3px solid var(--color-success);
}

.toast-notification.toast-error {
  border-left: 3px solid var(--color-error);
}

.toast-notification.toast-warning {
  border-left: 3px solid var(--color-warning);
}

.toast-notification.toast-info {
  border-left: 3px solid var(--color-info);
}

/* ========================================
   SCROLL TO TOP BUTTON (Global)
   ======================================== */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-fast);
  z-index: var(--z-sticky);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}

.scroll-to-top svg {
  width: 20px;
  height: 20px;
}

/* ========================================
   PAGE HEADER
   ======================================== */
.page-header {
  margin-bottom: var(--spacing-xl);
}

.page-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
}

.page-header .breadcrumb a:hover {
  color: var(--color-accent);
}

.page-header .breadcrumb svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.page-header .breadcrumb span {
  color: var(--color-text-primary);
}

.page-header .page-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.page-header .page-subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}

/* ========================================
   PLACEHOLDER COVER
   ======================================== */
.placeholder-cover {
  width: 100%;
  height: 100%;
  background: var(--color-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-cover svg {
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
}

/* ========================================
   STATUS BADGES
   ======================================== */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
  text-transform: capitalize;
}

.status-badge.ongoing,
.status-badge.devam-ediyor {
  background: var(--color-ongoing);
  color: white;
}

.status-badge.completed,
.status-badge.tamamlandi {
  background: var(--color-completed);
  color: white;
}

.status-badge.hiatus,
.status-badge.durduruldu {
  background: var(--color-hiatus);
  color: white;
}

/* ========================================
   BECAUSE YOU READ SECTION - Added complete section styling matching reference design
   ======================================== */
.because-you-read-section {
  padding: var(--spacing-xl) 0;
  background: var(--color-bg-primary);
}

.byr-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.byr-source-thumb {
  width: 48px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-tertiary);
}

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

.byr-source-thumb .placeholder-cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-secondary));
}

.byr-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.byr-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin: 0;
}

.byr-source-name {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
}

.byr-novels-wrapper {
  position: relative;
}

.byr-novels-scroll {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--spacing-sm);
  -webkit-overflow-scrolling: touch;
}

.byr-novels-scroll::-webkit-scrollbar {
  display: none;
}

.byr-novel-card {
  flex-shrink: 0;
  width: 160px;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.byr-novel-card:hover {
  transform: translateY(-4px);
}

.byr-novel-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

.byr-novel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.byr-novel-card:hover .byr-novel-cover img {
  transform: scale(1.05);
}

.byr-novel-cover .placeholder-cover {
  width: 100%;
  height: 100%;
  background: var(--color-bg-tertiary);
}

/* Status Badge - Ongoing/Completed */
.byr-status-badge {
  position: absolute;
  top: var(--spacing-xs);
  left: var(--spacing-xs);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  backdrop-filter: blur(4px);
}

.byr-status-badge.ongoing {
  background: var(--color-ongoing);
  color: white;
}

.byr-status-badge.completed {
  background: var(--color-completed);
  color: white;
}

.byr-status-badge.hiatus {
  background: var(--color-warning);
  color: white;
}

/* Cover Icon (bottom-right) */
.byr-cover-icon {
  position: absolute;
  bottom: var(--spacing-xs);
  right: var(--spacing-xs);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

/* ========================================
   REVIEW REPLIES - Added styling matching chapter comment replies
   ======================================== */
.review-replies {
  margin-top: var(--spacing-md);
  margin-left: var(--spacing-xl);
  padding-left: var(--spacing-md);
  border-left: 2px solid var(--color-border);
}

.review-reply-item {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  margin-bottom: var(--spacing-sm);
}

.review-reply-item:last-child {
  margin-bottom: 0;
}

.review-reply-item .reply-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

.review-reply-item .reply-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-reply-item .reply-body {
  flex: 1;
  min-width: 0;
}

.review-reply-item .reply-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: 4px;
}

.review-reply-item .reply-author {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.review-reply-item .reply-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.review-reply-item .reply-content {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  background: var(--color-bg-tertiary);
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
}

/* Review Reply Form */
.review-reply-form {
  margin-top: var(--spacing-md);
  margin-left: var(--spacing-xl);
  padding-left: var(--spacing-md);
  border-left: 2px solid var(--color-border);
}

.review-reply-form textarea {
  width: 100%;
  min-height: 80px;
  padding: var(--spacing-sm);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  resize: none;
}

.review-reply-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.review-reply-form button {
  margin-top: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--font-size-sm);
}

.review-reply-form button:hover {
  opacity: 0.9;
}

/* View Replies Toggle for Reviews */
.review-item .view-replies-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  padding: var(--spacing-xs) 0;
  transition: color var(--transition-normal);
}

.review-item .view-replies-btn:hover {
  color: var(--color-text-primary);
}

.review-item .view-replies-btn svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-normal);
}

.review-item .view-replies-btn.expanded svg {
  transform: rotate(180deg);
}

/* =====================================================
   MOBILE HERO SLIDER - Card Style Layout
   ===================================================== */
@media (max-width: 768px) {
  /* Hero slider mobile card style */
  .hero-slider {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch !important;
    gap: var(--spacing-md) !important;
    padding: 0 var(--spacing-md) !important;
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: auto !important;
  }

  .hero-slider::-webkit-scrollbar {
    display: none !important;
  }

  .hero-slide {
    position: relative !important;
    flex-shrink: 0 !important;
    width: calc(50% - var(--spacing-sm)) !important;
    opacity: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    scroll-snap-align: start !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden !important;
    background: var(--color-bg-card) !important;
    transform: none !important;
  }

  .hero-slide-image {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
  }

  .hero-slide-image img {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .hero-slide-content {
    position: relative !important;
    padding: var(--spacing-sm) !important;
    background: var(--color-bg-card) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: var(--spacing-xs) !important;
  }

  .hero-slide-title {
    font-size: var(--font-size-sm) !important;
    line-height: var(--line-height-tight) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .hero-slide-meta {
    font-size: 11px !important;
  }

  .hero-slide-status {
    font-size: 11px !important;
  }

  .hero-slide-desc {
    font-size: 11px !important;
    -webkit-line-clamp: 2 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  /* Hide desktop slider controls on mobile */
  .hero-slider-wrapper .slider-arrow {
    display: none !important;
  }

  /* Position dots below slider */
  .hero-slider-dots {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    margin-top: var(--spacing-md) !important;
    justify-content: center !important;
  }
}

/* =====================================================
   MOBILE NOVEL SLIDERS - 3 Items Per View
   ===================================================== */
@media (max-width: 768px) {
  /* Novel sliders show 3 items on mobile */
  .novel-slider-wrapper {
    position: relative;
  }

  .novel-slider {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch !important;
    gap: var(--spacing-sm) !important;
    padding-bottom: var(--spacing-sm) !important;
  }

  .novel-slider::-webkit-scrollbar {
    display: none !important;
  }

  .novel-slider .pop-novel-card {
    flex-shrink: 0 !important;
    width: calc(33.333% - 8px) !important;
    min-width: 100px !important;
    scroll-snap-align: start !important;
  }

  .novel-slider .pop-novel-card .novel-cover {
    aspect-ratio: 2 / 3 !important;
  }

  .novel-slider .pop-novel-card .pop-title {
    font-size: 11px !important;
    -webkit-line-clamp: 2 !important;
  }

  /* Hide slider controls on mobile - use swipe instead */
  .novel-slider-wrapper .slider-controls {
    display: none !important;
  }
}

/* =====================================================
   MOBILE TRENDING SECTION
   ===================================================== */
.trending-mobile-section {
  display: none;
}

@media (max-width: 1024px) {
  /* Show trending section on mobile */
  .trending-sidebar {
    display: none !important;
  }

  .trending-mobile-section {
    display: block !important;
    padding: var(--spacing-lg) 0;
  }

  .trending-mobile-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
  }

  .trending-mobile-section .section-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
  }

  /* Changed from horizontal scroll to vertical list layout */
  .trending-mobile-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .trending-mobile-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-decoration: none;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-base);
  }

  .trending-mobile-item:hover {
    background: var(--color-bg-secondary);
  }

  .trending-mobile-rank {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-secondary);
    background: var(--color-bg-tertiary);
    flex-shrink: 0;
  }

  .trending-mobile-rank.top-rank {
    background: var(--color-primary);
    color: white;
  }

  .trending-mobile-cover {
    width: 50px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
  }

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

  .trending-mobile-cover .placeholder-cover {
    width: 100%;
    height: 100%;
    background: var(--color-bg-tertiary);
  }

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

  .trending-mobile-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-xs) 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .trending-mobile-chapters {
    font-size: var(--font-size-sm);
    color: var(--color-success);
    display: block;
    margin-bottom: var(--spacing-xs);
  }

  .trending-mobile-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
  }

  .trending-mobile-rating svg {
    color: var(--color-success);
  }
}

/* =====================================================
   RECOMMENDATIONS SECTION - Because You Read
   ===================================================== */
.recommendations-section {
  padding: var(--spacing-xl) 0;
}

.recommendation-block {
  margin-bottom: var(--spacing-xl);
}

.recommendation-block .section-header {
  margin-bottom: var(--spacing-lg);
}

.recommendation-block .section-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  font-size: 1.25rem;
}

.because-label {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-normal);
}

.source-novel-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.source-novel-link:hover {
  opacity: 0.8;
}

.source-thumb {
  width: 24px;
  height: 32px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.source-title {
  font-weight: var(--font-weight-semibold);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Recommendation slider uses same styles as novel-slider */
.recommendation-slider .novel-slider {
  touch-action: pan-y pinch-zoom;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .recommendation-block .section-title {
    font-size: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }

  .source-title {
    max-width: 200px;
  }
}

/* =====================================================
   ANNOUNCEMENTS ARCHIVE & SINGLE PAGE
   ===================================================== */

/* Added complete announcements page styling */
.announcements-archive,
.single-announcement {
  padding: var(--spacing-xl) 0;
  min-height: calc(100vh - var(--header-height) - 200px);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
}

.breadcrumb a {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

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

.breadcrumb svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.breadcrumb span {
  color: var(--color-text-primary);
}

/* Archive Title */
.archive-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xl);
}

/* Announcement Card */
.announcement-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.announcement-card:hover {
  border-color: var(--color-border-light);
}

.announcement-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
}

.announcement-icon {
  flex-shrink: 0;
  color: var(--color-accent);
}

.announcement-icon svg {
  display: block;
}

.announcement-title-link {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent);
  line-height: var(--line-height-tight);
  transition: opacity var(--transition-fast);
}

.announcement-title-link:hover {
  opacity: 0.8;
  color: var(--color-accent);
}

.announcement-card-body {
  padding: 0 var(--spacing-lg);
  padding-left: calc(var(--spacing-lg) + 24px);
}

.announcement-greeting {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
}

.announcement-excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-sm);
}

.announcement-excerpt a {
  color: var(--color-accent);
}

.show-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: var(--spacing-md);
  transition: color var(--transition-fast);
}

.show-more-toggle:hover {
  color: var(--color-text-secondary);
}

.show-more-toggle svg {
  transition: transform var(--transition-fast);
}

.show-more-toggle.expanded svg {
  transform: rotate(180deg);
}

.announcement-card-footer {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  padding-left: calc(var(--spacing-lg) + 24px);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
}

.announcement-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.author-name {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: white;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
}

.announcement-date {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.announcement-comments {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-left: auto;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
}

.announcement-comments svg {
  flex-shrink: 0;
}

/* Announcements Pagination */
.announcements-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xl);
}

.page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.page-nav:hover:not(.disabled) {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.page-nav.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.page-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.page-num:hover:not(.current) {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.page-num.current {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.page-dots {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  padding: 0 var(--spacing-xs);
}

/* Single Announcement Page */
.announcement-single-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.announcement-single-header {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
}

.announcement-single-header .announcement-icon {
  flex-shrink: 0;
  margin-top: 4px;
}

.announcement-single-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  line-height: var(--line-height-tight);
}

.announcement-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-md) var(--spacing-xl);
  border-bottom: 1px solid var(--color-border);
}

.announcement-meta .announcement-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.announcement-meta .announcement-author img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.announcement-content {
  padding: var(--spacing-xl);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-primary);
}

.announcement-content p {
  margin-bottom: var(--spacing-md);
}

.announcement-content a {
  color: var(--color-accent);
  text-decoration: underline;
}

.announcement-content h2,
.announcement-content h3,
.announcement-content h4 {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  color: var(--color-text-primary);
}

.announcement-content ul,
.announcement-content ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-xl);
}

.announcement-content li {
  margin-bottom: var(--spacing-sm);
  list-style: disc;
}

.announcement-content ol li {
  list-style: decimal;
}

.announcement-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--spacing-md) 0;
}

.announcement-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding-left: var(--spacing-md);
  margin: var(--spacing-md) 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

/* Comments Section for Announcements */
.announcement-comments-section {
  margin-top: var(--spacing-xl);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .archive-title {
    font-size: var(--font-size-2xl);
  }

  .announcement-card-header {
    padding: var(--spacing-md);
  }

  .announcement-card-body {
    padding: 0 var(--spacing-md);
    padding-left: calc(var(--spacing-md) + 20px);
  }

  .announcement-card-footer {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    padding-left: calc(var(--spacing-md) + 20px);
  }

  .announcement-comments {
    margin-left: 0;
  }

  .announcement-single-header {
    padding: var(--spacing-md);
  }

  .announcement-single-title {
    font-size: var(--font-size-xl);
  }

  .announcement-meta {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .announcement-content {
    padding: var(--spacing-md);
  }

  .breadcrumb {
    font-size: var(--font-size-xs);
    flex-wrap: wrap;
  }
}

/* Because You Read Section - Homepage */
.because-you-read-section {
  padding: var(--spacing-xl) 0;
  background: var(--color-bg-secondary);
}

.byr-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.byr-source-thumb {
  width: 48px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

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

.byr-source-thumb .thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-bg-tertiary);
}

.byr-header-text {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.byr-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.byr-source-name {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
}

.byr-novels-wrapper {
  position: relative;
}

.byr-novels-scroll {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--spacing-sm);
  -webkit-overflow-scrolling: touch;
}

.byr-novels-scroll::-webkit-scrollbar {
  display: none;
}

.byr-novel-card {
  flex-shrink: 0;
  width: 140px;
  scroll-snap-align: start;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.byr-novel-card:hover {
  transform: translateY(-4px);
}

.byr-novel-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

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

.byr-novel-cover .placeholder-cover {
  width: 100%;
  height: 100%;
  background: var(--color-bg-tertiary);
}

.byr-status-badge {
  position: absolute;
  top: var(--spacing-xs);
  left: var(--spacing-xs);
  padding: 2px 6px;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
  text-transform: capitalize;
}

.byr-status-badge.ongoing {
  background: var(--color-ongoing);
  color: white;
}

.byr-status-badge.completed {
  background: var(--color-completed);
  color: white;
}

.byr-status-badge.hiatus {
  background: var(--color-warning);
  color: white;
}

.byr-cover-icon {
  position: absolute;
  bottom: var(--spacing-xs);
  right: var(--spacing-xs);
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* ========================================
   REVIEW REPLIES - Added styling matching chapter comment replies
   ======================================== */
.review-replies {
  margin-top: var(--spacing-md);
  margin-left: var(--spacing-xl);
  padding-left: var(--spacing-md);
  border-left: 2px solid var(--color-border);
}

.review-reply-item {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  margin-bottom: var(--spacing-sm);
}

.review-reply-item:last-child {
  margin-bottom: 0;
}

.review-reply-item .reply-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

.review-reply-item .reply-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-reply-item .reply-body {
  flex: 1;
  min-width: 0;
}

.review-reply-item .reply-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: 4px;
}

.review-reply-item .reply-author {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.review-reply-item .reply-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.review-reply-item .reply-content {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  background: var(--color-bg-tertiary);
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
}

/* =====================================================
   MOBILE THEME TOGGLE
   ===================================================== */

.mobile-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.mobile-theme-toggle .mode-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.mobile-theme-toggle .mode-label svg {
  width: 18px;
  height: 18px;
}

.theme-toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  background: var(--color-bg-tertiary);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s ease;
  border: 2px solid var(--color-border);
}

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

.theme-toggle-switch .toggle-track {
  position: absolute;
  inset: 2px;
  background: var(--color-bg-secondary);
  border-radius: 999px;
  transition: background 0.3s ease;
}

.theme-toggle-switch .toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--color-accent);
  border-radius: 50%;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-switch .toggle-thumb svg {
  width: 12px;
  height: 12px;
  color: white;
}

[data-theme="dark"] .theme-toggle-switch .toggle-thumb {
  transform: translateX(24px);
}

[data-theme="dark"] .theme-toggle-switch .toggle-track {
  background: var(--color-accent);
}

[data-theme="light"] .theme-toggle-switch .toggle-thumb {
  transform: translateX(0);
}

[data-theme="light"] .theme-toggle-switch .toggle-track {
  background: var(--color-bg-tertiary);
}

/* Sun/Moon icons in toggle */
.theme-toggle-switch .sun-icon,
.theme-toggle-switch .moon-icon {
  position: absolute;
  width: 12px;
  height: 12px;
  transition: opacity 0.3s ease;
}

.theme-toggle-switch .sun-icon {
  opacity: 1;
}

.theme-toggle-switch .moon-icon {
  opacity: 0;
}

[data-theme="dark"] .theme-toggle-switch .sun-icon {
  opacity: 0;
}

[data-theme="dark"] .theme-toggle-switch .moon-icon {
  opacity: 1;
}
.byr-novel-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}
.byr-novel-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: var(--line-height-tight);
}
.byr-novel-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
/* User dropdown balance styles */
.user-dropdown-balance {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--color-bg-tertiary);
  border-bottom: 1px solid var(--color-border);
}

.user-dropdown-balance .balance-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.user-dropdown-balance .balance-icon {
  width: 16px;
  height: 16px;
}

.user-dropdown-balance .balance-icon.diamond {
  color: #60a5fa;
}

.user-dropdown-balance .balance-icon.stone {
  color: #f59e0b;
}

.user-dropdown-balance .balance-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
}
/* Enhanced Infinite Scroll Styles */

/* Loading Status Container */
.infinite-scroll-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl) var(--spacing-md);
  min-height: 120px;
}

/* Spinner Animation - Three Bouncing Dots */
.infinite-scroll-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.infinite-scroll-loader .dot {
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.infinite-scroll-loader .dot:nth-child(1) {
  animation-delay: -0.32s;
}

.infinite-scroll-loader .dot:nth-child(2) {
  animation-delay: -0.16s;
}

.infinite-scroll-loader .dot:nth-child(3) {
  animation-delay: 0s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Alternative Spinner - Rotating Circle */
.infinite-scroll-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Loading Text */
.infinite-scroll-status .loading-text {
  margin-top: var(--spacing-md);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Pulse Animation for Loading Text */
.infinite-scroll-status .loading-text.pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* End Message - All Content Loaded */
.infinite-scroll-end {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg) var(--spacing-md);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  gap: var(--spacing-sm);
}

.infinite-scroll-end::before,
.infinite-scroll-end::after {
  content: "";
  flex: 1;
  max-width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.infinite-scroll-end .end-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-bg-secondary);
  border-radius: 50%;
  margin-right: var(--spacing-xs);
}

.infinite-scroll-end .end-icon i {
  font-size: 12px;
  color: var(--color-primary);
}

/* Skeleton Loading Cards */
.novel-card-skeleton {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.novel-card-skeleton .skeleton-image {
  width: 100%;
  padding-top: 140%;
  background: linear-gradient(
    90deg,
    var(--color-bg-tertiary) 25%,
    var(--color-bg-secondary) 50%,
    var(--color-bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.novel-card-skeleton .skeleton-content {
  padding: var(--spacing-md);
}

.novel-card-skeleton .skeleton-title {
  height: 16px;
  background: linear-gradient(
    90deg,
    var(--color-bg-tertiary) 25%,
    var(--color-bg-secondary) 50%,
    var(--color-bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: var(--spacing-sm);
}

.novel-card-skeleton .skeleton-meta {
  height: 12px;
  width: 60%;
  background: linear-gradient(
    90deg,
    var(--color-bg-tertiary) 25%,
    var(--color-bg-secondary) 50%,
    var(--color-bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

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

/* Progress Bar at Top */
.infinite-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-bg-secondary);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.infinite-scroll-progress.active {
  opacity: 1;
}

.infinite-scroll-progress .progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light, #60a5fa));
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 0 2px 2px 0;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--color-primary-dark, #2563eb);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Load More Button (Manual Alternative) */
.load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  width: 100%;
  max-width: 280px;
  margin: var(--spacing-xl) auto;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.load-more-btn:hover {
  background: var(--color-primary-dark, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.load-more-btn:disabled {
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.load-more-btn .btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Staggered Animation for New Cards */
.novel-card.stagger-1 {
  animation-delay: 0.05s;
}
.novel-card.stagger-2 {
  animation-delay: 0.1s;
}
.novel-card.stagger-3 {
  animation-delay: 0.15s;
}
.novel-card.stagger-4 {
  animation-delay: 0.2s;
}
.novel-card.stagger-5 {
  animation-delay: 0.25s;
}
.novel-card.stagger-6 {
  animation-delay: 0.3s;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .infinite-scroll-status {
    padding: var(--spacing-lg) var(--spacing-sm);
    min-height: 100px;
  }

  .load-more-btn {
    max-width: 100%;
    margin-left: var(--spacing-md);
    margin-right: var(--spacing-md);
  }
}
/* ==========================================
   POPULAR RECOMMENDATIONS SECTION
   ========================================== */

.popular-recommendations-section {
  padding: 40px 0;
  background: var(--dark-bg);
}

.popular-recommendations-section .section-header {
  margin-bottom: 24px;
}

.popular-recommendations-section .section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.popular-recommendations-section .section-title::before {
  content: "";
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
}

/* Wrapper ve Scroll Container */
.novel-recommendations-wrapper {
  position: relative;
  overflow: hidden;
  margin: 0 -12px;
  padding: 0 12px;
}

.novel-recommendations-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.novel-recommendations-scroll::-webkit-scrollbar {
  height: 6px;
}

.novel-recommendations-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.novel-recommendations-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.novel-recommendations-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Novel Card */
.novel-recommendation-card {
  flex: 0 0 auto;
  width: 140px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.novel-recommendation-card:hover {
  transform: translateY(-4px);
}

/* Cover Container */
.novel-recommendation-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.novel-recommendation-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.novel-recommendation-card:hover .novel-recommendation-cover img {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.novel-recommendation-cover .placeholder-cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

/* Status Badge */
.novel-recommendation-status-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.9);
  color: #fff;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.novel-recommendation-status-badge.ongoing {
  background: rgba(34, 197, 94, 0.9);
}

.novel-recommendation-status-badge.completed {
  background: rgba(59, 130, 246, 0.9);
}

.novel-recommendation-status-badge.hiatus {
  background: rgba(245, 158, 11, 0.9);
}

.novel-recommendation-status-badge.dropped {
  background: rgba(239, 68, 68, 0.9);
}

.novel-recommendation-cover-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.novel-recommendation-card:hover .novel-recommendation-cover-icon {
  opacity: 1;
  transform: scale(1);
}

/* Info Container */
.novel-recommendation-info {
  padding: 12px 4px 4px;
}

/* Rating */
.novel-recommendation-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 6px;
}

.novel-recommendation-rating svg {
  color: #22c55e;
}

/* Title */
.novel-recommendation-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.novel-recommendation-card:hover .novel-recommendation-title {
  color: #3b82f6;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
  .popular-recommendations-section {
    padding: 30px 0;
  }

  .popular-recommendations-section .section-title {
    font-size: 1.25rem;
  }

  .novel-recommendation-card {
    width: 120px;
  }

  .novel-recommendations-scroll {
    gap: 12px;
  }

  .novel-recommendation-title {
    font-size: 0.8rem;
  }

  .novel-recommendation-cover-icon {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .novel-recommendation-card {
    width: 110px;
  }

  .novel-recommendation-status-badge {
    font-size: 0.6rem;
    padding: 3px 6px;
  }
}

/* ==========================================
   LIGHT MODE
   ========================================== */

[data-theme="light"] .popular-recommendations-section {
  background: #f8fafc;
}

[data-theme="light"] .novel-recommendation-cover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .novel-recommendations-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .novel-recommendations-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .novel-recommendations-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}
