::-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;
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  color: #e9e9e9;
}

.container {
  max-width: 3000px;
  margin: auto;
  background-color: #121212;

  min-height: 100vh;
}

.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);
}

.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);
}

.jelajahikomik {
  color: #ce50ff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  flex: 1;
  justify-content: center;
}

.grid {
  display: grid;
  gap: 15px;
  padding: 20px;
  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;
}

.comic-card:hover {
  transform: translateY(-8px) scale(1.03);
  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;
  transition: transform 0.4s ease;
  pointer-events: none;
}

.comic-card:hover img {
  transform: scale(1.05);
}

.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: 5px;
  padding-right: 5px;
}

.comic-card:hover h3 {
  color: #fff !important;
}

.comic-image {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  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;
}

.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;
}

.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;
  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;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grid .comic-card {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 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;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
  animation: fadeInUp 0.8s ease;
}

.empty-state i {
  font-size: 4rem;
  color: #8a2be2;
  margin-bottom: 20px;
  display: inline-block;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #ce50ff;
}

.empty-state p {
  color: #aaa;
  margin-bottom: 25px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .comic-card img {
    height: 245px;
  }

  .lihat-semua {
    font-weight: 600;
    font-size: 0.8rem;
    margin-left: 80px;
  }

  .section-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
  }

  .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;
  }

  .status-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
}

.login-prompt {
  max-width: 500px;
  margin: auto;
  padding: 40px 20px;
  background: rgba(26, 26, 26, 0.9);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(206, 80, 255, 0.2);
}

.login-prompt::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(138, 43, 226, 0.1) 0%,
    transparent 70%
  );
  transform: rotate(25deg);
  z-index: 0;
  animation: pulseGlow 4s infinite ease-in-out;
}

.login-prompt h3 {
  font-size: 1.3rem;
  color: #ce50ff;
  margin-bottom: 20px;
  z-index: 1;
  position: relative;
  line-height: 1.5;
  font-weight: 600;
  animation: fadeIn 1s ease-in;
}

.icon {
  font-size: 1rem;
  color: #ce50ff;
  margin-bottom: 20px;
  display: inline-block;
  animation: bounce 2s infinite;
  z-index: 1;
  position: relative;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to right, #8a2be2, #ce50ff);
  padding: 10px 20px;
  border-radius: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(138, 43, 226, 0.4);
  z-index: 1;
  position: relative;
  font-size: 20px;
  font-weight: bold;
}

.sort-container {
  position: relative;
  display: inline-block;
}

.sort-btn {
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid #8a2be2;
  font-size: 0.8rem;
}

.sort-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background-color: #1a1a1a;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  z-index: 1000;
  margin-top: 5px;
  overflow: hidden;
  border: 1px solid #491c75ff;
}

.sort-dropdown a {
  color: #e9e9e9;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}

.sort-dropdown a:hover {
  background-color: #8a2be2;
  color: white;
}

.sort-dropdown a.active {
  background-color: #6a0dad;
  color: white;
}

.sort-container:hover .sort-dropdown {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.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;
  }
}
