* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: auto;
}

body {
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.page-bg {
    background-attachment: fixed;

    min-height: 75vh;
    width: 100%;
    background-image:
        linear-gradient(to bottom,
            rgba(0, 0, 0, .70),
            rgba(0, 0, 0, .70),
            rgba(0, 0, 0, .70),
            rgba(0, 0, 0, .70),
            rgba(0, 0, 0, .90)),
        var(--bg-image);

    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-deep);
}


h2 {
    font-size: 1.1em;
}

p {
    font-size: 0.9em;
}

.container {
    min-width: 370px;
    width: 60%;
    margin: 50px auto;
    padding: 30px;
    background-color: var(--header-bg);
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.manga-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.manga-cover-wrapper {
    position: relative;
}

.manga-cover {
    width: 240px;
    min-height: 350px;
    min-width: 40px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 20px;
    transition: transform 0.6s ease-in-out;
    transform-origin: center;
}

.manga-cover:hover {
    transform: perspective(600px) rotateY(15deg) translateZ(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.manga-info {
    flex-grow: 1;
}

.manga-title {
    font-size: 2.0em;
    margin: 0;
    text-align: left;
}

.manga-details-wrapper {
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    max-width: 400px;
}

.info-block {
    flex-direction: column;
    border-radius: 8px;
    width: 100%;
    text-align: left;
}

.info-label {
    font-weight: bold;
    color: #ff5e57;
    margin-bottom: 5px;
}

.info-value {
    color: #cccccc;
    margin-top: 5px;
    font-size: 1.3em;
}

.info-value li {
    margin-top: 15px;
    list-style: none;
}

.demography {
    position: absolute;
    top: 20px;
    right: 9%;
    z-index: 10;
    padding: 8px 20px;
    border-radius: 5px;
    font: bold 1rem 'Poppins', sans-serif;
    color: white;
    background-color: rgba(0, 0, 0, 0.1);
}

.demography.shounen {
    background-color: rgba(255, 165, 0, 1);
}

.demography.shoujo {
    background-color: rgba(255, 105, 180, 1);
}

.demography.seinen {
    background-color: rgba(255, 0, 0, 1);
}

.demography.josei {
    background-color: rgba(128, 0, 128, 1);
}

.manga-type {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-weight: bold;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 2;
}

.manga-type.manhwa {
    background-color: #3cb371;
}

.manga-type.manga {
    background-color: #4169e1;
}

.manga-type.manhua {
    background-color: #8b0000;
}

.info-generos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0.6rem 0;
}

.genero-item {
    padding: 0.5rem 1rem;
    background-color: #202121;
    color: #fff;
    border-radius: 4px;
    font-weight: 500;
    text-transform: capitalize;
    text-decoration: none;
}

.synopsis {
    margin-top: 5px;
    line-height: 1.6;
    font-size: 20px;
    text-align: left;
}

#toggle-synopsis {
    color: white;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

#toggle-synopsis:hover {
    color: #ffcc00;
}

#synopsis-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

#toggle-synopsis:checked~#synopsis-text {
    -webkit-line-clamp: unset;
}

.toggle-label {
    display: inline-block;
    margin-top: 5px;
    cursor: pointer;
    color: rgb(255 255 255 / 95%);
    font-weight: 700;
}

#toggle-synopsis:not(:checked)~.toggle-label::after {
    content: attr(data-show);
}

#toggle-synopsis:checked~.toggle-label::after {
    content: attr(data-hide);
}

/* Latest Releases Chapters */
.latest-releases {
    margin: 8px 0;
}

.latest-releases h3 {
    font-size: 1.3em;
    margin-bottom: 7px;
}

.chapter-scroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.chapter-scroll::-webkit-scrollbar {
    width: 8px;
}

.chapter-scroll::-webkit-scrollbar-thumb {
    background: #ff5e57;
    border-radius: 10px;
}

.chapter-scroll::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.chapter-card {
    background-color: #202121;
    padding: 15px 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.chapter-card:hover {
    background-color: #3a3a3a;
    transform: translateY(-5px);
}

.chapter-link {
    text-decoration: none;
    color: inherit;
}

.chapter-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.chapter-date {
    font-size: 0.9em;
    color: #cccccc;
}

.chapter-card.read {
    background-color: #4c4c4c !important;
    color: #ffb347;
}

/* Icons & Indicators */
.estado-indicador {
    display: block;
    width: 5px;
    height: 20px;
    background-color: green;
    margin-top: 5px;
    border-radius: 3px;
}

.favicon-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
}

.circle-red {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: rgb(0, 255, 34);
    border-radius: 50%;
    margin-right: 5px;
    margin-bottom: 1.5px;
}

.bookmark-btn {
    position: relative;
    overflow: hidden;
}

.bookmark-btn.loading {
    pointer-events: none;
    opacity: 0.85;
}

.bookmark-btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}

.bookmark-btn.loading .spinner {
    display: inline-block;
}

.bookmark-btn.loading svg,
.bookmark-btn.loading #follow-text {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Bookmark Button */
.bookmark-container {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bookmark-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #4169e1;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font: bold 0.9rem sans-serif;
    transition: background-color 0.3s;
    width: 92%;
    justify-content: center;
}

.bookmark-btn:hover {
    background-color: #1a50b3;
}

.bookmark-btn.active {
    background-color: #28a745;
}


#disqus_thread a {
    color: rgb(6, 0, 27);
}

#load-comments {
    background-color: #343434;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font: bold 20px sans-serif;

    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 15px 0;
}

#reactions__container {
    margin-top: 50px;
}

/* Manga Links Buttons */
.manga-links a.btn {
    display: inline-block;
    padding: 5px 11px;
    margin: 5px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.manga-links a.btn:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.btn-primary {
    background-color: #007bff;
    border: none;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    border: none;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.chapter-card-full {
    grid-column: 1 / -1;

    text-align: center;
}

.btn-ver-mas {
    display: block;
    width: 100%;
    padding: 10px;
    background: #ff5722;
    color: #fff;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-ver-mas:hover {
    background: #e64a19;
}

/* Responsive Styles */
@media (max-width: 880px) {
    .container {
        width: 97%;
        padding: 17px;
        margin: 4px auto;
    }

    .manga-header {
        text-align: center;
    }

    .manga-cover {
        width: 100%;
        max-width: 380px;
        margin-bottom: 4px;
        min-height: 200px;
    }

    .manga-info {
        width: 97%;
        margin-left: 15px;
    }

    .chapter-scroll {
        grid-template-columns: repeat(2, 1fr);
    }

    .demography {
        top: 0;

        right: 0;

        font-size: 0.9rem;
        padding: 4px 11px;
    }

    .synopsis {
        line-height: 1.3;
    }

    .latest-releases {
        margin: 9px 0;
    }

    .genero-item {
        padding: 0.1rem 0.4rem;
        font-weight: 500;
        font-size: 14px;
    }

    .manga-cover-wrapper {
        width: 60%;
    }

    .manga-title {
        font-size: 1.3em;
    }

    .info-value {
        font-size: 1em;
    }

    #synopsis-text {
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .info-value li {
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .chapter-scroll {
        grid-template-columns: 1fr;
    }

    .info-block {
        text-align: left;
    }

    .manga-header {
        text-align: center;
    }

    .manga-details-wrapper {
        text-align: center;
        justify-content: center;
    }

    .bookmark-btn {
        width: 100%;
    }
}


.manga-groups-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    width: 100%;
}


.manga-group-wrapper {
    flex: 0 0 auto;
    max-width: 260px;
}


.manga-group-item {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background-color: #222222;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;


    text-decoration: none;
    color: inherit;
    width: 100%;

    cursor: default;

}


.manga-group-item.link-mode {
    cursor: pointer;
}


.manga-group-item.link-mode:hover {
    background-color: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.2);
}


.manga-group-item.link-mode:active {
    transform: scale(0.98);
}


.manga-group-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    margin-right: 10px;
    overflow: hidden;
}

.manga-group-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.manga-group-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #f1f1f1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.manga-group-cta {
    display: flex;
    align-items: center;
    justify-content: center;

    border-left: 1px solid rgba(255, 255, 255, 0.2);
    height: 18px;
    padding-left: 10px;
    margin-left: auto;

    color: #888;
    transition: color 0.3s ease;
}

.manga-group-item.link-mode:hover .manga-group-cta {
    color: #ffb347;
    /* Naranja */
    border-left-color: rgba(255, 255, 255, 0.4);
}

/* Ajustes Móvil */
@media (max-width: 480px) {
    .manga-group-wrapper {
        max-width: 100%;
    }

    .manga-group-item {
        padding: 5px 10px 5px 5px;
    }

    .manga-group-name {
        font-size: 0.85rem;
    }
}

/* ====== SISTEMA DE ESTRELLAS Y LIKES ====== */
.manga-stats-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

/* --- Rating (Estrellas) --- */
.rating-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stars-container {
    display: flex;
    cursor: pointer;
}

.star {
    font-size: 1.5rem;
    color: #555;
    /* Color estrella vacía */
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.star.active,
.star.hovered {
    color: #ffcc00;
    /* Color dorado */
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}

.star:hover {
    transform: scale(1.2);
}

.rating-info {
    font-size: 0.95rem;
    color: #fff;
    display: flex;
    gap: 4px;
    align-items: center;
}

#rating-avg {
    font-weight: bold;
    color: #ffcc00;
}

.rating-votes {
    color: #aaa;
    font-size: 0.85rem;
}

/* --- Likes (Corazón) --- */
.like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 94, 87, 0.1);
    color: #ff5e57;
    border: 1px solid rgba(255, 94, 87, 0.3);
    padding: 6px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.like-btn .heart-icon {
    fill: transparent;
    stroke: #ff5e57;
    stroke-width: 2px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-btn:hover {
    background-color: rgba(255, 94, 87, 0.2);
    transform: translateY(-2px);
}

.like-btn.active {
    background-color: #ff5e57;
    color: white;
}

.like-btn.active .heart-icon {
    fill: white;
    stroke: white;
    transform: scale(1.1);
}

.like-btn.animating .heart-icon {
    animation: heartPop 0.4s ease;
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1.1);
    }
}

@media (max-width: 880px) {
    .manga-stats-container {
        margin-left: 0;
    }
}

.continue-card {
    border: 1px solid #2e7d32;
}

.continue-card .chapter-title {
    color: #b2ffc2;
}

.abandoned-container {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 94, 87, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    /* Más pequeño y sutil */
    margin-top: 10px;
    display: inline-flex;
    /* Se ajusta al tamaño de su contenido */
    align-items: center;
}

.abandoned-action {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Botón y Contador de puntos (Se mantienen iguales) */
.btn-donate-pts {
    background-color: rgba(255, 179, 71, 0.1);
    color: #ffb347;
    border: 1px solid rgba(255, 179, 71, 0.3);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-donate-pts:hover {
    background-color: rgba(255, 179, 71, 0.2);
    transform: translateY(-2px);
}

.btn-donate-pts:active {
    transform: scale(0.95);
}

.pts-count {
    font-size: 0.85rem;
    color: #ccc;
    background: rgba(0, 0, 0, 0.25);
    padding: 5px 10px;
    border-radius: 5px;
}

.pts-count strong {
    color: #ffb347;
    font-weight: bold;
}

/* ====== NUEVO: SISTEMA DE TOOLTIP (Signo de interrogación) ====== */
.info-tooltip-container {
    position: relative;
    display: flex;
    align-items: center;
    cursor: help;
    /* Cambia el cursor para indicar que es informativo */
}

/* El circulito con el "?" */
.info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

/* Efecto al pasar el mouse por el "?" */
.info-tooltip-container:hover .info-icon {
    background-color: #ff5e57;
    color: #fff;
    border-color: #ff5e57;
}

/* El cuadro negro con el texto explicativo */
.tooltip-text {
    position: absolute;
    bottom: 150%;
    /* Se posiciona arriba del icono */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    /* Efecto de movimiento inicial */
    width: 240px;
    background-color: #202121;
    color: #e0e0e0;
    text-align: center;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.6);

    /* Oculto por defecto */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    transition: all 0.3s ease;
}

/* Flechita debajo del tooltip */
.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #202121 transparent transparent transparent;
}

/* Mostrar el tooltip al pasar el mouse */
.info-tooltip-container:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Adaptación a móviles */
@media (max-width: 480px) {
    .abandoned-action {
        width: 100%;
        justify-content: space-between;
    }

    /* Mueve el tooltip un poco para que no se salga de la pantalla en móviles */
    .tooltip-text {
        left: auto;
        right: -30px;
        transform: translateY(10px);
    }

    .tooltip-text::after {
        left: auto;
        right: 35px;
    }

    .info-tooltip-container:hover .tooltip-text {
        transform: translateY(0);
    }
}