/* ============================================================
   YVLOS - Shared Stylesheet
   ============================================================ */
:root {
  --bg-body: #050507;
  --bg-nav: #0a0a0f;
  --bg-card: #0d0d12;
  --primary: #00aaff;
  --text-main: #ffffff;
  --text-dim: #94a3b8;
  --border: #1e293b;
  --radius: 2px;
  --transition: all 0.18s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Outfit", sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}
img {
  display: block;
  -webkit-touch-callout: none; /* Disable context menu on images */
}
.scan-container img {
  -webkit-touch-callout: default; /* Allow context menu on scans only */
}
* {
  -webkit-tap-highlight-color: transparent;
}
body {
  user-select: none;
  -webkit-user-select: none;
}
input, textarea, [contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
}

/* ===================== NAVBAR ===================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 1000;
  gap: 16px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 1.2rem;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}
.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: var(--transition);
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.nav-link.active {
  color: var(--primary);
}

/* Search */
.nav-search {
  position: relative;
  flex-shrink: 0;
  margin-left: auto; /* Pushes the right section to the right edge */
}
.nav-search input {
  background: #11111a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px 0 34px;
  color: #fff;
  outline: none;
  font-size: 0.82rem;
  width: 220px;
  height: 36px;
  box-sizing: border-box;
  transition: var(--transition);
  font-family: inherit;
}
.nav-search input:focus {
  border-color: var(--primary);
  width: 260px;
  background: #161625;
}
.nav-search i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.82rem;
  pointer-events: none;
}

/* Auth button */
.nav-account {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: transparent;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-account:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* Profile Link in Navbar */
.nav-my-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 4px;
  height: 36px;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.nav-my-profile:hover {
  border-color: var(--primary);
  background: rgba(0, 170, 255, 0.1);
}
.nav-prof-img {
  width: 26px;
  height: 26px;
  border-radius: 0;
  object-fit: cover;
  border: none;
}
.nav-my-profile span {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0px;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  flex-shrink: 0;
  cursor: pointer;
}
.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
  display: block;
}
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  padding: 12px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu .nav-link {
  font-size: 0.85rem;
  padding: 10px 14px;
}
.mobile-search-bar {
  position: relative;
  margin-top: 6px;
}
.mobile-search-bar input {
  width: 100%;
  background: #11111a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 10px 9px 34px;
  color: #fff;
  outline: none;
  font-size: 0.85rem;
  font-family: inherit;
}
.mobile-search-bar i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
}
.mobile-auth {
  margin-top: 4px;
}

/* Search results */
.search-results-box {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #0a0a0f;
  border: 1px solid var(--border);
  max-height: 400px;
  overflow-y: auto;
  border-radius: var(--radius);
  z-index: 2000;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  min-width: 280px;
}

/* ===================== NOTIFICATIONS STYLES ===================== */
.nav-notif-btn {
  position: relative;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0; 
  color: #fff;
  transition: var(--transition);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-notif-btn:hover {
  border-color: var(--primary);
  background: rgba(0, 170, 255, 0.1);
}
.nav-notif-btn i {
  font-size: 0.85rem;
}
.notif-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 4px;
  height: 4px;
  background: #f87171;
  border-radius: 0;
  border: 1px solid var(--bg-card);
  display: none;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.8);
}
.notif-badge.active {
  display: block;
}

.notif-panel {
  position: fixed;
  top: 66px;
  right: 24px;
  width: 380px;
  max-height: calc(100vh - 120px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  z-index: 10000;
  display: none;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,0.9);
  animation: fadeIn 0.15s ease;
  overflow: hidden;
}
.notif-panel.open {
  display: flex;
}
.notif-header {
  padding: 12px 20px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-header h3 {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.notif-close-btn {
  color: var(--text-dim);
  font-size: 0.95rem;
}
.notif-list {
  flex: 1;
  overflow-y: auto;
}
.notif-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  cursor: pointer;
  transition: var(--transition);
}
.notif-item:hover {
  background: rgba(255,255,255,0.03);
}
.notif-item.read {
  opacity: 0.45;
}
.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: rgba(0, 170, 255, 0.1);
  border: 1px solid rgba(0, 170, 255, 0.2);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.notif-item-body {
  flex: 1;
}
.notif-item-title {
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: #fff;
}
.notif-item-msg {
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 6px;
}
.notif-item-date {
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 800;
}
.unread-dot {
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 0;
  margin-top: 6px;
}
.notif-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.75rem;
}
.notif-footer {
  padding: 10px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--border);
  text-align: center;
}
.notif-footer button {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .notif-panel {
    top: 60px;
    right: 0;
    left: 0;
    width: 100vw;
    height: calc(100vh - 60px);
    max-height: none;
    border-radius: 0;
    border: none;
  }
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: var(--transition);
}
.search-result-item:hover {
  background: #1e293b;
}
.search-result-item img {
  width: 32px;
  height: 46px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
.res-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #efefef;
}
.res-type {
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ===================== HERO / BANNER ===================== */
.page-body {
  margin-top: 60px;
}
.hero {
  padding: 20px 24px 0;
}
.banner-carousel {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
}
.banner-item {
  position: absolute;
  inset: 0;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  image-rendering: auto;
  backface-visibility: hidden;
  will-change: transform;
  display: flex;
  align-items: center;
  padding: 0 48px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.banner-item.active {
  opacity: 1;
  pointer-events: auto;
}
.banner-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.65) 45%,
    transparent 100%
  );
}
.banner-content {
  position: relative;
  z-index: 10;
  max-width: 480px;
  animation: fadeIn 0.6s ease;
}
.banner-tag {
  background: var(--primary);
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 10px;
}
.banner-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 10px;
}
.banner-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.4;
}
.banner-dots {
  position: absolute;
  bottom: 12px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 20;
}
.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: var(--transition);
  cursor: pointer;
}
.banner-dot.active {
  background: var(--primary);
  width: 18px;
  border-radius: 3px;
}
@media (max-width: 768px) {
  .hero { padding: 12px 12px 0; }
  .banner-carousel { height: 220px; }
  .banner-item { padding: 0 20px; }
  .banner-title { font-size: 1.4rem; margin-bottom: 6px; }
  .banner-desc { font-size: 0.75rem; margin-bottom: 12px; -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ===================== SECTIONS ===================== */
.section {
  padding: 24px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-left: 3px solid var(--primary);
  padding-left: 12px;
}
.section-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===================== CARDS ===================== */
.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* ===================== SCROLL LAYOUT ===================== */
.scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.scroll-layout {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 5px;
  flex: 1;
}
.scroll-layout::-webkit-scrollbar {
  display: none;
}
.scroll-layout .card-base {
  min-width: 160px;
  max-width: 160px;
  flex-shrink: 0;
}
.scroll-arrow {
  opacity: 0;
  pointer-events: none;
  background: var(--bg-card);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 10;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.scroll-wrapper:hover .scroll-arrow:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}
.scroll-arrow.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  cursor: default;
}
.scroll-arrow:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.scroll-arrow.left { left: -15px; }
.scroll-arrow.right { right: -15px; }

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

.card-base {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.card-base:hover {
  transform: translateY(-3px);
  border-color: #475569;
}
.card-img-wrap {
  position: relative;
  height: 230px;
  background: #111;
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}
.card-badge-top {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  padding: 2px;
  border-radius: 2px;
  display: flex;
  width: 20px;
  height: 14px;
}
.card-badge-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-type-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: var(--bg-nav);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 2px;
  text-transform: uppercase;
}
.card-body {
  padding: 12px 10px 10px;
}
.card-name {
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
  margin-bottom: 8px;
}
.btn-see-more {
  display: block;
  width: 100%;
  padding: 5px 0;
  background: rgba(0, 170, 255, 0.15);
  border: 1px solid rgba(0, 170, 255, 0.4);
  color: var(--primary);
  font-size: 0.65rem;
  font-weight: 800;
  text-align: center;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: var(--transition);
}
.btn-see-more:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===================== AUTH MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open {
  display: flex;
}
.auth-modal {
  background: #0d0d12;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 100%;
  max-width: 400px;
  padding: 30px;
  animation: fadeIn 0.2s ease;
  margin: 20px;
}
.auth-modal h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.auth-modal .auth-subtitle {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-bottom: 22px;
}
.auth-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #111;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: var(--transition);
  border-radius: var(--radius);
}
.auth-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 5px;
  text-transform: uppercase;
}
.form-group input {
  width: 100%;
  background: #11111a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: #fff;
  outline: none;
  font-size: 0.85rem;
  font-family: inherit;
  transition: var(--transition);
}
.form-group input:focus {
  border-color: var(--primary);
  background: #161625;
}
.form-error {
  color: #f87171;
  font-size: 0.72rem;
  margin-top: 4px;
  display: none;
}
.btn-auth-submit {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
  transition: var(--transition);
}
.btn-auth-submit:hover {
  background: #0090dd;
}
.auth-close {
  float: right;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}
.auth-close:hover {
  color: #fff;
}

/* ===================== ANIME DETAIL PAGE ===================== */
.detail-hero {
  position: relative;
  width: 100%;
  height: 450px;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  image-rendering: auto;
  backface-visibility: hidden;
  will-change: transform;
  flex-shrink: 0;
}
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    var(--bg-body) 0%,
    rgba(5, 5, 7, 0.6) 60%,
    transparent 100%
  );
}
.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 0 24px 24px;
  margin-top: -80px;
  position: relative;
  z-index: 10;
}
.detail-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.detail-title {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 4px;
}
.detail-alttitle {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-bottom: 14px;
}
.detail-action-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.btn-watch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: #1e293b;
  color: #fff;
  transition: var(--transition);
}
.btn-watch:hover {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-watch.active {
  background: var(--primary);
  border-color: var(--primary);
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.detail-meta strong {
  color: #fff;
}
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}
.status-en-cours {
  background: rgba(0, 255, 128, 0.1);
  color: #00cc77;
  border: 1px solid rgba(0, 255, 128, 0.2);
}
.status-termine {
  background: rgba(255, 170, 0, 0.1);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.2);
}
.detail-section-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}
.detail-synopsis {
  font-size: 0.84rem;
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 16px;
}
.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.genre-tag {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-dim);
  background: #0a0a0f;
}

/* Season / Arc selector rows */
.content-section {
  padding: 0 24px 24px;
}
.content-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.8px;
  border-left: 3px solid var(--primary);
  padding-left: 10px;
  margin-bottom: 14px;
}
.season-row {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 8px;
}
.season-row::-webkit-scrollbar {
  height: 3px;
}
.season-row::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}
.season-card {
  flex-shrink: 0;
  width: 140px;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
}
.season-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.season-card-img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  background: #111;
}
.season-card-label {
  padding: 7px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

/* ===================== READER ===================== */
.reader-page {
  background: #000;
  min-height: 100vh;
}
.reader-top-bar {
  position: sticky;
  top: 0;
  height: 50px;
  background: #0a0a0f;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  justify-content: space-between;
  z-index: 100;
}
.reader-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  color: #fff;
  transition: var(--transition);
}
.reader-back:hover {
  color: var(--primary);
}
.reader-hero {
  width: 100%;
  height: 180px;
  position: relative;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  will-change: transform;
}
.reader-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.4) 100%);
}
.reader-hero-content {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 5;
}
.reader-title {
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: uppercase;
}
.reader-subtitle {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.reader-controls {
  background: #0a0a0f;
  border-bottom: 1px solid var(--border);
  padding: 16px;
}
.ctrl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.ctrl-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}
select.asn-select {
  background: #11111a;
  border: 1px solid var(--border);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-weight: 700;
  outline: none;
  min-width: 180px;
  font-family: inherit;
  font-size: 0.82rem;
}
.btn-nav-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-nav {
  background: #1e293b;
  color: #fff;
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  font-family: inherit;
}
.btn-nav:hover {
  background: var(--primary);
  border-color: var(--primary);
}
.srv-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.srv-btn {
  padding: 5px 12px;
  background: #1e293b;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
  transition: var(--transition);
  font-family: inherit;
}
.srv-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.srv-btn:hover:not(.active) {
  background: #2d3748;
  color: #fff;
}
.scan-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #000;
}
.scan-container img {
  width: 100%;
  max-width: 850px;
  height: auto;
}
.video-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 14px;
  background: #000;
}
.video-iframe-wrap {
  width: 100%;
  max-width: 880px;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--border);
}
.video-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===================== CATALOGUE ===================== */
.catalogue-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 16px 24px 0;
}
.filter-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  background: #0d0d12;
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: var(--radius);
  cursor: pointer;
  text-transform: uppercase;
  transition: var(--transition);
  font-family: inherit;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.catalogue-search {
  margin: 0 24px 16px;
  position: relative;
}
.catalogue-search input {
  width: 100%;
  background: #11111a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px 9px 36px;
  color: #fff;
  outline: none;
  font-size: 0.85rem;
  font-family: inherit;
  transition: var(--transition);
}
.catalogue-search input:focus {
  border-color: var(--primary);
}
.catalogue-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ===================== PLANNING ===================== */
.planning-grid {
  padding: 16px 24px;
}
.planning-day {
  margin-bottom: 24px;
}
.planning-day-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.planning-day-name {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.planning-day-badge {
  padding: 2px 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  border-radius: 2px;
  text-transform: uppercase;
  display: none;
}
.planning-day-badge.today {
  display: inline-block;
}
.planning-day-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.planning-releases {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.planning-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  cursor: pointer;
  transition: var(--transition);
  min-width: 220px;
  flex: 1;
  max-width: 360px;
}
.planning-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.planning-card img {
  width: 36px;
  height: 52px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.planning-card-info {
  flex: 1;
  min-width: 0; 
}
.planning-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.planning-card-meta {
  font-size: 0.64rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.planning-type-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 2px;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
}
.ptype-anime {
  background: rgba(0, 170, 255, 0.15);
  color: var(--primary);
  border: 1px solid rgba(0, 170, 255, 0.3);
}
.ptype-scan {
  background: rgba(255, 170, 0, 0.1);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.2);
}

/* ===================== SPINNER ===================== */
.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
}
.loading-box p {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* ===================== SHARED UTILS ===================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  transition: var(--transition);
  border: none;
}
.btn-primary:hover {
  background: #0090dd;
}
.divider {
  height: 1px;
  background: var(--border);
  margin: 0 24px;
}
.page-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 20px 24px 16px;
}

/* ===================== FOOTER ===================== */
.footer {
  padding: 40px 48px 5px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  background: #0a0a0f;
  font-size: 0.85rem;
  margin-top: 30px;
}
.footer-content {
  width: 100%;
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
}
.footer-brand {
  max-width: 440px;
}
.footer-logo {
  margin-bottom: 12px;
}
.footer-desc {
  line-height: 1.5;
  color: #8f9ba8;
  font-size: 0.82rem;
}
.footer-links {
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col h4 {
  color: #fff;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-size: 0.88rem;
  border-left: 2px solid var(--primary);
  padding-left: 8px;
}
.footer-col a {
  transition: var(--transition);
  font-size: 0.82rem;
}
.footer-col a:hover {
  color: var(--primary);
  transform: translateX(3px);
}
.footer-mascot {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 250px;
}
.footer-cat {
  height: 150px; /* Slightly reduced */
  width: auto;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
}
.footer-cat:hover {
  transform: scale(1.1) translateY(-5px);
}
.footer-bottom {
  text-align: center;
  padding: 16px 0 10px; /* Reduced space below text */
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.78rem;
  color: var(--text-dim);
}

@media (max-width: 1200px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .footer-brand {
    max-width: 100%;
    margin: 0 auto;
  }
  .footer-links {
    justify-content: center;
    margin: 0 auto;
  }
  .footer-mascot {
    order: -1;
    margin-bottom: 20px;
  }
  .footer-cat {
    height: 140px;
  }
}

/* ===================== SCROLL TO TOP ===================== */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 6000;
  cursor: pointer;
  font-size: 1rem;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}
.scroll-top:hover {
  background: #0090dd;
}
.scroll-top.show {
  display: flex;
}

.pwa-install-btn {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: #0e1627;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.pwa-install-btn:hover {
  background: var(--primary);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
    margin-top: 0;
  }
  .detail-poster {
    max-width: 200px;
    display: none;
  }
  .detail-title {
    font-size: 1.5rem;
  }
}
@media (max-width: 768px) {
  .navbar {
    padding: 0 14px;
    gap: 10px;
  }
  .nav-links {
    display: none;
  }
  .nav-search {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .nav-right-actions {
    margin-left: auto !important;
    gap: 6px;
  }
  .nav-account {
    padding: 6px 10px;
    font-size: 0.72rem;
  }
  .scroll-layout .card-base {
    min-width: 130px !important;
    max-width: 130px !important;
  }
  .scroll-layout .card-img-wrap {
    height: 190px !important;
  }
  .grid-layout {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .section {
    padding: 16px;
  }
  .hero {
    padding: 12px 16px 0;
  }
  .banner-title {
    font-size: 1.5rem;
  }
  .banner-desc {
    display: none;
  }
  .banner-carousel {
    height: 200px;
  }
  .banner-item {
    padding: 0 24px;
  }
  .catalogue-filters {
    padding: 12px 16px 0;
  }
  .catalogue-search {
    margin: 0 16px 10px;
    padding: 0;
  }
  .planning-grid {
    padding: 12px 16px;
  }
  .planning-releases {
    flex-direction: column;
  }
  .planning-card {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }
  .content-section {
    padding: 0 16px 16px;
  }
  .detail-hero {
    height: 200px;
  }
  .ctrl-row {
    flex-direction: column;
    align-items: stretch;
  }
  select.asn-select {
    width: 100%;
  }
  .btn-nav {
    padding: 10px 14px;
    flex: 1;
    justify-content: center;
  }
  .btn-nav-group {
    width: 100%;
  }
  .reader-controls {
    padding: 12px;
  }
  .footer {
    padding: 24px 16px;
  }
  .footer-content {
    flex-wrap: wrap;
  }
  .footer-links {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    margin-left: 0;
  }
}
@media (max-width: 480px) {
  .pwa-install-btn {
    right: 10px;
    bottom: 10px;
    padding: 9px 12px;
    font-size: 0.72rem;
  }
  .grid-layout {
    gap: 10px;
  }
  .card-img-wrap {
    height: 200px;
  }
  .detail-title {
    font-size: 1.3rem;
  }
  .banner-carousel {
    height: 170px;
  }
  .banner-title {
    font-size: 1.2rem;
  }
}

/* ===================== PROFILE PAGE ===================== */
.profile-header {
  padding: 40px 24px;
  background: linear-gradient(180deg, rgba(0, 170, 255, 0.05) 0%, transparent 100%);
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}
.profile-avatar-wrap {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  border: 3px solid var(--primary);
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.profile-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-info h1 {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.profile-info p {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}
.profile-tabs {
  display: flex;
  gap: 30px;
  margin: 20px 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
  padding: 12px 4px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  white-space: nowrap;
}
.profile-tab.active {
  color: var(--primary);
}
.profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 99px;
}
.profile-grid-section {
  display: none;
  padding: 16px 24px 40px;
}
.profile-grid-section.active {
  display: block;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.profile-empty {
  padding: 60px 0;
  text-align: center;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.82rem;
}
.profile-empty i {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.2;
}
/* ===================== SPLASH SCREEN ===================== */
.splash-overlay {
  position: fixed;
  inset: 0;
  background: #050507;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.5s ease, visibility 0.5s;
}
.splash-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  animation: pulse 2s infinite ease-in-out;
}
.splash-loader {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.05);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.splash-loader::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 30%;
  background: var(--primary);
  border-radius: 99px;
  animation: loading-bar 1.5s infinite ease-in-out;
}
@keyframes loading-bar {
  0% { left: -30%; }
  100% { left: 100%; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

@media (max-width: 768px) {
  .profile-header { padding: 30px 16px; flex-direction: column; text-align: center; gap: 16px; }
  .profile-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .profile-tabs { margin: 10px 16px; gap: 20px; }
  .profile-grid-section { padding: 12px 16px 30px; }

