.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.manga-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  padding: 3rem 0 2rem;
  margin-bottom: 3rem;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(25px) brightness(0.3);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(10, 10, 30, 0.4) 0%, rgba(10, 10, 30, 0.85) 70%, rgba(10, 10, 30, 1) 100%);
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  display: flex;
  gap: 2rem;
  align-items: flex-end;
}

.manga-cover {
  flex-shrink: 0;
  width: 220px;
}

.manga-cover img,
.manga-cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  border: 2px solid rgba(0, 212, 255, 0.5);
  box-shadow: 0 10px 40px rgba(0, 212, 255, 0.3);
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.manga-cover img:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 50px rgba(0, 212, 255, 0.5);
}

.manga-cover-placeholder {
  background: linear-gradient(135deg, #1a1a3e 0%, #0f0f2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.manga-details {
  flex: 1;
  min-width: 0;
}

.manga-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
  margin: 0 0 1.5rem 0;
  line-height: 1.2;
}

.manga-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category {
  background: linear-gradient(135deg, #00d4ff 0%, #0080ff 100%);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.category-empty {
  background: linear-gradient(135deg, #555 0%, #333 100%);
  box-shadow: none;
}

.stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 500;
}

.stat svg {
  color: #00d4ff;
}

.like-stat {
  display: flex;
  align-items: center;
}

.btn-like {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(26, 26, 62, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-like:hover:not(:disabled) {
  border-color: #ff1744;
  background: rgba(255, 23, 68, 0.15);
  transform: scale(1.05);
}

.btn-like:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-like.liked {
  background: rgba(255, 23, 68, 0.2);
  border-color: #ff1744;
  color: #ff1744;
  box-shadow: 0 4px 15px rgba(255, 23, 68, 0.3);
}

.btn-like.liked:hover {
  background: rgba(255, 23, 68, 0.3);
  transform: scale(1.05);
}

.btn-like svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.btn-like.liked svg {
  color: #ff1744;
  animation: heartBeat 0.5s ease;
}

.btn-like:active:not(:disabled) {
  transform: scale(0.95);
}

@keyframes heartBeat {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.3);
  }
  50% {
    transform: scale(1.1);
  }
}

.library-controls {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.status-filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(26, 26, 62, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.65rem 1.25rem;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.filter-count {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.filter-all.active {
  background: rgba(0, 150, 255, 0.9);
  border-color: #0096ff;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 150, 255, 0.5);
}

.filter-all:hover {
  border-color: #0096ff;
  background: rgba(0, 150, 255, 0.2);
}

.filter-siguiendo.current-status {
  background: rgba(26, 26, 62, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-siguiendo:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(26, 26, 62, 1);
}

.filter-finalizado.current-status {
  background: rgba(26, 26, 62, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-finalizado:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(26, 26, 62, 1);
}

.filter-pendiente.current-status {
  background: rgba(255, 149, 0, 0.15);
  border-color: #ff9500;
  color: #ff9500;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.filter-pendiente:hover {
  border-color: #ff9500;
  background: rgba(255, 149, 0, 0.25);
}

.filter-abandonado.current-status {
  background: rgba(26, 26, 62, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-abandonado:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(26, 26, 62, 1);
}

.filter-btn:active {
  transform: scale(0.98);
}

.btn-add-library {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #00d4ff 0%, #0080ff 100%);
  border: none;
  color: #fff;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

.btn-add-library:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 30px rgba(0, 212, 255, 0.6);
}

.btn-add-library:active {
  transform: translateY(-1px);
}

.btn-remove-library {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 77, 77, 0.1);
  border: 2px solid rgba(255, 77, 77, 0.3);
  color: #ff4d4d;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-remove-library:hover {
  background: rgba(255, 77, 77, 0.2);
  border-color: rgba(255, 77, 77, 0.6);
  box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3);
  transform: translateY(-2px);
}

.btn-remove-library:active {
  transform: translateY(0);
}

.description-section {
  padding: 2rem 0;
  background: transparent;
}

.description-card {
  background: rgba(26, 26, 62, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
  margin: 0 0 1.5rem 0;
}

.section-heading .count {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.description-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

.chapters-section {
  padding: 3rem 0;
  background: transparent;
}

.chapters-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chapter-card-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chapter-checkbox {
  position: relative;
  flex-shrink: 0;
}

.chapter-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

.chapter-checkbox label {
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(0, 212, 255, 0.5);
  border-radius: 6px;
  background: rgba(26, 26, 62, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.chapter-checkbox label::after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid #00d4ff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.chapter-checkbox input[type="checkbox"]:checked + label {
  background: rgba(0, 212, 255, 0.2);
  border-color: #00d4ff;
}

.chapter-checkbox input[type="checkbox"]:checked + label::after {
  display: block;
}

.chapter-checkbox label:hover {
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.chapter-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(26, 26, 62, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(0, 212, 255, 0.15);
  text-decoration: none;
  transition: all 0.3s ease;
  flex: 1;
}

.chapter-card:hover {
  background: rgba(26, 26, 62, 0.8);
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 6px 25px rgba(0, 212, 255, 0.25);
  transform: translateX(8px);
}

.chapter-number {
  background: linear-gradient(135deg, #00d4ff 0%, #0080ff 100%);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 50px;
  text-align: center;
}

.chapter-content {
  flex: 1;
  min-width: 0;
}

.chapter-name {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-card:hover .chapter-name {
  color: #00d4ff;
}

.chapter-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  margin: 0;
}

.chapter-icon {
  color: #00d4ff;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.chapter-card:hover .chapter-icon {
  transform: translateX(5px);
}

.empty-state {
  background: rgba(26, 26, 62, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state svg {
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 1.5rem;
}

.empty-state p {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .manga-hero {
    min-height: 350px;
    padding: 2rem 0 1.5rem;
    margin-bottom: 2rem;
  }

  .hero-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .manga-cover {
    width: 180px;
  }

  .manga-title {
    font-size: 2rem;
  }

  .categories {
    justify-content: center;
  }

  .stats {
    justify-content: center;
  }

  .library-controls {
    align-items: stretch;
  }

  .status-filter-buttons {
    justify-content: center;
  }

  .description-card {
    padding: 1.5rem;
  }

  .section-heading {
    font-size: 1.35rem;
  }

  .chapter-card {
    padding: 1rem;
  }

  .chapter-number {
    min-width: 45px;
    padding: 0.4rem 0.75rem;
  }
}

@media (max-width: 576px) {
  .manga-hero {
    min-height: 300px;
  }

  .manga-cover {
    width: 150px;
  }

  .manga-title {
    font-size: 1.75rem;
  }

  .stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  .status-filter-buttons {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
    justify-content: space-between;
  }

  .btn-add-library {
    width: 100%;
    justify-content: center;
  }

  .description-text {
    font-size: 1rem;
  }

  .chapter-card-wrapper {
    gap: 0.5rem;
  }

  .chapter-card {
    gap: 0.75rem;
  }

  .chapter-number {
    font-size: 0.8rem;
    min-width: 40px;
  }

  .chapter-name {
    font-size: 0.95rem;
  }
  .chapter-icon {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-weight: 700;
}

  .chapter-icon.read {
      background: linear-gradient(135deg, #00ffcc, #00c48c);
      color: #002b22;
  }

  .chapter-icon.unread {
      background: rgba(255,255,255,0.1);
      color: rgba(255,255,255,0.7);
  }
}
