.home-page {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 8% 4%, rgba(66, 169, 225, 0.09), transparent 35%),
    var(--primary, #111828);
}

.home-container {
  max-width: 1440px;
  padding-top: clamp(1rem, 3vw, 2.5rem);
}

.home-hero {
  position: relative;
  display: flex;
  min-height: 390px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 5rem);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.75rem;
  background:
    linear-gradient(110deg, rgba(19, 33, 57, 0.98) 0%, rgba(19, 33, 57, 0.96) 47%, rgba(15, 52, 96, 0.78) 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
  isolation: isolate;
}

.home-hero::before {
  position: absolute;
  z-index: -1;
  top: -45%;
  right: 22%;
  width: 55%;
  height: 180%;
  border-radius: 50%;
  background: rgba(66, 169, 225, 0.06);
  content: "";
  filter: blur(10px);
}

.home-hero-copy {
  position: relative;
  z-index: 2;
  width: min(58%, 650px);
}

.home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.2rem;
  color: #8ed4f5;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.home-hero h1 {
  margin: 0;
  color: #f7f9fc;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.home-hero h1 span {
  color: var(--custom-blue, #42a9e1);
}

.home-hero-copy > p {
  max-width: 510px;
  margin: 1.25rem 0 1.8rem;
  color: #b5c2d3;
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  line-height: 1.75;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.home-primary-action,
.home-secondary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border-radius: 0.8rem;
  padding: 0.75rem 1.15rem;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.home-primary-action {
  color: #8bd1f4;
  background: rgba(66, 169, 225, 0.09);
  border: 1px solid rgba(66, 169, 225, 0.3);
  box-shadow: none;
}

.home-primary-action:hover {
  color: #ccecff;
  background: rgba(66, 169, 225, 0.16);
  border-color: rgba(66, 169, 225, 0.5);
  transform: translateY(-2px);
}

.home-secondary-action {
  border: 1px solid rgba(203, 213, 225, 0.24);
  color: #e6edf7;
  background: rgba(255, 255, 255, 0.04);
}

.home-secondary-action:hover {
  border-color: rgba(66, 169, 225, 0.58);
  color: #fff;
  background: rgba(66, 169, 225, 0.1);
  transform: translateY(-2px);
}

.home-hero-art {
  position: absolute;
  top: 0;
  right: 2%;
  width: 43%;
  height: 100%;
  pointer-events: none;
}

.home-art-glow {
  position: absolute;
  top: 15%;
  right: 8%;
  width: 70%;
  height: 75%;
  border-radius: 50%;
  background: rgba(66, 169, 225, 0.2);
  filter: blur(75px);
}

.home-poster {
  position: absolute;
  top: 50%;
  width: clamp(120px, 16vw, 215px);
  aspect-ratio: 0.68;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 1rem;
  background: #263650;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.4);
}

.home-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-poster-1 {
  z-index: 1;
  left: 5%;
  transform: translateY(-43%) rotate(-14deg);
}

.home-poster-2 {
  z-index: 2;
  left: 34%;
  transform: translateY(-55%) rotate(3deg);
}

.home-poster-3 {
  z-index: 1;
  right: 0;
  transform: translateY(-43%) rotate(14deg);
}

.home-section {
  margin-top: clamp(2.8rem, 6vw, 5rem);
}

.home-popular {
  margin-top: 2.5rem;
}

.home-page .section-header {
  align-items: center;
  margin: 0 0 0.7rem;
  padding: 0 0.25rem;
}

.home-page .section-title {
  margin: 0;
  padding-left: 1rem;
  color: #f1f5fa;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  text-shadow: none;
}

.home-page .section-title::before {
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--custom-blue), #7bd2f3);
}

.home-page .nav-buttons {
  gap: 0.55rem;
}

.home-page .nav-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(203, 213, 225, 0.17);
  color: #d8e2ee;
  background: #1a2740;
  box-shadow: none;
  font-size: 0.95rem;
}

.home-page .nav-btn:hover {
  border-color: rgba(66, 169, 225, 0.55);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.home-page .slider-container {
  max-width: none;
  overflow: hidden;
  margin: 0;
  border-radius: 1.1rem;
}

.home-page .slider-track {
  gap: 1rem;
  padding: 1rem 0.2rem 1.5rem;
}

.home-page .slider-track > .card {
  flex: 0 0 calc(25% - 0.75rem);
  height: 465px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1rem;
  background: #1a2740;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  animation: none;
  opacity: 1;
}

.home-page .slider-track > .card:hover {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  transform: translateY(-5px);
}

.home-page .slider-track .card-image-container {
  height: 265px;
}

.home-page .slider-track .card-content {
  padding: 0.85rem 1rem 1rem;
}

.home-page .slider-track .card-title {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}

.home-page .slider-track .image-overlay {
  background: linear-gradient(180deg, transparent 30%, rgba(8, 14, 25, 0.84));
}

.home-page .slider-indicator {
  gap: 0.5rem;
  margin-top: 0.3rem;
  padding: 0.5rem;
}

.home-page .indicator-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #43516a;
}

.home-page .indicator-dot.active {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: scale(1.2);
  box-shadow: none;
}

.home-new-grid {
  --bs-gutter-x: 1.25rem;
  --bs-gutter-y: 1.25rem;
  margin-top: 0.2rem;
}

.home-new-grid .manga-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 1rem;
  background: #1a2740;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.home-new-grid .manga-card:hover {
  border-color: rgba(66, 169, 225, 0.36);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  transform: translateY(-3px);
}

.home-new-grid .manga-card-image {
  aspect-ratio: 0.72;
  margin-bottom: 0.5rem;
  border-radius: 0.7rem;
  object-fit: cover;
}

@media (min-width: 768px) {
  .home-new-grid {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
  }

  .home-new-grid .manga-card {
    height: 100%;
    padding: 0.65rem;
  }

  .home-new-grid .card-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.95rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

.home-empty-state {
  display: grid;
  min-height: 170px;
  place-content: center;
  justify-items: center;
  gap: 0.7rem;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 1rem;
  color: #9eacc0;
  background: rgba(26, 39, 64, 0.55);
}

.home-empty-state i {
  color: #6f829d;
  font-size: 1.7rem;
}

.home-empty-state p {
  margin: 0;
}

@media (max-width: 1199.98px) {
  .home-page .slider-track > .card {
    flex-basis: calc(33.333% - 0.7rem);
  }
}

@media (max-width: 991.98px) {
  .home-hero {
    min-height: 350px;
  }

  .home-hero-copy {
    width: 66%;
  }

  .home-hero-art {
    right: -8%;
    width: 48%;
  }

  .home-page .slider-track > .card {
    flex-basis: calc(50% - 0.5rem);
    height: 445px;
  }
}

@media (max-width: 767.98px) {
  .home-container {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .home-hero {
    min-height: 330px;
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
  }

  .home-hero-copy {
    width: min(82%, 540px);
  }

  .home-hero-art {
    right: -25%;
    width: 60%;
    opacity: 0.5;
  }

  .home-poster {
    width: clamp(100px, 21vw, 150px);
  }

  .home-page .section-header {
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
  }

  .home-popular {
    margin-top: 2rem;
  }

  .home-page .section-title {
    font-size: clamp(1.25rem, 4vw, 1.65rem);
  }

  .home-page .nav-buttons {
    width: auto;
    align-self: auto;
  }

  .home-page .slider-track > .card {
    height: 420px;
  }

  .home-page .slider-track .card-image-container {
    height: 235px;
  }
}

@media (max-width: 575.98px) {
  .home-popular {
    margin-top: 1.5rem;
  }

  .home-hero {
    min-height: 355px;
    padding: 1.7rem 1.25rem;
  }

  .home-hero-copy {
    width: 100%;
  }

  .home-eyebrow {
    font-size: 0.65rem;
  }

  .home-hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.3rem);
  }

  .home-hero-copy > p {
    max-width: 95%;
    font-size: 0.92rem;
  }

  .home-hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: min(100%, 290px);
  }

  .home-hero-art {
    right: -40%;
    width: 75%;
    opacity: 0.24;
  }

  .home-page .section-header {
    align-items: center;
  }

  .home-page .nav-btn {
    width: 36px;
    height: 36px;
  }

  .home-page .slider-track {
    gap: 0.8rem;
    padding-right: 0;
    padding-left: 0;
  }

  .home-page .slider-track > .card {
    flex-basis: 100%;
    height: 420px;
  }

  .home-new-grid {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
  }

  .home-new-grid .manga-card {
    padding: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page *,
  .home-page *::before,
  .home-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.chapter-day-group + .chapter-day-group { margin-top: 0.75rem; }
.chapter-day-heading { color: #9eacc0; font-size: 0.8rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(148, 163, 184, 0.16); }
.home-pagination { color: #b5c2d3; }

.chapter-more-link { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; padding: 0.65rem 0; color: #8ed4f5; font-size: 0.8rem; text-decoration: none; }
.chapter-more-link:hover { color: #fff; text-decoration: underline; }
.chapter-relative-time { color: #9eacc0; font-size: 0.75rem; text-align: right; margin-left: 0.5rem; }

/* Popular covers keep the entire image visible at every card size. */
.home-popular .card-image-container>div:first-child{
  width:100%;
  height:100%;
}
.home-popular .card-image{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  background:rgba(13,21,34,.25);
}
.home-popular .card:hover .card-image{transform:none}

/* Panorama strip: one row at every viewport, with native touch scrolling. */
.home-popular .popular-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px 0 18px;
}
.home-popular .popular-track::-webkit-scrollbar { display: none; }
.home-popular .popular-card { flex: 0 0 calc((100% - 72px) / 5); min-width: 0; scroll-snap-align: start; }
.home-popular .popular-card-link { display: block; color: #f0f5fc; text-decoration: none; }
.home-popular .popular-cover { position: relative; aspect-ratio: 3 / 4.4; overflow: hidden; border-radius: 1rem; background: #131e30; }
.home-popular .popular-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.home-popular .popular-card-link:hover img { transform: scale(1.035); }
.home-popular .popular-rank,
.home-popular .popular-chapters { position: absolute; top: 14px; padding: 5px 8px; border-radius: 4px; background: #0d1729e8; color: #e1ebf8; font-size: .72rem; font-weight: 400; line-height: 1.5; }
.home-popular .popular-rank { left: 12px; }
.home-popular .popular-chapters { right: 12px; }
.home-popular .popular-copy { position: absolute; inset: auto 0 0; padding: 64px 12px 18px; background: linear-gradient(180deg, transparent, rgba(7, 13, 24, .88) 45%, #070d18); color: #fff; }
.home-popular .popular-copy h3 { font-size: .95rem; font-weight: 650; line-height: 1.4; margin: 0 0 8px; min-height: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-popular .popular-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: #d9e5f5; font-size: .76rem; }
.home-popular .popular-rating { color: #f1cd77; }
.home-popular .popular-meta i { margin-right: 4px; }
.home-popular .popular-pagination { display: flex; justify-content: center; gap: 2px; }
.home-popular .popular-pagination[hidden] { display: none; }
.home-popular .popular-pagination button { width: 36px; height: 36px; border: 0; padding: 0; background: transparent; display: grid; place-items: center; }
.home-popular .popular-pagination button::after { content: ''; width: 18px; height: 3px; background: #43516a; border-radius: 3px; }
.home-popular .popular-pagination button[aria-current="true"]::after { background: #69c4f1; }
.home-popular .nav-btn:disabled { opacity: .35; cursor: default; transform: none; }
.home-popular .popular-card-link:focus-visible { outline: 2px solid #69c4f1; outline-offset: -2px; }
@media(max-width:1199px) { .home-popular .popular-card { flex-basis: calc((100% - 54px) / 4); } }
@media(max-width:767px) { .home-popular .popular-card { flex-basis: calc((100% - 36px) / 3); } }
@media(max-width:575px) { .home-popular .popular-track { gap: 12px; } .home-popular .popular-card { flex-basis: 43%; } .home-popular .popular-copy h3 { font-size: .85rem; } }

.home-popular .popular-labels { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.home-popular .popular-labels .badge { font-size: .65rem; font-weight: 500; line-height: 1.35; padding: 3px 6px; border-radius: 4px; }
