/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TUMANHWAONLINE â€” Estilo ClÃ¡sico 2012 (Minimalista & Funcional)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Estilos Generales â”€â”€ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #eef2f5;
  color: #333333;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: #2980b9;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;
}

/* â”€â”€ Topbar (Fila de arriba) â”€â”€ */
.topbar {
  background-color: #2c3e50;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 2px solid #34495e;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-section a {
  color: #f1c40f;
  margin-left: 10px;
  font-weight: bold;
}

.auth-section span {
  color: #bdc3c7;
}

.auth-section .username-tag {
  color: #2ecc71;
  font-weight: bold;
}

.auth-section .logout-btn {
  color: #e74c3c;
  cursor: pointer;
  margin-left: 10px;
}

/* â”€â”€ Header â”€â”€ */
.header {
  background-color: #ffffff;
  padding: 20px 0;
  border-bottom: 1px solid #d6dbdf;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.logo-main {
  font-size: 28px;
  font-weight: bold;
  color: #c0392b; /* Rojo clásico */
  letter-spacing: -1px;
  line-height: 1;
}

.logo-tag {
  font-size: 11px;
  background-color: #2c3e50;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  line-height: 1.2;
}

.logo-symbol {
  font-size: 24px;
  line-height: 1;
}

/* Buscador ClÃ¡sico */
.search-box {
  display: flex;
  border: 1px solid #cccccc;
  background-color: #ffffff;
  border-radius: 4px;
  overflow: hidden;
}

.search-box input {
  padding: 8px 12px;
  width: 250px;
  font-size: 13px;
  border: none;
  outline: none;
}

.search-box button {
  background-color: #c0392b;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  font-weight: bold;
  cursor: pointer;
}

.search-box button:hover {
  background-color: #a93226;
}

/* â”€â”€ NavegaciÃ³n Principal â”€â”€ */
.nav {
  background-color: #34495e;
  border-bottom: 3px solid #2c3e50;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
}

.nav-link {
  color: #ffffff;
  padding: 12px 18px;
  font-weight: bold;
  display: inline-block;
}

.nav-link:hover, .nav-link.active {
  background-color: #2c3e50;
  text-decoration: none;
}

.nav-link.text-red {
  color: #e74c3c;
}

.nav-link.text-red:hover, .nav-link.text-red.active {
  background-color: #c0392b;
  color: #ffffff !important;
}

.btn-subir {
  background-color: #27ae60;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 3px;
  font-weight: bold;
  font-size: 12px;
}

.btn-subir:hover {
  background-color: #219653;
}

/* â”€â”€ Layout de Dos Columnas (PC) â”€â”€ */
.main-layout {
  display: flex;
  margin-top: 20px;
  margin-bottom: 40px;
  gap: 20px;
}

.content-col {
  flex: 3;
  min-width: 0; /* previene desbordes en flex */
}

.sidebar-col {
  flex: 1;
}

/* â”€â”€ Paneles y Bloques ClÃ¡sicos â”€â”€ */
.section-title {
  font-size: 16px;
  font-weight: bold;
  color: #2c3e50;
  border-bottom: 2px solid #34495e;
  padding-bottom: 6px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.panel {
  background-color: #ffffff;
  border: 1px solid #d6dbdf;
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-header {
  background-color: #f2f4f4;
  border-bottom: 1px solid #d6dbdf;
  padding: 8px 12px;
  font-weight: bold;
  color: #34495e;
  font-size: 13px;
}

.panel-body {
  padding: 12px;
}

/* â”€â”€ Grilla de Mangas â”€â”€ */
.manga-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 15px;
}

.manga-card {
  background-color: #ffffff;
  border: 1px solid #d6dbdf;
  border-radius: 3px;
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
}

.manga-card:hover {
  border-color: #c0392b;
}

.card-cover-wrap {
  position: relative;
  aspect-ratio: 3/4.2;
  overflow: hidden;
  background-color: #eaeded;
  margin-bottom: 8px;
}

.card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-cover.nsfw-blur {
  filter: blur(10px);
}

.badge-tipo {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  background-color: #2c3e50;
  color: #ffffff;
  padding: 1px 4px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 2px;
}

.badge-nsfw {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  background-color: #c0392b;
  color: #ffffff;
  padding: 1px 4px;
  font-weight: bold;
  border-radius: 2px;
}

.card-title {
  font-size: 12px;
  font-weight: bold;
  color: #2c3e50;
  line-height: 1.3;
  height: 32px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  font-size: 11px;
  color: #7f8c8d;
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
}

/* â”€â”€ Vista Detalle ClÃ¡sica â”€â”€ */
.manga-detail {
  background-color: #ffffff;
  border: 1px solid #d6dbdf;
  border-radius: 4px;
  padding: 20px;
}

.detail-header {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid #eaeded;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.detail-cover {
  width: 160px;
  border: 1px solid #bdc3c7;
  padding: 4px;
  background-color: #ffffff;
}

.detail-cover img {
  width: 100%;
  display: block;
}

.detail-info {
  flex: 1;
}

.detail-title {
  font-size: 22px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 10px;
}

.detail-meta-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
  margin-bottom: 15px;
}

.detail-meta-table td {
  padding: 4px 8px;
}

.detail-meta-table td:first-child {
  font-weight: bold;
  color: #7f8c8d;
  width: 120px;
}

.detail-actions {
  display: flex;
  gap: 10px;
}

.btn-classic-red {
  background-color: #c0392b;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
}

.btn-classic-red:hover {
  background-color: #a93226;
}

.btn-classic-grey {
  background-color: #7f8c8d;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
}

.btn-classic-grey:hover {
  background-color: #95a5a6;
}

.detail-synopsis {
  font-size: 13px;
  line-height: 1.6;
  color: #555555;
  background-color: #fafbfc;
  padding: 12px;
  border: 1px dashed #d6dbdf;
  margin-bottom: 20px;
}

/* Lista de CapÃ­tulos ClÃ¡sica */
.chapter-list {
  list-style: none;
  border: 1px solid #d6dbdf;
  border-radius: 3px;
}

.chapter-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  border-bottom: 1px solid #eaeded;
  background-color: #ffffff;
  cursor: pointer;
}

.chapter-row:last-child {
  border-bottom: none;
}

.chapter-row:hover {
  background-color: #f8f9f9;
}

.chapter-row.read .chapter-name {
  color: #95a5a6;
}

.chapter-name {
  font-weight: bold;
  color: #2980b9;
}

.chapter-uploader {
  font-size: 11px;
  color: #7f8c8d;
  margin-left: 8px;
}

.chapter-date {
  color: #7f8c8d;
  font-size: 12px;
}

/* â”€â”€ Vista Lector ClÃ¡sica (Apilada verticalmente) â”€â”€ */
.lector-container {
  background-color: #1a1a1a;
  padding: 20px 0;
  border-radius: 4px;
}

.lector-header {
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #2c3e50;
  margin-bottom: 15px;
  border-radius: 3px;
}

.lector-title {
  font-weight: bold;
  font-size: 15px;
}

.btn-cerrar-lector {
  background-color: #e74c3c;
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  font-weight: bold;
  cursor: pointer;
}

.lector-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.lector-page-placeholder {
  width: 100%;
  max-width: 700px;
  background: #333333;
  color: #888888;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  border: 1px solid #444444;
}

.lector-nav-bottom {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

/* â”€â”€ Modales ClÃ¡sicos â”€â”€ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background-color: #ffffff;
  border-radius: 4px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  overflow: hidden;
}

.modal-header {
  background-color: #2c3e50;
  color: #ffffff;
  padding: 12px 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header .close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
}

.modal-body {
  padding: 15px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 12px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #cccccc;
  border-radius: 3px;
  font-size: 13px;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #3498db;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.checkbox-group input {
  width: auto;
}

.btn-submit {
  background-color: #2c3e50;
  color: #ffffff;
  border: none;
  width: 100%;
  padding: 10px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
}

.btn-submit:hover {
  background-color: #34495e;
}

.modal-footer-text {
  font-size: 12px;
  text-align: center;
  margin-top: 10px;
  color: #7f8c8d;
}

/* â”€â”€ Panel de GÃ©neros (Sidebar) â”€â”€ */
.genre-list {
  list-style: none;
}

.genre-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px solid #eaeded;
  font-size: 12px;
  cursor: pointer;
}

.genre-item:hover {
  background-color: #f2f4f4;
  color: #c0392b;
}

.genre-item.active {
  font-weight: bold;
  color: #c0392b;
}

.genre-count {
  color: #95a5a6;
}

.stats-table {
  width: 100%;
  font-size: 12px;
}

.stats-table td {
  padding: 4px 0;
}

.text-right {
  text-align: right;
  font-weight: bold;
}

.disclaimer-panel p {
  font-size: 11px;
  color: #7f8c8d;
  line-height: 1.4;
}

/* â”€â”€ Toast â”€â”€ */
.toast-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #333333;
  color: #ffffff;
  padding: 10px 20px;
  font-size: 13px;
  border-radius: 3px;
  display: none;
  z-index: 2000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* â”€â”€ Footer â”€â”€ */
.footer {
  background-color: #2c3e50;
  color: #bdc3c7;
  padding: 20px 0;
  font-size: 12px;
  border-top: 3px solid #c0392b;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  color: #ffffff;
  margin-left: 15px;
}

.footer-disclaimer {
  font-size: 10px;
  color: #95a5a6;
  text-align: center;
  margin-top: 10px;
}

/* â”€â”€ Adaptabilidad MÃ³vil (Responsive) â”€â”€ */
@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
  }
  
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .search-box {
    width: 100%;
  }
  
  .search-box input {
    width: 100%;
  }

  .nav-inner {
    flex-direction: column;
    padding: 10px 15px;
    gap: 10px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 12px;
  }

  .btn-subir {
    width: 100%;
    text-align: center;
  }

  .detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .detail-meta-table td:first-child {
    width: 90px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    margin-top: 10px;
  }
  
  .footer-links a {
    margin: 0 8px;
  }
}

/* â”€â”€ Recomendados / Destacados de la Semana â”€â”€ */
.recommended-section {
  background-color: #ffffff;
  border: 1px solid #d6dbdf;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
}

.recommended-title {
  font-size: 14px;
  font-weight: bold;
  color: #2c3e50;
  border-bottom: 1px solid #eaeded;
  padding-bottom: 5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.recommended-item {
  display: flex;
  gap: 10px;
  cursor: pointer;
}

.recommended-item:hover .rec-title {
  color: #c0392b;
  text-decoration: underline;
}

.rec-cover {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border: 1px solid #bdc3c7;
  flex-shrink: 0;
}

.rec-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.rec-title {
  font-size: 12px;
  font-weight: bold;
  color: #2c3e50;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-meta {
  font-size: 11px;
  color: #7f8c8d;
  margin-top: 3px;
}

/* â”€â”€ SecciÃ³n de Comentarios ClÃ¡sica â”€â”€ */
.comments-section {
  margin-top: 25px;
  background-color: #ffffff;
  border: 1px solid #d6dbdf;
  border-radius: 4px;
  padding: 20px;
}

.comment-form {
  margin-bottom: 20px;
  border-bottom: 1px solid #eaeded;
  padding-bottom: 15px;
}

.comment-input-area {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.comment-input-area textarea {
  flex: 1;
  padding: 10px;
  border: 1px solid #cccccc;
  border-radius: 3px;
  font-size: 13px;
  resize: vertical;
  outline: none;
}

.comment-input-area textarea:focus {
  border-color: #3498db;
}

.btn-comentar {
  background-color: #2c3e50;
  color: #ffffff;
  border: none;
  padding: 0 20px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
}

.btn-comentar:hover {
  background-color: #34495e;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  border-bottom: 1px solid #eaeded;
  padding-bottom: 10px;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-meta {
  font-size: 11px;
  color: #7f8c8d;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.comment-author {
  font-weight: bold;
  color: #34495e;
}

.comment-author.uploader-author {
  color: #c0392b;
}

.comment-content {
  font-size: 13px;
  color: #444444;
  line-height: 1.4;
}

/* â”€â”€ Mejoras al Listado de CapÃ­tulos y Subida â”€â”€ */
.chapters-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.btn-agregar-cap {
  background-color: #27ae60;
  color: #ffffff;
  border: none;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
}

.btn-agregar-cap:hover {
  background-color: #219653;
}

/* â”€â”€ Ajustes del Lector ClÃ¡sico â”€â”€ */
.lector-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  background-color: #34495e;
  padding: 10px;
  color: #ffffff;
  font-weight: bold;
}

.lector-toolbar select {
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  border: none;
}

@media (max-width: 768px) {
  .recommended-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .recommended-grid {
    grid-template-columns: 1fr;
  }
}

/* â”€â”€ Comentarios del Lector (Modo Oscuro) â”€â”€ */
.lector-comments {
  max-width: 700px;
  margin: 30px auto 10px;
  background-color: #222222;
  border: 1px solid #333333;
  padding: 15px;
  border-radius: 4px;
  color: #ffffff;
  text-align: left; /* Asegura alineaciÃ³n correcta a la izquierda */
}

.lector-comments-title {
  font-size: 13px;
  font-weight: bold;
  border-bottom: 1px solid #333333;
  padding-bottom: 6px;
  margin-bottom: 12px;
  text-transform: uppercase;
  color: #f1c40f;
}

.lector-comment-form {
  margin-bottom: 15px;
}

.lector-comment-lock {
  background-color: #2c3e50;
  border: 1px solid #34495e;
  padding: 12px;
  border-radius: 3px;
  font-size: 12px;
  text-align: center;
  color: #ffffff;
}

.lector-comment-lock .btn-classic-red {
  display: inline-block;
  vertical-align: middle;
  padding: 4px 10px;
  font-size: 11px;
  margin-top: 5px;
}

.lector-comment-form .comment-input-area {
  display: flex;
  gap: 10px;
}

.lector-comment-form textarea {
  flex: 1;
  background-color: #1a1a1a;
  border: 1px solid #444444;
  color: #ffffff;
  padding: 10px;
  border-radius: 3px;
  font-size: 12px;
  resize: vertical;
  outline: none;
}

.lector-comment-form textarea:focus {
  border-color: #f1c40f;
}

.lector-comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.lector-comment-item {
  background-color: #1c1c1c;
  border: 1px solid #2a2a2a;
  padding: 8px 12px;
  border-radius: 3px;
}

.lector-comment-meta {
  font-size: 11px;
  color: #888888;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.lector-comment-author {
  font-weight: bold;
  color: #f1c40f;
}

.lector-comment-author.uploader-author {
  color: #e74c3c;
}

.lector-comment-content {
  font-size: 12px;
  color: #dddddd;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .lector-comments {
    width: 95%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* â”€â”€ Historial de Lectura en el Home â”€â”€ */
.history-section {
  background-color: #ffffff;
  border: 1px solid #d6dbdf;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
}

.history-title {
  font-size: 13px;
  font-weight: bold;
  color: #2c3e50;
  border-bottom: 1px solid #eaeded;
  padding-bottom: 5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.history-grid {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.history-grid::-webkit-scrollbar {
  height: 4px;
}
.history-grid::-webkit-scrollbar-thumb {
  background-color: #bdc3c7;
  border-radius: 2px;
}

.history-item {
  display: flex;
  background-color: #f8f9f9;
  border: 1px solid #e5e8e8;
  border-radius: 3px;
  padding: 6px;
  min-width: 220px;
  max-width: 260px;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.history-item:hover {
  border-color: #c0392b;
}

.history-cover {
  width: 35px;
  height: 50px;
  object-fit: cover;
  border: 1px solid #d6dbdf;
}

.history-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.history-manga-title {
  font-size: 12px;
  font-weight: bold;
  color: #2c3e50;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-chapter {
  font-size: 11px;
  color: #27ae60;
  font-weight: bold;
  margin-top: 2px;
}

/* â”€â”€ ClasificaciÃ³n en Biblioteca (Botones) â”€â”€ */
.library-badge {
  font-size: 9px;
  background-color: #3498db;
  color: #ffffff;
  padding: 2px 5px;
  border-radius: 2px;
  font-weight: bold;
  text-transform: uppercase;
}

.library-badge.leyendo { background-color: #27ae60; }
.library-badge.pendiente { background-color: #f1c40f; color: #333333; }
.library-badge.completado { background-color: #9b59b6; }

/* â”€â”€ Ajustes Lector: Selector de Modo e BotÃ³n Reportar â”€â”€ */
.lector-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lector-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-reportar-error {
  background-color: #e74c3c;
  color: #ffffff;
  border: none;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
}

.btn-reportar-error:hover {
  background-color: #c0392b;
}

/* Modo de lectura PÃ¡gina a PÃ¡gina */
.lector-page-single {
  display: none;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border: 1px solid #444444;
}

.lector-page-single.active {
  display: block;
}

.single-page-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 15px 0;
  color: #ffffff;
}

.btn-page-nav {
  background-color: #34495e;
  border: 1px solid #444444;
  color: #ffffff;
  padding: 6px 15px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
}

.btn-page-nav:hover {
  background-color: #2c3e50;
}

/* â”€â”€ Ajuste de Grilla de Mangas para MÃ³viles PequeÃ±os â”€â”€ */
@media (max-width: 480px) {
  .manga-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* Fuerza 2 columnas limpias en celulares */
    gap: 8px !important;
  }
  .manga-card {
    padding: 6px !important;
  }
  .card-title {
    font-size: 11px !important;
    height: 28px !important;
  }
  .recommended-grid {
    grid-template-columns: 1fr !important;
  }
  .container {
    padding: 0 8px !important;
  }
}

/* â”€â”€ Inputs de Archivo (Subida desde PC/Celular) â”€â”€ */
input[type="file"] {
  display: block;
  width: 100%;
  padding: 8px;
  border: 2px dashed #bdc3c7;
  border-radius: 4px;
  background-color: #f9f9f9;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  box-sizing: border-box;
}

input[type="file"]:hover {
  border-color: #c0392b;
  background-color: #fdf3f3;
}

/* â”€â”€ Barra de progreso de subida de capÃ­tulo â”€â”€ */
.upload-progress-bar-wrap {
  background: #eaeded;
  border: 1px solid #d6dbdf;
  border-radius: 4px;
  height: 16px;
  overflow: hidden;
  margin-top: 8px;
}
.upload-progress-bar {
  height: 100%;
  background: #27ae60;
  width: 0%;
  transition: width 0.2s;
}

/* â”€â”€ Avatar de Perfil como Imagen â”€â”€ */
#profile-avatar-img {
  border: 3px solid #2c3e50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* â”€â”€ Estilos de listas laterales de estadÃ­sticas â”€â”€ */
.sidebar-list {
  display: flex;
  flex-direction: column;
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #eaeded;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 12px;
}

.sidebar-item:last-child {
  border-bottom: none;
}

.sidebar-item:hover {
  background-color: #fcfcfc;
}

.sidebar-item:hover .sidebar-item-title {
  color: #c0392b;
}

.sidebar-item-num {
  font-weight: bold;
  font-size: 13px;
  color: #7f8c8d;
  width: 20px;
}

.sidebar-item-title {
  flex: 1;
  color: #34495e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 5px;
}

.sidebar-item-meta {
  font-size: 10px;
  color: #95a5a6;
  background-color: #f2f4f4;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
}


/* -- Zona Drag & Drop de Capítulo -- */
.upch-dropzone {
  position: relative;
  border: 2px dashed #bdc3c7;
  border-radius: 6px;
  background: #f9f9f9;
  padding: 24px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.upch-dropzone:hover, .upch-dropzone.drag-over { border-color: #c0392b; background-color: #fdf3f3; }
.upch-dropzone-icon { font-size: 28px; line-height: 1; }
.upch-dropzone-text { font-size: 13px; color: #2c3e50; }
.upch-dropzone-hint { font-size: 11px; color: #7f8c8d; }

/* -- Cuadrícula de Miniaturas -- */
.upch-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin-top: 8px; }
.upch-thumb-wrap { position: relative; aspect-ratio: 2/3; border-radius: 4px; overflow: hidden; border: 1px solid #ddd; background: #f0f0f0; }
.upch-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upch-thumb-num { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.55); color: #fff; font-size: 9px; text-align: center; padding: 2px 0; }
.upch-thumb-del { position: absolute; top: 2px; right: 2px; background: rgba(192,57,43,0.85); color: #fff; border: none; border-radius: 50%; width: 16px; height: 16px; font-size: 9px; line-height: 16px; cursor: pointer; padding: 0; display: none; }
.upch-thumb-wrap:hover .upch-thumb-del { display: block; }

/* ===================================================
   OPTIMIZACIONES MÓVILES (TuManhwaOnline Responsive)
   =================================================== */

/* Botón del menú móvil (oculto en escritorio) */
.nav-mobile-toggle {
  display: none;
  width: 100%;
  padding: 10px;
  background-color: #2c3e50;
  color: #fff;
  border: 1px solid #34495e;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 13px;
  text-align: center;
  margin-bottom: 5px;
}

@media (max-width: 768px) {
  /* 1. Header y Logo en móvil */
  .header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
  }
  .logo {
    text-align: center;
    margin-bottom: 2px;
  }
  .search-box {
    width: 100% !important;
    display: flex;
  }
  .search-box input {
    flex: 1;
  }

  /* 2. Menú de navegación colapsable en móvil */
  .nav-mobile-toggle {
    display: block; /* Mostrar botón de menú */
  }
  
  .nav-inner {
    flex-direction: column;
    padding: 8px 10px;
  }

  .nav-links {
    display: none; /* Ocultar links por defecto */
    flex-direction: column;
    width: 100%;
    gap: 4px;
    margin-top: 5px;
    background-color: #f8f9f9;
    border: 1px solid #eaeded;
    border-radius: 4px;
    padding: 8px;
  }

  .nav-links.show {
    display: flex; /* Mostrar cuando tenga clase .show */
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-bottom: 1px solid #eaeded;
    box-sizing: border-box;
    font-size: 13px;
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }

  .btn-subir {
    width: 100% !important;
    margin-top: 8px;
    box-sizing: border-box;
    padding: 11px !important;
    font-size: 13px;
  }

  /* 3. Ajustes de Topbar */
  .topbar-inner {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 6px 10px;
  }
  .welcome-text {
    font-size: 10px;
  }
  .auth-section {
    font-size: 11px;
  }

  /* 4. Vista de Detalle del Manga en celular */
  .manga-detail {
    padding: 12px;
  }
  .detail-header {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  .detail-cover {
    width: 180px;
    margin: 0 auto;
  }
  .detail-cover img {
    width: 100%;
    height: auto;
  }
  .detail-info {
    width: 100%;
  }
  .detail-title {
    font-size: 18px;
    text-align: center;
  }
  .detail-meta-table {
    width: 100%;
    font-size: 12px;
    margin: 10px 0;
  }
  .detail-meta-table td {
    padding: 5px 2px;
  }
  .detail-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .detail-actions button {
    width: 100%;
    margin: 0 !important;
    padding: 12px;
    font-size: 13px;
  }

  /* 5. Comentarios y Formularios */
  .comment-input-area {
    flex-direction: column;
    gap: 8px;
  }
  .comment-input-area textarea {
    width: 100% !important;
    box-sizing: border-box;
  }
  .btn-comentar {
    width: 100%;
  }

  /* 6. Lector de Capítulos en celular */
  .lector-toolbar {
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }
  .lector-toolbar-left {
    width: 100%;
    justify-content: space-between;
  }
  .lector-toolbar-right {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .lector-toolbar-right button {
    flex: 1;
    padding: 8px;
    font-size: 11px;
  }
  .lector-nav-bottom {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }
  .lector-nav-bottom button {
    width: 100%;
    padding: 12px;
    font-size: 13px;
  }

  /* 7. Modales en móvil */
  .modal-box {
    width: 92% !important;
    margin: 20px auto;
    padding: 15px;
  }
  
  .upch-dropzone {
    padding: 15px 10px;
  }
}

/* â•â•â•â• Selector de GÃ©neros en Subida â•â•â•â• */
.genres-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid #eaeded;
  padding: 10px;
  border-radius: 4px;
  background-color: #fcfcfc;
}

.genre-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #f2f4f4;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  border: 1px solid #bdc3c7;
  color: #34495e;
}

.genre-checkbox-label:hover {
  background-color: #eaeded;
  border-color: #7f8c8d;
}

.genre-checkbox-label input {
  display: none;
}

.genre-checkbox-label.selected {
  background-color: #e74c3c;
  color: #fff;
  border-color: #c0392b;
  font-weight: bold;
}

/* â•â•â•â• Avatar en barra superior â•â•â•â• */
.topbar-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #eaeded;
}

.topbar-avatar-fallback {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #c0392b;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 11px;
  border: 1px solid #eaeded;
  text-shadow: 1px 1px 0px rgba(0,0,0,0.15);
}

/* â•â•â•â• CalificaciÃ³n de Obras (Estrellas) â•â•â•â• */
.star-rating-wrap {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}

.star-rating-btn {
  font-size: 22px;
  color: #bdc3c7; /* Color gris de estrella vacÃ­a */
  cursor: pointer;
  transition: color 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.star-rating-btn.active {
  color: #f1c40f; /* Color amarillo oro */
}

/* Efecto hover interactivo */
.star-rating-wrap:hover .star-rating-btn {
  color: #bdc3c7; /* Resetea todas a gris cuando el cursor entra en el bloque */
}

.star-rating-wrap .star-rating-btn:hover,
.star-rating-wrap .star-rating-btn:hover ~ .star-rating-btn {
  color: #f1c40f; /* Colorea de dorado la estrella sobre la que estÃ¡s y las anteriores */
}

.star-rating-btn:active {
  transform: scale(1.2);
}

/* â•â•â•â• ModeraciÃ³n de Administrador â•â•â•â• */
.btn-delete-comment {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 11px;
  cursor: pointer;
  margin-left: auto; /* Alinear a la derecha si es posible */
  padding: 0;
  font-weight: 500;
  transition: color 0.15s ease;
}

.btn-delete-comment:hover {
  color: #c0392b;
  text-decoration: underline;
}

.btn-admin-delete {
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-admin-delete:hover {
  background-color: #922b21 !important;
}

.btn-admin-delete:active {
  transform: scale(0.98);
}

/* ══════════════════════════════════════════════
   NUEVOS ESTILOS PREMIUM
   ══════════════════════════════════════════════ */

/* ── Tarjetas y Progreso de Lectura ── */
.card-progress-bar-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: rgba(0, 0, 0, 0.4);
  display: block;
  z-index: 5;
}

.card-progress-bar {
  height: 100%;
  background-color: #2ecc71; /* Verde brillante */
  transition: width 0.3s ease;
  width: 0%;
}

.card-progress-text {
  position: absolute;
  bottom: 6px;
  right: 4px;
  font-size: 9px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: bold;
  pointer-events: none;
  z-index: 5;
}

/* ── Pestañas de la Biblioteca ── */
.library-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #bdc3c7;
  padding-bottom: 10px;
}

.lib-tab {
  background: #eaeded;
  border: 1px solid #bdc3c7;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: bold;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lib-tab:hover {
  background: #d5dbdb;
}

.lib-tab.active {
  background: #c0392b;
  color: #ffffff;
  border-color: #c0392b;
}

/* ── Carrusel / Slider de Destacados ── */
.carousel-container {
  position: relative;
  width: 100%;
  height: 250px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  background: #000000;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-cover-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: blur(1.5px) brightness(0.65);
  transform: scale(1.05);
  transition: transform 0.5s ease;
}

.carousel-slide:hover .carousel-cover-bg {
  transform: scale(1.0);
}

.carousel-info {
  position: relative;
  z-index: 10;
  padding: 20px 60px 20px 20px;
  color: #ffffff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  width: 100%;
}

.carousel-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.carousel-desc {
  font-size: 12px;
  color: #dddddd;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  max-width: 80%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-meta {
  font-size: 11px;
  color: #f1c40f;
  font-weight: bold;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  color: #ffffff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: rgba(192, 57, 43, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 15;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-dot.active {
  background: #c0392b;
  transform: scale(1.2);
  width: 16px;
  border-radius: 4px;
}

/* ── Gamificación y Marcos de Avatar ── */
.xp-badge {
  font-size: 10px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: bold;
  margin-left: 6px;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  vertical-align: middle;
}

.topbar-avatar, .topbar-avatar-fallback {
  position: relative;
  border-radius: 50%;
  object-fit: cover;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.topbar-avatar {
  width: 28px;
  height: 28px;
  vertical-align: middle;
}

.topbar-avatar-fallback {
  width: 28px;
  height: 28px;
  background-color: #34495e;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 13px;
  vertical-align: middle;
}

.border-lvl-1 {
  border: 2px solid #bdc3c7; /* Hierro / Gris */
}

.border-lvl-2 {
  border: 2px solid #cd7f32; /* Bronce */
  box-shadow: 0 0 4px #cd7f32;
}

.border-lvl-3 {
  border: 2px solid #c0c0c0; /* Plata */
  box-shadow: 0 0 6px #c0c0c0;
}

.border-lvl-4 {
  border: 2px solid #ffd700; /* Oro */
  box-shadow: 0 0 8px #ffd700;
  animation: aura-oro 2s infinite ease-in-out;
}

.border-lvl-5 {
  border: 2px solid #ff007f; /* Rubí / Leyenda */
  box-shadow: 0 0 12px #ff007f;
  animation: aura-rubi 1.5s infinite ease-in-out;
}

@keyframes aura-oro {
  0%, 100% {
    box-shadow: 0 0 4px #ffd700;
  }
  50% {
    box-shadow: 0 0 10px #ffd700;
  }
}

@keyframes aura-rubi {
  0%, 100% {
    box-shadow: 0 0 6px #ff007f;
  }
  50% {
    box-shadow: 0 0 16px #ff007f;
  }
}



/* ── Barra de Filtros del Catálogo ── */
.catalog-filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  background-color: #ffffff;
  border: 1px solid #d6dbdf;
  border-radius: 4px;
  padding: 10px 15px;
  margin-bottom: 20px;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 12px;
  font-weight: bold;
  color: #34495e;
}

.filter-group select {
  padding: 6px 10px;
  border: 1px solid #cccccc;
  border-radius: 3px;
  font-size: 12px;
  background: #ffffff;
  outline: none;
  cursor: pointer;
}

.filter-group select:focus {
  border-color: #c0392b;
}

@media (max-width: 768px) {
  .catalog-filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .filter-group {
    justify-content: space-between;
  }
}



