@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.container {
  max-width: 1600px;
  margin: auto;
  background-color: #121212;
  padding: 25px 15px;
}
.section-title {
  font-size: 1.8em;
  margin: 0;
  color: #fff;
  padding-bottom: 3px;
  border-bottom: 5px solid rgb(83, 0, 116);
  font-weight: bold;
  text-shadow: 0 0 10px rgba(138, 43, 226, 0.7);
}
.grid {
  display: grid;
  gap: 15px;
  padding: 10px 0;
}
.grid {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 992px) {
  .grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.comic-card {
  position: relative;
  overflow: visible;
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.comic-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.comic-card:hover::before {
  opacity: 1;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(30, 30, 30, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #8a2be2, #4b0082);
  border-radius: 4px;
}

.comic-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 30px rgba(138, 43, 226, 0.4);
  z-index: 10;
}

.comic-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.comic-card h3 {
  margin: 0;
  padding-top: 8px;
  font-size: medium;
  background: #000;
  color: #e9e9e9;
  text-decoration: none !important;
  font-weight: 700;
  min-height: 60px;
  max-height: 4em;
  line-height: 1.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
}

.comic-image {
  position: relative;
  display: block;
  width: 100%;
  user-select: none;
  pointer-events: none;
}

img.flag-icon {
  all: unset;
  display: inline-block !important;
  width: 30px !important;
  height: auto !important;
  position: absolute !important;
  top: 10px !important;
  right: 8px !important;
  max-width: none !important;
  background: rgba(0, 0, 0, 0.7) !important;
  border-radius: 3px !important;
  padding: 2px !important;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 999 !important;
  user-select: none;
}

.comic-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.8) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}
.comic-card:hover .comic-image::after {
  opacity: 1;
}
.comic-card:hover h3 {
  color: #fff !important;
}
.comic-card a {
  text-decoration: none !important;
  color: inherit;
  display: block;
  height: 100%;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.grid .comic-card:nth-child(1) {
  animation-delay: 0.1s;
}
.grid .comic-card:nth-child(2) {
  animation-delay: 0.2s;
}
.grid .comic-card:nth-child(3) {
  animation-delay: 0.3s;
}
.grid .comic-card:nth-child(4) {
  animation-delay: 0.4s;
}
.grid .comic-card:nth-child(5) {
  animation-delay: 0.5s;
}
.grid .comic-card:nth-child(6) {
  animation-delay: 0.6s;
}
.grid .comic-card:nth-child(7) {
  animation-delay: 0.7s;
}
.grid .comic-card:nth-child(8) {
  animation-delay: 0.8s;
}
.grid .comic-card:nth-child(9) {
  animation-delay: 0.9s;
}
.grid .comic-card:nth-child(10) {
  animation-delay: 1s;
}
.grid .comic-card:nth-child(11) {
  animation-delay: 1.1s;
}
.grid .comic-card:nth-child(12) {
  animation-delay: 1.2s;
}
.read-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  color: #ce50ff;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 2;
}
.comic-card:hover .read-icon {
  opacity: 1;
  font-size: 36px;
}
.rank-badge {
  position: absolute;
  top: 10px;
  left: 5px;
  background: linear-gradient(45deg, rgb(121, 13, 229), rgb(208, 0, 255));
  color: rgb(34, 33, 33);
  font-size: 1em;
  padding: 2px 8px;
  border-radius: 10px;
  z-index: 2;
  font-weight: 600;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
  user-select: none;
}

.rank-badge.gold {
  background: linear-gradient(45deg, #ffd700, #ffec8b);
}

.rank-badge.silver {
  background: linear-gradient(45deg, #c0c0c0, #e0e0e0);
}

.rank-badge.bronze {
  background: linear-gradient(45deg, #cd7f32, #d29a6b);
}

.rank-badge.default {
  background: linear-gradient(45deg, rgb(121, 13, 229), rgb(208, 0, 255));
}

.comic-title {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
}

.rating-badge {
  position: absolute;
  top: 10px;
  left: 6px;
  background: rgba(0, 0, 0, 0.85) !important;
  padding: 5px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 999;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
}
.rating-badge i {
  color: gold;
}

.section-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(to right, #8a2be2, #ce50ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(138, 43, 226, 0.4);
  margin: 0;
}

.lihat-semua {
  color: #ce50ff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.lihat-semua:hover {
  color: #fff;
  transform: translateX(5px);
}

@media (max-width: 992px) {
  .slide-item {
    flex: 0 0 calc((100% / 2) - 25px);
    min-width: calc((100% / 2) - 25px);
  }
  .comic-title {
    font-size: 0.9rem;
  }
}
@media (max-width: 768px) {
  .slide-item {
    flex: 0 0 95%;
    min-width: 95%;
  }

  .comic-card h3 {
    font-weight: 700;
    min-height: 30px;
    max-height: 4em;
    line-height: 1.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    margin-bottom: 10px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .section-header h1 {
    font-size: 1.1rem;
  }

  .lihat-semua {
    font-size: 0.7rem;
  }

  .comic-card img {
    height: 250px;
  }
  .comic-title {
    font-size: 0.85rem;
    bottom: 8px;
    left: 8px;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.section-header {
  background: linear-gradient(90deg, rgba(83, 0, 116, 0.3), rgba(0, 0, 0, 0.7));
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 15px 25px;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.2);
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  padding-bottom: 20px;
}

.page-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ce50ff;
  padding: 8px 16px;
  text-decoration: none;
  border: 1px solid #8a2be2;
  margin: 0 4px;
  width: 45px;
  height: 45px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: linear-gradient(to right, #8a2be2, #4b0082);
  color: white;
}

.pagination a.active {
  background: linear-gradient(to right, #8a2be2, #4b0082);
  color: white;
  font-weight: bold;
}

.page-text {
  font-weight: 600;
  font-size: 17px;
}

.page-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-text.active {
  font-weight: 700;
  color: white;
}

@media (max-width: 480px) {
  .page-item {
    width: 40px;
    height: 40px;
  }
  .page-text {
    font-weight: 600;
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .page-item {
    width: 35px;
    height: 35px;
  }
  .page-text {
    font-weight: 600;
    font-size: 13px;
  }
}
