:root {
    --primary: #e74c3c;
    --primary-hover: #c0392b;
    --background: #f0f0f0;
    --text: #2c3e50;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    padding: 0;
}

header {
    background-color: var(--primary);
    box-shadow: 0 2px 2px rgba(0,0,0,0.1);
    /* position: sticky; */
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--background);
}

header p {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: var(--background);
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    color: var(--text);
}

.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    justify-items: center;
}

.manga-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%; /* Change max-width to width */
    max-width: 250px;
}

.manga-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.manga-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.manga-info {
    padding: 1rem;
}

.manga-info h2 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: var(--text);
}

.manga-info p {
    margin: 0 0 1rem;
    color: var(--text);
    font-size: 0.9rem;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

button:hover {
    background-color: var(--primary-hover);
}

#chapter-select {
    margin: 1rem 0;
    width: 100%;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 1rem;
}

#manga-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.manga-page {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.manga-page img {
    width: 100%;
    height: auto;
    display: block;
}

#navigation {
    position: fixed;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    background-color: rgba(255,255,255,0.9);
    padding: 0.5rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

#navigation button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 25px;
    font-size: 0.9rem;
    flex: 1;
    margin: 0 0.25rem;
}

#navigation button:hover {
    background-color: var(--primary-hover);
}

#navigation button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#page-info {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex: 1;
}

@media (min-width: 768px) {
    .container {
        max-width: 750px;
        padding: 1rem 2rem 2rem;
    }

    #navigation {
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        border-radius: 50px;
        justify-content: center;
        gap: 1rem;
    }

    #navigation button {
        flex: 0 1 auto;
    }
}