/* File Location: public/css/novel-card.css */
.card {
    width: 280px;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(102, 0, 0, 0.8);
}

/* ── IMAGE AREA ── */
.card-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.35s ease, transform 0.35s ease;
}

/* On hover: blur + darken the image */
.card:hover .card-image img {
    filter: blur(3px) brightness(0.5);
    transform: scale(1.04);
}

/* Orange bottom border that appears on hover */
.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e8400c, #ff6a00);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.card:hover .card-image::after {
    transform: scaleX(1);
}

/* Tags */
.tag {
    position: absolute;
    top: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    z-index: 2;
}

.tag-left {
    left: 12px;
    background: #2a2a2a;
    color: #fff;
}

.tag-right {
    right: 12px;
    background: #e8400c;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Status badge */
.status-badge {
    position: absolute;
    bottom: 14px;
    left: 12px;
    background: #27c93f;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.status-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
}

.card:hover .status-badge {
    opacity: 0;
}

/* Title overlay on image */
.image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 12px 40px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
    z-index: 1;
    pointer-events: none;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    transition: opacity 0.3s ease;
}

.card:hover .image-title {
    opacity: 0.4;
}

/* ── HOVER ACTION BUTTONS ── */
.hover-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 10px;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover .hover-actions {
    opacity: 1;
    pointer-events: auto;
}

.btn-read {
    /* background: #e8400c; */
    background: linear-gradient(to right, #dc2626 , #ef4444);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: background 0.2s;
}

.btn-read:hover {
    /* background: #ff5520; */
    background: #dc2626;
    /* border: 2px solid white; */
    box-shadow: 0 0 10px #dc26265f, 0 0 20px #dc262663, 0 0 30px #dc262662;
}

.btn-add {
    background: #2a2a2a;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-add:hover {
    background: #444;
}

/* ── CARD BODY ── */
.card-body {
    padding: 14px 14px 16px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #18181b;
    margin-bottom: 6px;
    transition: color 0.3s;
}

.card:hover .card-title {
    color: #ff6a00;
}

.card-author {
    font-size: 0.78rem;
    color: #e8400c;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.card-author .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e8400c;
}

.card-desc {
    font-size: 0.8rem;
    color: #71717a;
    line-height: 1.55;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    gap: 18px;
    font-size: 0.76rem;
    color: #777;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-meta svg {
    opacity: 0.7;
}

/* ── Dark mode overrides for cards ── */
.dark .card {
    background: #1e1e22;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
.dark .card-title {
    color: #fff;
}
.dark .card-desc {
    color: #aaa;
}
.dark .card-meta {
    color: #777;
}

/* ════════ RESET & VARIABLES ════════ */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

:root {
  --red: #dc2626;
  --red-hover: #ee3c3c;
  --dark: #0e0e10;
  --surface: #1f1f24;
  --border: #2a2a30;
  --text: #e8e8f0;
}

/* body {
  background: var(--dark);
  color: var(--text);
  font-family: 'Lato', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
} */

/* ════════ FEATURED BANNER ════════ */
.featured-banner {
  position: relative;
  margin: 28px auto;
  max-width: 1300px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 2px solid var(--red);
  box-shadow: 0 0 0 1px rgba(232,64,12,0.2), 0 20px 60px rgba(0,0,0,0.7);
  min-height: 240px;
}

.banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.3) saturate(1.4);
  transform: scale(1.15);
  z-index: 0;
  transition: background 0.6s ease;
}

/* Red progress bar at bottom */
.auto-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: var(--red);
  width: 0%;
  z-index: 5;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(232,64,12,0.8);
}

.banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
      height: 56vh ;
  padding: 24px 28px;
  align-items: flex-start;
}

.banner-cover {
  width: 250px;
  min-width: 190px;
  height: 334px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.8);
  /* border: 2px solid var(--red); */
  flex-shrink: 0;
}

.banner-info { flex: 1; padding-top: 4px; }

.banner-title {
  font-family: 'Cinzel', serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.25;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 70px;
  margin-bottom: 18px;
}

.tag {
  padding: 4px 12px;
  border-radius: 6px;
  background: #2e2e35;
  border: 1px solid var(--red);
  color: #ccc;
  font-size: 0.78rem;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
  cursor: default;
}

.tag:hover { background: var(--red); color: #fff; }

.banner-desc {
  font-size: 0.88rem;
  color: #bbb;
  line-height: 1.7;
  margin-bottom: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.banner-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--red);
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.btn-primary { background: var(--red); color: #fff; }

.btn-primary:hover {
  background: var(--red-hover); border-color: var(--red-hover);
  transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,64,12,0.5);
}

.btn-secondary { background: transparent; color: var(--red); }

.btn-secondary:hover {
  background: var(--red); color: #fff; transform: translateY(-1px);
}

.banner-author {
  position: absolute;
  bottom: 14px; right: 20px;
  font-size: 0.78rem;
  color: #666;
  font-style: italic;
  z-index: 1;
}

/* Fade animation for banner content */
.banner-fade { animation: fadeIn 0.45s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════ CAROUSEL ════════ */
.carousel-section {
  max-width: 1300px;
  margin: 0 auto 40px;
  padding: 0 30px;
  position: relative;
}

.carousel-wrapper { position: relative; }

.carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 12px 4px 16px;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar { display: none; }

/* Arrow buttons — red border & color */
.carousel-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(232,64,12,0.12);
  border: 2px solid var(--red);
  color: var(--red);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.carousel-btn:hover {
  background: var(--red); color: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 18px rgba(232,64,12,0.5);
}

.carousel-btn.prev { left: -22px; }
.carousel-btn.next { right: -22px; }

/* Small novel cards */
.novel-card {
  flex: 0 0 150px; width: 150px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  border: 2px solid transparent;
}

.novel-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 12px 32px rgba(0,0,0,0.7);
  border-color: rgba(232,64,12,0.5);
}

.novel-card.active-card {
  border: 2px solid var(--red);
  box-shadow: 0 0 0 2px rgba(232,64,12,0.25), 0 8px 24px rgba(232,64,12,0.3);
}

.novel-card-img {
  width: 150px; height: 210px;
  position: relative; overflow: hidden;
}

.novel-card-img > div:first-child {
  width: 100%; height: 100%;
  transition: filter 0.3s;
}

.novel-card:hover .novel-card-img > div:first-child {
  filter: brightness(0.4);
}

.novel-card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 30px 8px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-size: 0.63rem;
  font-weight: 800;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
  line-height: 1.2;
}

.novel-card-hover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s;
}

.novel-card:hover .novel-card-hover { opacity: 1; }

.mini-btn {
  background: var(--red); color: #fff;
  border: none;
  padding: 6px 16px; border-radius: 6px;
  font-size: 0.75rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: background 0.2s;
}

.mini-btn:hover { background: var(--red-hover); }

.mini-btn-outline {
  background: transparent; color: var(--red);
  border: 2px solid var(--red);
  padding: 4px 14px; border-radius: 6px;
  font-size: 0.75rem; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.mini-btn-outline:hover { background: var(--red); color: #fff; }

.card-badge {
  position: absolute; top: 7px; right: 7px;
  background: var(--red); color: #fff;
  font-size: 0.6rem; font-weight: 800;
  padding: 2px 7px; border-radius: 4px;
  z-index: 2;
}

/* ════════ RESPONSIVE ════════ */

/* Large tablet / small desktop (769px – 1024px) */
@media (max-width: 1024px) {
  .featured-banner {
    margin: 20px 16px;
    max-width: 100%;
  }

  .banner-inner {
    height: auto;
    min-height: 220px;
    padding: 20px 22px;
    gap: 20px;
  }

  .banner-cover {
    width: 200px;
    min-width: 160px;
    height: 270px;
  }

  .banner-title {
    font-size: 1.35rem;
  }

  .tags {
    gap: 10px;
  }

  .carousel-section {
    padding: 0 20px;
  }

  .carousel-btn.prev { left: -18px; }
  .carousel-btn.next { right: -18px; }
}

/* Tablet (481px – 768px) */
@media (max-width: 768px) {
  .featured-banner {
    margin: 16px 12px;
    border-radius: 12px;
    min-height: 200px;
  }

  .banner-inner {
    padding: 16px 18px;
    gap: 16px;
    align-items: flex-start;
  }

  .banner-cover {
    width: 160px;
    min-width: 130px;
    height: 220px;
    border-radius: 8px;
  }

  .banner-title {
    font-size: 1.15rem;
    margin-bottom: 10px;
  }

  .tags {
    gap: 8px;
    margin-bottom: 12px;
  }

  .banner-desc {
    font-size: 0.82rem;
    -webkit-line-clamp: 4;
    margin-bottom: 16px;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  .banner-author {
    font-size: 0.72rem;
    bottom: 10px;
    right: 14px;
  }

  .carousel-section {
    padding: 0 14px;
  }

  .carousel-btn {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }

  .carousel-btn.prev { left: -14px; }
  .carousel-btn.next { right: -14px; }

  .novel-card {
    flex: 0 0 130px;
    width: 130px;
  }

  .novel-card-img {
    width: 130px;
    height: 182px;
  }
}

/* Mobile (≤ 480px) */
@media (max-width: 480px) {
  .featured-banner {
    margin: 12px 8px;
    border-radius: 10px;
    min-height: 160px;
  }

  .banner-inner {
    padding: 12px 14px;
    gap: 12px;
  }

  .banner-cover {
    width: 110px;
    min-width: 90px;
    height: 152px;
    border-radius: 7px;
  }

  .banner-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .tags {
    gap: 6px;
    margin-bottom: 10px;
  }

  .tag {
    font-size: 0.7rem;
    padding: 3px 9px;
  }

  .banner-desc {
    font-size: 0.76rem;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    margin-bottom: 12px;
  }

  .banner-actions {
    gap: 8px;
  }

  .btn {
    padding: 7px 12px;
    font-size: 0.76rem;
    gap: 6px;
  }

  .btn svg {
    width: 13px;
    height: 13px;
  }

  .banner-author {
    font-size: 0.68rem;
    bottom: 8px;
    right: 10px;
  }

  .carousel-section {
    padding: 0 10px;
  }

  .carousel-btn {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }

  .carousel-btn.prev { left: -10px; }
  .carousel-btn.next { right: -10px; }

  .novel-card {
    flex: 0 0 110px;
    width: 110px;
  }

  .novel-card-img {
    width: 110px;
    height: 154px;
  }

  .mini-btn {
    padding: 5px 12px;
    font-size: 0.7rem;
  }

  .mini-btn-outline {
    padding: 3px 10px;
    font-size: 0.7rem;
  }
}

/* ── Restore dark:text-gray-300 color (overrides compiled CSS) ── */
.dark .text-gray-300 {
    color: black !important;
}