@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  /* Dark Theme Colors */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-card: rgba(25, 25, 25, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.05);

  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-info: #06b6d4;

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-secondary: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --gradient-hero: linear-gradient(
    135deg,
    #0f0f23 0%,
    #1a1a2e 50%,
    #16213e 100%
  );

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* Transition Durations */
  --transition-fast: 200ms;
  --transition-normal: 300ms;
  --transition-slow: 500ms;

  /* Easing Functions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);

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

  /* Touch Target */
  --touch-target-min: 44px;

  /* Skeleton Animation */
  --skeleton-base: rgba(255, 255, 255, 0.05);
  --skeleton-shine: rgba(255, 255, 255, 0.1);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-weight: 400;
  background: var(--bg-primary, #0a0a0a);
  color: var(--text-primary, #ffffff) !important;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden; /* Critical: prevent horizontal scroll */
  max-width: 100vw; /* Ensure body doesn't exceed viewport */
  box-sizing: border-box; /* Include padding in width calculation */
}

/* Override Bootstrap text colors */
.text-muted {
  color: var(--text-muted, #9ca3af) !important;
}

.text-secondary {
  color: var(--text-secondary, #d1d5db) !important;
}

.text-primary {
  color: var(--text-primary, #ffffff) !important;
}

.text-light {
  color: var(--text-primary, #ffffff) !important;
}

.text-dark {
  color: var(--text-primary, #ffffff) !important;
}

/* Card text colors */
.card-text {
  color: var(--text-secondary, #d1d5db) !important;
}

.card-title {
  color: var(--text-primary, #ffffff) !important;
}

/* Form text colors */
.form-label {
  color: var(--text-secondary, #d1d5db) !important;
}

/* Navigation text colors */
.navbar-nav .nav-link {
  color: var(--text-secondary, #d1d5db) !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text-primary, #ffffff) !important;
}

/* Dropdown text colors */
.dropdown-menu {
  background: var(--bg-secondary, #111111) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.dropdown-item {
  color: var(--text-secondary, #d1d5db) !important;
}

.dropdown-item:hover {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05)) !important;
  color: var(--text-primary, #ffffff) !important;
}

/* List text colors */
ul li a {
  color: var(--text-secondary, #d1d5db) !important;
}

ul li a:hover {
  color: var(--text-primary, #ffffff) !important;
}

/* Heading colors */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary, #ffffff) !important;
  font-weight: 700;
}

/* Emphasis text weight */
.fw-semibold,
strong,
.text-emphasis {
  font-weight: 600;
}

/* Paragraph colors */
p {
  color: var(--text-secondary, #d1d5db) !important;
}

/* Lead text */
.lead {
  color: var(--text-secondary, #d1d5db) !important;
}

/* Small text */
small {
  color: var(--text-muted, #9ca3af) !important;
}

/* Footer text */
footer {
  color: var(--text-secondary, #d1d5db) !important;
}

footer h5,
footer h6 {
  color: var(--text-primary, #ffffff) !important;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--accent-primary, #6366f1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary, #8b5cf6);
}

/* Navigation */
.navbar {
  background: rgba(10, 10, 10, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}

.navbar-toggler {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md, 0.5rem);
  padding: 0.25rem 0.5rem;
  transition: all 0.3s ease;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
  border-color: var(--accent-primary, #6366f1);
}

.navbar-toggler:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.navbar-toggler-icon {
  background: transparent;
  color: var(--text-primary, #ffffff);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-toggler-icon i {
  transition: transform 0.3s ease;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon i {
  transform: rotate(90deg);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: var(--text-secondary, #d1d5db) !important;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-md, 0.5rem);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary, #ffffff) !important;
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
}

.nav-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  );
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::before {
  width: 80%;
}

.nav-link.active::before {
  width: 80%;
}

/* Hero Section */
.hero-section {
  background: var(
    --gradient-hero,
    linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%)
  );
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  min-height: 70vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
  will-change: opacity, transform;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      180deg,
      rgba(8, 10, 16, 0.2) 0%,
      rgba(8, 10, 16, 0.55) 60%,
      rgba(8, 10, 16, 0.8) 100%
    ),
    linear-gradient(
      90deg,
      rgba(8, 10, 16, 0.55) 0%,
      rgba(8, 10, 16, 0.25) 40%,
      rgba(8, 10, 16, 0.55) 100%
    );
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(8, 10, 16, 0.4);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.hero-nav:hover {
  background: rgba(8, 10, 16, 0.65);
  border-color: rgba(255, 255, 255, 0.8);
}

.hero-nav-prev {
  left: 1rem;
}

.hero-nav-next {
  right: 1rem;
}

.hero-pagination {
  position: absolute;
  bottom: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 0.45rem;
  z-index: 3;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
}

.hero-dot.active,
.hero-dot:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.15);
}

.hero-section .hero-title,
.hero-section .hero-subtitle {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary, #d1d5db);
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Hero Gradient Animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Hero Decorative Element */
.hero-section::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  z-index: 1;
}

/* Hero Staggered Fade-In */
.hero-content .hero-title {
  animation: fadeInUp 0.8s var(--ease-out, ease-out) forwards;
  animation-delay: 0ms;
}

.hero-content .hero-subtitle {
  animation: fadeInUp 0.8s var(--ease-out, ease-out) forwards;
  animation-delay: 200ms;
  opacity: 0;
}

.hero-content .d-flex {
  animation: fadeInUp 0.8s var(--ease-out, ease-out) forwards;
  animation-delay: 400ms;
  opacity: 0;
}

/* Hero CTA Button Hover Effects */
.hero-section .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.hero-section .btn-outline-light:hover {
  transform: translateY(-3px);
}

/* Hero Wave Divider */
.hero-wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 2;
}

.hero-wave-divider svg {
  display: block;
  width: 100%;
  height: 60px;
}

/* Modern Buttons */
.btn {
  border: none;
  border-radius: var(--radius-lg, 0.75rem);
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  );
  color: white;
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1)),
    var(--shadow-glow, 0 0 30px rgba(99, 102, 241, 0.3));
  color: white;
}

.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary, #ffffff);
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  color: var(--text-primary, #ffffff);
}

/* SweetAlert2 site theme */
.swal2-container.swal2-backdrop-show {
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(8px);
}

.swal2-popup.swal2-modal {
  background: linear-gradient(
    180deg,
    rgba(31, 36, 41, 0.98),
    rgba(17, 17, 17, 0.98)
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px !important;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(99, 102, 241, 0.12) !important;
  color: var(--text-primary, #ffffff) !important;
  padding: 1.5rem !important;
}

.swal2-popup.swal2-modal .swal2-title {
  color: var(--text-primary, #ffffff) !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.swal2-popup.swal2-modal .swal2-html-container {
  color: var(--text-secondary, #d1d5db) !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
}

.swal2-popup.swal2-modal .swal2-icon {
  width: 4rem !important;
  height: 4rem !important;
  margin: 0.5rem auto 1rem !important;
  border-width: 2px !important;
}

.swal2-popup.swal2-modal .swal2-icon.swal2-warning {
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.75) !important;
  color: var(--accent-warning, #f59e0b) !important;
}

.swal2-popup.swal2-modal .swal2-icon.swal2-error {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.75) !important;
  color: var(--accent-danger, #ef4444) !important;
}

.swal2-popup.swal2-modal .swal2-icon.swal2-success {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.75) !important;
  color: var(--accent-success, #10b981) !important;
}

.swal2-popup.swal2-modal .swal2-actions {
  gap: 0.75rem !important;
  margin-top: 1.5rem !important;
}

.swal2-popup.swal2-modal .swal2-styled,
.swal2-popup.swal2-modal .site-swal-confirm,
.swal2-popup.swal2-modal .site-swal-cancel {
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  padding: 0.7rem 1.25rem !important;
  transition:
    transform var(--transition-fast, 200ms) var(--ease-out, ease-out),
    background var(--transition-fast, 200ms) var(--ease-out, ease-out),
    border-color var(--transition-fast, 200ms) var(--ease-out, ease-out) !important;
}

.swal2-popup.swal2-modal .site-swal-confirm,
.swal2-popup.swal2-modal .swal2-confirm.swal2-styled {
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  ) !important;
  color: #fff !important;
}

.swal2-popup.swal2-modal .site-swal-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.swal2-popup.swal2-modal .site-swal-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.swal2-popup.swal2-modal .site-swal-cancel,
.swal2-popup.swal2-modal .swal2-cancel.swal2-styled {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: var(--text-secondary, #d1d5db) !important;
}

.swal2-popup.swal2-modal .swal2-styled:hover,
.swal2-popup.swal2-modal .site-swal-confirm:hover,
.swal2-popup.swal2-modal .site-swal-cancel:hover {
  filter: none !important;
  transform: translateY(-1px);
}

.swal2-popup.swal2-modal .swal2-input,
.swal2-popup.swal2-modal .site-swal-input {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: var(--text-primary, #ffffff) !important;
}

.swal2-popup.swal2-modal .swal2-input:focus,
.swal2-popup.swal2-modal .site-swal-input:focus {
  border-color: rgba(99, 102, 241, 0.75) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16) !important;
}

.swal2-popup.swal2-modal .swal2-validation-message {
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  border-radius: 8px !important;
  color: #fecaca !important;
}

.swal2-popup.swal2-modal .swal2-close {
  color: var(--text-muted, #9ca3af) !important;
}

.swal2-popup.swal2-modal .swal2-close:hover {
  color: var(--text-primary, #ffffff) !important;
}

.swal2-popup.swal2-toast {
  background: rgba(17, 17, 17, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px !important;
  color: var(--text-primary, #ffffff) !important;
}

/* Size fix for small buttons: keep .btn-sm actually small */
.btn-sm,
.btn-group-sm > .btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-md, 0.5rem);
  letter-spacing: 0;
  text-transform: none;
}

/* Stats Section */
.stats-section {
  background: var(--bg-secondary, #111111);
  padding: 4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card {
  text-align: center;
  padding: 2rem;
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border-radius: var(--radius-xl, 1rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15);
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.stat-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.15) 0%,
    rgba(139, 92, 246, 0.1) 100%
  );
  border-radius: 50%;
  z-index: -1;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary, #d1d5db);
  font-weight: 500;
}

/* Cards */
.card {
  background: var(--bg-card, rgba(25, 25, 25, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl, 1rem);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
}

.card-header {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
}

/* Manga Cards */
.manga-card {
  height: 100%;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  cursor: pointer;
}

.manga-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-primary, #6366f1);
}

.manga-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  );
  opacity: 0;
  z-index: -1;
}

.manga-card:hover::before {
  opacity: 0.1;
}

.manga-cover {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg, 0.75rem);
}

/* Manga Card - Cover zoom on hover */
.manga-card .manga-cover {
  transition: transform var(--transition-normal, 300ms)
    var(--ease-out, ease-out);
}
.manga-card:hover .manga-cover {
  transform: scale(1.05);
}

/* Manga Card - Info overlay (score/chapter/category on hover) */
.manga-card .info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  opacity: 0;
  transition: opacity var(--transition-normal, 300ms) var(--ease-out, ease-out);
  z-index: 3;
}
.manga-card:hover .info-overlay {
  opacity: 1;
}

/* Manga Card - "Yeni" badge pulse animation */
@keyframes badgePulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
.manga-card .badge.bg-success {
  animation: badgePulse 2s ease-in-out infinite;
}

/* Category Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.category-card {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl, 1rem);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: var(--text-primary, #ffffff);
}

.category-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary, #6366f1);
  color: var(--text-primary, #ffffff);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.1);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Forms */
.form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg, 0.75rem);
  color: var(--text-primary, #ffffff);
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary, #6366f1);
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.2),
    0 0 15px rgba(99, 102, 241, 0.1);
  color: var(--text-primary, #ffffff);
}

.form-control::placeholder {
  color: var(--text-muted, #9ca3af);
}

.form-label {
  color: var(--text-secondary, #d1d5db);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Form Error States */
.form-error {
  color: var(--accent-danger, #ef4444);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  animation: fadeIn 0.3s var(--ease-out, ease-out);
}

.form-control.is-invalid {
  border-color: var(--accent-danger, #ef4444);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Search Suggestions Dropdown */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary, #111111);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg, 0.75rem);
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}
.search-suggestions.active {
  display: block;
}

/* Password Toggle */
.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted, #9ca3af);
  cursor: pointer;
  padding: 0.25rem;
  z-index: 5;
  transition: color var(--transition-fast, 200ms) ease;
}
.password-toggle-btn:hover {
  color: var(--text-primary, #ffffff);
}
.password-field-wrapper {
  position: relative;
}

/* Filters */
.filter-card {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl, 1rem);
  backdrop-filter: blur(10px);
  padding: 2rem;
}

/* Footer */
footer {
  background: var(--bg-secondary, #111111);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 0;
}

/* Footer Link Hover Animation */
footer ul li a {
  transition: all var(--transition-fast, 200ms) var(--ease-out, ease-out);
  display: inline-block;
}
footer ul li a:hover {
  transform: translateX(5px);
  color: var(--accent-primary, #6366f1) !important;
}

/* Footer Social Media Icons */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal, 300ms) var(--ease-out, ease-out);
  margin-right: 0.5rem;
}
.social-icon:hover {
  transform: translateY(-3px);
}
.social-icon.discord:hover {
  background: rgba(88, 101, 242, 0.2);
  border-color: #5865f2;
  color: #5865f2 !important;
}
.social-icon.twitter:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: #000;
  color: #ffffff !important;
}

/* Footer Wave Divider */
.footer-wave-divider {
  position: relative;
  overflow: hidden;
  line-height: 0;
  margin-top: -1px;
}
.footer-wave-divider svg {
  display: block;
  width: 100%;
  height: 60px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes heroLogoFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 4px 12px rgba(111, 66, 193, 0.3));
  }
  50% {
    transform: translateY(-12px) scale(1.02);
    filter: drop-shadow(0 12px 24px rgba(111, 66, 193, 0.5));
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Scroll-Triggered Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity var(--transition-slow, 500ms) var(--ease-out, ease-out),
    transform var(--transition-slow, 500ms) var(--ease-out, ease-out);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Button Active Press Effect */
.btn:active {
  transform: scale(0.95);
}

/* Clickable Elements Feedback */
.manga-card,
.category-card,
.stat-card,
[role="button"] {
  cursor: pointer;
}

/* Responsive Design */
/* Large tablets and small desktops */
@media (max-width: 992px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .display-4 {
    font-size: 2.5rem;
  }

  .display-5 {
    font-size: 2rem;
  }

  .display-6 {
    font-size: 1.75rem;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .hero-section {
    min-height: 60vh;
    padding: 3rem 0;
  }

  .hero-nav {
    width: 38px;
    height: 38px;
  }

  .hero-pagination {
    bottom: 4rem;
  }

  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .stat-card {
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .display-4 {
    font-size: 2rem;
  }

  .display-5 {
    font-size: 1.75rem;
  }

  .display-6 {
    font-size: 1.5rem;
  }

  /* Navbar improvements */
  .navbar-nav {
    text-align: center;
    padding: 1rem 0;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0;
    border-radius: var(--radius-md, 0.5rem);
  }

  /* Button groups */
  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md, 0.5rem) !important;
  }

  /* Filter improvements */
  .filter-card {
    padding: 1.5rem;
  }

  .filter-card .row > div {
    margin-bottom: 1rem;
  }

  /* Card spacing */
  .card-body {
    padding: 1.5rem;
  }

  footer .social-icon {
    margin-bottom: 0.5rem;
  }

  /* Touch target minimum sizes */
  .btn,
  .nav-link,
  .form-control,
  .page-link,
  .dropdown-item {
    min-height: var(--touch-target-min, 44px);
  }
}

/* Mobile phones */
@media (max-width: 576px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .hero-section {
    min-height: 50vh;
    padding: 2rem 0;
    text-align: center;
  }

  .hero-nav {
    width: 34px;
    height: 34px;
  }

  .hero-nav-prev {
    left: 0.6rem;
  }

  .hero-nav-next {
    right: 0.6rem;
  }

  .hero-pagination {
    bottom: 3.6rem;
  }

  .hero-title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
  }

  /* Hero staggered fade-in reduced delays */
  .hero-content .hero-title {
    animation-delay: 0ms;
  }
  .hero-content .hero-subtitle {
    animation-delay: 100ms;
  }
  .hero-content .d-flex {
    animation-delay: 200ms;
  }

  /* Navbar mobile fixes */
  .navbar-brand {
    font-size: 1.1rem;
  }

  .navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md, 0.5rem);
  }

  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
  }

  .navbar-collapse {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .dropdown-menu {
    position: static !important;
    transform: none !important;
    border: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.05) !important;
    margin-top: 0.5rem;
  }

  /* Button improvements */
  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    width: 100%;
    margin-bottom: 0.5rem;
    text-transform: none;
    letter-spacing: 0;
  }

  .d-flex .btn {
    width: auto;
    margin-bottom: 0;
    margin-right: 0.5rem;
  }

  .d-flex .btn:last-child {
    margin-right: 0;
  }

  /* Card improvements */
  .card {
    margin-bottom: 1.5rem;
  }

  .card-body {
    padding: 1.25rem;
  }

  .filter-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }

  /* Stats section */
  .stats-section {
    padding: 2rem 0;
  }

  .stat-card {
    padding: 1.25rem 0.75rem;
    margin-bottom: 1rem;
  }

  .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
  }

  .stat-number {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
  }

  /* Category grid */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 2rem;
  }

  .category-card {
    padding: 1.5rem 1rem;
  }

  .category-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  /* Typography fixes */
  .display-4 {
    font-size: 1.75rem;
  }

  .display-5 {
    font-size: 1.5rem;
  }

  .display-6 {
    font-size: 1.15rem;
  }

  .lead {
    font-size: 1rem;
  }

  .manga-card .card-title {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  /* Form improvements */
  .form-control {
    padding: 0.75rem;
    font-size: 1rem;
  }

  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  /* Footer improvements */
  footer .row > div {
    margin-bottom: 2rem;
    text-align: center;
  }

  footer .col-lg-4,
  footer .col-lg-8 {
    text-align: center;
  }

  /* Pagination improvements */
  .pagination {
    justify-content: center;
    flex-wrap: wrap;
  }

  .page-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  /* Toast improvements */
  .toast-container {
    width: 100%;
    padding: 1rem;
  }

  .toast {
    width: 100%;
    max-width: none;
  }
}

/* Extra small phones */
@media (max-width: 380px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .category-card {
    padding: 1rem 0.75rem;
  }

  .btn {
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
  }

  .filter-card .row {
    margin: 0;
  }

  .filter-card .col-lg-4,
  .filter-card .col-lg-3,
  .filter-card .col-lg-2,
  .filter-card .col-lg-1 {
    padding: 0;
    margin-bottom: 1rem;
  }
}

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Global Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.loading-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl, 1rem);
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.loading-spinner-container .loading-spinner {
  width: 40px;
  height: 40px;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: var(--accent-primary, #6366f1);
}

.loading-text {
  color: var(--text-primary, #ffffff);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

/* Button Loading States */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading .btn-text {
  opacity: 0;
}

.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* List Loading States */
.list-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--text-secondary, #d1d5db);
  font-size: 0.875rem;
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border-radius: var(--radius-lg, 0.75rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1rem 0;
}

.list-loading .loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--accent-primary, #6366f1);
}

/* Card Loading Skeleton */
.card-skeleton {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl, 1rem);
  padding: 1rem;
  animation: pulse 1.5s ease-in-out infinite alternate;
}

.skeleton-line {
  height: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.medium {
  width: 80%;
}

.skeleton-line.long {
  width: 100%;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

/* Skeleton Shimmer Animation */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-cover {
  width: 100%;
  height: 250px;
  background: linear-gradient(
    90deg,
    var(--skeleton-base, rgba(255, 255, 255, 0.05)) 25%,
    var(--skeleton-shine, rgba(255, 255, 255, 0.1)) 50%,
    var(--skeleton-base, rgba(255, 255, 255, 0.05)) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg, 0.75rem);
}

.skeleton-cover.loaded {
  display: none;
}

/* Form Loading States */
.form-loading {
  position: relative;
  pointer-events: none;
}

.form-loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(1px);
  border-radius: inherit;
  z-index: 1;
}

/* Loading States Utilities */
.loading-fade-in {
  animation: fadeIn 0.3s ease;
}

.loading-fade-out {
  animation: fadeOut 0.3s ease forwards;
}

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

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Toast Notifications */
.toast {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: var(--text-primary, #ffffff);
  border-radius: var(--radius-lg, 0.75rem);
}

.toast-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #ffffff);
}

/* Toast Type Colors */
.toast.toast-success {
  border-left: 4px solid var(--accent-success, #10b981);
}

.toast.toast-danger {
  border-left: 4px solid var(--accent-danger, #ef4444);
}

.toast.toast-info {
  border-left: 4px solid var(--accent-info, #06b6d4);
}

.toast.toast-warning {
  border-left: 4px solid var(--accent-warning, #f59e0b);
}

/* API Request Spinner */
.btn .loading-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  vertical-align: middle;
}

/* Utility Classes */
.text-gradient {
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-glass {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.bg-glass:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

.bg-glass:hover .fa-3x {
  transform: scale(1.15);
}

.bg-glass .fa-3x {
  transition: transform 0.3s ease;
}

.shadow-glow {
  box-shadow: var(--shadow-glow, 0 0 30px rgba(99, 102, 241, 0.3));
}

.border-gradient {
  border: 1px solid;
  border-image: var(
      --gradient-primary,
      linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
    )
    1;
}

/* UNIFIED TEXT TRUNCATE RULES FOR ALL MANGA CARDS */
/* Text Truncate Utility - Bootstrap equivalent */
.text-truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* SUPER STRONG UNIFIED MANGA CARD TITLE TRUNCATE - ALL PAGES */
/* Primary rules with highest specificity */
.manga-card .title-badge-container .card-title,
.manga-card .title-badge-container h5.card-title,
.manga-card .title-badge-container h6.card-title,
.card.manga-card .title-badge-container .card-title,
.card.manga-card .title-badge-container h5.card-title,
.card.manga-card .title-badge-container h6.card-title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  word-wrap: normal !important;
  word-break: normal !important;
  text-overflow: ellipsis !important;
}

/* Links inside titles - super specific */
.manga-card .title-badge-container .card-title a,
.manga-card .title-badge-container h5.card-title a,
.manga-card .title-badge-container h6.card-title a,
.card.manga-card .title-badge-container .card-title a,
.card.manga-card .title-badge-container h5.card-title a,
.card.manga-card .title-badge-container h6.card-title a {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  text-decoration: none !important;
  word-wrap: normal !important;
  word-break: normal !important;
}

/* Page-specific super strong rules - LATEST PAGE */
body .container .row .manga-card .title-badge-container .card-title,
body .container .row .manga-card .title-badge-container h5.card-title,
body .container .row .manga-card .title-badge-container h6.card-title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  word-wrap: normal !important;
  word-break: normal !important;
}

body .container .row .manga-card .title-badge-container .card-title a,
body .container .row .manga-card .title-badge-container h5.card-title a,
body .container .row .manga-card .title-badge-container h6.card-title a {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  text-decoration: none !important;
  word-wrap: normal !important;
  word-break: normal !important;
}

/* Grid container specific rules - POPULAR PAGE */
#mangaGrid .manga-card .title-badge-container .card-title,
#mangaGrid .manga-card .title-badge-container h5.card-title,
#mangaGrid .manga-card .title-badge-container h6.card-title,
#mangaGrid .card.manga-card .title-badge-container .card-title,
#mangaGrid .card.manga-card .title-badge-container h5.card-title,
#mangaGrid .card.manga-card .title-badge-container h6.card-title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  word-wrap: normal !important;
  word-break: normal !important;
}

#mangaGrid .manga-card .title-badge-container .card-title a,
#mangaGrid .manga-card .title-badge-container h5.card-title a,
#mangaGrid .manga-card .title-badge-container h6.card-title a,
#mangaGrid .card.manga-card .title-badge-container .card-title a,
#mangaGrid .card.manga-card .title-badge-container h5.card-title a,
#mangaGrid .card.manga-card .title-badge-container h6.card-title a {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  text-decoration: none !important;
  word-wrap: normal !important;
  word-break: normal !important;
}

/* Bootstrap override - force text truncation on all pages */
.card-title.text-truncate,
h5.card-title.text-truncate,
h6.card-title.text-truncate,
.manga-card .card-title,
.manga-card h5.card-title,
.manga-card h6.card-title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  word-wrap: normal !important;
  word-break: normal !important;
}

/* Bootstrap override - links inside titles */
.card-title.text-truncate a,
h5.card-title.text-truncate a,
h6.card-title.text-truncate a,
.manga-card .card-title a,
.manga-card h5.card-title a,
.manga-card h6.card-title a {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  text-decoration: none !important;
  word-wrap: normal !important;
  word-break: normal !important;
}

/* NUCLEAR OPTION - Catch all manga title truncation */
[class*="manga-card"] .card-title,
[class*="manga-card"] h5,
[class*="manga-card"] h6,
.card [class*="card-title"] {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  word-wrap: normal !important;
  word-break: normal !important;
}

[class*="manga-card"] .card-title a,
[class*="manga-card"] h5 a,
[class*="manga-card"] h6 a,
.card [class*="card-title"] a {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  text-decoration: none !important;
  word-wrap: normal !important;
  word-break: normal !important;
}

/* Auth Pages */
.auth-page {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 50px;
}

.auth-card {
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  animation: fadeInUp 0.6s ease-out;
}

.auth-header {
  text-align: center;
  padding: 40px 40px 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(
    135deg,
    var(--accent-primary, #6366f1) 0%,
    var(--accent-secondary, #8b5cf6) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.auth-icon.text-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
}

.auth-title {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  margin-bottom: 0;
}

.auth-body {
  padding: 40px;
}

.auth-form .form-group {
  margin-bottom: 25px;
}

.auth-form .form-label {
  color: #fff;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.auth-form .form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  padding: 12px 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.auth-form .form-control:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary, #6366f1);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
  color: #fff;
}

.auth-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.auth-form .form-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-top: 5px;
}

.auth-form .form-check {
  margin: 20px 0;
}

.auth-form .form-check-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.auth-form .form-check-input:checked {
  background-color: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
}

.auth-form .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

.btn-auth {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-auth::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-auth:hover::before {
  left: 100%;
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 30px 0;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
}

.auth-divider span {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer {
  text-align: center;
}

.auth-footer p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.auth-footer .btn {
  border-radius: 10px;
  padding: 10px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.auth-footer .btn:hover {
  transform: translateY(-2px);
}

/* Alert styles for auth pages */
.auth-page .alert {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.auth-page .alert-danger {
  background: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.3);
  color: #fff;
}

.auth-page .alert-success {
  background: rgba(40, 167, 69, 0.2);
  border-color: rgba(40, 167, 69, 0.3);
  color: #fff;
}

/* Validation states for auth forms */
.auth-form .form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.auth-form .form-control.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Auth responsive */
@media (max-width: 768px) {
  .auth-container {
    padding: 80px 15px 30px;
  }

  .auth-card {
    max-width: 400px;
    margin-top: 1rem;
  }

  .auth-header {
    padding: 30px 30px 15px;
  }

  .auth-body {
    padding: 30px;
  }

  .auth-icon {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }

  .auth-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 576px) {
  .auth-container {
    padding: 70px 10px 20px;
  }

  .auth-header {
    padding: 25px 20px 15px;
  }

  .auth-body {
    padding: 25px 20px;
  }

  .auth-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .auth-title {
    font-size: 1.4rem;
  }

  .auth-subtitle {
    font-size: 0.9rem;
  }
}

.admin-content .table,
.table {
  color: #f5f7fa !important;
  background-color: #0f131a !important;
  border-color: #2b3442 !important;
  --bs-table-color: #f5f7fa;
  --bs-table-bg: #0f131a;
  --bs-table-border-color: #2b3442;
  --bs-table-striped-bg: #131922;
  --bs-table-striped-color: #f5f7fa;
  --bs-table-active-bg: #1b2230;
  --bs-table-active-color: #f5f7fa;
  --bs-table-hover-bg: #1b2230;
  --bs-table-hover-color: #f5f7fa;
}

.admin-content .table thead,
.admin-content .table thead tr,
.table thead,
.table thead tr {
  background-color: #0b1220 !important;
}

.admin-content .table thead th,
.admin-content .table thead td,
.table thead th,
.table thead td {
  color: #f8fafc !important;
  border-color: #2b3442 !important;
  background-color: #0b1220 !important;
  background-image: none !important;
}

.admin-content .table tbody tr,
.table tbody tr {
  background-color: #0f131a !important;
}

.admin-content .table tbody tr:nth-of-type(odd),
.table tbody tr:nth-of-type(odd) > * {
  background-color: #131922 !important;
}

.admin-content .table tbody tr:hover,
.table tbody tr:hover > * {
  background-color: #1b2230 !important;
}

.admin-content .table .text-muted,
.table .text-muted {
  color: #c7d1df !important;
}

.admin-content .table a:not(.btn),
.table a:not(.btn) {
  color: #7aa2ff !important;
  text-decoration: none;
}

.admin-content .table a:not(.btn):hover,
.table a:not(.btn):hover {
  color: #9ec3ff !important;
  text-decoration: underline;
}

.admin-content .pagination .page-link {
  background-color: #0b1220 !important;
  border-color: #2b3442 !important;
  color: #f5f7fa !important;
}

.admin-content .pagination .page-item.active .page-link {
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  ) !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
  color: #ffffff !important;
}

/* Favorites page: fix "Görüntüle" button layout on small screens */
@media (max-width: 768px) {
  /* Stack date and action button vertically for clarity */
  #favoritesGrid .manga-card .card-body .d-flex.align-items-center {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  /* Make the action button full-width and keep text on one line */
  #favoritesGrid .manga-card .card-body .btn {
    width: 100% !important;
    text-align: center;
    white-space: nowrap;
  }

  /* Prevent long dates from breaking layout */
  #favoritesGrid .manga-card .card-body small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Favorites page: desktop alignment fixes (default >=769px) */
#favoritesGrid .manga-card .card-body .d-flex.align-items-center {
  gap: 0.5rem;
}

#favoritesGrid .manga-card .card-body .d-flex.align-items-center small {
  flex: 1 1 auto;
  min-width: 0; /* allow ellipsis */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#favoritesGrid .manga-card .card-body .d-flex.align-items-center .btn {
  flex: 0 0 auto; /* keep button size, don't shrink */
  white-space: nowrap; /* keep on one line */
}

/* Contrast safety net: fix low-contrast text on light backgrounds (esp. profile page) */
.bg-light,
.card.bg-light {
  background-color: var(--bg-glass, rgba(255, 255, 255, 0.05)) !important;
  color: var(--text-primary, #ffffff) !important;
}

/* Helper: ensure helper texts are readable on dark/glass backgrounds */
.form-text {
  color: var(--text-secondary, #d1d5db) !important;
}

/* Badges with bright backgrounds must keep dark text for readability */
.badge.bg-warning,
.badge.bg-light {
  color: #111 !important;
}

/* Active dropdown items: enforce high contrast */
.dropdown-menu .dropdown-item.active,
.dropdown-menu-dark .dropdown-item.active {
  background: var(--accent-primary, #6366f1) !important;
  color: #fff !important;
}

/* Lists inside cards: regular text slightly dimmed, emphasized parts bright */
.card .list-unstyled li,
.card li {
  color: var(--text-secondary, #d1d5db) !important;
}
.card .list-unstyled li strong,
.card strong {
  color: var(--text-primary, #ffffff) !important;
}

/* Global dark-theme alert overrides: ensure high contrast on all pages (incl. profile) */
.alert {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05)) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: var(--text-primary, #ffffff) !important;
}

.alert a {
  color: #c7d2fe !important; /* indigo-200 */
  text-decoration: underline;
}
.alert a:hover {
  color: #e0e7ff !important; /* indigo-100 */
}

/* Variant tints for readability on dark background */
.alert-success {
  background-color: rgba(16, 185, 129, 0.18) !important; /* green */
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #ffffff !important;
}
.alert-danger {
  background-color: rgba(239, 68, 68, 0.18) !important; /* red */
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #ffffff !important;
}
.alert-warning {
  background-color: rgba(245, 158, 11, 0.18) !important; /* amber */
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #ffffff !important;
}
.alert-info {
  background-color: rgba(6, 182, 212, 0.18) !important; /* cyan */
  border-color: rgba(6, 182, 212, 0.35) !important;
  color: #ffffff !important;
}

/* Close button should stay visible on dark alerts */
.alert .btn-close {
  filter: invert(1) grayscale(100%);
}

/* Dark theme: outline button contrast fixes (keeps borders visible despite global .btn reset) */
.btn-outline-danger {
  border: 2px solid var(--accent-danger, #ef4444) !important;
  color: var(--accent-danger, #ef4444) !important;
  background: transparent !important;
}
.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background: var(--accent-danger, #ef4444) !important;
  color: #ffffff !important;
  border-color: var(--accent-danger, #ef4444) !important;
}

.btn-outline-info {
  border: 2px solid var(--accent-info, #06b6d4) !important;
  color: var(--accent-info, #06b6d4) !important;
  background: transparent !important;
}
.btn-outline-info:hover,
.btn-outline-info:focus {
  background: var(--accent-info, #06b6d4) !important;
  color: #ffffff !important;
  border-color: var(--accent-info, #06b6d4) !important;
}

/* Optional: keep other outline variants readable on dark bg */
.btn-outline-primary {
  border: 2px solid var(--accent-primary, #6366f1) !important;
  color: var(--accent-primary, #6366f1) !important;
  background: transparent !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--accent-primary, #6366f1) !important;
  color: #ffffff !important;
  border-color: var(--accent-primary, #6366f1) !important;
}

/* Navbar brand: replace ghost icon + text with site logo (/images/logo.png) */
.navbar-brand {
  /* Hide any text nodes (e.g., "Gengar Scans") while keeping accessibility via hidden span */
  font-size: 0 !important;
  line-height: 0;
  display: inline-flex;
  align-items: center;
}

/* Hide any existing icon in brand */
.navbar-brand i {
  display: none !important;
}

/* Keep original text accessible but not visible (if wrapped in span) */
.navbar-brand span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Inject logo image as brand content */
.navbar-brand::before {
  content: "";
  display: inline-block;
  height: 40px;
  width: 50px; /* tune width for your logo aspect */
  background-image: url("/images/logo.png");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
}

/* Responsive sizing for smaller screens */
@media (max-width: 768px) {
  .navbar-brand::before {
    height: 34px;
    width: 170px;
  }
}
@media (max-width: 576px) {
  .navbar-brand::before {
    height: 30px;
    width: 150px;
  }
}

/* Navbar brand spacing tweaks: reduce gap between logo and first link */
.navbar .navbar-brand {
  margin-right: 0.25rem !important; /* default ~1rem; tighten to bring "Ana Sayfa" closer */
}

/* Slightly reduce vertical navbar padding on large screens (optional visual compactness) */
@media (min-width: 992px) {
  .navbar {
    padding: 0.75rem 0;
  }
}

/* Listing headers: improve mobile segmented control (Latest/Popular) */
.latest-header .btn-check:checked + .btn,
.popular-header .btn-check:checked + .btn {
  background: var(--accent-primary, #6366f1) !important;
  border-color: var(--accent-primary, #6366f1) !important;
  color: #fff !important;
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
}

/* Compact and balanced buttons on small screens */
@media (max-width: 768px) {
  .latest-header,
  .popular-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .latest-header .btn-group,
  .popular-header .btn-group {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
  }
  .latest-header .btn-group .btn,
  .popular-header .btn-group .btn {
    flex: 1 1 0;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md, 0.5rem);
  }
}

/* Listing headers (Latest/Popular): polished segmented toggle styling */
.latest-header .btn-group .btn,
.popular-header .btn-group .btn {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05)) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: var(--text-secondary, #d1d5db) !important;
  box-shadow: none !important;
  transition: all 0.2s ease-in-out;
}
.latest-header .btn-group .btn:hover,
.popular-header .btn-group .btn:hover {
  color: var(--text-primary, #ffffff) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
.latest-header .btn-check:checked + .btn,
.popular-header .btn-check:checked + .btn {
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  ) !important;
  border-color: var(--accent-primary, #6366f1) !important;
  color: #fff !important;
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1)) !important;
}

/* Seamless segmented control edges */
.latest-header .btn-group .btn:first-of-type,
.popular-header .btn-group .btn:first-of-type {
  border-top-left-radius: var(--radius-md, 0.5rem) !important;
  border-bottom-left-radius: var(--radius-md, 0.5rem) !important;
}
.latest-header .btn-group .btn:last-of-type,
.popular-header .btn-group .btn:last-of-type {
  border-top-right-radius: var(--radius-md, 0.5rem) !important;
  border-bottom-right-radius: var(--radius-md, 0.5rem) !important;
}

/* Desktop/Tablet compactness */
@media (min-width: 577px) {
  .latest-header .btn-group .btn,
  .popular-header .btn-group .btn {
    padding: 0.5rem 0.9rem !important;
  }
}

/* Mobile: stacked header + full-width segmented without gaps */
@media (max-width: 576px) {
  .latest-header,
  .popular-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  /* Center title/text block */
  .latest-header > div:first-child,
  .popular-header > div:first-child {
    text-align: center;
  }
  .latest-header .btn-group,
  .popular-header .btn-group {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 0; /* seamless segments */
  }
  .latest-header .btn-group .btn,
  .popular-header .btn-group .btn {
    flex: 1 1 0;
    padding: 0.6rem 0.75rem !important;
    border-radius: 0 !important; /* reset middle buttons */
  }
  /* avoid double borders between segments */
  .latest-header .btn-group .btn + .btn,
  .popular-header .btn-group .btn + .btn {
    margin-left: -1px;
  }
  .latest-header .btn-group .btn:first-of-type,
  .popular-header .btn-group .btn:first-of-type {
    border-top-left-radius: var(--radius-md, 0.5rem) !important;
    border-bottom-left-radius: var(--radius-md, 0.5rem) !important;
  }
  .latest-header .btn-group .btn:last-of-type,
  .popular-header .btn-group .btn:last-of-type {
    border-top-right-radius: var(--radius-md, 0.5rem) !important;
    border-bottom-right-radius: var(--radius-md, 0.5rem) !important;
  }
}

/* Segmented header controls polish (Latest/Popular) */
.latest-header .btn-group,
.popular-header .btn-group {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg, 0.75rem);
  padding: 0.25rem;
  overflow: hidden; /* create seamless pill container */
}

.latest-header .btn-group .btn,
.popular-header .btn-group .btn {
  background: transparent !important;
  border: 0 !important;
  color: var(--text-secondary, #d1d5db) !important;
  box-shadow: none !important;
  transition: all 0.2s ease-in-out;
}

.latest-header .btn-group .btn i,
.popular-header .btn-group .btn i {
  font-size: 1.05rem;
  line-height: 1;
}

.latest-header .btn-group .btn:hover,
.popular-header .btn-group .btn:hover {
  color: var(--text-primary, #ffffff) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.latest-header .btn-check:checked + .btn,
.popular-header .btn-check:checked + .btn {
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  ) !important;
  border-color: var(--accent-primary, #6366f1) !important;
  color: #fff !important;
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1)) !important;
}

/* Ensure outer edges are rounded when not full-width */
.latest-header .btn-group .btn:first-of-type,
.popular-header .btn-group .btn:first-of-type {
  border-top-left-radius: var(--radius-md, 0.5rem) !important;
  border-bottom-left-radius: var(--radius-md, 0.5rem) !important;
}
.latest-header .btn-group .btn:last-of-type,
.popular-header .btn-group .btn:last-of-type {
  border-top-right-radius: var(--radius-md, 0.5rem) !important;
  border-bottom-right-radius: var(--radius-md, 0.5rem) !important;
}

/* Desktop/Tablet compact spacing */
@media (min-width: 577px) {
  .latest-header .btn-group .btn,
  .popular-header .btn-group .btn {
    padding: 0.5rem 0.9rem !important;
  }
}

/* Mobile: stacked header + full-width segmented control */
@media (max-width: 576px) {
  .latest-header,
  .popular-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .latest-header > div:first-child,
  .popular-header > div:first-child {
    text-align: center;
  }
  .latest-header .btn-group,
  .popular-header .btn-group {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 0; /* seamless segments */
  }
  .latest-header .btn-group .btn,
  .popular-header .btn-group .btn {
    flex: 1 1 0;
    padding: 0.6rem 0.75rem !important;
    border-radius: 0 !important; /* middle buttons flat edges */
  }
  /* Avoid double borders between neighbors inside the pill */
  .latest-header .btn-group .btn + .btn,
  .popular-header .btn-group .btn + .btn {
    margin-left: -1px;
  }
  /* Keep pill-rounded edges on the ends */
  .latest-header .btn-group .btn:first-of-type,
  .popular-header .btn-group .btn:first-of-type {
    border-top-left-radius: var(--radius-md, 0.5rem) !important;
    border-bottom-left-radius: var(--radius-md, 0.5rem) !important;
  }
  .latest-header .btn-group .btn:last-of-type,
  .popular-header .btn-group .btn:last-of-type {
    border-top-right-radius: var(--radius-md, 0.5rem) !important;
    border-bottom-right-radius: var(--radius-md, 0.5rem) !important;
  }
}

/* Force segmented buttons to stay horizontal on mobile (override global .btn-group rule) */
@media (max-width: 768px) {
  .latest-header .btn-group,
  .popular-header .btn-group {
    display: flex !important;
    flex-direction: row !important; /* ensure horizontal segments */
  }
  .latest-header .btn-group .btn,
  .popular-header .btn-group .btn {
    margin: 0 !important; /* reset any stacked spacing */
  }
}

/* Manga list: Filter button responsive width + typography fix */
@media (min-width: 992px) {
  .w-lg-auto {
    width: auto !important;
  }
}

/* Keep the "Filtrele" button not uppercase inside the filter form */
#filterForm .btn {
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* Manga list: Filter button layout polish (scope: only filter form) */
#filterForm .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem; /* match input height better */
  font-size: 0.95rem;
  line-height: 1.2;
  border-radius: var(--radius-md, 0.5rem);
  white-space: nowrap; /* prevent wrapping like "A" + "ra" */
  text-transform: none !important;
  letter-spacing: 0 !important;
}

#filterForm .btn i {
  font-size: 1rem;
}

/* Keep full-width on small screens without affecting larger breakpoints */
@media (max-width: 768px) {
  #filterForm .btn {
    width: 100%;
  }
}

/* Heroize gray header sections across pages to match homepage hero */
section.py-5.mt-5.bg-secondary {
  background: var(
    --gradient-hero,
    linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%)
  ) !important;
  position: relative;
  overflow: hidden;
}

/* Manga detail hero with dynamic background image */
.manga-hero {
  position: relative !important;
  overflow: hidden !important;
}

/* Grid pattern for all header sections (Categories, Latest, Popular) */
section.py-5.bg-secondary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

/* Remove grid pattern for manga detail page only */
section.py-5.bg-secondary.manga-hero::before {
  display: none !important;
}

/* Background image layer (behind grid overlay, behind content overlay) */
.manga-hero .manga-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.65; /* previously too low; make it visible against hero gradient */
  z-index: 0; /* sit below overlays and content */
  pointer-events: none;
}

/* Ensure content stays above background and overlays */
.manga-hero > .container {
  position: relative;
  z-index: 2;
}

/* Ensure content sits above overlay */
section.py-5.mt-5.bg-secondary > * {
  position: relative;
  z-index: 1;
}

/* Heroize gray (bg-secondary) header sections site-wide, except list detail hero (custom cover image) */
section.py-5.bg-secondary:not(.list-detail-hero) {
  background: var(
    --gradient-hero,
    linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%)
  ) !important;
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
}

/* Keep content above overlay */
section.py-5.bg-secondary:not(.list-detail-hero) > * {
  position: relative;
  z-index: 1;
}

/* Manga list header: match Latest/Popular segmented control styling */
.manga-header .btn-group {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg, 0.75rem);
  padding: 0.25rem;
  overflow: hidden; /* pill container */
}
.manga-header .btn-group .btn {
  background: transparent !important;
  border: 0 !important;
  color: var(--text-secondary, #d1d5db) !important;
  box-shadow: none !important;
  transition: all 0.2s ease-in-out;
}
.manga-header .btn-group .btn i {
  font-size: 1.05rem;
  line-height: 1;
}
.manga-header .btn-group .btn:hover {
  color: var(--text-primary, #ffffff) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}
.manga-header .btn-check:checked + .btn {
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  ) !important;
  border-color: var(--accent-primary, #6366f1) !important;
  color: #fff !important;
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1)) !important;
}
/* Edges */
.manga-header .btn-group .btn:first-of-type {
  border-top-left-radius: var(--radius-md, 0.5rem) !important;
  border-bottom-left-radius: var(--radius-md, 0.5rem) !important;
}
.manga-header .btn-group .btn:last-of-type {
  border-top-right-radius: var(--radius-md, 0.5rem) !important;
  border-bottom-right-radius: var(--radius-md, 0.5rem) !important;
}
/* Desktop/Tablet compact spacing */
@media (min-width: 577px) {
  .manga-header .btn-group .btn {
    padding: 0.5rem 0.9rem !important;
  }
}
/* Mobile layout: stack header content; full-width segmented control like Latest/Popular */
@media (max-width: 576px) {
  .manga-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .manga-header > div:first-child {
    text-align: center;
  }
  .manga-header .btn-group {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 0; /* seamless segments */
  }
  .manga-header .btn-group .btn {
    flex: 1 1 0;
    padding: 0.6rem 0.75rem !important;
    border-radius: 0 !important; /* middle buttons flat */
  }
  .manga-header .btn-group .btn + .btn {
    margin-left: -1px; /* avoid double border */
  }
  .manga-header .btn-group .btn:first-of-type {
    border-top-left-radius: var(--radius-md, 0.5rem) !important;
    border-bottom-left-radius: var(--radius-md, 0.5rem) !important;
  }
  .manga-header .btn-group .btn:last-of-type {
    border-top-right-radius: var(--radius-md, 0.5rem) !important;
    border-bottom-right-radius: var(--radius-md, 0.5rem) !important;
  }
}
/* Also ensure horizontal on small screens (override any global .btn-group column rules) */
@media (max-width: 768px) {
  .manga-header .btn-group {
    display: flex !important;
    flex-direction: row !important;
  }
  .manga-header .btn-group .btn {
    margin: 0 !important;
  }
}
/* Compact balanced buttons on small screens */
@media (max-width: 768px) {
  .manga-header .btn-group .btn {
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md, 0.5rem);
  }
}

/* History page: desktop alignment fixes (ensure date visible next to action button) */
#historyGrid .manga-card .card-body .d-flex.align-items-center {
  gap: 0.5rem;
}
#historyGrid .manga-card .card-body .d-flex.align-items-center small {
  flex: 1 1 auto;
  min-width: 0; /* allow ellipsis to work */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* show truncated date instead of collapsing */
}
#historyGrid .manga-card .card-body .d-flex.align-items-center .btn {
  flex: 0 0 auto; /* keep action button size */
  white-space: nowrap;
}

/* Force date to its own line on narrow desktop cards (favorites + history) */
#favoritesGrid .manga-card .card-body .d-flex.align-items-center,
#historyGrid .manga-card .card-body .d-flex.align-items-center {
  flex-wrap: wrap !important; /* allow items to wrap to next row */
}

/* Date line spans full width, always visible */
#favoritesGrid .manga-card .card-body .d-flex.align-items-center small,
#historyGrid .manga-card .card-body .d-flex.align-items-center small {
  flex: 0 0 100% !important; /* occupy full row */
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important; /* prevent overflow with ellipsis */
  order: 1; /* keep date before button */
  margin-bottom: 0.25rem;
}

/* Action button stays on the next row, aligned to the right */
#favoritesGrid .manga-card .card-body .d-flex.align-items-center .btn,
#historyGrid .manga-card .card-body .d-flex.align-items-center .btn {
  order: 2;
  margin-left: 0 !important; /* left align on its row */
  flex: 0 0 auto !important;
  white-space: nowrap;
}

/* Favorites + History: align action buttons to bottom consistently across cards */
#favoritesGrid .manga-card,
#historyGrid .manga-card {
  display: flex !important; /* make the card a flex column */
  flex-direction: column !important;
  height: 100% !important; /* stretch to full column height */
}

#favoritesGrid .manga-card .card-body,
#historyGrid .manga-card .card-body {
  display: flex !important; /* stack card body content */
  flex-direction: column !important;
  flex: 1 1 auto !important; /* allow card-body to grow and push footer row down */
}

/* Bottom-align the (date + button) action row within each card */
#favoritesGrid .manga-card .card-body .d-flex.align-items-center:last-child,
#historyGrid .manga-card .card-body .d-flex.align-items-center:last-child {
  margin-top: auto !important; /* anchor the action row to the bottom of the card body */
}

/* Keep our earlier visibility rules (wrap + full-width date + right-aligned button) */
#favoritesGrid .manga-card .card-body .d-flex.align-items-center,
#historyGrid .manga-card .card-body .d-flex.align-items-center {
  flex-wrap: wrap !important;
}

#favoritesGrid .manga-card .card-body .d-flex.align-items-center small,
#historyGrid .manga-card .card-body .d-flex.align-items-center small {
  flex: 0 0 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  order: 1;
  margin-bottom: 0.25rem;
}

#favoritesGrid .manga-card .card-body .d-flex.align-items-center .btn,
#historyGrid .manga-card .card-body .d-flex.align-items-center .btn {
  order: 2;
  margin-left: 0 !important;
  flex: 0 0 auto !important;
  white-space: nowrap;
}

@media (max-width: 768px) {
  /* Use a consistent stacked layout on mobile and tablets */
  #favoritesGrid .manga-card .card-body .d-flex.align-items-center,
  #historyGrid .manga-card .card-body .d-flex.align-items-center {
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important; /* override desktop wrap */
    gap: 0.5rem !important;
  }

  /* Date row: full width, ellipsis */
  #favoritesGrid .manga-card .card-body .d-flex.align-items-center small,
  #historyGrid .manga-card .card-body .d-flex.align-items-center small {
    order: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 0 !important;
  }

  /* Action button: full width, left margin reset */
  #favoritesGrid .manga-card .card-body .d-flex.align-items-center .btn,
  #historyGrid .manga-card .card-body .d-flex.align-items-center .btn {
    order: 2 !important;
    width: 100% !important;
    align-self: stretch !important;
    margin-left: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    text-align: center !important;
  }
}

@media (max-width: 768px) {
  /* Container row (date + button) */
  #favoritesGrid .manga-card .card-body .d-flex.align-items-center,
  #historyGrid .manga-card .card-body .d-flex.align-items-center {
    justify-content: flex-start !important; /* override .justify-content-between from Bootstrap */
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
  }

  /* Date line: full width with ellipsis */
  #favoritesGrid .manga-card .card-body .d-flex.align-items-center small,
  #historyGrid .manga-card .card-body .d-flex.align-items-center small {
    order: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 0 !important;
  }

  /* Action button: full width, no left auto margin */
  #favoritesGrid .manga-card .card-body .d-flex.align-items-center .btn,
  #historyGrid .manga-card .card-body .d-flex.align-items-center .btn {
    order: 2 !important;
    width: 100% !important;
    align-self: stretch !important;
    margin-left: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    text-align: center !important;
  }
}

.navbar .navbar-toggler-icon {
  background-image: none !important; /* kill default black bars */
  color: #fff !important; /* ensure text/icon color is white */
}
.navbar .navbar-toggler-icon i {
  color: #fff !important; /* FA bars icon stays white */
}

/* Reader navbar - top layer for navigation */
.navbar-reader {
  z-index: 1040 !important; /* Top navigation layer */
}
.reader-content {
  padding-top: 72px;
  padding-bottom: 80px;
}
@media (max-width: 768px) {
  .reader-content {
    padding-top: 64px;
  }

  .ad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1.5rem 0;
    padding: 0.75rem; /* Reduced padding */
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg, 0.75rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden; /* Prevent content overflow */
    /* CRITICAL: Ensure proper width without viewport overflow */
    width: 100%;
    max-width: 100%; /* Prevent viewport overflow */
    min-width: 280px; /* Reduced from 300px */
    box-sizing: border-box;
  }

  .ad-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
      135deg,
      rgba(99, 102, 241, 0.03) 0%,
      rgba(139, 92, 246, 0.03) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .ad-container:hover::before {
    opacity: 1;
  }

  .ad-container:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
  }

  /* Ad label styling */
  .ad-label {
    font-size: 0.75rem;
    color: var(--text-muted, #9ca3af);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
  }

  /* Banner ad specific styling - FIXED: Viewport overflow */
  .ad-banner {
    margin: 2rem 0;
    text-align: center;
    width: 100%;
    max-width: 100%; /* Prevent overflow */
    min-width: 280px; /* Reduced from 320px */
    overflow: hidden; /* Prevent content overflow */
    box-sizing: border-box;
  }

  .ad-banner .ad-container {
    width: 100%;
    max-width: 100%; /* Prevent overflow */
    min-width: 280px; /* Reduced from 320px */
    min-height: 90px; /* Standard banner height */
    box-sizing: border-box;
    overflow: hidden; /* Prevent content overflow */
  }

  .ad-banner ins.adsbygoogle {
    width: 100% !important;
    min-width: 280px !important; /* Reduced from 320px */
    max-width: 100% !important; /* Allow flexible width */
    display: block !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent content overflow */
  }

  /* Sidebar ad specific styling - FIXED: Viewport overflow */
  .ad-sidebar {
    margin: 1.5rem 0;
    position: sticky;
    top: 100px; /* Account for navbar height */
    width: 100%;
    max-width: 100%; /* Prevent overflow */
    min-width: 200px; /* Reduced from 250px */
    overflow: hidden; /* Prevent content overflow */
    box-sizing: border-box;
  }

  .ad-sidebar .ad-container {
    width: 100%;
    max-width: 100%; /* Prevent overflow */
    min-width: 200px; /* Reduced from 250px */
    max-width: 336px;
    min-height: 250px; /* Standard rectangle height */
    box-sizing: border-box;
    overflow: hidden; /* Prevent content overflow */
  }

  .ad-sidebar ins.adsbygoogle {
    width: 100% !important;
    min-width: 200px !important; /* Reduced from 250px */
    max-width: 100% !important; /* Allow flexible width */
    display: block !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent content overflow */
  }

  /* Mobile sticky ad styling - FIXED: availableWidth=0 */
  /* Mobile Sticky Ad - OPTIMIZED STRUCTURE */
  .mobile-sticky-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1020; /* Standard mobile ad layer */
    background: var(--bg-card, rgba(25, 25, 25, 0.8));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 100%;
    min-width: 250px;
    box-sizing: border-box;
    display: block;
    overflow: visible;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-sticky-ad .sticky-wrapper {
    position: relative;
    padding: 0.75rem; /* REDUCED: 1rem -> 0.75rem for better spacing balance */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 250px;
    min-height: 90px; /* REDUCED: 100px -> 90px for better height balance */
    box-sizing: border-box;
    overflow: visible;
  }

  .mobile-sticky-ad .ad-label {
    margin-bottom: 1rem;
    text-align: center;
  }

  .mobile-sticky-ad .ad-label small {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .mobile-sticky-ad ins.adsbygoogle {
    width: 100% !important;
    min-width: 250px !important; /* FIXED: 280px → 260px zoom problemini çözer */
    max-width: 100% !important; /* Allow flexible width */
    margin: 0 auto !important;
    display: block !important;
    box-sizing: border-box !important;
    overflow: visible !important; /* Allow AdSense content to display */
  }

  .mobile-sticky-ad .ad-placeholder {
    background: linear-gradient(
      135deg,
      rgba(99, 102, 241, 0.1) 0%,
      rgba(139, 92, 246, 0.1) 100%
    );
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md, 0.5rem);
    width: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Close button for mobile sticky ads - OPTIMIZED */
  .mobile-sticky-ad .close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 0, 0, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    pointer-events: all;
  }

  .mobile-sticky-ad .close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
  }

  /* Reader page mobile sticky ad - OPTIMIZED */
  body.reader-body .mobile-sticky-ad {
    z-index: 1010;
  }

  body.reader-body .mobile-sticky-ad .sticky-wrapper {
    padding: 0.5rem;
    min-height: 250px;
  }

  body.reader-body .chapter-nav-bottom {
    z-index: 1030;
    position: relative;
  }

  body.reader-body .mobile-sticky-ad ins.adsbygoogle {
    min-height: 50px;
  }

  /* Development placeholder styling */
  .ad-placeholder {
    background: linear-gradient(
      135deg,
      rgba(99, 102, 241, 0.1) 0%,
      rgba(139, 92, 246, 0.1) 100%
    );
    border: 2px dashed rgba(99, 102, 241, 0.3);
    color: var(--text-muted, #9ca3af);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius-md, 0.5rem);
  }

  .ad-placeholder i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
  }

  /* Responsive ad behavior - FIXED: availableWidth=0 for all breakpoints */
  @media (max-width: 768px) {
    /* Mobile sticky ads visible on tablets and phones */
    .mobile-sticky-ad {
      display: block;
    }

    /* Hide sidebar ads on mobile */
    .ad-sidebar {
      display: none;
    }

    /* Adjust banner ads for mobile - FIXED VIEWPORT */
    .ad-banner {
      width: 100%;
      max-width: 100%;
      min-width: 250px; /* FIXED: 280px → 260px zoom problemini çözer */
      overflow: hidden; /* Prevent content overflow */
    }

    .ad-banner .ad-container {
      margin: 1rem 0;
      padding: 0.5rem; /* Reduced padding */
      min-height: 50px;
      width: 100%;
      max-width: 100%;
      min-width: 250px; /* FIXED: 280px → 260px zoom problemini çözer */
      box-sizing: border-box;
      overflow: hidden; /* Prevent content overflow */
    }

    .ad-banner ins.adsbygoogle {
      min-width: 250px !important; /* FIXED: 280px → 260px zoom problemini çözer */
      max-width: 100% !important; /* Allow flexible width */
      overflow: hidden !important; /* Prevent content overflow */
    }

    /* Adjust ad container spacing on mobile - FIXED VIEWPORT */
    .ad-container {
      margin: 1rem 0;
      padding: 0.5rem; /* Reduced padding */
      width: 100%;
      max-width: 100%; /* Ensure no overflow */
      min-width: 280px; /* Reduced from 300px */
      box-sizing: border-box;
      overflow: hidden; /* Prevent content overflow */
    }
  }

  @media (max-width: 576px) {
    /* Further mobile optimizations - FIXED VIEWPORT */
    .ad-banner .ad-container {
      margin: 0.75rem 0;
      padding: 0.25rem; /* Further reduced padding */
      width: 100%;
      max-width: 100%;
      min-width: 280px; /* Reduced from 320px */
      box-sizing: border-box;
      overflow: hidden;
    }

    .ad-container {
      margin: 0.75rem 0;
      padding: 0.25rem; /* Further reduced padding */
      width: 100%;
      max-width: 100%;
      min-width: 250px; /* FIXED: 280px → 260px zoom problemini çözer */
      box-sizing: border-box;
      overflow: hidden;
    }

    .ad-label {
      font-size: 0.7rem;
      margin-bottom: 0.25rem;
    }

    /* Ensure all ins elements have proper width - FIXED */
    ins.adsbygoogle {
      min-width: 250px !important; /* FIXED: 280px → 260px zoom problemini çözer */
      max-width: 100% !important; /* Prevent overflow */
      box-sizing: border-box !important;
      overflow: hidden !important; /* Prevent content spillover */
    }
  }

  /* Desktop optimizations - FIXED VIEWPORT */
  @media (min-width: 992px) {
    /* Larger sidebar ads on desktop */
    .ad-sidebar .ad-container {
      width: 100%;
      max-width: 100%;
      min-width: 200px; /* Reduced from 250px */
      max-width: 336px;
      min-height: 280px;
      box-sizing: border-box;
      overflow: hidden;
    }

    .ad-sidebar ins.adsbygoogle {
      min-width: 200px !important; /* Reduced from 250px */
      max-width: 100% !important; /* Allow flexible width */
      overflow: hidden !important;
    }

    /* Banner ads on desktop */
    .ad-banner .ad-container {
      width: 100%;
      max-width: 100%;
      min-width: 250px; /* FIXED: 280px → 260px zoom problemini çözer */
      box-sizing: border-box;
      overflow: hidden;
    }

    .ad-banner ins.adsbygoogle {
      min-width: 250px !important; /* FIXED: 280px → 260px zoom problemini çözer */
      max-width: 100% !important; /* Allow flexible width */
      overflow: hidden !important;
    }

    /* Hide mobile sticky on desktop */
    .mobile-sticky-ad {
      display: none;
    }
  }

  /* Ad loading states */
  .ad-container.loading {
    min-height: 100px;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 25%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(255, 255, 255, 0.02) 75%
    );
    background-size: 200% 100%;
    animation: adLoading 1.5s infinite;
  }

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

  /* AdSense script loading optimization */
  .adsbygoogle {
    background: transparent !important;
  }

  /* Ensure ads don't break layout */
  ins.adsbygoogle {
    text-decoration: none !important;
    background: transparent !important;
  }

  /* Content spacing adjustments when ads are present */
  .content-with-ads {
    margin-bottom: 160px; /* Account for mobile sticky ad */
  }

  @media (min-width: 769px) {
    .content-with-ads {
      margin-bottom: 0; /* No mobile sticky on desktop */
    }
  }
}

/* ============================================================ */
/* RATING WIDGET SYSTEM - Interactive 5-Star Rating Component */
/* ============================================================ */

/* Rating Widget Container */
.rating-widget {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl, 1rem);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.rating-widget:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

/* Rating Display Section */
.rating-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* Rating Stars Container */
.rating-stars {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg, 0.75rem);
  transition: all 0.3s ease;
}

/* Individual Rating Star */
.rating-star {
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: var(--radius-md, 0.5rem);
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.5rem;
  line-height: 1;
}

/* Star Icon Styling */
.rating-star .star-icon {
  transition: all 0.2s ease;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
}

/* Star States */
.rating-star:hover {
  color: #fbbf24; /* amber-400 */
  background: rgba(251, 191, 36, 0.1);
  transform: scale(1.1);
}

.rating-star:focus {
  outline: 2px solid var(--accent-primary, #6366f1);
  outline-offset: 2px;
  background: rgba(99, 102, 241, 0.1);
}

.rating-star.hover {
  color: #fbbf24; /* amber-400 */
  background: rgba(251, 191, 36, 0.1);
  transform: scale(1.05);
}

.rating-star.active {
  color: #f59e0b; /* amber-500 */
}

.rating-star.user-rated {
  color: #10b981; /* emerald-500 */
  background: rgba(16, 185, 129, 0.1);
}

/* Disabled Stars */
.rating-star:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

.rating-star:disabled:hover {
  transform: none;
  background: transparent;
}

/* Rating Label */
.rating-label {
  font-size: 0.875rem;
  color: var(--text-secondary, #d1d5db);
  text-align: center;
  min-height: 1.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md, 0.5rem);
  transition: all 0.3s ease;
}

/* Rating Statistics Section */
.rating-stats {
  margin-top: 1.5rem;
  animation: fadeInUp 0.6s ease-out;
}

.rating-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg, 0.75rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-average {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.average-score {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  line-height: 1;
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.average-stars {
  display: flex;
  gap: 0.125rem;
}

.display-star {
  color: rgba(255, 255, 255, 0.3);
  font-size: 1rem;
  transition: color 0.3s ease;
}

.display-star.active {
  color: #f59e0b;
}

.rating-count {
  text-align: center;
}

.total-ratings {
  font-size: 0.875rem;
  color: var(--text-muted, #9ca3af);
  font-weight: 500;
}

/* Rating Breakdown Bars */
.rating-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rating-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.bar-label {
  font-size: 0.875rem;
  color: var(--text-secondary, #d1d5db);
  font-weight: 500;
  min-width: 1rem;
  text-align: center;
}

.bar-star {
  color: #f59e0b;
  font-size: 0.875rem;
}

.bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  );
  border-radius: 4px;
  transition: width 0.8s ease;
  width: 0%;
}

.bar-percentage {
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
  min-width: 2.5rem;
  text-align: right;
  font-weight: 500;
}

/* Loading States */
.rating-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  color: var(--text-secondary, #d1d5db);
  font-size: 0.875rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg, 0.75rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-primary, #6366f1);
  animation: spin 1s linear infinite;
}

/* Message States */
.rating-error,
.rating-success {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg, 0.75rem);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  margin: 1rem 0;
  border: 1px solid;
  backdrop-filter: blur(10px);
}

.rating-error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

.rating-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

/* Rating Actions */
.rating-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
}

.rating-delete {
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md, 0.5rem);
  transition: all 0.3s ease;
}

.rating-delete:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
}

/* Compact Rating Widget (for lists) */
.rating-widget.compact {
  padding: 0.75rem;
  margin: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-widget.compact .rating-display {
  margin-bottom: 0.75rem;
}

.rating-widget.compact .rating-stars {
  gap: 0.125rem;
  padding: 0.25rem;
}

.rating-widget.compact .rating-star {
  padding: 0.25rem;
  font-size: 1.25rem;
}

.rating-widget.compact .rating-label {
  font-size: 0.75rem;
  padding: 0.125rem 0.25rem;
}

.rating-widget.compact .rating-stats {
  margin-top: 0.75rem;
}

.rating-widget.compact .rating-summary {
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.rating-widget.compact .average-score {
  font-size: 2rem;
}

.rating-widget.compact .rating-breakdown {
  gap: 0.5rem;
}

/* Inline Rating Display (for cards) */
.rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md, 0.5rem);
  font-size: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-inline .rating-stars {
  display: flex;
  gap: 0.125rem;
  background: none;
  padding: 0;
}

.rating-inline .rating-star {
  padding: 0;
  font-size: 0.875rem;
  color: #f59e0b;
  cursor: default;
  background: none;
}

.rating-inline .rating-star:hover {
  transform: none;
  background: none;
}

.rating-inline .rating-value {
  color: var(--text-secondary, #d1d5db);
  font-weight: 500;
  white-space: nowrap;
}

/* Container: No space-between, minimal gaps */
.admin-navbar .container-fluid {
  display: flex !important;
  justify-content: space-between !important; /* Sol grup - Sağ grup arası maksimum mesafe */
  align-items: center !important;
  padding: 0 1rem !important;
  gap: 0 !important; /* Container içinde gap kaldır */
}

/* Sol grup: ULTRA COMPACT - HİÇ BOŞLUK YOK */
.admin-navbar .d-flex.align-items-center:first-child {
  gap: 0 !important;
  flex-shrink: 0 !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

/* Navbar brand (LOGO) - TÜM SPACING KALDIR */
.admin-navbar .navbar-brand {
  margin: 0 !important;
  padding: 0 !important; /* Padding'i de komple kaldır */
  font-size: 1.2rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: auto !important;
  width: auto !important;
  flex-shrink: 0 !important;
  border: none !important;
  background: none !important;
}

/* Logo icon - hiç spacing yok */
.admin-navbar .navbar-brand i {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1.1rem !important;
  color: var(--accent-primary, #6366f1) !important;
  line-height: 1 !important;
}

/* Siteye Dön butonu - logo'ya YAPIŞTIR */
.admin-navbar .btn-outline-light {
  margin: 0 !important; /* Tüm margin'lar 0 */
  padding: 0.3rem 0.6rem !important;
  font-size: 0.75rem !important;
  border-radius: var(--radius-sm, 0.375rem) !important;
  flex-shrink: 0 !important;
  /* Logo'ya yapıştırmak için negative margin */
  margin-left: -2px !important; /* Bu butonu logo'ya yaklaştırır */
}

/* Siteye Dön butonu - logo'ya daha yakın */
.admin-navbar .btn-outline-light {
  margin-left: 0 !important;
  padding: 0.3rem 0.6rem !important; /* Daha compact button */
  font-size: 0.75rem !important;
  border-radius: var(--radius-sm, 0.375rem) !important;
}

/* Mobile toggle positioning */
.admin-navbar .navbar-toggler {
  order: 2 !important; /* Sol gruptan sonra gelsin */
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* SAĞ GRUP: Kullanıcı + Çıkış - TAM EN SAĞDA DİP DİBE */
.admin-navbar .d-none.d-lg-flex {
  order: 3 !important; /* En sona git */
  margin-left: 0 !important; /* Auto margin kaldır, space-between halleder */
  gap: 0.25rem !important; /* Kullanıcı bilgisi + çıkış arası minimal gap */
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* Kullanıcı bilgisi görünürlük ve styling */
.admin-navbar .navbar-text {
  display: inline-flex !important; /* flex yerine inline-flex */
  align-items: center !important;
  font-size: 0.8rem !important; /* Biraz küçült */
  color: #e5e7eb !important; /* Açık gri, görünür olsun */
  background: transparent !important;
  margin: 0 !important;
  padding: 0.3rem 0.5rem !important; /* Hafif padding */
  border-radius: var(--radius-sm, 0.375rem) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important; /* Hafif border */
}

/* Kullanıcı bilgisi ikonu */
.admin-navbar .navbar-text i {
  font-size: 0.75rem !important;
  margin-right: 0.3rem !important;
  color: var(--accent-primary, #6366f1) !important; /* İkonu vurgulu yap */
}

/* Çıkış butonu - compact */
.admin-navbar .d-none.d-lg-flex .btn-outline-light {
  padding: 0.3rem 0.6rem !important;
  font-size: 0.75rem !important;
  margin-left: 0 !important;
  border-radius: var(--radius-sm, 0.375rem) !important;
}

/* Çıkış butonu ikonu */
.admin-navbar .btn i.fa-right-from-bracket {
  font-size: 0.75rem !important;
  margin-right: 0.25rem !important;
}

/* Mobile layout - stack everything */
@media (max-width: 991.98px) {
  .admin-navbar .container-fluid {
    justify-content: space-between !important;
  }

  .admin-navbar .navbar-toggler {
    order: unset !important;
    margin-left: 0 !important;
  }

  /* Mobile'da sağ grup gizli, mobile menu'de göster */
  .admin-navbar .d-none.d-lg-flex {
    display: none !important;
  }
}

/* Admin navbar genel styling */
.admin-navbar {
  padding: 0.5rem 0 !important; /* Daha da compact vertical padding */
  background: rgba(10, 10, 10, 0.98) !important; /* Biraz daha opak */
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Tüm admin navbar elemanları - margin/padding reset */
.admin-navbar * {
  margin-bottom: 0 !important;
}

/* Icon genel boyutları */
.admin-navbar i {
  line-height: 1 !important;
  vertical-align: middle !important;
}

/* List view toggle buttons */
.btn-check:checked + .btn-outline-light {
  background-color: var(--accent-primary, #6366f1) !important;
  border-color: var(--accent-primary, #6366f1) !important;
  color: white !important;
}

/* Base list view layout */
.list-view .manga-card {
  display: flex !important;
  flex-direction: row !important;
  height: auto !important;
  min-height: 180px !important;
  overflow: hidden !important;
}

.list-view .position-relative {
  flex-shrink: 0 !important;
  width: 140px !important;
  height: 200px !important;
  margin-right: 1rem !important;
  position: relative !important; /* Ensure positioning context */
}

.list-view .manga-cover {
  width: 140px !important;
  height: 200px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}

.list-view .manga-card .card-body {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 1rem !important;
}

/* No hover overlays for list view - removed per user request */

/* Ensure content stays above full card overlay */
.list-view .manga-card .position-relative,
.list-view .manga-card .card-body {
  position: relative !important;
  z-index: 2 !important;
}

.list-view .card-title {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.5rem !important;
}

.list-view .badge {
  font-size: 0.75rem !important;
}

/* List view: Badge styling in title area */
.list-view .card-title .badge {
  font-size: 0.7rem !important;
  padding: 0.25rem 0.5rem !important;
  margin-left: 0.5rem !important;
  vertical-align: middle !important;
}

/* Tablet responsive (768px) */
@media (max-width: 768px) {
  .list-view .position-relative {
    width: 100px !important;
    height: 140px !important;
    margin-right: 0.75rem !important;
  }

  .list-view .manga-cover {
    width: 100px !important;
    height: 140px !important;
  }

  .list-view .hover-overlay {
    width: 100px !important;
    height: 140px !important;
  }

  .list-view .manga-card .card-body {
    padding: 0.75rem !important;
  }

  .list-view .card-title {
    font-size: 1rem !important;
  }

  /* Tablet: Keep badges in text area (already handled by main rule) */
}

/* Mobile responsive (576px) */
@media (max-width: 576px) {
  /* Fix base list view layout for mobile */
  .list-view .manga-card {
    min-height: 150px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
  }

  .list-view .position-relative {
    width: 90px !important;
    height: 135px !important; /* Proper 2:3 aspect ratio */
    margin-right: 1rem !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    background: #333 !important; /* Fallback color */
  }

  .list-view .manga-cover {
    width: 90px !important;
    height: 135px !important;
    object-fit: cover !important;
    object-position: center top !important;
    border-radius: 8px !important;
    display: block !important;
  }

  .list-view .hover-overlay {
    width: 90px !important;
    height: 135px !important;
  }

  .list-view .card-title {
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
  }

  .list-view .manga-card .card-body {
    padding: 1rem !important;
    flex: 1 !important;
    min-width: 0 !important; /* Allow text truncation */
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  /* Mobile: Smaller badges in text area */
  .list-view .badge {
    font-size: 0.6rem !important;
    padding: 0.2rem 0.4rem !important;
  }
}

/* Extra small phones (380px) */
@media (max-width: 380px) {
  .list-view .manga-card {
    min-height: 130px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
  }

  .list-view .position-relative {
    width: 75px !important;
    height: 112px !important; /* Proper 2:3 aspect ratio */
    margin-right: 0.75rem !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    background: #333 !important;
  }

  .list-view .manga-cover {
    width: 75px !important;
    height: 112px !important;
    object-fit: cover !important;
    object-position: center top !important;
    border-radius: 6px !important;
    display: block !important;
  }

  .list-view .hover-overlay {
    width: 75px !important;
    height: 112px !important;
  }

  .list-view .card-title {
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
  }

  .list-view .manga-card .card-body {
    padding: 0.75rem !important;
    flex: 1 !important;
    min-width: 0 !important; /* Allow text truncation */
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  /* Extra small: Very small badges in text area */
  .list-view .badge {
    font-size: 0.55rem !important;
    padding: 0.15rem 0.3rem !important;
    line-height: 1 !important;
  }
}

/* List view header fixes for all manga pages */
.manga-header,
.latest-header,
.popular-header {
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
}

@media (max-width: 576px) {
  .manga-header,
  .latest-header,
  .popular-header {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
  }

  .manga-header .btn-group,
  .latest-header .btn-group,
  .popular-header .btn-group {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Title-Badge Container Layout */
.title-badge-container {
  display: flex !important;
  flex-direction: column !important; /* Grid view: Stack vertically */
  align-items: flex-start !important;
  gap: 0.5rem !important;
}

/* List view: Title and badges on same line */
.list-view .title-badge-container {
  flex-direction: row !important; /* List view: Side by side */
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
}

/* Badge container styling */
.badge-container {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.25rem !important;
  align-items: center !important;
}

/* Grid view: Badge styling (below title) */
.manga-card .badge {
  font-size: 0.75rem !important;
  padding: 0.25rem 0.5rem !important;
  display: inline-block !important;
  margin: 0 !important; /* Reset margins, use gap instead */
}

/* List view: Badge styling (next to title) */
.list-view .badge {
  font-size: 0.7rem !important;
  padding: 0.2rem 0.4rem !important;
  display: inline-block !important;
  margin: 0 !important; /* Reset margins, use gap instead */
}

/* List view: Title takes available space, badges on right */
.list-view .card-title {
  flex: 1 !important;
  margin-bottom: 0 !important;
}

.list-view .badge-container {
  flex-shrink: 0 !important;
}

/* Desktop: Ensure badges are visible */
@media (min-width: 769px) {
  .manga-card .badge,
  .list-view .badge {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Tablet responsive (768px) */
@media (max-width: 768px) {
  .manga-card .badge {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
  }

  .list-view .badge {
    font-size: 0.65rem !important;
    padding: 0.2rem 0.35rem !important;
  }

  .title-badge-container {
    gap: 0.4rem !important;
  }

  .list-view .title-badge-container {
    gap: 0.75rem !important;
  }
}

/* Mobile responsive (576px) */
@media (max-width: 576px) {
  .manga-card .badge {
    font-size: 0.65rem !important;
    padding: 0.2rem 0.4rem !important;
  }

  .list-view .badge {
    font-size: 0.6rem !important;
    padding: 0.15rem 0.3rem !important;
  }

  .title-badge-container {
    gap: 0.3rem !important;
  }

  .list-view .title-badge-container {
    gap: 0.5rem !important;
  }

  /* On mobile, stack badges below title even in list view if needed */
  .list-view .title-badge-container {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.3rem !important;
  }

  /* MOBILE LIST VIEW FIX: Remove absolute positioning for status badges */
  .list-view .card-body .status-badge {
    position: static !important;
    top: auto !important;
    right: auto !important;
    display: inline-block !important;
    margin: 0 !important;
  }

  /* MOBILE LIST VIEW: Ensure badges appear below title in normal flow */
  .list-view .card-body {
    position: relative !important;
  }

  /* MOBILE LIST VIEW: Stack title and badges vertically */
  .list-view .title-badge-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  /* MOBILE LIST VIEW: Title takes full width */
  .list-view .card-title {
    width: 100% !important;
    margin-bottom: 0 !important;
  }

  /* MOBILE LIST VIEW: Badge container stacks below title */
  .list-view .badge-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
    width: 100% !important;
  }
}

/* Extra small phones (380px) */
@media (max-width: 380px) {
  .manga-card .badge {
    font-size: 0.6rem !important;
    padding: 0.15rem 0.3rem !important;
  }

  .list-view .badge {
    font-size: 0.55rem !important;
    padding: 0.1rem 0.25rem !important;
  }
}

/* Force badge visibility globally */
.badge {
  display: inline-block !important;
  visibility: visible !important;
}

/* Status badge colors - ensure they're visible */
.badge.bg-success {
  background-color: var(--accent-success, #10b981) !important;
  color: #fff !important;
}

.badge.bg-primary {
  background-color: var(--accent-primary, #6366f1) !important;
  color: #fff !important;
}

.badge.bg-warning {
  background-color: var(--accent-warning, #f59e0b) !important;
  color: #000 !important;
}

.badge.bg-dark {
  background-color: #333 !important;
  color: #fff !important;
}

/* ULTIMATE LIST VIEW RULES - HIGHEST PRIORITY */
.list-view .position-relative {
  width: 140px !important;
  height: 200px !important;
  min-width: 140px !important;
  max-width: 140px !important;
  min-height: 200px !important;
  max-height: 200px !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  flex-basis: 140px !important;
  margin-right: 1rem !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  position: relative !important;
  background: #333 !important;
  display: block !important;
}

.list-view .manga-cover {
  width: 140px !important;
  height: 200px !important;
  min-width: 140px !important;
  max-width: 140px !important;
  min-height: 200px !important;
  max-height: 200px !important;
  object-fit: cover !important;
  object-position: center top !important;
  border-radius: 8px !important;
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

/* ULTIMATE MOBILE RESPONSIVE RULES - OVERRIDE ALL */
@media (max-width: 768px) {
  .list-view .position-relative {
    width: 100px !important;
    height: 140px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    min-height: 140px !important;
    max-height: 140px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: 100px !important;
    margin-right: 0.75rem !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    position: relative !important;
    background: #333 !important;
    display: block !important;
  }

  .list-view .manga-cover {
    width: 100px !important;
    height: 140px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    min-height: 140px !important;
    max-height: 140px !important;
    object-fit: cover !important;
    object-position: center top !important;
    border-radius: 8px !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
  }
}

@media (max-width: 576px) {
  .list-view .position-relative {
    width: 90px !important;
    height: 135px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    min-height: 135px !important;
    max-height: 135px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: 90px !important;
    margin-right: 1rem !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    position: relative !important;
    background: #333 !important;
    display: block !important;
  }

  .list-view .manga-cover {
    width: 90px !important;
    height: 135px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    min-height: 135px !important;
    max-height: 135px !important;
    object-fit: cover !important;
    object-position: center top !important;
    border-radius: 8px !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
  }
}

@media (max-width: 380px) {
  .list-view .position-relative {
    width: 75px !important;
    height: 112px !important;
    min-width: 75px !important;
    max-width: 75px !important;
    min-height: 112px !important;
    max-height: 112px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: 75px !important;
    margin-right: 0.75rem !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    position: relative !important;
    background: #333 !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .list-view .manga-cover {
    width: 75px !important;
    height: 112px !important;
    min-width: 75px !important;
    max-width: 75px !important;
    min-height: 112px !important;
    max-height: 112px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    object-fit: cover !important;
    object-position: center top !important;
    border-radius: 6px !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ULTIMATE CARD LAYOUT RULES */
.list-view .manga-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  height: auto !important;
  min-height: 180px !important;
  overflow: hidden !important;
  border-radius: var(--radius-xl, 1rem) !important;
  background: var(--bg-card, rgba(25, 25, 25, 0.8)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.list-view .manga-card .card-body {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 1rem !important;
  min-width: 0 !important;
}

/* Mobile card adjustments */
@media (max-width: 768px) {
  .list-view .manga-card {
    min-height: 150px !important;
  }

  .list-view .manga-card .card-body {
    padding: 0.75rem !important;
  }
}

@media (max-width: 576px) {
  .list-view .manga-card {
    min-height: 150px !important;
  }

  .list-view .manga-card .card-body {
    padding: 1rem !important;
  }
}

@media (max-width: 380px) {
  .list-view .manga-card {
    min-height: 130px !important;
  }

  .list-view .manga-card .card-body {
    padding: 0.75rem !important;
  }
}

/* REMOVE ALL HOVER EFFECTS FOR MOBILE */
.list-view .manga-card:hover .manga-cover,
.list-view .manga-cover:hover {
  transform: none !important;
  scale: none !important;
}

/* KILL ALL CONFLICTING OVERLAY RULES */
.list-view .hover-overlay,
.list-view .manga-card .hover-overlay {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* REFINED MOBILE LIST VIEW SOLUTION FOR EXTRA SMALL PHONES */
@media (max-width: 380px) {
  /* ZERO-SPACE WRAPPER - VISIBLE BUT NO LAYOUT IMPACT */
  .list-view .position-relative {
    width: 75px !important;
    height: 112px !important;
    min-width: 75px !important;
    max-width: 75px !important;
    min-height: 112px !important;
    max-height: 112px !important;
    /* ELIMINATE ALL SPACING */
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    /* POSITIONING */
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    background: #333 !important;
  }

  /* PERFECT IMAGE POSITIONING WITHIN WRAPPER */
  .list-view .manga-cover {
    width: 75px !important;
    height: 112px !important;
    min-width: 75px !important;
    max-width: 75px !important;
    min-height: 112px !important;
    max-height: 112px !important;
    object-fit: cover !important;
    object-position: center top !important;
    border-radius: 6px !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    /* RESET ALL SPACING */
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-sizing: border-box !important;
    z-index: 1 !important;
  }

  /* CARD LAYOUT */
  .list-view .manga-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    min-height: 112px !important;
    height: auto !important;
    overflow: hidden !important;
    gap: 0.75rem !important;
  }

  /* CARD BODY - PROPER FLEX */
  .list-view .manga-card .card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 0.75rem !important;
    min-width: 0 !important;
  }
}

/* REFINED MOBILE LIST VIEW SOLUTION - SMART WRAPPER RESET */
@media (max-width: 576px) {
  /* ZERO-SPACE WRAPPER - VISIBLE BUT NO LAYOUT IMPACT */
  .list-view .position-relative {
    width: 90px !important;
    height: 135px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    min-height: 135px !important;
    max-height: 135px !important;
    /* ELIMINATE ALL SPACING */
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    /* POSITIONING */
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    background: #333 !important;
  }

  /* PERFECT IMAGE POSITIONING WITHIN WRAPPER */
  .list-view .manga-cover {
    width: 90px !important;
    height: 135px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    min-height: 135px !important;
    max-height: 135px !important;
    object-fit: cover !important;
    object-position: center top !important;
    border-radius: 8px !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    /* RESET ALL SPACING */
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-sizing: border-box !important;
    z-index: 1 !important;
  }

  /* CARD LAYOUT */
  .list-view .manga-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    min-height: 135px !important;
    height: auto !important;
    overflow: hidden !important;
    gap: 1rem !important;
  }

  /* CARD BODY - PROPER FLEX */
  .list-view .manga-card .card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 1rem !important;
    min-width: 0 !important;
  }
}

/* REFINED MOBILE LIST VIEW SOLUTION FOR TABLETS */
@media (max-width: 768px) {
  /* ZERO-SPACE WRAPPER - VISIBLE BUT NO LAYOUT IMPACT */
  .list-view .position-relative {
    width: 100px !important;
    height: 150px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    min-height: 150px !important;
    max-height: 150px !important;
    /* ELIMINATE ALL SPACING */
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    /* POSITIONING */
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    background: #333 !important;
  }

  /* PERFECT IMAGE POSITIONING WITHIN WRAPPER */
  .list-view .manga-cover {
    width: 100px !important;
    height: 150px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    min-height: 150px !important;
    max-height: 150px !important;
    object-fit: cover !important;
    object-position: center top !important;
    border-radius: 8px !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    /* RESET ALL SPACING */
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-sizing: border-box !important;
    z-index: -1 !important;
  }

  /* CARD LAYOUT */
  .list-view .manga-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    min-height: 140px !important;
    height: auto !important;
    overflow: hidden !important;
    gap: 0.75rem !important;
  }

  /* CARD BODY - PROPER FLEX */
  .list-view .manga-card .card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 0.75rem !important;
    min-width: 0 !important;
  }
}

/* ============================================================ */
/* READER GRID LAYOUT SYSTEM - 3-Column Layout with Ads */
/* ============================================================ */

/* Reader Grid Container */
.reader-grid-container {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  grid-template-areas: "sidebar-left main-content sidebar-right";
  gap: 2rem;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: calc(100vh - 200px);
  position: relative;
  contain: layout style paint;
}

/* Grid Areas */
.reader-sidebar-left {
  grid-area: sidebar-left;
  position: sticky;
  top: calc(var(--reader-nav-h, 72px) + 2rem);
  align-self: start;
  max-height: calc(100vh - var(--reader-nav-h, 72px) - 4rem);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  will-change: transform;
}

.reader-sidebar-left::-webkit-scrollbar {
  display: none;
}

.reader-main-content {
  grid-area: main-content;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reader-sidebar-right {
  grid-area: sidebar-right;
  position: sticky;
  top: calc(var(--reader-nav-h, 72px) + 2rem);
  align-self: start;
  max-height: calc(100vh - var(--reader-nav-h, 72px) - 4rem);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  will-change: transform;
}

.reader-sidebar-right::-webkit-scrollbar {
  display: none;
}

/* Main Content Styling */
.reader-main-content .page-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* Z-index Hierarchy for Reader */
.reader-grid-container {
  z-index: 1;
}

.reader-sidebar-left,
.reader-sidebar-right {
  z-index: 100;
}

.reader-main-content {
  z-index: 500; /* Fixed: Higher than chapter nav (1030) to prevent conflicts */
}

/* Reader Bottom Navigation */
.reader-body .chapter-nav-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: rgba(10, 10, 18, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.75rem 0;
}

.chapter-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.82rem;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chapter-nav-btn:hover:not(.disabled) {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  text-decoration: none;
}

.chapter-nav-btn.chapter-nav-next:not(.disabled) {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2),
    rgba(139, 92, 246, 0.2)
  );
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.chapter-nav-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.chapter-nav-btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.chapter-nav-label {
  font-weight: 600;
  font-size: 0.82rem;
}

.chapter-nav-sub {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
}

.chapter-nav-center {
  flex: 1;
  text-align: center;
  min-width: 0;
  padding: 0 1rem;
}

.chapter-nav-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
}

.chapter-nav-progress-bar {
  width: 100%;
  max-width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.chapter-nav-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
}

.chapter-nav-page-info {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.chapter-nav-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 576px) {
  .chapter-nav-btn-text {
    display: none;
  }
  .chapter-nav-btn {
    padding: 0.55rem 0.75rem;
  }
  .chapter-nav-progress-bar {
    max-width: 120px;
  }
}

/* Performance Optimizations */
.reader-grid-container,
.reader-sidebar-left,
.reader-sidebar-right {
  contain: layout style paint;
  will-change: transform;
}

/* Responsive Breakpoints */

/* Extra Large Desktops (≥1600px) */
@media (min-width: 1600px) {
  .reader-grid-container {
    grid-template-columns: 350px 1fr 350px;
    gap: 2.5rem;
    max-width: 2000px;
  }
}

/* Large Desktops (1200px-1599px) */
@media (min-width: 1200px) and (max-width: 1599px) {
  .reader-grid-container {
    grid-template-columns: 300px 1fr 300px;
    gap: 1.5rem;
    max-width: 1600px;
  }

  .reader-sidebar-left,
  .reader-sidebar-right {
    top: calc(var(--reader-nav-h, 72px) + 1.5rem);
  }
}

/* Desktop (992px-1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .reader-grid-container {
    grid-template-columns: 280px 1fr 280px;
    gap: 1.5rem;
    max-width: 1400px;
    padding: 0 0.75rem;
  }

  .reader-sidebar-left,
  .reader-sidebar-right {
    top: calc(var(--reader-nav-h, 72px) + 1.5rem);
  }
}

/* Tablet (768px-991px) - Hide Sidebars, Single Column */
@media (min-width: 768px) and (max-width: 991px) {
  .reader-grid-container {
    display: block;
    max-width: 800px;
    padding: 0 1rem;
  }

  .reader-sidebar-left,
  .reader-sidebar-right {
    display: none !important;
  }

  .reader-main-content {
    width: 100%;
    max-width: 100%;
  }
}

/* Mobile (576px-767px) - Hide Sidebars, Enable Mobile Sticky */
@media (min-width: 576px) and (max-width: 767px) {
  .reader-grid-container {
    display: block;
    max-width: 100%;
    padding: 0 0.75rem;
  }

  .reader-sidebar-left,
  .reader-sidebar-right {
    display: none !important;
  }

  .reader-main-content {
    width: 100%;
    max-width: 100%;
  }

  /* Enable mobile sticky ads */
  .mobile-sticky-ad {
    display: block !important;
  }
}

/* Small Mobile (380px-575px) */
@media (min-width: 380px) and (max-width: 575px) {
  .reader-grid-container {
    display: block;
    max-width: 100%;
    padding: 0 0.5rem;
  }

  .reader-sidebar-left,
  .reader-sidebar-right {
    display: none !important;
  }

  .reader-main-content {
    width: 100%;
    max-width: 100%;
  }

  /* Enable mobile sticky ads */
  .mobile-sticky-ad {
    display: block !important;
  }
}

/* Extra Small Mobile (≤379px) */
@media (max-width: 379px) {
  .reader-grid-container {
    display: block;
    max-width: 100%;
    padding: 0 0.25rem;
  }

  .reader-sidebar-left,
  .reader-sidebar-right {
    display: none !important;
  }

  .reader-main-content {
    width: 100%;
    max-width: 100%;
  }

  /* Enable mobile sticky ads */
  .mobile-sticky-ad {
    display: block !important;
  }
}

/* Grid Fallback for Older Browsers */
@supports not (display: grid) {
  .reader-grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
  }

  .reader-sidebar-left,
  .reader-sidebar-right {
    flex: 0 0 320px;
    position: sticky;
    top: calc(var(--reader-nav-h, 72px) + 2rem);
  }

  .reader-main-content {
    flex: 1 1 auto;
    min-width: 400px;
    max-width: calc(100% - 680px);
  }
}

/* Sidebar Ad Containers */
.reader-sidebar-left .ad-container,
.reader-sidebar-right .ad-container {
  margin-bottom: 2rem;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.reader-sidebar-left .ad-container:last-child,
.reader-sidebar-right .ad-container:last-child {
  margin-bottom: 0;
}

/* Ad Loading States for Sidebars */
.reader-sidebar-left .ad-container.loading,
.reader-sidebar-right .ad-container.loading {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.02) 25%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.02) 75%
  );
  background-size: 200% 100%;
  animation: adLoading 1.5s infinite;
  border-radius: var(--radius-lg, 0.75rem);
}

/* Smooth Transitions */
.reader-grid-container,
.reader-sidebar-left,
.reader-sidebar-right,
.reader-main-content {
  transition: all 0.3s ease;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  .reader-grid-container,
  .reader-sidebar-left,
  .reader-sidebar-right,
  .reader-main-content {
    transition: none;
  }

  .reader-sidebar-left .ad-container.loading,
  .reader-sidebar-right .ad-container.loading {
    animation: none;
  }
}

/* Print Styles */
@media print {
  .reader-grid-container {
    display: block !important;
  }

  .reader-sidebar-left,
  .reader-sidebar-right {
    display: none !important;
  }

  .reader-main-content {
    width: 100% !important;
    max-width: none !important;
  }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
  .reader-sidebar-left .ad-container,
  .reader-sidebar-right .ad-container {
    border: 2px solid rgba(255, 255, 255, 0.5);
  }
}

/* Custom Scrollbar for Sidebar Areas */
.reader-sidebar-left::-webkit-scrollbar,
.reader-sidebar-right::-webkit-scrollbar {
  width: 4px;
}

.reader-sidebar-left::-webkit-scrollbar-track,
.reader-sidebar-right::-webkit-scrollbar-track {
  background: transparent;
}

.reader-sidebar-left::-webkit-scrollbar-thumb,
.reader-sidebar-right::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.reader-sidebar-left::-webkit-scrollbar-thumb:hover,
.reader-sidebar-right::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Focus Indicators for Accessibility */
.reader-sidebar-left:focus-within,
.reader-sidebar-right:focus-within {
  outline: 2px solid var(--accent-primary, #6366f1);
  outline-offset: 2px;
}

/* Reader Grid Debug Mode (Development Only) */
.reader-grid-debug .reader-grid-container {
  border: 2px solid #ff0000;
}

.reader-grid-debug .reader-sidebar-left {
  border: 2px solid #00ff00;
  background: rgba(0, 255, 0, 0.1);
}

.reader-grid-debug .reader-main-content {
  border: 2px solid #0000ff;
  background: rgba(0, 0, 255, 0.1);
}

.reader-grid-debug .reader-sidebar-right {
  border: 2px solid #ffff00;
  background: rgba(255, 255, 0, 0.1);
}

/* ============================================================ */
/* PROFILE PAGE REDESIGN                                        */
/* ============================================================ */

/* Hero Banner */
.profile-hero {
  position: relative;
  padding: 120px 0 40px;
  overflow: hidden;
}

.profile-hero-bg {
  position: absolute;
  inset: 0;
  background: var(
    --gradient-hero,
    linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%)
  );
  z-index: 0;
}

.profile-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
}

.profile-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Avatar */
.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.3),
    var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
}

.profile-avatar-letter {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  user-select: none;
}

.profile-role-badge {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  white-space: nowrap;
  border: 2px solid var(--bg-primary, #0a0a0a);
}

.badge-admin {
  background: var(--accent-warning, #f59e0b);
  color: #111;
}
.badge-mod {
  background: var(--accent-info, #06b6d4);
  color: #fff;
}
.badge-editor {
  background: var(--accent-secondary, #8b5cf6);
  color: #fff;
}
.badge-user {
  background: var(--accent-primary, #6366f1);
  color: #fff;
}

.profile-hero-info {
  min-width: 0;
}

.profile-username {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.profile-join-date {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted, #9ca3af) !important;
}

/* Stats Row */
.profile-stats-row {
  margin-top: -20px;
  position: relative;
  z-index: 2;
}

.profile-stat-card {
  background: var(--bg-card, rgba(25, 25, 25, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl, 1rem);
  padding: 1.25rem 1rem;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.profile-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
}

.profile-stat-icon {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  background: var(
    --gradient-primary,
    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  line-height: 1;
}

.profile-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Quick Access Cards */
.profile-quick-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card, rgba(25, 25, 25, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl, 1rem);
  text-decoration: none;
  color: var(--text-primary, #ffffff);
  transition: all 0.3s ease;
}

.profile-quick-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
  color: var(--text-primary, #ffffff);
  text-decoration: none;
}

.profile-quick-card:hover .fa-chevron-right {
  transform: translateX(3px);
}

.profile-quick-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg, 0.75rem);
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
}

.profile-quick-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary, #ffffff) !important;
}

.profile-quick-desc {
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af) !important;
}

.profile-quick-card .fa-chevron-right {
  color: var(--text-muted, #9ca3af);
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

/* Tabs */
.profile-tabs-wrapper {
  background: var(--bg-card, rgba(25, 25, 25, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl, 1rem);
  overflow: hidden;
}

.profile-nav-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0;
  margin: 0;
  list-style: none;
  background: rgba(255, 255, 255, 0.03);
}

.profile-nav-tabs .nav-item {
  flex: 1;
}

.profile-tab-btn {
  width: 100%;
  padding: 1rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted, #9ca3af);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-tab-btn:hover {
  color: var(--text-primary, #ffffff);
  background: rgba(255, 255, 255, 0.03);
}

.profile-tab-btn.active {
  color: var(--text-primary, #ffffff);
  border-bottom-color: var(--accent-primary, #6366f1);
  background: rgba(99, 102, 241, 0.05);
}

.profile-tab-content {
  padding: 1.5rem;
}

/* Section Cards inside tabs */
.profile-section-card {
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 0.75rem);
  padding: 1.5rem;
}

.profile-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Detail Grid */
.profile-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.profile-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-detail-label {
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af) !important;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-detail-value {
  font-size: 0.95rem;
  color: var(--text-primary, #ffffff) !important;
  font-weight: 500;
}

/* Input Group dark theme */
.profile-section-card .input-group-text {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-right: none;
  color: var(--text-muted, #9ca3af);
}

.profile-section-card .input-group .form-control {
  border-left: none;
}

/* List Cards in Lists tab */
.profile-list-card {
  display: block;
  background: var(--bg-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 0.75rem);
  padding: 1.25rem;
  transition: all 0.3s ease;
  color: var(--text-primary, #ffffff);
  cursor: pointer;
}

.profile-list-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

.profile-list-link {
  color: var(--text-primary, #ffffff) !important;
  font-weight: 600;
}

.profile-list-link:hover {
  color: var(--accent-primary, #6366f1) !important;
}

/* Empty State */
.profile-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted, #9ca3af);
}

.profile-empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.profile-empty-state p {
  margin-bottom: 1rem;
}

/* Profile Page Responsive */
@media (max-width: 768px) {
  .profile-hero {
    padding: 100px 0 30px;
  }

  .profile-hero-content {
    flex-direction: column;
    text-align: center;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
  }

  .profile-avatar-letter {
    font-size: 2rem;
  }

  .profile-username {
    font-size: 1.4rem;
  }

  .profile-stat-card {
    padding: 1rem 0.75rem;
  }

  .profile-stat-value {
    font-size: 1.25rem;
  }

  .profile-tab-btn {
    font-size: 0.8rem;
    padding: 0.75rem 0.5rem;
  }

  .profile-tab-btn i {
    display: none;
  }

  .profile-tab-content {
    padding: 1rem;
  }

  .profile-detail-grid {
    grid-template-columns: 1fr;
  }

  .profile-quick-card {
    padding: 0.85rem 1rem;
  }
}

@media (max-width: 576px) {
  .profile-hero {
    padding: 85px 0 25px;
  }

  .profile-avatar {
    width: 70px;
    height: 70px;
  }

  .profile-avatar-letter {
    font-size: 1.75rem;
  }

  .profile-username {
    font-size: 1.2rem;
  }

  .profile-stats-row {
    margin-top: -10px;
  }

  .profile-section-card {
    padding: 1rem;
  }
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* =============================================
   Nested Comment Replies — Thread Styles
   Requirements: 6.1, 6.2, 6.3, 6.4
   ============================================= */

/* Comment item base */
.comment-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: margin-left var(--transition-fast, 200ms) ease;
}

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

/* Reply-line vertical connector (Req 6.1) */
.reply-line {
  position: relative;
  width: 2px;
  flex-shrink: 0;
}

.reply-connector {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background-color: rgba(var(--bs-primary-rgb, 99, 102, 241), 0.3);
  border-radius: 1px;
}

/* Depth-based indentation (Req 6.2) — inline styles handle this via JS,
   but we define depth classes for CSS-level cap (Req 6.4) */
.comment-depth-0 {
  margin-left: 0;
}

/* Depth > 3 cap: all depths beyond 3 get the same indent as depth 3 (Req 6.4) */
.comment-depth-4,
.comment-depth-5 {
  margin-left: 60px; /* same as depth 3: 3 * 20px */
}

/* Replies container */
.replies-container {
  margin-top: 0;
}

/* Reply indicator badge */
.comment-item .badge.bg-dark {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile responsive — reduce indentation (Req 6.3) */
@media (max-width: 575.98px) {
  /* Override inline margin-left on all nested comments */
  .comment-item[data-depth="1"],
  .comment-item[data-depth="2"],
  .comment-item[data-depth="3"],
  .comment-item[data-depth="4"],
  .comment-item[data-depth="5"] {
    margin-left: 10px !important;
  }

  /* Root comments stay flush */
  .comment-item[data-depth="0"] {
    margin-left: 0 !important;
  }

  /* Slightly smaller reply-line on mobile */
  .reply-line {
    width: 2px;
    margin-right: 0.25rem !important;
  }
}

/* Multi-category badges */
.manga-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.manga-categories .badge {
  font-size: 0.875rem !important;
  font-weight: 400;
  text-decoration: none;
}

.manga-categories .badge:hover {
  opacity: 0.8;
}

.badge-sm {
  font-size: 0.75rem !important;
  padding: 0.25rem 0.5rem !important;
}

/* ============================================================ */
/* MANGA SITE REDESIGN - ENHANCED UI COMPONENTS                 */
/* ============================================================ */

/* ---- NAVBAR SEARCH ---- */
.navbar-search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-search-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  color: #fff;
  padding: 0.4rem 2.5rem 0.4rem 1rem;
  font-size: 0.875rem;
  width: 200px;
  transition: all 0.3s ease;
  outline: none;
}

.navbar-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.navbar-search-input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-primary, #6366f1);
  width: 260px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.navbar-search-btn {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.navbar-search-btn:hover {
  color: var(--accent-primary, #6366f1);
}

/* ---- HERO SECTION IMPROVEMENTS ---- */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.15) 0%,
    rgba(0, 0, 0, 0) 50%,
    rgba(168, 85, 247, 0.1) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-logo {
  filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.6));
  max-height: 180px;
}

.hero-search-bar {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.hero-search-bar:focus-within {
  border-color: var(--accent-primary, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.hero-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

.hero-search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.hero-search-bar button {
  background: linear-gradient(
    135deg,
    var(--accent-primary, #6366f1),
    var(--accent-secondary, #8b5cf6)
  );
  border: none;
  color: #fff;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.hero-search-bar button:hover {
  opacity: 0.9;
}

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.hero-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.hero-quick-link:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary, #6366f1);
  color: #fff;
}

/* ---- MANGA CARD IMPROVEMENTS ---- */
.manga-card {
  background: var(--bg-card, #1a1a2e);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.manga-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(99, 102, 241, 0.1);
}

.manga-status-ribbon {
  position: absolute;
  top: 0.5rem;
  left: 0;
  padding: 0.2rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0 4px 4px 0;
  z-index: 3;
}

.manga-status-ribbon.ongoing {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.manga-status-ribbon.completed {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
}
.manga-status-ribbon.hiatus {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.manga-rating-pill {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 50px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 3;
}

.manga-new-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  z-index: 3;
}

.manga-card .card-title a {
  transition: color 0.2s;
}

.manga-card .card-title a:hover {
  color: var(--accent-primary, #6366f1);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent-primary, #6366f1),
    var(--accent-secondary, #8b5cf6)
  );
  border-radius: 2px;
}

.section-title.no-underline::after {
  display: none;
}

.section-title i {
  background: linear-gradient(
    135deg,
    var(--accent-primary, #6366f1),
    var(--accent-secondary, #8b5cf6)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.2rem;
}

.section-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-primary, #6366f1);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  transition: all 0.2s ease;
}

.section-view-all:hover {
  background: var(--accent-primary, #6366f1);
  color: #fff;
  border-color: var(--accent-primary, #6366f1);
}

/* ---- STATS CARDS REDESIGN ---- */
.stat-card-new {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card-new::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--accent-primary, #6366f1),
    var(--accent-secondary, #8b5cf6)
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card-new:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-3px);
}
.stat-card-new:hover::before {
  opacity: 1;
}

.stat-card-icon-new {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2),
    rgba(139, 92, 246, 0.2)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.3rem;
}

.stat-card-icon-new i {
  background: linear-gradient(
    135deg,
    var(--accent-primary, #6366f1),
    var(--accent-secondary, #8b5cf6)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-number-new {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label-new {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---- CATEGORY GRID REDESIGN ---- */
.category-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.category-card-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.25s ease;
  text-align: center;
}

.category-card-new:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #fff;
  transform: translateY(-3px);
}

.category-card-new .category-icon-new {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.15),
    rgba(139, 92, 246, 0.15)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.25s;
}

.category-card-new:hover .category-icon-new {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.3),
    rgba(139, 92, 246, 0.3)
  );
}

.category-card-new .category-icon-new i {
  background: linear-gradient(
    135deg,
    var(--accent-primary, #6366f1),
    var(--accent-secondary, #8b5cf6)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.category-card-new .cat-name {
  font-size: 0.82rem;
  font-weight: 600;
}
.category-card-new .cat-count {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ---- MANGA DETAIL PAGE ---- */
.manga-detail-hero {
  position: relative;
  padding: 100px 0 3rem;
  overflow: hidden;
  background: var(--bg-secondary, #111);
}

.manga-detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.15;
  filter: blur(8px) saturate(1.2);
  transform: scale(1.05);
  z-index: 0;
}

.manga-detail-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.7) 60%,
    rgba(10, 10, 10, 1) 100%
  );
  z-index: 1;
}

.manga-detail-hero > .container {
  position: relative;
  z-index: 2;
}

.manga-detail-cover-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease;
}

.manga-detail-cover-wrap:hover {
  transform: scale(1.02);
}

.manga-detail-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.manga-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  margin-bottom: 1.5rem;
}

.manga-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.manga-info-item .info-icon {
  color: var(--accent-primary, #6366f1);
  width: 16px;
  margin-top: 0.1rem;
  flex-shrink: 0;
}
.manga-info-item .info-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  display: block;
}
.manga-info-item .info-value {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.manga-description-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--accent-primary, #6366f1);
  border-radius: 0 10px 10px 0;
  padding: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.75);
}

.manga-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
}

.manga-action-btn.primary {
  background: linear-gradient(
    135deg,
    var(--accent-primary, #6366f1),
    var(--accent-secondary, #8b5cf6)
  );
  color: #fff;
}

.manga-action-btn.primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
  color: #fff;
}

.manga-action-btn.secondary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.manga-action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.manga-action-btn.danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.manga-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

/* ---- CHAPTER LIST ---- */
.chapter-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px 12px 0 0;
}

.chapter-list-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chapter-list-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.chapter-sort-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.chapter-sort-btn:hover,
.chapter-sort-btn.active,
.btn-check:checked + .chapter-sort-btn {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
  color: #fff;
}

.chapter-list-body {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  padding: 1rem;
}

.chapter-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

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

.chapter-item:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #fff;
  padding-left: 1.5rem;
}

.chapter-item.read {
  color: rgba(255, 255, 255, 0.4);
}
.chapter-item.read:hover {
  color: rgba(255, 255, 255, 0.7);
}

.chapter-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary, #6366f1);
  min-width: 70px;
  flex-shrink: 0;
}

.chapter-item.read .chapter-number {
  color: rgba(99, 102, 241, 0.5);
}

.chapter-name {
  flex: 1;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.chapter-read-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.chapter-item.read .chapter-read-indicator {
  background: var(--accent-success, #10b981);
}

.chapter-new-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* ---- PAGE HEADER BANNER ---- */
.page-header-banner {
  position: relative;
  padding: 6rem 0 1rem;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1) 0%,
    rgba(0, 0, 0, 0) 60%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.page-header-banner::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.page-header-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.page-header-subtitle {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.95rem;
}

/* ---- BROWSE FILTER ---- */
.filter-sidebar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 1.25rem;
  position: sticky;
  top: 5rem;
}

.filter-section {
  margin-bottom: 1.5rem;
}
.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
}

/* ---- FOOTER REDESIGN ---- */
.site-footer {
  background: #090912;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 0 0;
}

.footer-brand p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.footer-social {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.footer-social-link:hover {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
  color: #fff;
  transform: translateY(-2px);
}

.footer-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links li a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links li a:hover {
  color: var(--accent-primary, #6366f1);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.25rem 0;
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
  margin: 0;
}

/* ---- POPULAR RANK LIST ---- */
.popular-rank-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 0.5rem;
}

.popular-rank-item:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateX(4px);
}

.rank-number {
  font-size: 1.1rem;
  font-weight: 900;
  min-width: 28px;
  text-align: center;
  color: rgba(255, 255, 255, 0.2);
}
.rank-number.top-1 {
  color: #fbbf24;
}
.rank-number.top-2 {
  color: #9ca3af;
}
.rank-number.top-3 {
  color: #f97316;
}

.rank-cover {
  width: 40px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.rank-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  margin-bottom: 0.2rem;
}

.rank-meta {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  gap: 0.5rem;
}
.rank-views {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- SEARCH DROPDOWN ---- */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
  min-width: 320px;
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.search-dropdown-item:last-child {
  border-bottom: none;
}
.search-dropdown-item:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #fff;
}

.search-dropdown-item img {
  width: 36px;
  height: 50px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}

.search-dropdown-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.search-dropdown-item-meta {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.search-no-results {
  padding: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
}

/* ---- NAVBAR IMPROVEMENTS ---- */
.nav-link {
  font-size: 0.875rem !important;
  font-weight: 500;
  padding: 0.45rem 0.75rem !important;
  border-radius: 8px;
  transition: all 0.2s ease !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

.nav-link:hover,
.nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.07);
}

.nav-link.active {
  background: rgba(99, 102, 241, 0.12) !important;
  color: var(--accent-primary, #6366f1) !important;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

/* ---- EMPTY STATE ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}
.empty-state h4 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.empty-state p {
  font-size: 0.875rem;
  max-width: 300px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero-section {
    min-height: 100vh !important;
    padding-top: 100px;
    padding-bottom: 80px;
  }
  .hero-content {
    margin-top: 1rem;
  }
  .hero-title .hero-logo {
    max-height: 120px !important;
  }
  .hero-search-bar {
    max-width: 100%;
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .hero-search-bar button {
    padding: 0.85rem 1.2rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }
  .hero-search-bar button i.me-1 {
    margin-right: 0 !important;
  }
  .hero-search-bar input {
    padding: 0.85rem 1rem;
    min-width: 0;
  }
  .manga-info-grid {
    justify-content: center;
    gap: 1.25rem 2rem;
  }
  .manga-info-item {
    text-align: center;
    justify-content: center;
  }
  .category-grid-new {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  .section-title {
    font-size: 1.15rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .hero-title .hero-logo {
    max-height: 90px !important;
  }
  .hero-search-bar {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  .hero-search-bar button {
    padding: 0.75rem 0.8rem;
    font-size: 0.9rem;
  }
  .hero-search-bar input {
    padding: 0.75rem 0.8rem;
    font-size: 0.9rem;
  }
  .hero-quick-links {
    gap: 0.4rem;
    padding: 0 0.5rem;
  }
  .hero-quick-link {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
  }
  .hero-pagination {
    bottom: 2rem;
  }
}

/* ---- MOBILE NAVBAR FIXES ---- */
@media (max-width: 991.98px) {
  .navbar-collapse {
    max-height: calc(100vh - 65px); /* 65px is approx navbar height */
    overflow-y: auto;
    overflow-x: hidden;
  }

  .navbar-collapse .navbar-nav.ms-lg-2 {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    padding-top: 1.5rem;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
  }

  .navbar-collapse .navbar-nav.ms-lg-2 .nav-item {
    margin: 0 !important;
  }

  .navbar-collapse .navbar-nav.ms-lg-2 .nav-link.text-start {
    text-align: center !important;
    padding: 0.5rem 1rem !important;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .navbar-collapse .navbar-nav.ms-lg-2 .btn {
    width: auto !important;
    margin: 0 !important;
    padding: 0.5rem 1.5rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .navbar-collapse .navbar-search-form.d-md-none {
    margin: 1.5rem 1rem 1rem 1rem !important;
    width: calc(100% - 2rem) !important;
  }

  .navbar-collapse .dropdown-menu {
    position: static !important;
    width: 100% !important;
    margin-top: 1rem !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding-bottom: 1rem;
  }
}

.navbar-nav {
  align-items: center;
}

/* ---- SHARED SHELL PARTIALS ---- */
.navbar-user-initial {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--accent-primary, #6366f1),
    var(--accent-secondary, #8b5cf6)
  );
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}

.site-user-menu {
  min-width: 200px;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: #1a1a2e !important;
}

.site-user-menu-header {
  padding: 0.55rem 0.65rem 0.6rem;
  margin: 0 0 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.site-user-menu-header small {
  font-size: 0.7rem;
}

.site-user-menu-header strong {
  font-size: 0.875rem;
}

.site-user-menu .dropdown-item {
  min-height: 0;
  padding: 0.48rem 0.65rem;
  border-radius: 8px;
  line-height: 1.2;
}

.site-user-menu .dropdown-divider {
  margin: 0.28rem 0;
  border-color: rgba(255, 255, 255, 0.08);
}

.site-register-btn {
  background: linear-gradient(
    135deg,
    var(--accent-primary, #6366f1),
    var(--accent-secondary, #8b5cf6)
  );
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
}

.site-register-btn:hover,
.site-register-btn.active {
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.28);
}

.page-header-title i {
  background: linear-gradient(
    135deg,
    var(--accent-primary, #6366f1),
    var(--accent-secondary, #8b5cf6)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-select {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg, 0.75rem);
  color: var(--text-primary, #ffffff);
  padding: 0.75rem 1rem;
}

.form-select:focus {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  color: var(--text-primary, #ffffff);
}

.form-select option {
  background: var(--bg-secondary, #111111);
  color: var(--text-primary, #ffffff);
}

/* ---- AUTH PAGES: CURRENT DESIGN LANGUAGE ---- */
.auth-page {
  background:
    linear-gradient(
      135deg,
      rgba(99, 102, 241, 0.08) 0%,
      rgba(10, 10, 10, 0) 55%
    ),
    var(--bg-primary, #0a0a0a);
}

.auth-card {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.auth-header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.auth-icon,
.auth-icon.text-success {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.22),
    rgba(139, 92, 246, 0.2)
  );
  color: var(--accent-primary, #6366f1);
  box-shadow: none;
}

.auth-title {
  font-size: 1.55rem;
  font-weight: 800;
  text-shadow: none;
}

.auth-form .form-control {
  border-width: 1px;
  border-radius: 10px;
}

.auth-footer .btn {
  border-radius: 10px;
}

/* ---- SUPPORT PAGES ---- */
.support-accordion {
  display: grid;
  gap: 0.75rem;
}

.support-accordion .accordion-item {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04) !important;
}

.support-accordion .accordion-button {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.82);
  border: none;
  box-shadow: none;
  font-weight: 700;
}

.support-accordion .accordion-button:not(.collapsed) {
  background: rgba(99, 102, 241, 0.12);
  color: #fff;
}

.support-accordion .accordion-button::after {
  filter: invert(1);
  opacity: 0.6;
}

.support-accordion .accordion-body {
  color: rgba(255, 255, 255, 0.72) !important;
}

.support-side-card,
.support-contact-card,
.support-form-card {
  border-radius: 14px;
}

.support-form-card {
  background: rgba(255, 255, 255, 0.04);
}

.support-contact-card .stat-card-icon-new {
  flex-shrink: 0;
}

/* ---- LEGAL PAGES ---- */
.legal-page .page-header-title i {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.legal-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.82rem;
  font-weight: 600;
}

.legal-layout {
  align-items: flex-start;
}

.legal-side-card {
  position: sticky;
  top: 5.75rem;
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.legal-side-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legal-nav-list {
  display: grid;
  gap: 0.35rem;
}

.legal-nav-list a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.56);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 650;
  transition: all 0.2s ease;
}

.legal-nav-list a:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.28);
  color: #fff;
}

.legal-note,
.legal-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.legal-note {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  color: rgba(255, 255, 255, 0.72);
}

.legal-note p {
  margin: 0;
}

.legal-note > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.legal-note-info {
  border-color: rgba(59, 130, 246, 0.22);
}

.legal-note-warning {
  border-color: rgba(245, 158, 11, 0.25);
}

.legal-note-warning > i {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.legal-note-success {
  border-color: rgba(16, 185, 129, 0.24);
}

.legal-note-success > i {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
}

.legal-note-primary {
  border-color: rgba(99, 102, 241, 0.28);
}

.legal-card {
  position: relative;
  overflow: hidden;
  padding: 1.35rem;
  margin-bottom: 1rem;
  scroll-margin-top: 6rem;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.legal-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.legal-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.legal-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2),
    rgba(139, 92, 246, 0.18)
  );
  color: #c4b5fd;
}

.legal-kicker {
  display: block;
  margin-bottom: 0.2rem;
  color: rgba(255, 255, 255, 0.36);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-card h2 {
  margin: 0;
  color: #fff;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.25;
}

.legal-card h5 {
  margin: 1rem 0 0.45rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.96rem;
  font-weight: 800;
}

.legal-card p,
.legal-card li {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal-card p:last-child,
.legal-card ul:last-child {
  margin-bottom: 0;
}

.legal-card ul {
  padding-left: 1.15rem;
}

.legal-card a,
.legal-inline-alert a {
  color: #a5b4fc;
  text-decoration: none;
}

.legal-card a:hover,
.legal-inline-alert a:hover {
  color: #c4b5fd;
}

.legal-inline-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0.9rem 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.legal-inline-alert i {
  margin-top: 0.18rem;
  flex-shrink: 0;
}

.legal-inline-alert.success {
  border-color: rgba(16, 185, 129, 0.26);
}

.legal-inline-alert.success i {
  color: #34d399;
}

.legal-inline-alert.info {
  border-color: rgba(59, 130, 246, 0.24);
}

.legal-inline-alert.info i {
  color: #93c5fd;
}

.legal-inline-alert.warning {
  border-color: rgba(245, 158, 11, 0.26);
}

.legal-inline-alert.warning i {
  color: #fbbf24;
}

.legal-inline-alert.danger {
  border-color: rgba(239, 68, 68, 0.3);
}

.legal-inline-alert.danger i {
  color: #f87171;
}

@media (max-width: 991.98px) {
  .legal-side-card {
    position: static;
  }

  .legal-nav-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 576px) {
  .legal-meta-row {
    gap: 0.5rem;
  }

  .legal-meta-pill {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .legal-note {
    align-items: flex-start;
  }

  .legal-card {
    padding: 1.1rem;
  }

  .legal-card-header {
    gap: 0.75rem;
  }

  .legal-card-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .legal-card h2 {
    font-size: 1.05rem;
  }
}

/* ---- ERROR PAGES ---- */
.error-page {
  background:
    radial-gradient(
      circle at top left,
      rgba(99, 102, 241, 0.14),
      transparent 34rem
    ),
    var(--bg-primary, #0a0a0a);
}

.error-shell {
  min-height: calc(100vh - 220px);
  padding: 7rem 0 4rem;
}

.error-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.36fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.error-code-column {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.error-status {
  width: min(180px, 70%);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(0, 0, 0, 0.22);
}

.error-status span {
  background: linear-gradient(135deg, #fff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 3.6rem;
  font-weight: 900;
  line-height: 1;
}

.error-status.warning {
  border-color: rgba(245, 158, 11, 0.32);
}

.error-status.danger {
  border-color: rgba(239, 68, 68, 0.32);
}

.error-content {
  padding: 2.5rem 2.5rem 2.5rem 0;
}

.error-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.15rem;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
  font-size: 1.35rem;
}

.error-icon.warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.error-icon.danger {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
}

.error-kicker {
  margin: 0 0 0.35rem;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.error-content h1 {
  margin: 0;
  color: #fff;
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.1;
}

.error-message {
  max-width: 680px;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 1rem;
  line-height: 1.75;
}

.error-request {
  display: grid;
  gap: 0.35rem;
  max-width: 680px;
  margin-top: 1.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.error-request span {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-request code {
  color: #c4b5fd;
  white-space: normal;
  word-break: break-word;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.error-help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.error-help-card {
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.error-help-card i {
  color: #a5b4fc;
  margin-bottom: 0.85rem;
}

.error-help-card h2 {
  margin: 0 0 0.45rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
  font-weight: 800;
}

.error-help-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  line-height: 1.65;
}

@media (max-width: 991.98px) {
  .error-shell {
    padding-top: 6.25rem;
  }

  .error-panel {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .error-code-column {
    min-height: 180px;
  }

  .error-status {
    width: 150px;
    border-radius: 22px;
  }

  .error-status span {
    font-size: 3rem;
  }

  .error-content {
    padding: 2rem;
  }

  .error-help-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .error-shell {
    padding: 5.75rem 0 2.5rem;
  }

  .error-content {
    padding: 1.35rem;
  }

  .error-content h1 {
    font-size: 1.65rem;
  }

  .error-actions .manga-action-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---- PROFILE ALIGNMENT ---- */
.profile-hero {
  padding: 105px 0 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-hero-bg {
  background:
    linear-gradient(
      135deg,
      rgba(99, 102, 241, 0.12) 0%,
      rgba(10, 10, 10, 0) 60%
    ),
    var(--bg-secondary, #111111);
}

.profile-stat-card.stat-card-new {
  padding: 1.35rem 1rem;
}

.profile-stat-card .stat-card-icon-new {
  margin: 0 auto 1rem;
}

/* ---- PUBLIC LISTS PAGE ---- */
.public-lists-page .filter-sidebar {
  position: sticky;
  top: 5rem;
}

.public-lists-page #listsGrid:not(.list-view) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.public-lists-page #listsGrid:not(.list-view) > [class*="col-"] {
  width: auto;
  max-width: none;
  flex: none;
  padding: 0;
  margin: 0 !important;
}

.public-lists-page #listsGrid.list-view {
  display: flex !important;
  flex-direction: column;
  gap: 1rem;
}

.public-lists-page .public-list-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.public-lists-page .public-list-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.12);
}
