/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --dark-bg: #0a0a0a;
  --card-bg: #1a1a1a;
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0b0;
  --accent-red: #ff3a3a;
  --accent-green: #d4ff59;
  --section-spacing: 3rem;
  /* Diubah dari 2rem ke 3rem */
}

body {
  background-color: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  width: auto;
  height: auto;
  display: block;
}

.container {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  /* Padding dihapus untuk konsistensi */
}

section {
  margin-bottom: var(--section-spacing);
}

/* Navbar - Diperbarui untuk konsistensi dengan main.css */
.navbar {
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 40px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent-red);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-red);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  transition: background-color 0.3s;
}

.search-bar:focus-within {
  background-color: rgba(255, 255, 255, 0.2);
}

.search-bar input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0.3rem 0.5rem;
  width: 180px;
}

.search-bar input:focus {
  outline: none;
}

.search-bar button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: var(--accent-green);
}

.breadcrumb span {
  margin: 0 0.5rem;
  color: var(--text-secondary);
}

/* Page Header */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.page-title::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-green));
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Filters */
.filters-section {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.filter-input {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.7rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.3s;
}

.filter-input:focus {
  outline: none;
  border-color: var(--accent-green);
  background-color: rgba(255, 255, 255, 0.15);
}

.filter-select {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.7rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-green);
  background-color: rgba(255, 255, 255, 0.15);
}

.filter-select option {
  background-color: var(--card-bg);
  color: var(--text-primary);
}

.filter-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-green);
  color: #000;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 255, 89, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Results Info */
.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
}

.results-count {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.sort-options {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sort-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Anime Grid */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.anime-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s;
  cursor: pointer;
}

.anime-card:hover {
  transform: translateY(-3px);
}

.card-image {
  height: 250px;
  background-color: #333;
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  display: block;
}

.card-status {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: var(--accent-green);
  color: #000;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.card-status.ongoing {
  background-color: var(--accent-green);
}

.card-status.upcoming {
  background-color: #ffa500;
}

.card-status.completed {
  background-color: #6c757d;
}

.card-info {
  height: 180px;
  padding: 0.8rem;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  min-height: 2.6em;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.card-genre {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.65rem;
  margin-right: 0.3rem;
  margin-bottom: 0.2rem;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--accent-green);
  font-size: 0.75rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s;
}

.pagination-btn:hover {
  background-color: var(--accent-green);
  color: #000;
}

.pagination-btn.active {
  background-color: var(--accent-green);
  color: #000;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.loading i {
  font-size: 2rem;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
  display: block;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Footer - Diperbarui untuk konsistensi dengan main.css */
footer {
  background-color: #111;
  padding: 1rem 0;
  margin-top: var(--section-spacing);
}

.copyright {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .navbar-container {
    position: relative;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--dark-bg);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease-out;
  }

  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .nav-links li {
    padding: 0.8rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .mobile-menu-btn {
    display: block;
  }

  .search-bar {
    display: none;
  }

  .container {
    padding: 1rem 0;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    justify-content: stretch;
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .results-info {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .anime-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
  }

  .card-image {
    height: 200px;
  }
}

@media (max-width: 576px) {
  .anime-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .pagination {
    gap: 0.3rem;
  }

  .pagination-btn {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
  }
}
