/* Pagina de detalle del doujin -  esto es cuando haces click en un doujin para verlo */
/* Estilo inspirado en MyAnimeList: tarjeta con portada a la izquierda e info a la derecha */

.doujin-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Boton de volver atras con animacion de desplazamiento a la izquierda */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
    font-size: 14px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.back-btn:hover {
    color: var(--white);
    transform: translateX(-4px);
}

/* Tarjeta de detalle tipo MAL: portada + informacion lado a lado */
/* flexbox con gap separa la portada de la info */
.doujin-detail-card {
    background: var(--panel);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    gap: 35px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

/* Area de la portada - ancho fijo de 280px (no se achica gracias a flex-shrink: 0) */
.doujin-cover-area {
    flex-shrink: 0;
    width: 280px;
}

.doujin-cover-wrapper {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    background: #111;
}

.doujin-cover-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    /* Efecto de zoom suave al hacer hover en la portada */
    transition: transform 0.5s ease;
}

.doujin-cover-wrapper:hover img {
    transform: scale(1.03);
}

/* Badge NSFW en posicion  absoluta sobre la portada */
.doujin-nsfw-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

/* Columna derecha con la informacion */
.doujin-info-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.doujin-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--white);
    margin-bottom: 5px;
}

/* Titulo original en color rosado para destacar */
.doujin-original-title {
    font-size: 16px;
    color: #ff4e6f;
    margin-bottom: 18px;
    font-weight: 500;
}

/* Fila de metadatos (idioma, parodias, etc) en flex con wrap */
.doujin-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #bbb;
    margin-bottom: 20px;
}

.doujin-meta-item {
    display: inline-flex;
    align-items: center;
}

.doujin-meta-divider {
    color: #555;
}

/* Tags en formato pills redondeadas */
.doujin-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.doujin-tag-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    transition: var(--transition);
}

/* Al hover, el tag se vuelve blanco con texto negro */
.doujin-tag-pill:hover {
    background: var(--white);
    color: #000;
    border-color: var(--white);
}

/* Descripcion con borde izquierdo como cita */
.doujin-description-heading {
    font-size: 16px;
    font-weight: bold;
    color: #ddd;
    margin-bottom: 8px;
}

.doujin-description {
    font-size: 15px;
    color: #bbb;
    line-height: 1.6;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 3px solid rgba(255, 255, 255, 0.2);
}

/* Botones de accion (leer, favorito, etc) */
.doujin-actions-row {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

/* Caja de estadisticas (vistas, favoritos) */
.doujin-stat-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.doujin-stat-value {
    display: flex;
    flex-direction: column;
}

.doujin-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #777;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-top: 2px;
}

.doujin-stat-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

/* Boton de leer principal - blanco con sombra */
.btn-read {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--white);
    color: #000;
    font-weight: bold;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 12px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

/* Efecto de elevacion al hover - sube 2px y la sombra aumenta */
.btn-read:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
}

.btn-read:active {
    transform: translateY(0);
}

/* Estado deshabilitado - gris sin interaccion */
.btn-read.disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-read.disabled:hover {
    transform: none;
}

/* Botones secundarios con borde */
.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #222;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 20px;
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid #444;
}

.btn-link:hover {
    background: #333;
    border-color: #666;
    transform: translateY(-2px);
}

/* Boton solo icono (cuadrado) */
.btn-icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    transition: var(--transition);
}

.btn-icon-only:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Seccion de capitulos */
.chapters-section {
    background: var(--panel);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.chapters-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.chapters-count {
    font-size: 14px;
    color: #888;
}

/* Lista de capitulos apilados verticalmente */
.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Fila de cada capitulo con hover que se desplaza a la derecha */
.chapter-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px 24px;
    transition: var(--transition);
}

.chapter-item-row:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.1);
    /* Efecto de slide a la derecha al hacer hover */
    transform: translateX(4px);
}

.chapter-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Numero de capitulo en badge blanco */
.chapter-item-num {
    background: var(--white);
    color: #000;
    font-weight: bold;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 6px;
    min-width: 32px;
    text-align: center;
}

.chapter-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.chapter-item-date {
    font-size: 13px;
    color: #666;
}

/* Accion "Leer" que se vuelve rosa al hover de la fila */
.chapter-item-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    opacity: 0.8;
    transition: var(--transition);
}

.chapter-item-row:hover .chapter-item-action {
    opacity: 1;
    color: #ff4e6f;
}

/* responsive: en pantallas menores a 900px la tarjeta se apila verticalmente */
/*  aca la portada pasa arriba y la info abajo, centrado */
@media (max-width: 900px) {
    .doujin-detail-card {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }

    .doujin-cover-area {
        width: 100%;
        max-width: 300px;
    }

    .doujin-info-area {
        align-items: center;
        text-align: center;
    }

    .doujin-meta-row {
        justify-content: center;
    }

    .doujin-tags {
        justify-content: center;
    }

    .doujin-actions-row {
        justify-content: center;
        width: 100%;
    }

    .doujin-description {
        width: 100%;
    }
}

/* Seccion de comentarios */
.comments-section { margin-top: 30px; }
.comment { background: #1e1e1e; border-radius: 14px; padding: 16px; margin-bottom: 12px; }

/* Comentarios anidados (respuestas) con margen izquierdo y borde izquierdo */
.comment-reply { margin-left: 40px; border-left: 3px solid #333; border-radius: 0 14px 14px 0; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.comment-author { font-weight: bold; color: white; font-size: 14px; }
.comment-date { color: #666; font-size: 12px; }
.comment-reply-to { color: #888; font-size: 13px; margin-bottom: 4px; }
.comment-reply-to a { color: #3498db; text-decoration: none; font-weight: 600; }
.comment-reply-to a:hover { text-decoration: underline; }
.comment-body { color: #ddd; font-size: 14px; line-height: 1.5; word-break: break-word; }
.comment-actions { margin-top: 8px; }
.btn-delete-comment { background: none; border: none; color: #e74c3c; font-size: 12px; cursor: pointer; padding: 0; }
.btn-delete-comment:hover { text-decoration: underline; }
.btn-reply { background: none; border: none; color: #3498db; font-size: 12px; cursor: pointer; padding: 0; margin-left: 15px; }
.btn-reply:hover { text-decoration: underline; }
.comment-form { margin-top: 20px; }
.comment-form textarea {
    width: 100%; background: #1a1a1a; border: 1px solid #333; border-radius: 14px;
    padding: 14px; color: white; font-size: 14px; outline: none; resize: vertical;
    min-height: 80px; font-family: Arial, Helvetica, sans-serif; transition: border-color .2s;
}
.comment-form textarea:focus { border-color: #666; }
.comment-form textarea::placeholder { color: #555; }
.comment-form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.reply-indicator { color: #888; font-size: 13px; display: none; align-items: center; gap: 8px; }
.reply-indicator.show { display: flex; }
.reply-indicator button { background: none; border: none; color: #e74c3c; cursor: pointer; font-size: 13px; padding: 0; }
.reply-indicator button:hover { text-decoration: underline; }
.btn-submit-comment {
    background: white; color: black; font-weight: bold; border: none;
    padding: 12px 28px; border-radius: 12px; cursor: pointer; font-size: 14px;
    transition: opacity .2s;
}
.btn-submit-comment:hover { opacity: .85; }
.btn-submit-comment:disabled { opacity: .4; cursor: not-allowed; }
.restricted-msg { color: #e74c3c; font-size: 14px; padding: 15px; text-align: center; background: rgba(231,76,60,.1); border-radius: 14px; border: 1px solid rgba(231,76,60,.2); }
.empty-comments { text-align: center; padding: 30px; color: #555; font-size: 14px; }
