/**
 * Estilos para NTRGod Reader - Frontend
 */

/* Contenedores principales */
.ntrgod-reader-container {
    margin-bottom: 30px;
}

.ntrgod-chapter-container {
    max-width: 1200px;
    margin: 0 auto;
}

.ntrgod-manga-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Lector de capítulos */
.ntrgod-chapter-reader {
    margin: 20px 0;
}

.ntrgod-chapter-reader[data-style="vertical"] .ntrgod-chapter-page {
    margin-bottom: 15px;
}

.ntrgod-chapter-reader[data-style="horizontal"] {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    height: 90vh;
}

.ntrgod-chapter-reader[data-style="horizontal"] .ntrgod-chapter-page {
    display: none;
    text-align: center;
}

.ntrgod-chapter-reader[data-style="horizontal"] .ntrgod-chapter-page.active {
    display: block;
}

.ntrgod-chapter-reader[data-style="webtoon"] .ntrgod-chapter-page {
    margin-bottom: 0;
}

.ntrgod-chapter-reader[data-style="gallery"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.ntrgod-chapter-image {
    max-width: 100%;
    height: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ntrgod-chapter-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 15px 0;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.ntrgod-chapter-controls {
    display: flex;
    align-items: center;
}

/* Manga Single */
.ntrgod-manga-header {
    margin-bottom: 30px;
}

.ntrgod-manga-cover {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ntrgod-manga-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    height: 450px;
    background: #f1f1f1;
    border-radius: 4px;
    color: #ccc;
}

.ntrgod-manga-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 700;
}

.ntrgod-manga-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}

.ntrgod-manga-genres {
    margin-top: 5px;
}

.ntrgod-chapters-title {
    margin: 25px 0 15px;
    font-size: 22px;
    font-weight: 600;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 5px;
}

.ntrgod-chapters-list {
    margin-bottom: 30px;
}

.ntrgod-chapters-list .list-group-item {
    border-left: none;
    border-right: none;
    margin-bottom: -1px;
    transition: background-color 0.2s;
}

.ntrgod-chapters-list .list-group-item:hover {
    background-color: #f9f9f9;
}

.ntrgod-chapters-list .list-group-item:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.ntrgod-chapters-list .list-group-item:last-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Reader de Manga */
.ntrgod-reader-tabs {
    border-bottom: 2px solid #f1f1f1;
}

.ntrgod-reader-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 10px 15px;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.2s;
}

.ntrgod-reader-tabs .nav-link:hover {
    border-color: #dee2e6;
    background-color: #f8f9fa;
}

.ntrgod-reader-tabs .nav-link.active {
    color: #0275d8;
    border-color: #0275d8;
    background-color: transparent;
}

.ntrgod-reader-tabs .nav-link i {
    margin-right: 5px;
}

.ntrgod-view-options {
    text-align: right;
    margin-bottom: 15px;
}

.ntrgod-view-option.active {
    background-color: #6c757d;
    color: white;
}

.ntrgod-results-container {
    min-height: 400px;
}

/* Grid de Mangas */
.ntrgod-manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ntrgod-manga-card {
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background: white;
}

.ntrgod-manga-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.ntrgod-manga-card-cover {
    position: relative;
    padding-top: 150%; /* Aspect ratio 2:3 */
    overflow: hidden;
}

.ntrgod-manga-card-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ntrgod-manga-card:hover .ntrgod-manga-card-cover img {
    transform: scale(1.05);
}

.ntrgod-manga-card-body {
    padding: 10px;
}

.ntrgod-manga-card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ntrgod-manga-card-info {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
}

/* Lista de Mangas */
.ntrgod-manga-list {
    margin-bottom: 30px;
}

.ntrgod-manga-list-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f1f1;
}

.ntrgod-manga-list-cover {
    width: 100px;
    margin-right: 15px;
}

.ntrgod-manga-list-cover img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ntrgod-manga-list-info {
    flex: 1;
}

.ntrgod-manga-list-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.ntrgod-manga-list-chapters {
    font-size: 14px;
    color: #6c757d;
}

/* Paginación */
.ntrgod-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.ntrgod-pagination button {
    margin: 0 10px;
}

.ntrgod-page-info {
    font-size: 14px;
    color: #6c757d;
}

/* Otros estilos */
.ntrgod-import-status {
    margin-top: 10px;
}

.ntrgod-chapter-source, .ntrgod-manga-source {
    margin-top: 30px;
    padding-top: 10px;
    border-top: 1px solid #f1f1f1;
    font-size: 12px;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .ntrgod-manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .ntrgod-chapter-navigation {
        flex-wrap: wrap;
    }
    
    .ntrgod-chapter-controls {
        order: 3;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
    
    .ntrgod-chapter-reader[data-style="horizontal"] {
        height: 75vh;
    }
}
