/* =========================================
   ESTILOS GENERALES 
   ========================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
}

main {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* =========================================
   SECCIÓN DE BIENVENIDA
   ========================================= */
.welcome-section {
    text-align: center;
    background-color: #222;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px dashed #8e44ad;
}

.welcome-section h2 {
    color: #d1b3e0;
    margin-top: 0;
    font-size: 1.4rem;
}

.welcome-section p {
    font-size: 0.95rem;
    color: #bbb;
    margin-bottom: 0;
}

/* =========================================
   BARRA DE FILTROS AVANZADOS
   ========================================= */
.advanced-search {
    background-color: #222;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border-left: 5px solid #8e44ad;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.filter-select {
    width: 100%;
    padding: 10px;
    background-color: #111;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}

.filter-select:focus {
    outline: none;
    border-color: #8e44ad;
}

/* =========================================
   DISEÑO ESTILO MANGA (Galería de Fanfics)
   ========================================= */
.manga-section {
    margin-top: 2rem;
}

.manga-section h2 {
    border-bottom: 2px solid #8e44ad;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.manga-card {
    background-color: #222;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.manga-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 14px rgba(142, 68, 173, 0.3);
}

.manga-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background-color: #111;
}

.manga-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.manga-card:hover .manga-cover img {
    transform: scale(1.06);
}

.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    color: white;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 2;
}

/* Color morado para la etiqueta de Fanfic */
.badge.badge-fanfic {
    background-color: #8e44ad;
    color: white;
}

/* Color naranja para la etiqueta de Manga */
.badge.badge-manga {
    background-color: #e67e22;
    color: white;
}

.manga-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.manga-info h3 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manga-genres {
    font-size: 0.8rem;
    color: #d1b3e0;
    margin-bottom: 12px;
    font-style: italic;
}

.btn-leer-manga {
    display: block;
    text-align: center;
    background-color: #8e44ad;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: auto;
    transition: background-color 0.3s;
}

.btn-leer-manga:hover {
    background-color: #9b59b6;
}

/* =========================================
   PAGINACIÓN
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 3rem;
}

.page-link {
    background-color: #222;
    color: #e0e0e0;
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.page-link:hover {
    background-color: #333;
}

.page-link.active {
    background-color: #8e44ad;
    color: white;
}

.page-dots {
    color: #888;
}

/* =========================================
   VENTANA EMERGENTE (MODAL DE LOGIN)
   ========================================= */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #222;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    border: 1px solid #8e44ad;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #bbb;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #111;
    color: white;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #8e44ad;
}

.btn-auth-submit {
    width: 100%;
    background-color: #8e44ad;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.btn-auth-submit:hover {
    background-color: #9b59b6;
}

#auth-toggle-text {
    text-align: center;
    margin-top: 15px;
    font-size: 0.85rem;
    color: #aaa;
}

#auth-toggle-text a {
    color: #d1b3e0;
    text-decoration: none;
}

/* =========================================
   ESTILOS DE LECTURA DE LIBRO (Tipografía y contenedor)
   ========================================= */
.reader-container {
    max-width: 800px;
    margin: 2.5rem auto;
    background-color: #222;
    padding: 4rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    border: 1px solid #444;
}

.reader-container h2 {
    color: #d1b3e0;
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-family: 'Georgia', serif;
}

.chapter-title {
    text-align: center;
    color: #aaa;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid #444;
    padding-bottom: 1rem;
    font-family: 'Georgia', serif;
}

/* Estilo idéntico al documento de la novela (Tipografía serif, sangría y lectura de libro) */
.chapter-text {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.15rem;
    line-height: 1.9;
    color: #e5e5e5;
    text-align: justify;
}

/* Forzamos a que cada párrafo dentro de la lectura tenga su espacio abajo */
.chapter-text p {
    margin-bottom: 1.5rem !important;
    display: block !important;
}

.reader-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #444;
}

.btn-nav {
    background-color: transparent;
    color: #e0e0e0;
    border: 1px solid #8e44ad;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-nav:hover {
    background-color: #8e44ad;
    border-color: #8e44ad;
    color: white;
}

/* =========================================
   ESTILOS PARA LA PÁGINA DE LOGIN
   ========================================= */
.login-page-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.login-box {
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-title {
    color: #00d2d3; /* Color celeste similar al de tu ejemplo */
    font-size: 32px;
    font-weight: normal;
    margin-bottom: 30px;
}

.input-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.input-row label {
    color: #ffffff;
    width: 100px; /* Fija el ancho del texto de la izquierda */
    text-align: right;
    margin-right: 15px;
    font-size: 16px;
    font-weight: bold;
}

.input-row input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background-color: #ffffff;
    color: #333;
    font-size: 14px;
}

.input-row input:focus {
    outline: 2px solid #8e44ad; /* Borde morado de Fictopía al escribir */
}

.btn-login-submit {
    width: calc(100% - 115px); /* Alineado con el input */
    margin-left: 115px;
    padding: 12px;
    background-color: #34495e; /* Color oscuro del ejemplo, o puedes usar #8e44ad (Morado) */
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-login-submit:hover {
    background-color: #8e44ad; /* Cambia a morado al pasar el ratón */
}

/* El separador "O" con líneas a los lados */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0 25px 115px;
    color: #fff;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #fff;
}

.login-divider span {
    padding: 0 10px;
}

/* Botón de Google */
.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: #555;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 115px; /* Para alinear con el formulario */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-google img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.btn-google:hover {
    background-color: #f1f1f1;
}

.login-footer-text {
    margin-top: 30px;
    color: #fff;
    font-size: 14px;
}

.login-footer-text a {
    color: #00d2d3;
    text-decoration: none;
}

.login-footer-text a:hover {
    text-decoration: underline;
}

/* =========================================
   ESTILOS PARA LA PÁGINA DE FORO Y AVISOS
   ========================================= */
.forum-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}
.forum-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #9c27b0;
    padding-bottom: 10px;
}
.forum-header-bar h2 {
    color: #fff;
    margin: 0;
}
.btn-crear-tema {
    background-color: #9c27b0;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
}
.btn-crear-tema:hover {
    background-color: #7b1fa2;
}
.forum-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.2s;
}
.forum-card:hover {
    transform: translateX(5px);
    border-color: #9c27b0;
}
.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
}
.tag-aviso { background-color: #ff3d00; color: white; }
.tag-discusion { background-color: #29b6f6; color: #000; }

.forum-card h3 {
    margin: 0 0 10px 0;
    color: #e0e0e0;
}
.forum-meta {
    font-size: 13px;
    color: #888;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
}

/* =========================================
   ESTILOS PARA EL PERFIL DE USUARIO
   ========================================= */
.profile-wrapper {
    max-width: 600px;
    margin: 50px auto;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #9c27b0;
    margin-bottom: 20px;
}
.profile-name {
    font-size: 28px;
    color: #fff;
    margin: 0 0 5px 0;
}
.profile-email {
    font-size: 16px;
    color: #aaa;
    margin-bottom: 30px;
}
.profile-content {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: left;
}
.profile-content h3 {
    color: #e0e0e0;
    margin-bottom: 10px;
}
.btn-edit {
    background-color: #9c27b0;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-edit:hover {
    background-color: #7b1fa2;
}

/* =========================================
   ESTILOS PARA LA PÁGINA VIP
   ========================================= */
.vip-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}
.vip-header-section {
    text-align: center;
    margin-bottom: 50px;
}
.vip-title {
    color: #ffd700;
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.vip-subtitle {
    color: #aaa;
    font-size: 1.2rem;
}
.vip-plans-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}
.vip-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 30px;
    width: 320px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.vip-card.premium-card {
    border: 2px solid #daa520;
    transform: scale(1.05);
    background: linear-gradient(180deg, #1a1a1a 0%, #2a2000 100%);
}
.vip-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #daa520;
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
}
.vip-card h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 15px;
}
.vip-price {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
}
.vip-price span {
    font-size: 1rem;
    color: #888;
}
.vip-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
}
.vip-benefits li {
    margin-bottom: 12px;
    color: #ddd;
    font-size: 0.95rem;
}
.btn-plan {
    display: inline-block;
    width: 100%;
    padding: 12px 0;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}
.btn-plan.normal {
    background-color: #333;
    color: #fff;
}
.btn-plan.normal:hover {
    background-color: #444;
}
.btn-plan.gold {
    background: linear-gradient(135deg, #ffd700, #daa520);
    color: #000;
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.4);
}
.btn-plan.gold:hover {
    background: linear-gradient(135deg, #ffdf33, #e6b800);
}

/* =========================================
   PÁGINA DE PERFIL DE USUARIO
   ========================================= */
.profile-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}
.profile-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.profile-header {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 40px 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #8e44ad;
    object-fit: cover;
}
.profile-info h1 {
    margin: 0 0 5px 0;
    color: #fff;
    font-size: 2rem;
}
.profile-email {
    color: #aaa;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}
.profile-status {
    display: flex;
    align-items: center;
    gap: 15px;
}
.status-badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}
.status-badge.normal {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
}
.status-badge.vip {
    background: linear-gradient(135deg, #ffd700, #daa520);
    color: #000;
    border: 1px solid #b8860b;
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.4);
}
.btn-upgrade-vip {
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: transform 0.2s;
}
.btn-upgrade-vip:hover {
    transform: scale(1.05);
    text-decoration: underline;
}
.profile-body {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.profile-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 30px;
    flex: 1;
    min-width: 300px;
}
.profile-card h3 {
    margin-top: 0;
    color: #8e44ad;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.profile-form .form-group {
    margin-bottom: 20px;
}
.profile-form label {
    display: block;
    color: #aaa;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.profile-form input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 6px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    color: #fff;
    font-size: 1rem;
    box-sizing: border-box;
}
.profile-form input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.profile-stats {
    display: flex;
    gap: 20px;
}
.stat-box {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    border: 1px solid #333;
}
.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}
.stat-label {
    color: #aaa;
    font-size: 0.9rem;
}
