/* --- Variables y Estilos Globales --- */
:root {
    --primary-color: #fa0068;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --text-color-secondary: #a0a0a0;
    --border-radius: 8px;
    --border-color: #2c2c2c;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    width: 95%; /* Más ancho en móviles */
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff0062;
}

/* --- Header --- */
header {
    background-color: var(--surface-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    flex-direction: column; /* Apilado en móvil por defecto */
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

nav {
    display: flex;
    flex-wrap: wrap; /* Permitir que los enlaces se envuelvan */
    justify-content: center;
    gap: 0 1rem;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
}

/* --- Secciones de Manga --- */
.manga-section {
    padding: 1.5rem 0;
}

.section-title {
    font-size: 1.5rem; /* Ligeramente más pequeño en móvil */
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

/* --- Grid de Mangas (Este ya era responsive) --- */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Tamaño mínimo un poco más pequeño */
    gap: 1.2rem;
}

.manga-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.manga-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(var(--primary-color), 0.3);
}

.manga-card a {
    display: block;
    color: inherit;
}

.manga-card img {
    width: 100%;
    height: 240px; /* Altura de portada ajustada */
    object-fit: cover;
    display: block;
}

.manga-info {
    padding: 1rem;
}

.manga-nombre {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* --- MEDIA QUERIES (Para pantallas más grandes) --- */

@media (min-width: 768px) {
    .container {
        width: 90%; /* Volvemos al 90% en tablets/desktop */
    }

    header .container {
        flex-direction: row; /* Horizontal en pantallas grandes */
        justify-content: space-between;
    }

    nav {
        gap: 0 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}