/* ================================================
   🌗 THEME VARIABLES (Dark & Light Mode Compatible)
   ================================================ */
:root {
  --ng-bg: #0f0f10;
  --ng-card: rgba(255,255,255,0.04);
  --ng-accent: #00b7ff;
  --ng-text: #e6eef8;
  --ng-muted: rgba(230,238,248,0.6);
  --ng-border: rgba(255,255,255,0.08);
  --ng-shadow: 0 8px 22px rgba(0,0,0,0.35);
}

body.light-mode {
  --ng-bg: #ffffff;
  --ng-card: rgba(0,0,0,0.05);
  --ng-accent: #007bff;
  --ng-text: #000000;
  --ng-muted: rgba(0,0,0,0.65);
  --ng-border: rgba(0,0,0,0.1);
  --ng-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* ================================================
   MAIN CONTAINER
   ================================================ */
.ng-allseries {
  padding: 20px 15px 40px;
  max-width: 1100px;
  margin: 0 auto;
  color: var(--ng-text);
  background: transparent;
  box-sizing: border-box;
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

/* ================================================
   HEADER & TOOLBAR
   ================================================ */
.ng-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.ng-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ng-text);
}

/* ✅ END BUTTON — Minimal Flat Style */
#completedBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--ng-border);
  background: transparent;
  color: var(--ng-text);
  cursor: pointer;
  transition: all 0.25s ease;
}
#completedBtn i {
  font-size: 1rem;
  line-height: 1;
}
#completedBtn:hover {
  background: var(--ng-card);
  transform: translateY(-1px);
}
#completedBtn.active {
  background: var(--ng-accent);
  color: #000;
  border-color: var(--ng-accent);
  box-shadow: 0 0 6px var(--ng-accent);
}
body.light-mode #completedBtn {
  border-color: var(--ng-border);
  background: rgba(0,0,0,0.03);
}
body.light-mode #completedBtn:hover {
  background: var(--ng-accent);
  color: #fff;
}

/* ================================================
   SEARCH & GENRE
   ================================================ */
.ng-search-box {
  margin: 12px 0 16px;
  width: 100%;
}
.ng-search-box input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--ng-border);
  background: rgba(255,255,255,0.04);
  color: var(--ng-text);
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border 0.2s ease, background 0.2s ease;
}
.ng-search-box input:focus {
  border-color: var(--ng-accent);
  background: rgba(255,255,255,0.06);
  outline: none;
}

/* Genre Bar */
.ng-genre-bar {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 8px 2px 10px;
  margin-bottom: 14px;
  scroll-behavior: smooth;
}
.genre-btn {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  color: var(--ng-text);
  border: 1px solid var(--ng-border);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 0.9rem;
}
.genre-btn:hover {
  background: var(--ng-accent);
  color: #000;
}
.genre-btn.active {
  background: var(--ng-accent);
  color: #000;
  box-shadow: 0 0 6px var(--ng-accent);
}

/* ================================================
   SERIES LIST (LIST VIEW)
   ================================================ */
.ng-series-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  margin: 0;
}

.ng-series-item {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--ng-card);
  border-radius: 10px;
  padding: 10px 12px;
  transition: transform 0.16s ease, background 0.12s ease, box-shadow 0.12s ease;
  overflow: hidden;
  box-sizing: border-box;
}
.ng-series-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--ng-shadow);
}

/* Thumbnail */
.ng-series-thumb {
  flex-shrink: 0;
  width: 120px;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.02));
}
.ng-series-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.ng-series-thumb:hover img {
  transform: scale(1.06);
}

/* Badge END */
.ng-badge-end {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #ff3b3b, #7a0000);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(255,0,0,0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 3;
}

/* Info */
.ng-series-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  gap: 6px;
  min-width: 0;
}
.ng-series-info a {
  color: inherit;
  text-decoration: none;
}

.ng-series-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ng-text);
}

.ng-desc {
  margin: 0;
  color: var(--ng-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

/* ================================================
   PAGINATION (Compact Ellipsis Style)
   ================================================ */
.ng-pagination {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.ng-pagination button {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--ng-border);
  background: rgba(255,255,255,0.04);
  color: var(--ng-text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ng-pagination button:hover {
  background: var(--ng-accent);
  color: #000;
  transform: translateY(-1px);
}
.ng-pagination button.active {
  background: var(--ng-accent);
  color: #000;
  box-shadow: 0 0 6px var(--ng-accent);
}
.ng-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ng-pagination span {
  color: var(--ng-muted);
  user-select: none;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 900px) {
  .ng-series-thumb {
    width: 110px;
    height: 150px;
  }
  .ng-series-item {
    gap: 12px;
    padding: 10px;
  }
  .ng-series-info h3 {
    font-size: 0.95rem;
  }
}

@media (max-width: 600px) {
  .ng-allseries {
    padding: 10px;
  }
  .ng-series-thumb {
    width: 90px;
    height: 120px;
    border-radius: 6px;
  }
  .ng-series-info h3 {
    font-size: 0.9rem;
  }
  .ng-desc {
    display: none;
  }
  .genre-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}

/* ================================================
   ACCESSIBILITY FOCUS
   ================================================ */
.genre-btn:focus,
#completedBtn:focus,
.ng-search-box input:focus,
.ng-pagination button:focus {
  outline: 2px solid rgba(0,183,255,0.25);
  outline-offset: 2px;
  box-shadow: 0 0 8px rgba(0,183,255,0.15);
}