/* ==========================================================================
   Design System & Globals
   ========================================================================== */
:root {
  --bg-darker: #06070a;
  --bg-dark: #0d0f17;
  --bg-card: #141724;
  --bg-input: #1a1e30;

  --text-white: #ffffff;
  --text-muted: #8b949e;
  --text-primary: #f0f3f6;

  --accent-purple: #8e44ad;
  --accent-purple-glow: rgba(142, 68, 173, 0.4);
  --accent-cyan: #00d2ff;
  --accent-cyan-glow: rgba(0, 210, 255, 0.3);
  --accent-gold: #f1c40f;

  --gradient-primary: linear-gradient(135deg, #8e44ad 0%, #3498db 100%);
  --gradient-hover: linear-gradient(135deg, #9b59b6 0%, #2980b9 100%);
  --gradient-dark: linear-gradient(to bottom,
      rgba(13, 15, 23, 0) 0%,
      rgba(13, 15, 23, 0.95) 100%);

  --border-color: #1f2538;
  --border-glow: rgba(142, 68, 173, 0.2);

  --ad-bg: #0c0f18;
  --ad-border: #f1c40f;
  --ad-text: #f39c12;
  --ad-glow: rgba(241, 196, 15, 0.1);

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

  --font-primary: "Outfit", sans-serif;
  --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 15px rgba(142, 68, 173, 0.3);
}

/* Reset & Scrollbar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-primary);
}

body {
  background-color: var(--bg-darker);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border: 2px solid var(--bg-darker);
  border-radius: 5px;
}

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

/* A11y & Helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes ctaShimmer {
  0% {
    left: -100%;
  }

  30% {
    left: 180%;
  }

  100% {
    left: 180%;
  }
}

.badge {
  background: var(--gradient-primary);
  color: var(--text-white);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.05em;
  vertical-align: middle;
  margin-left: 6px;
  box-shadow: 0 0 10px var(--accent-purple-glow);
  position: relative;
  overflow: hidden;
  display: inline-block;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.logo .badge::after,
.mobile-sidebar-logo .badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 65%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: ctaShimmer 3.5s infinite;
  pointer-events: none;
}

.logo:hover .badge,
.mobile-sidebar-logo:hover .badge {
  transform: scale(1.08);
  box-shadow: 0 0 14px var(--accent-cyan-glow), 0 0 10px var(--accent-purple-glow);
}

/* ==========================================================================
   Header Styles (Unificado & Responsivo)
   ========================================================================== */
.global-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(13, 15, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 0 24px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, border-color 0.3s ease;
}

.views-wrapper {
  transition: margin-top 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Top Search Banner (Menu de busca acima do header - Imagem 2)
   ========================================================================== */
.top-search-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: #0f121d;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  z-index: 105;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

body.top-search-active .top-search-banner {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

body.top-search-active .global-header {
  transform: translateY(72px);
}

body.top-search-active .views-wrapper {
  margin-top: 142px !important;
}

.top-search-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 800px;
  position: relative;
  gap: 16px;
}

.top-search-form {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 620px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.top-search-input {
  flex: 1;
  background: #ffffff;
  color: #111827;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 18px;
  border: none;
  outline: none;
  border-radius: 6px 0 0 6px;
}

.top-search-input::placeholder {
  color: #94a3b8;
  font-size: 0.92rem;
}

.top-search-submit-btn {
  background: #111522;
  color: #ffffff;
  font-family: var(--font-primary);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0 26px;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  border-radius: 0 6px 6px 0;
  white-space: nowrap;
}

.top-search-submit-btn:hover {
  background: #1b2034;
  color: var(--accent-cyan);
}

.top-search-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.top-search-close-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.08);
}

/* Compatibilidade do Search Banner no Light Mode */
body.light-mode .top-search-banner {
  background: #cbd5e1;
  border-bottom-color: #94a3b8;
}

body.light-mode .top-search-input {
  background: #ffffff;
  color: #0f172a;
}

body.light-mode .top-search-submit-btn {
  background: #1e293b;
  color: #ffffff;
}

body.light-mode .top-search-close-btn {
  color: #475569;
}

body.light-mode .top-search-close-btn:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Live Search Dropdown (Instantâneo com Categorias, Tags e HQs)
   ========================================================================== */
.top-search-form-wrapper {
  position: relative;
  width: 100%;
  max-width: 620px;
}

.mobile-search-container {
  position: relative;
  width: 100%;
}

.search-live-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #131726;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 1px rgba(0, 210, 255, 0.2);
  max-height: 520px;
  overflow-y: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  backdrop-filter: blur(12px);
  animation: liveSearchFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-live-dropdown {
  top: calc(100% + 4px);
  max-height: 380px;
  background: #0f121d;
  border-color: rgba(255, 255, 255, 0.18);
}

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

.live-search-section {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.live-search-section:last-of-type {
  border-bottom: none;
}

.live-search-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.live-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.live-search-chip:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-1px);
}

.live-search-chip.tag-chip {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
}

.live-search-chip.tag-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.live-search-chip .chip-count {
  font-size: 0.68rem;
  padding: 1px 5px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  color: var(--text-muted);
}

.live-search-mangas {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.live-search-manga-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, transform 0.15s ease;
}

.live-search-manga-item:hover,
.live-search-manga-item.is-selected {
  background: rgba(0, 210, 255, 0.1);
  transform: translateX(2px);
}

.live-search-cover {
  width: 38px;
  height: 52px;
  border-radius: 4px;
  object-fit: cover;
  background: #1b2034;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.live-search-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.live-search-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-search-title mark {
  background: rgba(0, 210, 255, 0.25);
  color: var(--accent-cyan);
  padding: 0 2px;
  border-radius: 2px;
}

.live-search-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.live-search-meta .meta-tag {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.live-search-chapter-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.live-search-vip-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.live-search-footer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  margin: 6px 10px 2px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(0, 210, 255, 0.12), rgba(0, 150, 255, 0.18));
  border: 1px solid rgba(0, 210, 255, 0.25);
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.live-search-footer-btn:hover {
  background: linear-gradient(90deg, rgba(0, 210, 255, 0.22), rgba(0, 150, 255, 0.3));
  color: #ffffff;
}

.live-search-empty {
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.live-search-empty .empty-icon {
  font-size: 1.6rem;
  opacity: 0.7;
}

.live-search-empty .empty-text {
  font-size: 0.88rem;
  color: #e2e8f0;
}

.live-search-empty .empty-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.live-search-loading {
  padding: 20px 16px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Light Mode para Live Search */
body.light-mode .search-live-dropdown {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

body.light-mode .mobile-live-dropdown {
  background: #ffffff;
  border-color: #cbd5e1;
}

body.light-mode .live-search-section {
  border-bottom-color: #f1f5f9;
}

body.light-mode .live-search-section-title {
  color: #0284c7;
}

body.light-mode .live-search-chip {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}

body.light-mode .live-search-chip:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}

body.light-mode .live-search-chip.tag-chip {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-mode .live-search-chip.tag-chip:hover {
  background: #e2e8f0;
}

body.light-mode .live-search-chip .chip-count {
  background: #e2e8f0;
  color: #475569;
}

body.light-mode .live-search-manga-item:hover,
body.light-mode .live-search-manga-item.is-selected {
  background: #f0f9ff;
}

body.light-mode .live-search-cover {
  background: #e2e8f0;
}

body.light-mode .live-search-title {
  color: #0f172a;
}

body.light-mode .live-search-meta {
  color: #64748b;
}

body.light-mode .live-search-meta .meta-tag {
  background: #f1f5f9;
  color: #475569;
}

body.light-mode .live-search-footer-btn {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}

body.light-mode .live-search-footer-btn:hover {
  background: #bae6fd;
  color: #0c4a6e;
}

body.light-mode .live-search-empty .empty-text {
  color: #0f172a;
}

/* Chips de refinamento na página de catálogo */
.search-refine-bar {
  margin: 12px 0 20px 0;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.light-mode .search-refine-bar {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.search-refine-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-refine-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-refine-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.2);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.search-refine-pill:hover {
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.search-refine-pill.tag-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.search-refine-pill.tag-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

body.light-mode .search-refine-pill {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}

body.light-mode .search-refine-pill.tag-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.search-clear-btn {
  font-size: 0.76rem;
  color: #ef4444;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.search-clear-btn:hover {
  text-decoration: underline;
}

/* Hamburger Button */
.hamburger-btn {
  display: none !important;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
  color: var(--text-white);
  transition:
    transform 0.3s ease,
    color var(--transition-fast);
}

.hamburger-btn:hover {
  color: var(--accent-cyan);
}

.hamburger-icon line {
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
}

.hamburger-btn.active .line-mid {
  opacity: 0;
}

.hamburger-btn.active .line-top {
  transform: translateY(6px) rotate(45deg);
  transform-origin: center;
}

.hamburger-btn.active .line-bot {
  transform: translateY(-6px) rotate(-45deg);
  transform-origin: center;
}

/* Logo & Alignment */
.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-white);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}

.logo-accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
}

.mobile-menu-controls {
  display: none;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text-white);
}

.nav-item.active {
  font-weight: 700;
  border-bottom: 2px solid var(--accent-cyan);
  padding-bottom: 4px;
}

/* Dropdowns Institucional, Login & User */
.nav-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-item-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.dropdown-chevron {
  transition: transform 0.25s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-dropdown-wrapper:hover .dropdown-chevron,
.nav-dropdown-wrapper:hover .nav-item-dropdown {
  color: var(--text-white);
}

.nav-dropdown-wrapper:hover .dropdown-chevron {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.nav-sub-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(14, 17, 26, 0.98);
  border: 1px solid rgba(142, 68, 173, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 20px rgba(142, 68, 173, 0.2);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 195px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Ponte invisível para o mouse */
.nav-sub-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-dropdown-wrapper:hover .nav-sub-dropdown-menu,
.nav-dropdown-wrapper:focus-within .nav-sub-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.sub-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition-fast), color var(--transition-fast), padding-left var(--transition-fast);
  white-space: nowrap;
}

.sub-dropdown-item:hover {
  background: rgba(142, 68, 173, 0.16);
  color: var(--accent-cyan);
  padding-left: 22px;
}

/* Light mode overrides para Sub-dropdowns (Institucional e Login) */
body.light-mode .nav-sub-dropdown-menu {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(142, 68, 173, 0.22);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(142, 68, 173, 0.08);
}

body.light-mode .sub-dropdown-item {
  color: #1e293b;
}

body.light-mode .sub-dropdown-item:hover {
  background: rgba(142, 68, 173, 0.08);
  color: var(--accent-purple);
  padding-left: 22px;
}

/* Botão de Pesquisa (Lupa Circular no Header) */
.header-search-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.header-search-icon-btn:hover,
body.top-search-active .header-search-icon-btn {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.08);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
  transform: scale(1.04);
}

/* Botão de Usuário / Login Circular no Header (Mobile) */
.header-user-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.header-user-btn:hover,
.header-user-btn:active {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.08);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
  transform: scale(1.04);
}

.header-user-btn.logged-in {
  color: var(--accent-cyan);
  border-color: rgba(0, 210, 255, 0.45);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.2);
}

.header-user-btn svg {
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-theme-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-container {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px 2px 2px 12px;
  width: 280px;
  transition: border-color var(--transition-fast);
}

.search-container:focus-within {
  border-color: var(--accent-purple);
}

.search-container input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-size: 0.85rem;
  flex: 1;
}

/* Custom Styled Selects */
.selector-group {
  display: flex;
  gap: 10px;
}

.custom-select {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 32px 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.custom-select:hover {
  border-color: var(--accent-purple);
}

.custom-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px var(--accent-cyan-glow);
}

.w-100 {
  width: 100%;
}

/* Buttons */
.btn {
  border: none;
  outline: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--accent-purple-glow);
}

.btn-primary:hover {
  background: var(--gradient-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--accent-purple-glow);
}

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

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

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
}

.btn-icon-text {
  padding: 10px 20px;
  gap: 8px;
  font-size: 0.9rem;
}

.quick-modes {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  margin-right: 12px;
}

.quick-modes .btn-icon {
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: 6px;
}

.quick-modes .btn-icon.active {
  background: var(--bg-input);
  color: var(--accent-cyan);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-buttons {
  display: flex;
  gap: 6px;
}

/* ==========================================================================
   Views Architecture (SPA transitions)
   ========================================================================== */
.views-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-view {
  animation: fadeInView 0.4s ease-out forwards;
  width: 100%;
}

@keyframes fadeInView {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Home View Styles (Hero & Catalog Grid)
   ========================================================================== */


/* Layout Home - Catalog + Sidebar */
.home-main-layout {
  display: flex;
  padding: 30px 40px;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.catalog-content {
  flex: 3;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
}

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

.tag-btn {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag-btn:hover {
  color: var(--text-white);
  border-color: var(--text-muted);
}

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

/* Manga Grid */
.manga-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}

.manga-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.manga-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-main), var(--shadow-glow);
}

.card-cover-wrapper {
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-darker);
}

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

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

.card-rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Badge de Status na Capa (Em lançamento, Completo, Hiato, etc.) */
.card-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.manga-card:hover .card-status-badge {
  transform: translateY(-2px);
}

/* Status: Em lançamento / Em andamento / Ativo */
.card-status-badge.status-releasing,
.card-status-badge.status-em-lancamento,
.card-status-badge.status-em-andamento,
.card-status-badge.status-ativo {
  background: rgba(8, 28, 38, 0.88);
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.45);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

/* Status: Completo / Finalizado */
.card-status-badge.status-completed,
.card-status-badge.status-completo,
.card-status-badge.status-finalizado {
  background: rgba(10, 32, 20, 0.88);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.45);
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
}

/* Status: Hiato / Pausado */
.card-status-badge.status-hiatus,
.card-status-badge.status-hiato,
.card-status-badge.status-pausado {
  background: rgba(35, 24, 10, 0.88);
  color: #f39c12;
  border: 1px solid rgba(243, 156, 18, 0.45);
  box-shadow: 0 0 10px rgba(243, 156, 18, 0.2);
}

/* Status: Ativo / Padrão */
.card-status-badge.status-active {
  background: rgba(26, 16, 38, 0.88);
  color: #a29bfe;
  border: 1px solid rgba(162, 155, 254, 0.45);
  box-shadow: 0 0 10px rgba(162, 155, 254, 0.2);
}

/* Ponto pulsante para status 'Em lançamento' */
.status-pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #00f2fe;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #00f2fe;
  animation: statusPulse 1.8s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes statusPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 8px #00f2fe;
  }

  100% {
    transform: scale(0.85);
    opacity: 0.6;
  }
}

.status-check-icon {
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
}

.status-pause-icon {
  font-size: 0.68rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Container Vertical de Badges no Topo da Capa (Elimina qualquer risco de sobreposição) */
.card-badges-stack {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 6;
  pointer-events: none;
  max-width: calc(100% - 20px);
}

.card-badges-stack>* {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  pointer-events: auto;
}

/* Linha horizontal para badges no topo da capa (VIP + Status lado a lado) */
.card-top-badges-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  pointer-events: auto;
}

/* Garante que nenhum badge dentro da linha horizontal ou pilha seja absolute para evitar sobreposição */
.card-badges-stack .card-status-badge,
.card-top-badges-row .card-status-badge,
.card-top-badges-row > * {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  pointer-events: auto;
}

/* Badge VIP Exclusivo na Capa (Posicionado à esquerda do Status) */
.card-status-badge.card-vip-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ff9800 100%);
  color: #120e02;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 2px 10px rgba(255, 170, 0, 0.45), 0 0 14px rgba(255, 215, 0, 0.35);
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.card-status-badge.card-vip-badge .card-vip-icon {
  font-size: 0.85rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Badge VIP no Topo / Navbar (Substitui o ícone 👤 de user para membros VIP) */
.nav-vip-badge {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  background: linear-gradient(135deg, #ffd700 0%, #ff9800 100%) !important;
  color: #120e02 !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 2px 8px rgba(255, 170, 0, 0.45), 0 0 12px rgba(255, 215, 0, 0.35) !important;
  font-size: 0.70rem !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  letter-spacing: 0.4px !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

.nav-vip-badge .card-vip-icon {
  font-size: 0.78rem !important;
  line-height: 1 !important;
}

.vip-nav-username {
  color: #ffd700;
  font-weight: 700;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.nav-dropdown-wrapper:hover .vip-nav-username {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.header-user-btn.user-vip {
  color: #ffd700 !important;
  border-color: rgba(255, 215, 0, 0.6) !important;
  background: rgba(255, 215, 0, 0.12) !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.35) !important;
}


@media (max-width: 600px) {
  .card-badges-stack {
    top: 6px;
    right: 6px;
    gap: 4px;
    max-width: calc(100% - 12px);
  }

  .card-top-badges-row {
    gap: 4px;
  }

  .card-status-badge.card-vip-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    gap: 3px;
  }

  .card-status-badge.card-vip-badge .card-vip-icon {
    font-size: 0.75rem;
  }

  .card-status-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .card-original-badge {
    font-size: 0.62rem;
    padding: 2px 6px;
  }
}

/* Badge de Tradução Original HQ18.net na Capa */
.card-original-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(18, 10, 32, 0.92);
  color: #ffffff;
  border: 1px solid rgba(162, 155, 254, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65), 0 0 10px rgba(142, 68, 173, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 6;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.manga-card:hover .card-original-badge {
  transform: translateY(-2px);
  border-color: rgba(0, 210, 255, 0.7);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7), 0 0 14px rgba(0, 210, 255, 0.45);
}

.original-badge-icon {
  color: #f1c40f;
  filter: drop-shadow(0 0 4px rgba(241, 196, 15, 0.8));
  flex-shrink: 0;
}

.badge-orig-brand {
  background: linear-gradient(135deg, #00d2ff 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* Badge de Tradução Original na página de detalhes */
.details-original-badge {
  top: 14px;
  left: 14px;
  font-size: 0.75rem;
  padding: 5px 12px;
}

.original-meta-badge {
  background: linear-gradient(135deg, rgba(142, 68, 173, 0.25), rgba(0, 210, 255, 0.2));
  color: #00d2ff;
  border: 1px solid rgba(0, 210, 255, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.15);
}

/* Linha de Últimas Atualizações no Card (HQ Nova ou Capítulo Lançado) */
.card-update-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 6px 0 8px 0;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  font-size: 0.75rem;
  transition: all var(--transition-fast);
}

.manga-card:hover .card-update-row {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 170, 0, 0.3);
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.72rem;
  line-height: 1.2;
  text-decoration: none;
  max-width: 68%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Novo capítulo lançado */
.update-badge--chapter {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.18), rgba(255, 107, 0, 0.22));
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.update-badge--chapter:hover {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.35), rgba(255, 107, 0, 0.45));
  color: #ffffff;
  border-color: #ffaa00;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 170, 0, 0.3);
}

/* HQ Nova postada */
.update-badge--new_hq {
  background: linear-gradient(135deg, rgba(162, 155, 254, 0.18), rgba(108, 92, 231, 0.22));
  color: #a29bfe;
  border: 1px solid rgba(162, 155, 254, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.update-badge--new_hq:hover {
  background: linear-gradient(135deg, rgba(162, 155, 254, 0.35), rgba(108, 92, 231, 0.45));
  color: #ffffff;
  border-color: #a29bfe;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(162, 155, 254, 0.3);
}

.update-icon {
  font-size: 0.75rem;
  line-height: 1;
}

.update-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-time {
  color: var(--text-muted);
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-actions-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 10;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.manga-card:hover .card-actions-overlay {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .card-actions-overlay {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-action-btn {
  background: rgba(13, 15, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all var(--transition-fast);
}

.card-action-btn:hover {
  background: var(--gradient-primary);
  border-color: var(--accent-purple);
  color: #ffffff;
  box-shadow: 0 0 10px var(--accent-purple-glow);
  transform: scale(1.1);
}

.card-action-btn.fav-btn.active {
  color: #ff4757;
  background: rgba(255, 71, 87, 0.2);
  border-color: #ff4757;
}

.card-action-btn.fav-btn.active:hover {
  background: #ff4757;
  color: #ffffff;
}

.card-action-btn.watch-later-btn.active {
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--accent-cyan);
}

.card-action-btn.watch-later-btn.active:hover {
  background: var(--accent-cyan);
  color: #0b0e14;
}

/* Light mode overrides para os botões flutuantes dos cards (Favoritar e Ler Mais Tarde) */
body.light-mode .card-action-btn {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.light-mode .card-action-btn:hover {
  background: #ffffff;
  color: var(--accent-purple);
  border-color: var(--accent-purple);
  box-shadow: 0 6px 16px rgba(142, 68, 173, 0.35);
  transform: scale(1.12);
}

body.light-mode .card-action-btn.fav-btn.active {
  color: #ef4444;
  background: #fee2e2;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

body.light-mode .card-action-btn.fav-btn.active:hover {
  background: #ef4444;
  color: #ffffff;
}

body.light-mode .card-action-btn.watch-later-btn.active {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

body.light-mode .card-action-btn.watch-later-btn.active:hover {
  background: #0284c7;
  color: #ffffff;
}

.card-info {
  padding: 12px;
}

.card-genres {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.card-genre-item {
  cursor: pointer;
  transition: color var(--transition-fast);
}

.card-genre-item:hover {
  color: var(--accent-purple);
  text-decoration: underline;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.card-chapters-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-meta-link {
  cursor: pointer;
  transition: color 0.2s ease;
}

.card-meta-link:hover {
  color: var(--primary) !important;
  text-decoration: underline;
}

.meta-tag-link {
  transition: color 0.2s ease;
}

.meta-tag-link:hover {
  color: var(--primary) !important;
  text-decoration: underline;
}

.categories-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

.category-sidebar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid transparent;
}

.category-sidebar-item:hover {
  color: #ffffff;
  background: rgba(142, 68, 173, 0.08);
  border-color: rgba(142, 68, 173, 0.2);
  transform: translateX(3px);
}

.category-sidebar-name {
  font-weight: 500;
}

.category-sidebar-count {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.category-sidebar-item.active {
  color: #ffffff;
  background: rgba(142, 68, 173, 0.12);
  border-color: rgba(142, 68, 173, 0.3);
}

/* Tags Cloud (Blogger-style) */
.tags-cloud-wrapper {
  position: relative;
  margin-top: 12px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.tags-cloud.collapsed-4-lines {
  max-height: 168px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-expand-tags {
  width: 100%;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-expand-tags:hover {
  background: var(--bg-input);
  border-color: var(--accent-purple);
  color: var(--text-white);
  box-shadow: 0 4px 12px var(--accent-purple-glow);
}

.tag-cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}

.tag-cloud-item:hover {
  color: var(--text-white);
  background: rgba(142, 68, 173, 0.1);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(142, 68, 173, 0.15);
}

.tag-cloud-item.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: var(--text-white);
  box-shadow: 0 0 12px var(--accent-purple-glow);
}

.tag-cloud-count {
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-cyan);
  min-width: 18px;
  text-align: center;
}

.tag-cloud-item.active .tag-cloud-count {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-white);
}

/* Sidebar Recentes */
.recent-sidebar {
  flex: 1;
  min-width: 280px;
}

.recent-sidebar h3 {
  font-size: 1.2rem;
  color: var(--text-white);
}

.recent-releases-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.recent-cover-thumb {
  width: 48px;
  height: 70px;
  border-radius: 4px;
  object-fit: cover;
  background-color: var(--bg-darker);
}

.recent-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.recent-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-chap-link {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-top: 4px;
}

.recent-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   Details View Styles
   ========================================================================== */
.view-details {
  position: relative;
  padding-bottom: 50px;
}

.details-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 380px;
  background-size: cover;
  background-position: center 20%;
  filter: blur(24px) brightness(0.25);
  opacity: 0.6;
  z-index: 1;
  border-bottom: 1px solid var(--border-color);
}

.details-container {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

.details-header-row {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
}

.manga-cover-column {
  flex: 1;
  max-width: 250px;
}

.details-cover-container {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-color);
}

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

.manga-info-column {
  flex: 3;
  display: flex;
  flex-direction: column;
}

.manga-info-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.status-badge {
  background: #27ae60;
  color: var(--text-white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
}

.rating-badge {
  background: rgba(241, 196, 15, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(241, 196, 15, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.manga-info-column h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 6px;
}

.author-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.manga-stats {
  display: flex;
  gap: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px 24px;
  border-radius: 12px;
  width: fit-content;
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-white);
}

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

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

.manga-genres .genre-tag {
  background: var(--bg-input);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.manga-genres .genre-tag:hover {
  background: var(--accent-cyan);
  color: var(--bg-dark);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.manga-tags-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.synopsis-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.details-action-buttons {
  display: flex;
  gap: 12px;
}

/* Corpo Detalhes - Capítulos + Ad */
.details-body-layout {
  display: flex;
  gap: 40px;
}

.chapters-area {
  flex: 3;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.section-title-row h3 {
  font-size: 1.25rem;
  color: var(--text-white);
}

.chapters-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 8px;
}

.chapter-row-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  width: 100%;
  transition: all var(--transition-fast);
}

.chapter-row-btn:hover {
  border-color: var(--accent-purple);
  background: var(--bg-input);
  transform: translateX(4px);
}

.chapter-row-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.chapter-row-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.details-sidebar-ad {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.details-sidebar-ad .ad-slot {
  width: 300px;
  height: 250px;
}

.desktop-only-ad {
  display: flex !important;
}

@media (max-width: 991px) {
  .desktop-only-ad {
    display: none !important;
  }
}

.mobile-only-ad {
  display: none !important;
}

@media (max-width: 991px) {
  .mobile-only-ad {
    display: flex !important;
  }
}

/* ==========================================================================
   Ad Systems (Designed for Easy Replacement & Programmatic Placement)
   ========================================================================== */
.ad-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ad-bg);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  position: relative;
}

.ad-top {
  margin-top: 0;
}

.ad-home-banner {
  margin: 10px 0 30px 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-width: 1400px;
  width: calc(100% - 80px);
  margin-left: auto;
  margin-right: auto;
}

.ad-tag {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--ad-text);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  padding: 2px 6px;
  background: var(--ad-glow);
  border-radius: 4px;
  border: 1px solid rgba(243, 156, 18, 0.2);
}

.ad-slot {
  width: 100%;
  max-width: 728px;
  height: 90px;
  background: rgba(6, 7, 10, 0.6);
  border: 1.5px dashed rgba(241, 196, 15, 0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: border-color var(--transition-fast);
}

.ad-slot:hover {
  border-color: var(--ad-border);
}

.ad-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}

.ad-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ad-text);
}

.ad-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ad-spec {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-white);
  background: var(--bg-card);
  padding: 1px 6px;
  border-radius: 4px;
  margin: 4px 0;
}

/* In-Feed Ad (Cascading mode) */
.ad-slot-in-feed {
  width: 100%;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ad-slot-in-feed .ad-slot {
  height: 250px;
  max-width: 300px;
}

@media (min-width: 768px) {
  .ad-slot-in-feed .ad-slot {
    height: 120px;
    max-width: 728px;
  }
}

/* Sidebar Ads (Skyscrapers) */
.ad-sidebar {
  width: 180px;
  position: sticky;
  top: 90px;
  height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  z-index: 5;
  background: var(--bg-darker);
}

.ad-sidebar.left {
  border-right: 1px solid var(--border-color);
}

.ad-sidebar.right {
  border-left: 1px solid var(--border-color);
}

.ad-sidebar .ad-slot {
  width: 160px;
  height: 600px;
}

/* ==========================================================================
   Layout & Structural Viewports para o Leitor
   ========================================================================== */
.layout-main-wrapper {
  display: flex;
  flex: 1;
  width: 100%;
  position: relative;
}

.reader-content-area {
  flex: 1;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 24px 0;
  background: var(--bg-dark);
}

/* ==========================================================================
   Settings Drawer (Floating Drawer Menu)
   ========================================================================== */
.settings-drawer {
  position: fixed;
  top: 70px;
  right: 0;
  bottom: 0;
  width: 320px;
  background: rgba(20, 23, 36, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
  z-index: 90;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.settings-drawer.open {
  transform: translateX(0);
}

.settings-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 7, 10, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 89;
  /* Logo abaixo do settings-drawer */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.settings-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

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

.drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
}

.btn-close {
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background-color var(--transition-fast);
}

.btn-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
}

.drawer-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Switch Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.option-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.option-btn:hover {
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

.option-btn.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: var(--text-white);
  box-shadow: 0 4px 10px var(--accent-purple-glow);
}

.toggle-switch-group {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px;
}

.switch-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.switch-btn.active {
  background: var(--bg-card);
  color: var(--accent-cyan);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Checkbox Switch */
.toggle-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
}

.toggle-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 70%;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-card);
  transition: 0.4s;
  border: 1px solid var(--border-color);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: 0.4s;
}

input:checked+.slider {
  background-color: var(--accent-purple);
  border-color: var(--accent-purple);
}

input:checked+.slider:before {
  transform: translateX(22px);
  background-color: var(--text-white);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* ==========================================================================
   Reader Canvas / Manga Display Viewports
   ========================================================================== */
.manga-view-mode {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.manga-pages-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Espaçamento em Cascata */
#cascade-view[data-spacing="none"] .manga-page-wrapper {
  margin-bottom: 0;
  padding: 0;
  line-height: 0;
}

#cascade-view[data-spacing="none"] .manga-img {
  box-shadow: none !important;
  margin: 0;
  padding: 0;
  border: none;
  vertical-align: bottom;
}

#cascade-view[data-spacing="small"] .manga-page-wrapper {
  margin-bottom: 12px;
}

#cascade-view[data-spacing="large"] .manga-page-wrapper {
  margin-bottom: 36px;
}

.manga-page-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: max-width var(--transition-normal);
  line-height: 0;
  font-size: 0;
}

/* Tamanhos de Largura */
[data-width="narrow"] .manga-page-wrapper,
[data-width="narrow"] .single-image-container {
  max-width: 600px;
}

[data-width="medium"] .manga-page-wrapper,
[data-width="medium"] .single-image-container {
  max-width: 800px;
}

[data-width="wide"] .manga-page-wrapper,
[data-width="wide"] .single-image-container {
  max-width: 1050px;
}

[data-width="full"] .manga-page-wrapper,
[data-width="full"] .single-image-container {
  max-width: 100%;
}

.manga-img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
  border: none;
  outline: none;
  opacity: 0;
  transition: opacity 0.4s ease-in;
  background-color: var(--bg-dark);
  pointer-events: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none !important;
  -webkit-tap-highlight-color: transparent;
}

.manga-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  background: transparent;
  cursor: pointer;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.manga-img.loaded {
  opacity: 1;
}

/* Skeleton Loading Shimmer */
.page-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 600px;
  background: linear-gradient(90deg,
      var(--bg-card) 25%,
      var(--bg-input) 50%,
      var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite linear;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  z-index: 1;
  color: var(--text-muted);
}

.page-skeleton.hidden {
  display: none !important;
}

.skeleton-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(142, 68, 173, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-purple);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 12px;
}

.page-label-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--text-white);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Single Page View */
.single-page-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 70vh;
}

.single-image-container {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
}

.single-image-container .manga-img {
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#cascade-view[data-spacing="small"] .manga-img,
#cascade-view[data-spacing="large"] .manga-img {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.page-click-area {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15%;
  z-index: 10;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.page-click-area.left {
  left: 0;
}

.page-click-area.right {
  right: 0;
}

.page-click-area.left:hover {
  background: linear-gradient(to right,
      rgba(142, 68, 173, 0.05) 0%,
      rgba(0, 0, 0, 0) 100%);
}

.page-click-area.right:hover {
  background: linear-gradient(to left,
      rgba(142, 68, 173, 0.05) 0%,
      rgba(0, 0, 0, 0) 100%);
}

.single-page-footer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  width: 100%;
}

.page-indicator {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
  background: var(--bg-card);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.bottom-nav-overlay {
  width: 100%;
  margin-top: 40px;
  padding: 24px;
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border-color);
  background: var(--bg-darker);
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 600px;
  width: 100%;
  justify-content: space-between;
}

.bottom-chap-title {
  font-weight: 700;
  font-size: 1.2rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes loading-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

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

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */
@media (max-width: 1200px) {

  .ad-sidebar,
  .related-sidebar-left {
    display: none !important;
  }

  .layout-main-wrapper {
    justify-content: center;
  }

  .home-main-layout {
    flex-direction: column;
    padding: 20px;
  }

  .recent-sidebar {
    width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .global-header {
    gap: 16px;
    padding: 0 16px;
  }
  .nav-links {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .global-header {
    position: fixed;
    height: 65px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
  }

  .views-wrapper {
    margin-top: 65px !important;
  }

  .logo-container {
    position: static;
    transform: none;
    order: 1;
    margin: 0;
    margin-right: auto;
    display: flex;
    align-items: center;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 2;
    margin-left: auto;
  }

  .hamburger-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    order: 3;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-white);
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
  }

  .hamburger-btn:hover,
  .hamburger-btn.active {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.08);
  }

  .global-header:not(.reader-active) .search-theme-controls {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  .global-header:not(.reader-active) #theme-toggle-btn {
    display: none !important;
  }

  .header-search-icon-btn,
  .header-user-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .header-user-btn {
    display: inline-flex !important;
  }

  /* Desktop nav links substituído pela barra lateral no mobile */
  .nav-links {
    display: none !important;
  }

  /* Categories Bar (Segunda Linha) no Mobile - Garantia de Linha Única Sempre */
  .categories-bar {
    padding: 8px 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .categories-bar::-webkit-scrollbar {
    display: none !important;
  }

  .categories-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(8px, 3.8vw, 22px) !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .desktop-only-cat,
  .categories-bar .desktop-only-cat,
  .categories-list .desktop-only-cat,
  a.desktop-only-cat,
  button.desktop-only-cat {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
  }

  .categories-bar .category-item {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: clamp(0.82rem, 3.3vw, 0.92rem) !important;
    padding: 4px clamp(4px, 1.2vw, 8px) !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
  }

  .categories-bar .category-item.active {
    border-bottom: 2px solid var(--accent-purple) !important;
    color: var(--text-white) !important;
  }

  body.light-mode .categories-bar .category-item.active {
    color: var(--accent-purple) !important;
    border-bottom-color: var(--accent-purple) !important;
  }

  .category-item-originais {
    background: #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 9999px !important;
    padding: 5px clamp(12px, 3.5vw, 18px) !important;
    font-weight: 700 !important;
    font-size: clamp(0.78rem, 3.2vw, 0.88rem) !important;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: all var(--transition-fast) !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .category-item-originais:hover {
    background: #e2e8f0 !important;
    color: #000000 !important;
    transform: translateY(-1px) !important;
  }

  body.light-mode .category-item-originais {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
  }
}

/* ==========================================================================
   Mobile Lateral Sidebar (Drawer Menu)
   ========================================================================== */
.mobile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.mobile-sidebar-active .mobile-sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 310px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(14, 17, 26, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-color);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
}

body.mobile-sidebar-active .mobile-sidebar {
  transform: translateX(0);
}

.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.mobile-sidebar-logo {
  font-size: 1.3rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-white);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}

.mobile-sidebar-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-sidebar-close-btn:hover {
  background: rgba(255, 51, 102, 0.2);
  color: #ff3366;
  border-color: #ff3366;
  transform: rotate(90deg);
}

.mobile-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-sidebar-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all var(--transition-fast);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.mobile-sidebar-item .item-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.mobile-sidebar-item:hover,
.mobile-sidebar-item.active {
  background: rgba(142, 68, 173, 0.15);
  color: var(--accent-cyan);
  padding-left: 20px;
}

.mobile-sidebar-item:hover .item-icon,
.mobile-sidebar-item.active .item-icon {
  color: var(--accent-cyan);
}

.mobile-sidebar-auth {
  margin: 4px 0 8px 0;
}

.auth-btn-item {
  background: rgba(142, 68, 173, 0.18) !important;
  border: 1px solid rgba(142, 68, 173, 0.4) !important;
  color: #ffffff !important;
}

.auth-btn-item .item-icon {
  color: var(--accent-cyan) !important;
}

.auth-btn-item:hover {
  background: rgba(142, 68, 173, 0.3) !important;
  border-color: var(--accent-cyan) !important;
}

.mobile-user-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-user-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-user-avatar {
  font-size: 1.3rem;
}

.mobile-user-meta {
  display: flex;
  flex-direction: column;
}

.mobile-user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-white);
}

.mobile-user-badge {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.mobile-user-actions {
  display: flex;
  gap: 8px;
}

.mobile-user-action-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  text-decoration: none;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-user-action-btn:hover {
  background: var(--bg-input);
  color: var(--text-white);
}

.mobile-user-action-btn.admin {
  color: var(--accent-purple);
  border-color: rgba(142, 68, 173, 0.4);
}

.mobile-user-action-btn.logout {
  color: #ff4757;
  border-color: rgba(255, 71, 87, 0.3);
}

.mobile-user-action-btn.logout:hover {
  background: rgba(255, 71, 87, 0.15);
  border-color: #ff4757;
}

/* Accordion Institucional */
.mobile-sidebar-accordion {
  border-radius: 10px;
  overflow: hidden;
}

.mobile-sidebar-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.96rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.accordion-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.accordion-chevron {
  transition: transform 0.25s ease;
  color: var(--text-muted);
}

.mobile-sidebar-accordion-btn:hover {
  background: rgba(142, 68, 173, 0.15);
  color: var(--accent-cyan);
}

.mobile-sidebar-accordion-btn.open {
  background: rgba(142, 68, 173, 0.12);
  color: var(--text-white);
}

.mobile-sidebar-accordion-btn.open .accordion-chevron {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.mobile-sidebar-accordion-body {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 6px 42px;
}

.mobile-sidebar-accordion-body.open {
  display: flex;
}

.mobile-sidebar-subitem {
  padding: 8px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.mobile-sidebar-subitem:hover {
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.04);
  padding-left: 18px;
}

.mobile-sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.mobile-sidebar-theme-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-sidebar-theme-btn:hover {
  background: var(--bg-input);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Light mode overrides for lateral sidebar */
body.light-mode .mobile-sidebar {
  background: rgba(248, 250, 252, 0.98);
  border-left-color: #cbd5e1;
}

body.light-mode .mobile-sidebar-header {
  background: rgba(0, 0, 0, 0.03);
  border-bottom-color: #cbd5e1;
}

body.light-mode .mobile-sidebar-close-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-mode .mobile-user-card {
  background: rgba(0, 0, 0, 0.03);
  border-color: #cbd5e1;
}

body.light-mode .mobile-sidebar-footer {
  background: rgba(0, 0, 0, 0.03);
  border-top-color: #cbd5e1;
}

/* Esconder sidebar em desktop */
@media (min-width: 769px) {
  .mobile-sidebar-backdrop,
  .mobile-sidebar {
    display: none !important;
  }
}

@media (max-width: 768px) {

  /* Reader Active on Mobile - Grid layout to preserve header brand/nav and config gear */
  .global-header.reader-active {
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 70px auto;
    height: auto;
    padding: 0 16px 12px 16px;
    gap: 0;
  }

  .global-header.reader-active .logo-container {
    display: flex !important;
    grid-column: 2;
    grid-row: 1;
    justify-content: center;
    align-items: center;
    position: relative !important;
    left: auto !important;
    transform: none !important;
  }

  .global-header.reader-active .hamburger-btn {
    display: block !important;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .global-header.reader-active .header-right {
    display: flex !important;
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    width: auto;
  }

  .global-header.reader-active #header-reader-controls {
    grid-column: 1 / span 3;
    grid-row: 2;
    display: flex !important;
    flex-direction: row;
    width: 100%;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
  }

  .global-header.reader-active #header-reader-controls .selector-group {
    display: flex;
    flex: 1;
    gap: 4px;
    margin: 0;
  }

  .global-header.reader-active #header-reader-controls .nav-buttons {
    display: flex;
    gap: 4px;
    width: auto;
    margin: 0;
  }

  .global-header.reader-active #header-reader-controls .custom-select {
    flex: 1;
    font-size: 0.85rem;
    padding: 8px 24px 8px 12px;
  }

  .global-header.reader-active #header-reader-right {
    display: flex !important;
    width: auto;
    justify-content: flex-end;
    border-top: none;
    padding-top: 0;
    margin-top: 0;
  }

  .global-header.reader-active #header-reader-right .quick-modes {
    display: flex !important;
    /* Exibe os botões de modo rápido no mobile */
  }

  .global-header.reader-active #header-reader-right #toggle-settings-btn {
    display: none !important;
    /* Oculta o botão de configurar no mobile */
  }

  .global-header.reader-active~.views-wrapper {
    margin-top: 130px !important;
  }

  .search-container {
    width: 100%;
  }

  .header-center {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .selector-group {
    width: 100%;
  }

  .custom-select {
    flex: 1;
    font-size: 0.8rem;
  }

  .nav-buttons {
    width: 100%;
  }

  .nav-buttons .btn {
    flex: 1;
  }

  .header-right {
    width: auto;
    display: flex;
    justify-content: flex-end;
  }

  .quick-modes {
    margin-right: 0;
    flex: 1;
  }

  /* O settings-drawer responsivo foi movido para uma media query especifica de 1024px no final do arquivo para cobrir todos os dispositivos mobile e tablets de forma consistente */




  .details-header-row {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .manga-cover-column {
    max-width: 180px;
  }

  .manga-info-column {
    align-items: center;
    text-align: center;
  }

  .manga-info-column h1 {
    font-size: 1.6rem;
  }

  .manga-stats {
    gap: 16px;
    padding: 10px;
  }

  .details-action-buttons {
    flex-direction: column;
    width: 100%;
  }

  .details-action-buttons .btn {
    width: 100%;
  }

  .details-body-layout {
    flex-direction: column;
  }

  .details-sidebar-ad {
    width: 100%;
  }

  .ad-home-banner {
    width: calc(100% - 24px);
  }

  /* Melhorias no Leitor Mobile - Página Única */
  #single-prev-btn {
    flex-direction: column !important;
    gap: 4px !important;
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
    height: auto !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #single-next-btn {
    flex-direction: column-reverse !important;
    gap: 4px !important;
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
    height: auto !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .single-page-footer-controls {
    gap: 12px !important;
  }
}

/* ==========================================================================
   Modal de Verificação de Idade (+18)
   ========================================================================== */
.adult-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 7, 10, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeInView 0.3s ease-out;
}

.adult-modal-card {
  background: var(--bg-card);
  border: 2px solid #e74c3c;
  border-radius: 16px;
  padding: 40px 30px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow:
    0 10px 40px rgba(231, 76, 60, 0.2),
    var(--shadow-main);
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.adult-modal-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  animation: pulseRed 2s infinite;
}

.adult-modal-body-layout {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.adult-modal-col-img {
  flex-shrink: 0;
}

.adult-modal-img {
  width: 120px;
  height: auto;
  border-radius: 12px;
  flex-shrink: 0;
  display: block;
}

.adult-modal-col-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.adult-modal-col-text .adult-modal-icon {
  font-size: 2.8rem;
  margin-bottom: 8px;
  animation: pulseRed 2s infinite;
}

.adult-modal-col-text h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 8px;
}

.adult-modal-col-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.adult-modal-col-text .adult-modal-subtext {
  font-weight: 700;
  color: #e74c3c !important;
  font-size: 0.8rem !important;
  margin-bottom: 0 !important;
}

.adult-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adult-modal-actions .btn {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
}

@media (max-width: 550px) {
  .adult-modal-body-layout {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    margin-bottom: 20px;
  }

  .adult-modal-col-text {
    align-items: center;
    text-align: center;
  }

  .adult-modal-col-text .adult-modal-icon,
  .adult-modal-col-text h2,
  .adult-modal-col-text p,
  .adult-modal-col-text .adult-modal-subtext {
    text-align: center !important;
  }

  .adult-modal-img {
    width: 100px;
  }
}

#btn-adult-confirm {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

#btn-adult-confirm:hover {
  background: linear-gradient(135deg, #ff6b6b 0%, #e74c3c 100%);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulseRed {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(231, 76, 60, 0));
  }

  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 15px rgba(231, 76, 60, 0.6));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(231, 76, 60, 0));
  }
}

@keyframes pulsePurple {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(142, 68, 173, 0));
  }

  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 15px rgba(142, 68, 173, 0.6));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(142, 68, 173, 0));
  }
}

.badge-adult {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.4) !important;
}

/* Card customizado para o modal de convite de cadastro */
.invite-modal-card {
  position: relative;
  overflow: hidden;
  border-color: var(--accent-purple) !important;
  box-shadow: 0 10px 40px var(--accent-purple-glow), var(--shadow-main) !important;
}

/* Imagem decorativa de fundo */
.invite-modal-bg-img {
  position: absolute;
  bottom: -10px;
  right: -20px;
  height: 90%;
  width: auto;
  opacity: 0.15;
  /* Sutil no fundo para garantir legibilidade */
  pointer-events: none;
  z-index: 1;
  border: none !important;
  box-shadow: none !important;
}

/* Garantir que o texto e os botões fiquem por cima da imagem de fundo */
.invite-modal-card .adult-modal-body-layout,
.invite-modal-card .adult-modal-actions {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Header Nav Divider & Spacing
   ========================================================================== */
.nav-divider {
  color: var(--border-color);
  font-size: 0.95rem;
  align-self: center;
  user-select: none;
  margin: 0 4px;
}

/* ==========================================================================
   Search & Theme Controls (Expandable Lupa + Luz)
   ========================================================================== */
.search-theme-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Busca expansível */
.search-container.expandable {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2px 2px 2px 12px;
  width: 42px;
  /* Começa compactada */
  height: 40px;
  transition:
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color var(--transition-fast);
  overflow: hidden;
  position: relative;
}

.search-container.expandable.expanded {
  width: 240px;
}

.search-container.expandable input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-size: 0.85rem;
  width: 100%;
  padding-right: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.search-container.expandable.expanded input {
  opacity: 1;
  pointer-events: auto;
}

.search-toggle-btn {
  position: absolute;
  right: 2px;
  top: 2px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.search-container.expandable:hover .search-toggle-btn,
.search-container.expandable.expanded .search-toggle-btn {
  color: var(--text-white);
}

.search-container.expandable.expanded .search-toggle-btn {
  background: var(--bg-input);
}

/* Luz / Dark Mode button */
.theme-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-btn:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.2);
  transform: scale(1.05);
}

body.light-mode .theme-btn {
  color: var(--accent-purple);
  border-color: var(--accent-purple);
}

body.light-mode .theme-btn:hover {
  color: var(--accent-purple);
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(142, 68, 173, 0.2);
}

/* ==========================================================================
   Categories Bar (Segunda Linha)
   ========================================================================== */
.categories-bar {
  width: 100%;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 90;
  flex-wrap: wrap;
}

.categories-label {
  color: var(--accent-cyan);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  user-select: none;
}

.categories-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.category-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition:
    color var(--transition-fast),
    transform var(--transition-fast);
  padding: 4px 6px;
  letter-spacing: 0.01em;
}

.category-item:hover,
.category-item.active {
  color: var(--text-white);
}

.category-item.active {
  border-bottom: 2px solid var(--accent-purple);
}

.cat-divider {
  color: var(--border-color);
  font-size: 0.85rem;
  user-select: none;
}

/* Originais: Botão em formato de pílula / badge */
.category-item-originais {
  background: #cbd5e1;
  color: #0f172a !important;
  border-radius: 9999px !important;
  padding: 5px 16px !important;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all var(--transition-fast) !important;
}

.category-item-originais:hover {
  background: #e2e8f0;
  color: #000000 !important;
  transform: translateY(-1px);
}

body.light-mode .category-item-originais {
  background: #1e293b;
  color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

/* VIP: Botão Dourado Premium em formato de pílula */
.category-item-vip {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 152, 0, 0.12)) !important;
  color: #ffd700 !important;
  border-radius: 9999px !important;
  padding: 5px 16px !important;
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  text-decoration: none !important;
  border: 1px solid rgba(255, 215, 0, 0.45) !important;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.2) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  transition: all var(--transition-fast) !important;
}

.category-item-vip:hover {
  background: linear-gradient(135deg, #ffd700, #ff9800) !important;
  color: #000000 !important;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.45) !important;
  transform: translateY(-1px);
}

.nav-item-vip {
  color: #ffd700 !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
  transition: all var(--transition-fast) !important;
}

.nav-item-vip:hover {
  color: #fff !important;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* ==========================================================================
   Categories Bar no Mobile (<= 991px):
   - Exclusivamente 3 itens: Recentes, HQ Aleatória, Originais (Pílula)
   - Oculta estritamente: Milftoon, Animes, Séries
   - Sempre na MESMA LINHA (flex-wrap: nowrap, centralizado)
   ========================================================================== */
@media (max-width: 991px) {
  .desktop-only-cat,
  .categories-bar .desktop-only-cat,
  .categories-list .desktop-only-cat,
  a.desktop-only-cat,
  button.desktop-only-cat {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
  }

  .categories-bar {
    padding: 8px 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .categories-bar::-webkit-scrollbar {
    display: none !important;
  }

  .categories-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: clamp(8px, 4vw, 24px) !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .categories-bar .category-item {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: clamp(0.82rem, 3.4vw, 0.92rem) !important;
    padding: 4px clamp(4px, 1.2vw, 8px) !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
  }

  .categories-bar .category-item.active {
    border-bottom: 2px solid var(--accent-purple) !important;
    color: var(--text-white) !important;
  }

  body.light-mode .categories-bar .category-item.active {
    color: var(--accent-purple) !important;
    border-bottom-color: var(--accent-purple) !important;
  }

  .categories-bar .category-item-originais {
    background: #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 9999px !important;
    padding: 5px clamp(12px, 3.5vw, 18px) !important;
    font-weight: 700 !important;
    font-size: clamp(0.78rem, 3.2vw, 0.88rem) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.2 !important;
  }

  body.light-mode .categories-bar .category-item-originais {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
  }

  .categories-bar .category-item-vip {
    color: #ffd700 !important;
    font-weight: 800 !important;
    letter-spacing: 0.3px !important;
  }

  .categories-bar .category-item-vip.active {
    border-bottom: 2px solid #ffd700 !important;
    color: #ffd700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.45) !important;
  }

  body.light-mode .categories-bar .category-item-vip {
    color: #b8860b !important;
  }

  body.light-mode .categories-bar .category-item-vip.active {
    border-bottom-color: #b8860b !important;
    color: #b8860b !important;
  }
}

/* ==========================================================================
   Desktop Hover Popovers (Personagens & Categorias Sugeridas)
   ========================================================================== */
.nav-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-suggestions-popover {
  display: none !important;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0.97);
  width: 320px;
  background: rgba(14, 16, 26, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(142, 68, 173, 0.38);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75), 0 0 24px rgba(142, 68, 173, 0.22);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.22s;
  z-index: 10000;
  text-align: left;
}

/* Ponte invisível para garantir que o mouse não perca o hover */
.nav-suggestions-popover::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  width: 100%;
  height: 16px;
  background: transparent;
}

/* Seta charmosa apontando para cima */
.nav-suggestions-popover::after {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(14, 16, 26, 0.98);
  border-left: 1px solid rgba(142, 68, 173, 0.38);
  border-top: 1px solid rgba(142, 68, 173, 0.38);
}

/* Exibição no Desktop (mouse hover ou classe aberta) */
@media (min-width: 992px) {

  .nav-dropdown-wrapper:hover .nav-suggestions-popover,
  .nav-suggestions-popover.popover-open {
    display: block !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.popover-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 6px;
}

.popover-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(142, 68, 173, 0.3), rgba(0, 242, 254, 0.2));
  color: var(--accent-cyan);
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.popover-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Item Personagem */
.popover-item-char {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.popover-item-char:hover {
  background: rgba(142, 68, 173, 0.18);
  border-color: rgba(142, 68, 173, 0.4);
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(142, 68, 173, 0.2);
}

.popover-char-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(142, 68, 173, 0.5);
  background: #191b28;
  box-shadow: 0 0 10px rgba(142, 68, 173, 0.3);
}

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

.popover-char-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.popover-char-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.popover-item-char:hover .popover-char-name {
  color: var(--accent-cyan);
}

.popover-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

.popover-item-char:hover .popover-arrow,
.popover-item-cat:hover .popover-arrow {
  opacity: 1;
  color: var(--accent-cyan);
  transform: translateX(3px);
}

/* Item Categoria */
.popover-item-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.popover-item-cat:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.35);
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.18);
}

.popover-cat-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.popover-cat-icon {
  font-size: 1.15rem;
  line-height: 1;
  width: 24px;
  text-align: center;
}

.popover-cat-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popover-item-cat:hover .popover-cat-name {
  color: var(--accent-cyan);
}

.popover-footer-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

.popover-footer-link:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

/* Light mode overrides para Navbar Popovers (Personagens & Categorias Sugeridas) */
body.light-mode .nav-suggestions-popover {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(142, 68, 173, 0.22);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(142, 68, 173, 0.08);
}

body.light-mode .nav-suggestions-popover::after {
  background: #ffffff;
  border-left: 1px solid rgba(142, 68, 173, 0.22);
  border-top: 1px solid rgba(142, 68, 173, 0.22);
}

body.light-mode .popover-header {
  border-bottom: 1px solid #edf2f7;
}

body.light-mode .popover-title {
  color: #0f172a;
}

body.light-mode .popover-badge {
  background: rgba(0, 210, 255, 0.12);
  color: #0284c7;
  border-color: rgba(0, 210, 255, 0.4);
}

body.light-mode .popover-item-char,
body.light-mode .popover-item-cat {
  background: #f8fafc;
  border-color: #f1f5f9;
}

body.light-mode .popover-item-char:hover {
  background: rgba(142, 68, 173, 0.08);
  border-color: rgba(142, 68, 173, 0.3);
  box-shadow: 0 4px 12px rgba(142, 68, 173, 0.1);
}

body.light-mode .popover-item-cat:hover {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 210, 255, 0.12);
}

body.light-mode .popover-char-name,
body.light-mode .popover-cat-name {
  color: #0f172a;
}

body.light-mode .popover-item-char:hover .popover-char-name,
body.light-mode .popover-item-cat:hover .popover-cat-name {
  color: var(--accent-purple);
}

body.light-mode .popover-char-avatar {
  background: #e2e8f0;
  border-color: rgba(142, 68, 173, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

body.light-mode .popover-char-meta {
  color: #64748b;
}

body.light-mode .popover-arrow {
  color: #94a3b8;
}

body.light-mode .popover-item-char:hover .popover-arrow,
body.light-mode .popover-item-cat:hover .popover-arrow {
  color: var(--accent-purple);
}

body.light-mode .popover-footer-link {
  border-top: 1px solid #edf2f7;
  color: var(--accent-purple);
}

body.light-mode .popover-footer-link:hover {
  color: #6c3483;
  text-shadow: none;
}

/* ==========================================================================
   Animação do Dado 3D e Overlay Cinematográfico de HQ Aleatória
   ========================================================================== */
.btn-random-nav-trigger {
  position: relative;
  transition: color 0.25s ease, transform 0.25s ease, text-shadow 0.25s ease !important;
}

.btn-random-nav-trigger:hover {
  color: var(--accent-cyan) !important;
  text-shadow: 0 0 12px rgba(0, 242, 254, 0.6);
  transform: scale(1.05);
}

.btn-random-nav-trigger.rolling-active {
  animation: navDicePulse 0.8s infinite alternate ease-in-out;
}

@keyframes navDicePulse {
  0% {
    transform: scale(1);
    color: var(--accent-cyan);
  }

  100% {
    transform: scale(1.15);
    color: var(--accent-purple);
    text-shadow: 0 0 18px rgba(142, 68, 173, 0.8);
  }
}

/* Overlay Fullscreen do Sorteio */
.hq-dice-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(circle at center, rgba(16, 12, 32, 0.94) 0%, rgba(5, 6, 10, 0.97) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.hq-dice-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dice-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dice-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #00f2fe;
  color: #00f2fe;
  transform: scale(1.1);
}

.dice-scene-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  position: relative;
}

/* Anéis de energia orbitando */
.dice-energy-rings {
  position: absolute;
  width: 280px;
  height: 280px;
  pointer-events: none;
}

.dice-energy-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(142, 68, 173, 0.45);
  box-shadow: 0 0 20px rgba(142, 68, 173, 0.3);
  animation: energyRingSpin 4s linear infinite;
}

.dice-energy-ring:nth-child(2) {
  inset: 25px;
  border-color: rgba(0, 242, 254, 0.5);
  border-style: dotted;
  border-width: 2px;
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.35);
  animation: energyRingSpinReverse 2.8s linear infinite;
}

@keyframes energyRingSpin {
  0% {
    transform: rotate(0deg) scale(0.95);
  }

  50% {
    transform: rotate(180deg) scale(1.05);
  }

  100% {
    transform: rotate(360deg) scale(0.95);
  }
}

@keyframes energyRingSpinReverse {
  0% {
    transform: rotate(360deg) scale(1.03);
  }

  50% {
    transform: rotate(180deg) scale(0.97);
  }

  100% {
    transform: rotate(0deg) scale(1.03);
  }
}

/* Dado 3D */
.dice-cube-wrapper {
  width: 110px;
  height: 110px;
  position: relative;
  transform-style: preserve-3d;
  animation: diceRollSpin3D 1.1s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.dice-cube-wrapper.dice-landed {
  animation: diceImpactLand 0.4s ease-out forwards;
}

@keyframes diceRollSpin3D {
  0% {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
  }

  25% {
    transform: rotateX(180deg) rotateY(90deg) rotateZ(45deg);
  }

  50% {
    transform: rotateX(360deg) rotateY(270deg) rotateZ(180deg);
  }

  75% {
    transform: rotateX(540deg) rotateY(360deg) rotateZ(270deg);
  }

  100% {
    transform: rotateX(720deg) rotateY(720deg) rotateZ(360deg);
  }
}

@keyframes diceImpactLand {
  0% {
    transform: scale(1.3) rotateX(15deg) rotateY(15deg);
  }

  50% {
    transform: scale(0.9) rotateX(0deg) rotateY(0deg);
  }

  100% {
    transform: scale(1.15) rotateX(0deg) rotateY(0deg);
    filter: drop-shadow(0 0 35px #00f2fe);
  }
}

.dice-face {
  position: absolute;
  width: 110px;
  height: 110px;
  background: linear-gradient(135deg, rgba(22, 18, 38, 0.94), rgba(38, 22, 60, 0.96));
  border: 2.5px solid rgba(0, 242, 254, 0.85);
  border-radius: 20px;
  box-shadow: inset 0 0 25px rgba(142, 68, 173, 0.6), 0 0 20px rgba(0, 242, 254, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
  user-select: none;
}

.dice-face-front {
  transform: rotateY(0deg) translateZ(55px);
}

.dice-face-back {
  transform: rotateY(180deg) translateZ(55px);
}

.dice-face-right {
  transform: rotateY(90deg) translateZ(55px);
}

.dice-face-left {
  transform: rotateY(-90deg) translateZ(55px);
}

.dice-face-top {
  transform: rotateX(90deg) translateZ(55px);
}

.dice-face-bottom {
  transform: rotateX(-90deg) translateZ(55px);
}

.dice-pip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 75%;
  height: 75%;
  align-items: center;
  justify-items: center;
}

.dice-pip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  box-shadow: 0 0 10px #00f2fe, 0 0 16px rgba(0, 242, 254, 0.8);
}

.dice-pip.accent {
  background: linear-gradient(135deg, #ff007f, #8e44ad);
  box-shadow: 0 0 12px #ff007f, 0 0 20px rgba(255, 0, 127, 0.9);
}

/* Textos e status da roleta */
.dice-status-container {
  margin-top: 45px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dice-status-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 60%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glowTitle 1.5s infinite alternate ease-in-out;
}

@keyframes glowTitle {
  0% {
    filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.3));
  }

  100% {
    filter: drop-shadow(0 0 20px rgba(142, 68, 173, 0.8));
  }
}

.dice-status-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  min-height: 24px;
}

.dice-slot-ticker {
  display: inline-block;
  color: #fff;
  font-weight: 700;
  animation: slotFlicker 0.15s infinite;
}

@keyframes slotFlicker {
  0% {
    opacity: 0.8;
    transform: translateY(-1px);
  }

  50% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0.9;
    transform: translateY(1px);
  }
}

.dice-flash-fx {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
  border-radius: inherit;
}

.dice-flash-fx.flash {
  opacity: 0.45;
}

/* ==========================================================================
   Contact View Styling
   ========================================================================== */
.contact-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 0 20px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-main);
}

.contact-card h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 8px;
  text-align: center;
}

.contact-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 30px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-white);
  padding: 12px 16px;
  border-radius: 8px;
  outline: none;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
  width: 100%;
}

.form-group textarea {
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-purple);
}

.contact-success-msg {
  display: none;
  align-items: center;
  justify-content: center;
  color: #27ae60;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 20px;
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.2);
  border-radius: 8px;
  padding: 16px;
  animation: fadeInView 0.3s ease;
}

.contact-error-msg {
  display: none;
  align-items: center;
  justify-content: center;
  color: #e74c3c;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 20px;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-radius: 8px;
  padding: 16px;
  animation: fadeInView 0.3s ease;
}


/* ==========================================================================
   Light Mode Theme Styles
   ========================================================================== */
body.light-mode {
  --bg-darker: #f5f7fa;
  --bg-dark: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #e4e6eb;

  --text-white: #1a1e26;
  --text-muted: #65676b;
  --text-primary: #1a1e26;

  --border-color: #dee2e6;
  --border-glow: rgba(142, 68, 173, 0.1);

  --ad-bg: #e4e6eb;
  --ad-border: #f39c12;
  --ad-text: #e67e22;
  --ad-glow: rgba(243, 156, 18, 0.05);
}

body.light-mode .global-header {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}



body.light-mode .manga-card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.light-mode .manga-card:hover {
  box-shadow: 0 8px 24px rgba(142, 68, 173, 0.15);
}

body.light-mode .recent-item {
  background: #ffffff;
}

body.light-mode .details-backdrop {
  filter: blur(24px) brightness(0.95);
  opacity: 0.15;
}

body.light-mode .manga-stats {
  background: #ffffff;
}

body.light-mode .genre-tag {
  background: #e4e6eb;
}

body.light-mode .genre-tag:hover {
  background: var(--accent-cyan);
  color: #ffffff;
  border-color: var(--accent-cyan);
}

body.light-mode .tag-cloud-item {
  background: #e9ecef;
  color: #495057;
  border-color: #dee2e6;
}

body.light-mode .tag-cloud-item:hover {
  background: rgba(142, 68, 173, 0.12);
  color: #6c3082;
  border-color: rgba(142, 68, 173, 0.3);
}

body.light-mode .tag-cloud-item.active {
  background: var(--accent-purple);
  color: #ffffff;
  border-color: var(--accent-purple);
}

body.light-mode .tag-cloud-count {
  background: rgba(0, 0, 0, 0.08);
  color: #495057;
}

body.light-mode .tags-cloud {
  background: #f8f9fa;
  border-color: #dee2e6;
}

body.light-mode .category-sidebar-item.active {
  background: rgba(142, 68, 173, 0.08);
  color: #6c3082;
  border-color: rgba(142, 68, 173, 0.2);
}

body.light-mode .chapter-row-btn {
  background: #ffffff;
  border-color: #dee2e6;
}

body.light-mode .chapter-row-btn:hover {
  background: #e4e6eb;
  border-color: var(--accent-purple);
}

body.light-mode .adult-modal-card {
  background: #ffffff;
  color: #1a1e26;
}

body.light-mode .drawer-body {
  background: #ffffff;
}

body.light-mode .settings-drawer {
  background: #ffffff;
  border-left: 1px solid #dee2e6;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
}

body.light-mode .btn-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .custom-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2365676b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

body.light-mode .btn-primary {
  color: #ffffff !important;
}

body.light-mode .btn-primary:hover {
  color: #ffffff !important;
}

body.light-mode .btn-secondary {
  background: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
}

body.light-mode .btn-secondary:hover {
  background: #e4e6eb;
  color: #0f172a;
}

/* Botões de Ação de Detalhes da Obra no Light Mode */
body.light-mode #btn-favorite,
body.light-mode #btn-read-later {
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-mode #btn-favorite:hover,
body.light-mode #btn-read-later:hover {
  background: #f8fafc;
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

body.light-mode #btn-favorite.active,
body.light-mode #btn-favorite.btn-primary {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
}

body.light-mode #btn-read-later.active,
body.light-mode #btn-read-later.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
}

/* Botões Circulares do Header no Light Mode */
body.light-mode .header-search-icon-btn,
body.light-mode .header-user-btn,
body.light-mode .hamburger-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

body.light-mode .header-search-icon-btn:hover,
body.light-mode .header-user-btn:hover,
body.light-mode .hamburger-btn:hover,
body.light-mode .hamburger-btn.active {
  background: rgba(142, 68, 173, 0.08);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  box-shadow: 0 2px 10px rgba(142, 68, 173, 0.15);
}

/* Sidebar Lateral Mobile no Light Mode */
body.light-mode .auth-btn-item {
  background: var(--gradient-primary) !important;
  border: 1px solid var(--accent-purple) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(142, 68, 173, 0.25);
}

body.light-mode .auth-btn-item .item-icon {
  color: #ffffff !important;
}

body.light-mode .mobile-sidebar-subitem:hover {
  background: rgba(142, 68, 173, 0.08);
  color: var(--accent-purple);
}

body.light-mode .mobile-sidebar-item:hover,
body.light-mode .mobile-sidebar-item.active {
  background: rgba(142, 68, 173, 0.1);
  color: var(--accent-purple);
}

body.light-mode .mobile-sidebar-item:hover .item-icon,
body.light-mode .mobile-sidebar-item.active .item-icon {
  color: var(--accent-purple);
}

body.light-mode .contact-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
  color: #1a1e26;
}

/* ==========================================================================
   Coherent Global Footer
   ========================================================================== */
.global-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 40px 24px;
  margin-top: 60px;
  width: 100%;
  z-index: 10;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 2fr 1fr;
  gap: 32px;
  align-items: center;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 320px;
}

.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-purple);
}

.footer-divider {
  color: var(--border-color);
  font-size: 0.85rem;
  user-select: none;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.footer-copy strong {
  color: var(--text-white);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #2e7d32;
  border-radius: 50%;
  box-shadow: 0 0 8px #4caf50;
  animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 12px #4caf50;
  }

  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* Ocultar footer no leitor */
#view-reader[style*="block"]~.global-footer {
  display: none;
}

/* ==========================================================================
   Botão do Pânico
   ========================================================================== */
.panic-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 10px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
  z-index: 999;
  transition: all var(--transition-fast);
  opacity: 0.75;
  letter-spacing: 0.05em;
}

.panic-btn:hover {
  background: linear-gradient(135deg, #ff6b6b 0%, #e74c3c 100%);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
  transform: translateY(-2px) scale(1.05);
  opacity: 1;
}

.panic-btn .panic-icon {
  animation: spinSlow 4s infinite linear;
}

@keyframes spinSlow {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Responsividade do rodapé */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }

  .footer-left,
  .footer-right {
    align-items: center;
  }

  .footer-desc {
    max-width: 100%;
  }
}

/* Light mode overrides for footer */
body.light-mode .global-footer {
  background: #ffffff;
  border-top: 1px solid #dee2e6;
}

body.light-mode .footer-copy strong {
  color: #1a1e26;
}

/* ==========================================================================
   Share Component (SEO & Social Buttons)
   ========================================================================== */
.share-container {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.btn-share {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-share svg {
  transition: transform var(--transition-fast);
}

.btn-share:hover svg {
  transform: scale(1.15);
}

.btn-share.whatsapp:hover {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
}

.btn-share.telegram:hover {
  background: #0088cc;
  border-color: #0088cc;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 136, 204, 0.4);
}

.btn-share.twitter:hover {
  background: #000000;
  border-color: #333333;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.btn-share.copy:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

/* Proteção antipirataria para impressão/PDF */
@media print {

  body,
  html,
  #view-reader,
  .manga-img,
  .manga-page-wrapper,
  .single-image-container {
    display: none !important;
  }
}

/* ==========================================================================
   11. Sistema de Avaliação (Rating) e Comentários
   ========================================================================== */
.manga-rating-section {
  margin-top: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  text-align: center;
}

.manga-rating-section h4 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 10px;
  font-weight: 600;
}

.rating-stars-interactive {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.star-interactive {
  font-size: 2rem;
  color: #4a5568;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

.star-interactive:hover,
.star-interactive.hovered {
  transform: scale(1.2);
  color: #f6ad55;
}

.star-interactive.active {
  color: #ecc94b;
  text-shadow: 0 0 10px rgba(236, 201, 75, 0.5);
}

.rating-status-text {
  font-size: 0.9rem;
  color: #a0aec0;
}

/* Comentários */
.manga-comments-section {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 30px;
}

.manga-comments-section h3 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 20px;
  font-weight: 700;
  border-left: 4px solid var(--accent-purple);
  padding-left: 12px;
}

.comment-input-area {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.comment-input-area .custom-input,
.comment-input-area .custom-textarea {
  width: 100%;
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.comment-input-area .custom-input {
  padding: 12px 16px;
}

.comment-input-area .custom-textarea {
  padding: 14px 16px;
  min-height: 100px;
  resize: vertical;
}

.comment-input-area .custom-input:focus,
.comment-input-area .custom-textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(142, 68, 173, 0.2);
}

.btn-submit-comment {
  align-self: flex-end;
  padding: 10px 25px;
  font-weight: 600;
  font-size: 0.9rem;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom Scrollbar para Lista de Comentários */
.comments-list::-webkit-scrollbar {
  width: 6px;
}

.comments-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.comments-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

.no-comments {
  text-align: center;
  color: #718096;
  padding: 30px;
  font-style: italic;
  font-size: 0.95rem;
}

.comment-card {
  display: flex;
  gap: 15px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 16px;
  border-radius: 10px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.comment-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.03);
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple) 0%, #3498db 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* Container de Avatar com Suporte a Imagem e Auras */
.comment-avatar-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  background: #131722;
  position: relative;
}

.comment-avatar-wrapper.reply-avatar {
  width: 28px;
  height: 28px;
}

.comment-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  transform: scale(1.14);
}

/* AURAS ESTÁTICAS DE NÍVEL / STATUS (Sem lag no celular) */
.comment-avatar-wrapper.aura-none {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-avatar-wrapper.aura-user {
  border: 1.5px solid rgba(255, 255, 255, 0.22);
}

.comment-avatar-wrapper.aura-vip {
  border: 2px solid #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.45);
}

.comment-avatar-wrapper.aura-admin {
  border: 2px solid var(--accent-purple, #8e44ad);
  box-shadow: 0 0 10px rgba(142, 68, 173, 0.65);
}

@media (max-width: 768px) {
  .comment-avatar-wrapper {
    width: 36px;
    height: 36px;
  }
  .comment-avatar-wrapper.reply-avatar {
    width: 26px;
    height: 26px;
  }
  .comment-avatar-wrapper.aura-vip,
  .comment-avatar-wrapper.aura-admin {
    border-width: 1.5px;
  }
}

.comment-content {
  flex-grow: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.comment-user {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.comment-date {
  font-size: 0.8rem;
  color: #718096;
}

.comment-body {
  color: #cbd5e0;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}

/* ==========================================================================
   Seção de HQs Relacionadas na Lateral Esquerda do Leitor
   ========================================================================== */
.related-sidebar-left {
  width: 200px;
  position: sticky;
  top: 90px;
  height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 10px;
  z-index: 5;
  background: var(--bg-darker);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

.related-sidebar-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 6px;
  width: 100%;
  text-align: center;
}

.related-mangas-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.related-manga-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}

.related-manga-item:hover {
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.related-cover-wrapper {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

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

.related-manga-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.related-manga-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-manga-meta {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ==========================================================================
   Tamanho dos Botões de Capítulo Anterior e Próximo no Leitor
   ========================================================================== */
.bottom-nav-inner .btn {
  padding: 12px 28px;
  font-size: 1.1rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Otimização UX Leitor */
#manga-select {
  display: none !important;
}

.page-label-tag {
  display: none !important;
}

/* Paginação do Catálogo */
.catalog-pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  margin-bottom: 16px;
  width: 100%;
}

.btn-pagination-number {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  padding: 0;
}

.btn-pagination-number:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
  border-color: var(--text-muted);
}

.btn-pagination-number.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: var(--text-white);
  box-shadow: 0 0 12px var(--accent-purple-glow);
}

.btn-pagination-arrow {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  padding: 0;
}

.btn-pagination-arrow:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
  border-color: var(--text-muted);
}

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

/* ==========================================================================
   Sistema de Votação (Reações)
   ========================================================================== */
.reactions-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px 20px;
  margin: 30px auto;
  text-align: center;
  max-width: 800px;
  box-sizing: border-box;
  box-shadow: var(--shadow-main);
}

.reactions-title {
  font-family: var(--font-primary);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 6px;
}

.reactions-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-weight: 500;
}

.reactions-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.reaction-btn {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
  padding: 12px 10px;
  border-radius: 10px;
  transition: all var(--transition-normal);
  outline: none;
}

.reaction-emoji {
  font-size: 2.8rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  transition: transform var(--transition-fast) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reaction-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 8px;
  transition: color var(--transition-fast);
}

.reaction-counter {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 12px;
  transition: all var(--transition-fast);
}

/* Hover e estados ativos */
.reaction-btn:hover {
  background: rgba(255, 255, 255, 0.03);
}

.reaction-btn:hover .reaction-emoji {
  transform: scale(1.2) translateY(-6px);
}

.reaction-btn:hover .reaction-label {
  color: var(--text-white);
}

.reaction-btn.active {
  background: rgba(142, 68, 173, 0.1);
  border: 1px solid var(--accent-purple);
  box-shadow: 0 0 12px rgba(142, 68, 173, 0.25);
}

.reaction-btn.active .reaction-emoji {
  transform: scale(1.2) translateY(-6px);
}

.reaction-btn.active .reaction-label {
  color: var(--text-white);
}

.reaction-btn.active .reaction-counter {
  background: var(--accent-purple);
  color: var(--text-white);
}

/* Ajustes mobile para as reações e catálogo grid (2 HQs por linha) */
@media (max-width: 768px) {

  /* Forçar 2 HQs por linha no catálogo */
  .manga-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 4px;
  }

  .manga-card {
    border-radius: 8px;
  }

  .manga-info-column h1 {
    font-size: 1.4rem !important;
  }

  /* Grid de reações mobile */
  .reactions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .reaction-btn {
    width: auto;
    padding: 8px 4px;
  }

  .reaction-emoji {
    font-size: 2.2rem;
  }

  .reaction-label {
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   Novos Elementos de UX (Itens 10 & 11)
   ========================================================================== */

/* 1. Breadcrumbs */
.breadcrumb-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 0 4px;
  flex-wrap: wrap;
}

.breadcrumb-container a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.breadcrumb-container a:hover {
  color: var(--accent-purple);
}

.breadcrumb-separator {
  color: var(--border-color);
  user-select: none;
}

.breadcrumb-current {
  color: var(--text-white);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.breadcrumb-container.reader-breadcrumbs {
  margin: 15px 24px 15px 24px;
}

/* 2. Barra de Progresso Global (SPA Transitions) */
.global-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  width: 0;
  z-index: 99999;
  opacity: 0;
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.3, 1), opacity 0.3s ease;
  pointer-events: none;
}

.global-loading-bar.active {
  opacity: 1;
}

.global-loading-bar.finished {
  width: 100% !important;
  opacity: 0;
  transition: width 0.2s ease, opacity 0.4s ease 0.2s;
}

/* 3. Botão Voltar ao Topo */
.back-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 998;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-fast);
  pointer-events: none;
}

.back-to-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top-btn:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(142, 68, 173, 0.4);
}

/* 4. Indicador de Página do Modo Cascata */
.cascade-page-indicator {
  position: fixed;
  bottom: 80px;
  /* Acima do botão do pânico/voltar ao topo */
  right: 24px;
  background: rgba(26, 30, 38, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 997;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cascade-page-indicator.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .cascade-page-indicator {
    bottom: 24px;
    left: 24px;
    right: auto;
    font-size: 0.75rem;
    padding: 4px 10px;
  }
}

/* ==========================================================================
   reCAPTCHA Custom Terms & Badge Hiding
   ========================================================================== */
.grecaptcha-badge {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.recaptcha-terms {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 15px;
  margin-bottom: 15px;
  text-align: center;
  width: 100%;
}

.recaptcha-terms a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.recaptcha-terms a:hover {
  color: var(--text-white);
  text-decoration: underline;
}

/* ==========================================================================
   Responsive Settings Pop-up Modal (Up to 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .settings-drawer {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: 90% !important;
    max-width: 440px !important;
    max-height: 85vh !important;
    height: auto !important;
    border-radius: 24px !important;
    background: rgba(20, 23, 36, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(168, 85, 247, 0.25) !important;
    z-index: 10000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate(-50%, -45%) scale(0.95) !important;
    transition:
      transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
      opacity 0.3s ease,
      visibility 0.3s ease !important;
    overflow-y: auto !important;
  }

  .settings-drawer.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate(-50%, -50%) scale(1) !important;
  }

  .settings-backdrop {
    background: rgba(6, 7, 10, 0.75) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    z-index: 9999 !important;
  }

  body.light-mode .settings-drawer {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 30px rgba(168, 85, 247, 0.1) !important;
  }
}

/* ==========================================================================
   Correção de GPU e Visualização para o Modal de Configurações no Mobile
   ========================================================================== */
@media (max-width: 1024px) {
  .settings-drawer {
    will-change: transform, opacity !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    transform: translate3d(-50%, -45%, 0) scale(0.95) !important;
  }

  .settings-drawer.open {
    transform: translate3d(-50%, -50%, 0) scale(1) !important;
  }

  /* Reset estrito de largura para evitar imagens extrapolando 100% e gerando scroll lateral */
  #view-reader,
  .layout-main-wrapper,
  .reader-content-area,
  .manga-view-mode,
  .manga-pages-list,
  .manga-page-wrapper,
  .single-page-wrapper,
  .manga-img {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   Seção de Recomendações no Fim do Leitor
   ========================================================================== */
.reader-recommendations-section {
  width: 100%;
  max-width: 800px;
  margin: 40px auto 20px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  box-sizing: border-box;
}

.recommendations-group {
  width: 100%;
}

.recommendations-group h3.rec-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 15px;
  text-align: left;
  border-left: 3px solid var(--accent-purple);
  padding-left: 10px;
}

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

.rec-manga-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.rec-manga-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-purple);
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.15);
}

.rec-cover-wrapper {
  position: relative;
  aspect-ratio: 2/3;
  width: 100%;
  overflow: hidden;
  background: var(--bg-card-fallback);
}

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

.rec-manga-card:hover .rec-cover {
  transform: scale(1.05);
}

.rec-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rec-manga-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-white);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.rec-manga-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 992px) {
  .recommendations-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .reader-recommendations-section {
    padding: 0 16px;
    margin-top: 30px;
  }

  /* Ajustes para evitar quebra horizontal dos botões de navegação do leitor no mobile */
  .bottom-nav-overlay {
    padding: 12px 8px !important;
    margin-top: 30px !important;
  }

  .bottom-nav-inner {
    gap: 8px !important;
  }

  .bottom-chap-title {
    font-size: 0.95rem !important;
  }

  .bottom-nav-inner .btn {
    padding: 8px 12px !important;
    font-size: 0 !important;
    border-radius: 8px !important;
  }

  .bottom-nav-inner .btn:disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
  }

  #bottom-prev-chap::after {
    content: "Anterior";
    font-size: 0.85rem !important;
  }

  #bottom-next-chap::after {
    content: "Próximo";
    font-size: 0.85rem !important;
  }
}

/* ==========================================================================
   Lista de Capítulos — manga.php (PHP Server-Side Rendering)
   ========================================================================== */

.chapters-area {
  margin-top: 30px;
}

.chapters-list-box {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.section-title-row h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-white);
  font-family: var(--font-primary);
}

.chapters-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Scrollbar customizada para a lista de capítulos */
.chapters-grid::-webkit-scrollbar {
  width: 5px;
}

.chapters-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.chapters-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.chapters-grid::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* Card individual de capítulo */
.chapter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-white);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.chapter-card:hover {
  background: rgba(142, 68, 173, 0.08);
  border-color: var(--accent-purple);
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  color: var(--text-white);
  text-decoration: none;
}

.chapter-card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.chapter-card-number {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

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

.chapter-card:hover .chapter-card-number {
  color: var(--accent-purple);
}

/* Mobile: simplificar exibição da data */
@media (max-width: 600px) {
  .chapter-card {
    padding: 10px 12px;
  }

  .chapter-card-date {
    display: none;
  }

  .chapters-grid {
    max-height: 320px;
  }
}

/* ==========================================================================
   User Dropdown Styles (Hover activation)
   ========================================================================== */
.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-dropdown-menu {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(20, 23, 36, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  min-width: 160px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  padding: 8px 0;
  margin-top: 10px;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

/* Area invisivel para evitar fechamento precoce */
.user-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
  display: block;
}

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


.user-dropdown-menu a,
.user-dropdown-menu button {
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px 18px;
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-primary);
}

.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
}

.user-dropdown-menu .logout-item {
  color: var(--accent-cyan) !important;
  border-top: 1px solid var(--border-color);
  margin-top: 6px;
  padding-top: 10px;
}

.user-dropdown-menu .logout-item:hover {
  background: rgba(231, 76, 60, 0.15) !important;
  color: #ff4a4a !important;
}

/* ==========================================================================
   Personagens Page (A-Z Index)
   ========================================================================== */
.characters-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 24px 60px;
}

.characters-hero {
  text-align: center;
  margin-bottom: 30px;
  padding: 30px 20px;
  background: linear-gradient(135deg, rgba(142, 68, 173, 0.08), rgba(0, 210, 255, 0.04));
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.characters-page-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.characters-page-title svg {
  color: var(--accent-purple);
}

.characters-page-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Search bar */
.characters-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 24px;
  transition: border-color var(--transition-fast);
}

.characters-search-bar:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px var(--accent-purple-glow);
}

.characters-search-bar svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.characters-search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-white);
  font-size: 1rem;
  font-family: var(--font-primary);
}

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

/* ===== Filtros de Personagens ===== */
.char-filters-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px 20px 14px;
  margin-bottom: 24px;
  transition: border-color var(--transition-fast);
}

.char-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px;
}

.char-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.char-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.char-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.char-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  line-height: 1;
}

.char-filter-pill:hover {
  border-color: var(--accent-purple);
  color: var(--text-white);
  background: rgba(142, 68, 173, 0.08);
}

.char-filter-pill.active {
  background: linear-gradient(135deg, var(--accent-purple), #6a35c2);
  border-color: var(--accent-purple);
  color: #fff;
  box-shadow: 0 2px 10px rgba(142, 68, 173, 0.35);
}

.char-filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 69, 96, 0.3);
  background: rgba(255, 69, 96, 0.07);
  color: #ff4560;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all 0.18s ease;
  align-self: flex-end;
  margin-bottom: 2px;
}

.char-filter-reset:hover {
  background: rgba(255, 69, 96, 0.18);
  border-color: #ff4560;
}

.char-filter-count {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 0.83rem;
  color: var(--text-muted);
}

.char-filter-count strong {
  color: var(--accent-purple);
}

/* Flat grid mode (usado quando filtros estão ativos — remove agrupamento A-Z) */
.characters-az-grid.filter-mode .az-letter-section {
  margin-bottom: 16px;
}

.characters-az-grid.filter-mode .az-letter-heading {
  display: none;
}

.characters-az-grid.filter-mode .characters-letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

/* Responsive filtros */
@media (max-width: 768px) {
  .char-filters-bar {
    padding: 14px 14px 12px;
  }

  .char-filters-row {
    gap: 14px;
  }

  .char-filter-pill {
    padding: 5px 11px;
    font-size: 0.78rem;
  }

  .char-filter-label {
    font-size: 0.68rem;
  }
}

/* A-Z Index Bar */
.az-index-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 32px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.az-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.az-letter.active {
  color: var(--text-white);
  background: rgba(142, 68, 173, 0.1);
  border: 1px solid rgba(142, 68, 173, 0.2);
  cursor: pointer;
}

.az-letter.active:hover {
  background: var(--accent-purple);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 12px var(--accent-purple-glow);
}

.az-letter.disabled {
  color: rgba(139, 148, 158, 0.3);
  cursor: default;
  pointer-events: none;
}

/* Letter Sections */
.az-letter-section {
  margin-bottom: 32px;
}

.az-letter-heading {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-purple);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(142, 68, 173, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.az-letter-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(142, 68, 173, 0.2), transparent);
}

/* Character cards grid */
.characters-letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.character-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-normal);
}

.character-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-main), var(--shadow-glow);
  background: var(--bg-input);
}

.character-avatar-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 12px;
  border: 3px solid var(--border-color);
  transition: border-color var(--transition-fast);
  flex-shrink: 0;
}

.character-card:hover .character-avatar-wrapper {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px var(--accent-purple-glow);
}

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

.character-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-purple), #3498db);
  color: white;
  font-size: 2rem;
  font-weight: 800;
}

.character-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.character-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.character-card-count {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* No characters */
.no-characters-msg,
.no-search-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-characters-msg svg {
  margin-bottom: 16px;
}

.no-characters-msg p,
.no-search-results p {
  font-size: 1.1rem;
}

/* Character Detail Modal */
.char-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.char-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.char-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  line-height: 1;
}

.char-modal-close:hover {
  color: var(--accent-purple);
}

.char-modal-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.char-modal-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent-purple);
  flex-shrink: 0;
}

.char-modal-avatar .character-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-modal-avatar .character-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-purple), #3498db);
  color: white;
  font-size: 2rem;
  font-weight: 800;
}

.char-modal-info h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 4px;
}

.char-modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.char-modal-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.char-modal-mangas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.char-manga-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.char-manga-card:hover {
  border-color: var(--accent-purple);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.char-manga-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.char-manga-card-info {
  padding: 8px 10px;
}

.char-manga-card-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.char-manga-card-author {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.char-modal-loading,
.char-modal-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .characters-page-container {
    padding: 20px 16px 40px;
  }

  .characters-page-title {
    font-size: 1.4rem;
  }

  .az-letter {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  .characters-letter-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  .character-avatar-wrapper {
    width: 70px;
    height: 70px;
  }

  .character-card {
    padding: 14px 8px 12px;
  }

  .char-modal-card {
    padding: 20px;
  }

  .char-modal-header {
    flex-direction: column;
    text-align: center;
  }

  .char-modal-mangas-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
}

/* Personagens na página de detalhes do Mangá */
.char-section-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  letter-spacing: 0.5px;
}

.details-characters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.details-character-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-white);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.details-character-item:hover {
  border-color: var(--accent-purple);
  background: var(--bg-input);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-purple-glow);
}

.details-character-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.details-character-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), #3498db);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: white;
}

.details-character-name {
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Página de Categorias & Nuvem de Tags (categorias.php)
   ========================================================================== */
.categories-page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 40px;
  width: 100%;
}

.categories-hero {
  margin-bottom: 30px;
}

.categories-page-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.categories-page-title svg {
  color: var(--accent-purple);
}

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

/* Grid de Cards de Categorias inspirados na imagem de referência */
.categories-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.category-grid-card {
  position: relative;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.category-grid-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--accent-purple);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-purple-glow);
}

.category-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.category-grid-card:hover .category-card-bg {
  transform: scale(1.08);
}

.category-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(6, 7, 10, 0.95) 0%, rgba(6, 7, 10, 0.45) 50%, rgba(6, 7, 10, 0.15) 100%);
}

.category-card-content {
  position: absolute;
  bottom: 14px;
  left: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.category-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-white);
  margin: 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  line-height: 1.2;
}

.category-card-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(142, 68, 173, 0.85);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  margin-left: 8px;
}

.no-categories-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* Seção Nuvem de Tags */
.tags-cloud-section {
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.tags-cloud-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.tags-cloud-header h2 svg {
  color: var(--accent-cyan);
}

.tags-cloud-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.tags-cloud-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 14px;
}

.tag-cloud-full-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.25s ease;
}

.tag-cloud-full-item:hover {
  color: var(--text-white);
  background: rgba(142, 68, 173, 0.15);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--accent-purple-glow);
}

.tag-cloud-full-item .tag-name {
  color: var(--text-primary);
}

.tag-cloud-full-item:hover .tag-name {
  color: var(--text-white);
}

.tag-cloud-full-item .tag-count {
  background: rgba(0, 210, 255, 0.15);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tag-cloud-full-item:hover .tag-count {
  background: var(--accent-cyan);
  color: var(--bg-darker);
}

.tag-cloud-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .categories-page-container {
    padding: 20px 16px;
  }

  .categories-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .category-grid-card {
    height: 120px;
  }

  .category-card-title {
    font-size: 1rem;
  }
}

/* ==========================================================================
   Home: Section Header Sub-label
   ========================================================================== */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.section-header-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Home: Grade 4 Colunas (Mais Relevantes)
   ========================================================================== */
.manga-grid-4col {
  grid-template-columns: repeat(4, 1fr) !important;
}

@media (max-width: 992px) {
  .manga-grid-4col {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 600px) {
  .manga-grid-4col {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ==========================================================================
   Home: Personagens
   ========================================================================== */
.home-characters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 8px 0;
}

.home-char-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.25s ease;
  width: 90px;
  text-decoration: none;
}

.home-char-card:hover {
  transform: translateY(-6px);
}

.home-char-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border-color);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

.home-char-card:hover .home-char-avatar {
  border-color: var(--accent-purple);
  box-shadow: 0 0 18px rgba(142, 68, 173, 0.45);
}

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

.home-char-avatar--letter span,
.home-char-avatar span {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.home-char-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
  transition: color 0.2s ease;
}

.home-char-card:hover .home-char-name {
  color: var(--text-white);
}

/* ==========================================================================
   Home: HQ Aleatória — Banner do Dado
   ========================================================================== */
.random-hq-section {
  border-radius: 20px;
  overflow: hidden;
}

.random-hq-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: linear-gradient(135deg,
      rgba(142, 68, 173, 0.15) 0%,
      rgba(52, 152, 219, 0.1) 50%,
      rgba(0, 188, 212, 0.1) 100%);
  border: 1px solid rgba(142, 68, 173, 0.3);
  border-radius: 20px;
  padding: 40px 50px;
  position: relative;
  overflow: hidden;
}

.random-hq-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(142, 68, 173, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.random-hq-text {
  flex: 1;
}

.random-hq-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-white);
  margin: 0 0 10px 0;
  line-height: 1.25;
}

.random-hq-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.btn-random-hq {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent-purple) 0%, #3498db 100%);
  border: none;
  border-radius: 18px;
  padding: 22px 32px;
  cursor: pointer;
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 24px rgba(142, 68, 173, 0.4);
  flex-shrink: 0;
  min-width: 160px;
}

.btn-random-hq:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 32px rgba(142, 68, 173, 0.55);
}

.dice-icon {
  font-size: 3rem;
  line-height: 1;
  display: block;
  transition: transform 0.15s ease;
}

.btn-random-hq.rolling .dice-icon {
  animation: diceRoll 0.7s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes diceRoll {
  0% {
    transform: rotate(0deg) scale(1);
  }

  20% {
    transform: rotate(-25deg) scale(1.15);
  }

  40% {
    transform: rotate(30deg) scale(1.2);
  }

  60% {
    transform: rotate(-20deg) scale(1.1);
  }

  80% {
    transform: rotate(15deg) scale(1.05);
  }

  100% {
    transform: rotate(0deg) scale(1);
  }
}

.btn-random-label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .random-hq-inner {
    flex-direction: column;
    text-align: center;
    padding: 30px 24px;
  }

  .random-hq-title {
    font-size: 1.2rem;
  }

  .btn-random-hq {
    width: 100%;
  }

  .home-char-card {
    width: 72px;
  }

  .home-char-avatar {
    width: 64px;
    height: 64px;
  }

  .home-char-name {
    max-width: 72px;
    font-size: 0.72rem;
  }

  .manga-grid-2col {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

/* ==========================================================================
   Solicitação / Pedido de HQ (Botão CTA e Modal Pop-up)
   ========================================================================== */
.request-hq-cta-wrapper {
  width: 100%;
}

.btn-request-hq-cta {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(142, 68, 173, 0.25) 0%, rgba(0, 210, 255, 0.2) 100%);
  background-color: var(--bg-card);
  border: 1px solid rgba(0, 210, 255, 0.4);
  border-radius: 14px;
  color: var(--text-white);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 210, 255, 0.15);
  text-align: left;
}

.btn-request-hq-cta:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--accent-cyan);
  background: linear-gradient(135deg, rgba(142, 68, 173, 0.4) 0%, rgba(0, 210, 255, 0.35) 100%);
  box-shadow: 0 8px 25px rgba(0, 210, 255, 0.3), 0 0 20px rgba(142, 68, 173, 0.3);
}

.cta-glow-effect {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg);
  animation: ctaShimmer 3.5s infinite;
  pointer-events: none;
}

@keyframes ctaShimmer {
  0% {
    left: -100%;
  }

  30% {
    left: 180%;
  }

  100% {
    left: 180%;
  }
}

.cta-icon {
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 210, 255, 0.4));
  animation: iconPulse 2s infinite ease-in-out;
}

@keyframes iconPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }
}

.cta-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cta-title {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffffff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cta-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.cta-arrow {
  color: var(--accent-cyan);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.btn-request-hq-cta:hover .cta-arrow {
  transform: translateX(4px);
  color: #fff;
}

/* Modal Pop-up Estilizado e Compacto (Com Rolagem Mobile) */
.hq-request-modal-overlay {
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.hq-request-modal-card {
  max-width: 440px !important;
  width: 100% !important;
  max-height: 88vh !important;
  max-height: 88dvh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  background: #141722 !important;
  border: 1px solid rgba(0, 210, 255, 0.3) !important;
  border-radius: 16px !important;
  padding: 20px 22px !important;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 210, 255, 0.18) !important;
  position: relative;
  box-sizing: border-box !important;
  margin: auto !important;
}

/* Custom Scrollbar Interna do Modal */
.hq-request-modal-card::-webkit-scrollbar {
  width: 5px;
}

.hq-request-modal-card::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

.hq-request-modal-card::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 255, 0.3);
  border-radius: 4px;
}

.hq-request-modal-card::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.hq-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.hq-modal-close-btn:hover {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border-color: #e74c3c;
  transform: rotate(90deg);
}

.hq-request-modal-header {
  text-align: center;
  margin-bottom: 14px;
  padding-right: 20px;
}

.hq-request-modal-icon {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.hq-request-modal-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 4px;
}

.hq-request-modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.hq-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  text-align: left;
}

.hq-form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-white);
}

.required-star {
  color: var(--accent-purple);
  font-weight: 800;
}

.optional-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hq-form-group input,
.hq-form-group textarea {
  width: 100%;
  background: #0d0f17;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.85rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}

.hq-form-group input:focus,
.hq-form-group textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.25);
}

.hq-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 580px) {
  .hq-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Aviso de Privacidade */
.hq-privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(0, 210, 255, 0.05);
  border: 1px solid rgba(0, 210, 255, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 6px;
  margin-bottom: 10px;
  text-align: left;
}

.hq-privacy-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.hq-privacy-text {
  font-size: 0.75rem;
  color: var(--text-white);
  line-height: 1.3;
}

.hq-privacy-text strong {
  display: block;
  color: var(--accent-cyan);
  margin-bottom: 2px;
  font-size: 0.78rem;
}

.hq-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

.hq-modal-actions .btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.hq-feedback-msg {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 10px;
  text-align: center;
  line-height: 1.35;
}

.hq-feedback-msg.success {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid #2ecc71;
  color: #2ecc71;
}

.hq-feedback-msg.error {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid #e74c3c;
  color: #e74c3c;
}

/* Ajustes Específicos para Telas Mobile Pequenas */
@media (max-width: 480px) {
  .hq-request-modal-overlay {
    padding: 10px !important;
  }

  .hq-request-modal-card {
    padding: 16px 14px !important;
    max-height: 90vh !important;
    border-radius: 14px !important;
  }

  .hq-request-modal-header {
    margin-bottom: 10px;
  }

  .hq-request-modal-header h2 {
    font-size: 1.05rem;
  }

  .hq-form-group input,
  .hq-form-group textarea {
    font-size: 0.88rem;
    padding: 8px 10px;
  }

  .hq-modal-actions {
    flex-direction: column;
    gap: 8px;
  }

  .hq-modal-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Banner Alerta ECA Digital (Estilo CTA Chamativo)
   ========================================================================== */
.eca-alert-cta-wrapper {
  width: 100%;
}

.btn-eca-alert-cta {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.22) 0%, rgba(142, 68, 173, 0.25) 50%, rgba(0, 210, 255, 0.18) 100%);
  background-color: var(--bg-card);
  border: 1px solid rgba(243, 156, 18, 0.45);
  border-radius: 14px;
  color: var(--text-white);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(243, 156, 18, 0.15);
  box-sizing: border-box;
}

.btn-eca-alert-cta:hover {
  transform: translateY(-3px) scale(1.008);
  border-color: #f39c12;
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.35) 0%, rgba(142, 68, 173, 0.38) 50%, rgba(0, 210, 255, 0.3) 100%);
  box-shadow: 0 8px 25px rgba(243, 156, 18, 0.3), 0 0 22px rgba(142, 68, 173, 0.35);
}

.eca-glow {
  background: linear-gradient(90deg, transparent, rgba(243, 156, 18, 0.35), transparent) !important;
}

.btn-eca-alert-cta .cta-title {
  background: linear-gradient(90deg, #ffca28, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.05rem;
}

.btn-eca-alert-cta .cta-sub {
  color: #e0e6ed;
  font-size: 0.84rem;
  line-height: 1.35;
}

.btn-eca-alert-cta .cta-arrow {
  color: #f39c12;
}

.btn-eca-alert-cta:hover .cta-arrow {
  color: #ffffff;
  transform: translateX(4px);
}

@media (max-width: 600px) {
  .btn-eca-alert-cta {
    padding: 14px 16px;
    gap: 12px;
  }

  .btn-eca-alert-cta .cta-title {
    font-size: 0.95rem;
  }

  .btn-eca-alert-cta .cta-sub {
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   MODAL POP-UP DE AUTENTICAÇÃO (LOGIN / CADASTRO / RECUPERAÇÃO)
   ========================================================================== */
.global-auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(6, 7, 12, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: authOverlayFadeIn 0.25s ease-out forwards;
}

@keyframes authOverlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.global-auth-modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #141724;
  border: 1px solid rgba(142, 68, 173, 0.45);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(142, 68, 173, 0.3);
  box-sizing: border-box;
  animation: authCardPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authCardPopIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Custom Scrollbar inside Auth Modal Card */
.global-auth-modal-card::-webkit-scrollbar {
  width: 6px;
}

.global-auth-modal-card::-webkit-scrollbar-track {
  background: rgba(250, 250, 250, 0.03);
  border-radius: 4px;
}

.global-auth-modal-card::-webkit-scrollbar-thumb {
  background: rgba(142, 68, 173, 0.5);
  border-radius: 4px;
}

.global-auth-modal-card::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

.auth-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.auth-modal-close-btn:hover {
  background: rgba(231, 76, 60, 0.25);
  border-color: #e74c3c;
  color: #ffffff;
  transform: rotate(90deg);
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-modal-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-avatar svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px rgba(142, 68, 173, 0.5));
}

.auth-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
}

.auth-modal-alert {
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.auth-modal-alert.error {
  display: block;
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid #e74c3c;
  color: #ff6b6b;
}

.auth-modal-alert.success {
  display: block;
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid #2ecc71;
  color: #2ecc71;
}

/* Forms inside modal */
.auth-modal-form .form-group {
  margin-bottom: 16px;
  text-align: left;
}

.auth-modal-form .form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-modal-form .form-input {
  width: 100%;
  padding: 12px 14px;
  background: #0d0f17;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-modal-form .form-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(142, 68, 173, 0.4);
}

.auth-modal-form .form-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.auth-modal-form .btn-submit {
  width: 100%;
  padding: 13px;
  font-size: 0.98rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent-purple), var(--primary));
  border: none;
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(142, 68, 173, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-modal-form .btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(142, 68, 173, 0.5);
  opacity: 0.96;
}

.auth-modal-form .btn-submit:active {
  transform: translateY(1px);
}

@media (max-width: 480px) {
  .global-auth-modal-overlay {
    padding: 10px;
  }

  .global-auth-modal-card {
    padding: 22px 16px;
    border-radius: 16px;
    max-height: 94vh;
    max-height: 94dvh;
  }

  .auth-modal-title {
    font-size: 1.2rem;
  }
}

/* ==========================================================================
   HQ18 Metrics & Support System Styles
   ========================================================================== */
.nav-item-support {
  color: var(--accent-gold) !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.nav-item-support:hover {
  color: #fff !important;
  text-shadow: 0 0 10px rgba(241, 196, 15, 0.6);
  transform: translateY(-1px);
}

.support-heart {
  display: inline-block;
  animation: 1.8s infinite heartPulse;
}

@keyframes heartPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.25);
  }
}

.support-modal-card {
  max-width: 480px;
  background: linear-gradient(145deg, #111420 0%, #080a10 100%);
  border: 1px solid rgba(241, 196, 15, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(241, 196, 15, 0.15);
}

/* ==========================================================================
   Mobile: Ocultar elementos de baixo valor visual em telas pequenas
   ========================================================================== */
@media (max-width: 768px) {
  /* Linha "HQ Nova • há X dias" / "Capítulo X" nos cards do grid */
  .card-update-row {
    display: none;
  }

  /* Contagem de capítulos nas listas laterais (Destaques, Mais Vistos, etc.) */
  .recent-time {
    display: none;
  }
}

/* ==========================================================================
   HQ18 - Sistema de Lançamentos Agendados & Cronômetros Regressivos
   ========================================================================== */
.upcoming-releases-section {
  width: 100%;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(20, 23, 36, 0.9) 0%, rgba(13, 15, 23, 0.95) 100%);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 242, 254, 0.08);
  position: relative;
  overflow: hidden;
}

.upcoming-releases-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00f2fe, var(--accent-purple), transparent);
}

.upcoming-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.upcoming-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upcoming-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #00f2fe;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.upcoming-title-wrap {
  flex: 1;
  min-width: 0;
}

.upcoming-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.upcoming-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.upcoming-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: #00f2fe;
  line-height: 1;
}

body.user-is-vip .upcoming-count-badge {
  background: rgba(255, 215, 0, 0.18);
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd700;
}

.upcoming-toggle-btn {
  display: none;
}

.upcoming-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.upcoming-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.upcoming-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.15);
}

.upcoming-thumb {
  width: 58px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

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

.upcoming-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 6px;
  width: fit-content;
}

.upcoming-tag-badge.premiere {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(79, 172, 254, 0.2));
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.35);
}

.upcoming-tag-badge.chapter {
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(245, 87, 108, 0.2));
  color: #ff758c;
  border: 1px solid rgba(245, 87, 108, 0.35);
}

.upcoming-manga-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.upcoming-chapter-label {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.countdown-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #00f2fe;
  font-family: 'Outfit', monospace, sans-serif;
  letter-spacing: 0.3px;
  margin-top: 3px;
  width: fit-content;
}

.countdown-box.countdown-ready {
  background: rgba(46, 204, 113, 0.15);
  border-color: #2ecc71;
  color: #2ecc71;
}

.countdown-pulse-icon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f2fe;
  box-shadow: 0 0 8px #00f2fe;
  animation: upcomingPulse 1.4s infinite ease-in-out;
}

@keyframes upcomingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

@media (max-width: 768px) {
  .upcoming-releases-section {
    padding: 14px 14px;
    margin-bottom: 20px;
    transition: padding 0.2s ease, margin 0.2s ease;
  }

  .upcoming-header {
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .upcoming-header-left {
    flex: 1;
    min-width: 0;
    gap: 10px;
  }

  .upcoming-title {
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .upcoming-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 5px 9px;
    color: #00f2fe;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }

  body.user-is-vip .upcoming-toggle-btn {
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.35);
    background: rgba(255, 215, 0, 0.08);
  }

  .upcoming-toggle-chevron {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Estado recolhido (fechado) no mobile */
  .upcoming-releases-section.is-collapsed {
    padding: 12px 14px;
  }

  .upcoming-releases-section.is-collapsed .upcoming-header {
    margin-bottom: 0;
  }

  .upcoming-releases-section.is-collapsed .upcoming-grid {
    display: none !important;
  }

  .upcoming-releases-section.is-collapsed .upcoming-sub {
    display: none !important;
  }

  .upcoming-releases-section.is-collapsed .upcoming-toggle-chevron {
    transform: rotate(-90deg);
  }

  /* Estado aberto no mobile */
  .upcoming-releases-section:not(.is-collapsed) .upcoming-toggle-chevron {
    transform: rotate(0deg);
  }

  .upcoming-releases-section:not(.is-collapsed) .upcoming-toggle-btn {
    background: rgba(0, 242, 254, 0.12);
  }

  body.user-is-vip .upcoming-releases-section:not(.is-collapsed) .upcoming-toggle-btn {
    background: rgba(255, 215, 0, 0.16);
  }

  .upcoming-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ==========================================================================
   VIP Active User: Zero Advertisements Mode
   ========================================================================== */
body.user-is-vip .ad-container,
body.user-is-vip .ad-sidebar,
body.user-is-vip .details-sidebar-ad,
body.user-is-vip .ad-container-sidebar,
body.user-is-vip .mobile-only-ad,
body.user-is-vip .desktop-only-ad,
body.user-is-vip .in-reader-ad,
body.user-is-vip .single-page-ad,
body.user-is-vip .ad-home-banner,
body.user-is-vip #ad-top-wrapper,
body.user-is-vip #ad-right-wrapper,
body.user-is-vip #ad-bottom-wrapper,
body.user-is-vip #ad-home-top {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

body.user-is-vip .chapters-area {
  flex: 1 1 100%;
  width: 100%;
}

body.user-is-vip .reader-content-area {
  width: 100%;
  max-width: 100%;
}

/* ==========================================================================
   Mobile VIP Floating Bar (Degustação 5 Minutos / Cookie-style Promo Bar)
   ========================================================================== */
.mobile-vip-floating-bar {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-vip-floating-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9980;
    padding: 10px 14px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: linear-gradient(135deg, rgba(16, 13, 26, 0.98), rgba(28, 19, 8, 0.98));
    border-top: 1px solid rgba(255, 215, 0, 0.45);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.85), 0 -1px 12px rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(115%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    box-sizing: border-box;
  }

  .mobile-vip-floating-bar.visible {
    display: block !important;
    transform: translateY(0);
    opacity: 1;
  }

  .vip-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    cursor: pointer;
  }

  .vip-bar-close-btn {
    position: absolute;
    top: -12px;
    right: 14px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #191629;
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 10;
    padding: 0;
  }

  .vip-bar-close-btn:hover,
  .vip-bar-close-btn:active {
    background: #ff4757;
    color: #fff;
    border-color: #ff4757;
    transform: scale(1.1);
  }

  .vip-bar-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 152, 0, 0.12));
    border: 1px solid rgba(255, 215, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
  }

  .vip-bar-icon {
    font-size: 1.45rem;
    line-height: 1;
    animation: pulseVipIcon 2.2s infinite ease-in-out;
  }

  @keyframes pulseVipIcon {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.4)); }
    50% { transform: scale(1.12); filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)); }
  }

  .vip-bar-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .vip-bar-headline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
  }

  .vip-badge-tag {
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.45);
    line-height: 1.1;
  }

  .vip-bar-headline strong {
    font-size: 0.86rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .vip-bar-desc {
    margin: 0;
    font-size: 0.72rem;
    color: #bbb;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .vip-bar-action {
    flex-shrink: 0;
  }

  .vip-bar-cta-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ff9800 100%);
    color: #0d0a14;
    font-weight: 900;
    font-size: 0.8rem;
    padding: 8px 13px;
    border-radius: 22px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .vip-bar-cta-btn:active {
    transform: scale(0.96);
  }

  /* Elevação de botões flutuantes para não sobrepor */
  body.has-vip-bar-visible .panic-btn {
    bottom: 84px !important;
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  body.has-vip-bar-visible .back-to-top-btn {
    bottom: 84px !important;
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
}

body.user-is-vip .mobile-vip-floating-bar {
  display: none !important;
}

/* ==========================================================================
   Modal Pop-up Banner — HQs Originais (hq18.net/index.php?genre=Original)
   ========================================================================== */
.original-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
  box-sizing: border-box;
}

.original-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.original-modal-card {
  position: relative;
  background: linear-gradient(160deg, #181b29 0%, #0d0f17 100%);
  border: 1.5px solid rgba(255, 45, 117, 0.45);
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  overflow: visible;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(255, 45, 117, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(14px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.original-modal-overlay.active .original-modal-card {
  transform: scale(1) translateY(0);
}

.original-modal-close-btn {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #141724;
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  padding: 0;
}

.original-modal-close-btn:hover {
  transform: scale(1.12) rotate(90deg);
  background: #ff2d75;
  border-color: #ff2d75;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(255, 45, 117, 0.6);
}

.original-modal-close-btn:active {
  transform: scale(0.95);
}

.original-popup-link {
  display: block;
  text-decoration: none;
  outline: none;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  cursor: pointer;
  background: #000;
}

.original-popup-img-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.original-popup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.original-popup-link:hover .original-popup-img {
  transform: scale(1.03);
  filter: brightness(1.04);
}

.original-popup-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 65%, rgba(13, 15, 23, 0.95) 100%);
}

.original-popup-footer {
  padding: 14px 18px 16px 18px;
  background: #0d0f17;
  border-radius: 0 0 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.original-popup-tag {
  background: linear-gradient(135deg, rgba(255, 45, 117, 0.2), rgba(163, 0, 214, 0.2));
  color: #ff2d75;
  border: 1px solid rgba(255, 45, 117, 0.4);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.original-popup-text {
  font-size: 0.78rem;
  color: var(--text-muted, #8b949e);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.original-popup-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff2d75 0%, #a300d6 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 6px 20px rgba(255, 45, 117, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-sizing: border-box;
}

.original-popup-cta-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 8px 25px rgba(255, 45, 117, 0.6);
  color: #ffffff;
}

.original-popup-cta-btn:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .original-modal-card {
    max-width: 92vw;
    border-radius: 16px;
  }
  .original-modal-close-btn {
    top: -10px;
    right: -8px;
    width: 32px;
    height: 32px;
  }
  .original-popup-footer {
    padding: 12px 14px 14px 14px;
    gap: 8px;
  }
  .original-popup-cta-btn {
    padding: 10px 14px;
    font-size: 0.88rem;
  }
}

/* Itens de Seleção de Avatar (Estilo Netflix) */
.avatar-pick-item {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.avatar-pick-item:hover {
  transform: translateY(-4px) scale(1.06);
}
.avatar-pick-item:active {
  transform: scale(0.96);
}

/* =========================================================================
   CTA TORNAR-SE VIP (Mangás com Categoria 'Original')
   ========================================================================= */
.manga-original-vip-cta {
  position: relative;
  overflow: hidden;
  margin: 32px auto 28px auto;
  max-width: 800px;
  width: 100%;
  padding: 26px 30px;
  background: linear-gradient(135deg, rgba(26, 20, 42, 0.96) 0%, rgba(16, 12, 28, 0.98) 100%);
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.12), inset 0 0 25px rgba(255, 215, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-sizing: border-box;
}

.manga-original-vip-cta::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.16) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
  z-index: 0;
}

.manga-original-vip-cta::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -15%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(162, 155, 254, 0.12) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
  z-index: 0;
}

.original-vip-info {
  flex: 1;
  min-width: 260px;
  z-index: 1;
}

.original-vip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.35);
  margin-bottom: 8px;
}

.original-vip-title {
  margin: 0 0 6px 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}

.original-vip-title .gold-accent {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.original-vip-desc {
  margin: 0 0 12px 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.original-vip-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.original-vip-perks span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.original-vip-actions {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-original-become-vip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: #120e02 !important;
  background: linear-gradient(135deg, #ffd700 0%, #ff9800 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(255, 170, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  white-space: nowrap;
}

.btn-original-become-vip:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px rgba(255, 170, 0, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  color: #000 !important;
}

.btn-original-become-vip:active {
  transform: translateY(1px) scale(0.98);
}

.btn-original-become-vip-active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  color: #ffd700 !important;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 10px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-original-become-vip-active:hover {
  background: rgba(255, 215, 0, 0.2);
  transform: translateY(-2px);
}

@media (max-width: 680px) {
  .manga-original-vip-cta {
    flex-direction: column;
    text-align: center;
    padding: 22px 18px;
    gap: 18px;
    margin: 24px auto 20px auto;
  }
  .original-vip-info {
    text-align: center;
  }
  .original-vip-perks {
    justify-content: center;
  }
  .original-vip-actions {
    width: 100%;
  }
  .btn-original-become-vip {
    width: 100%;
    box-sizing: border-box;
  }
}