@import url('https://fonts.googleapis.com/css2?family=Cherry+Bomb+One&family=Chocolate+Classical+Sans&family=Crimson+Text:ital,wght@0,700;1,600&family=Faculty+Glyphic&display=swap');

:root {
    --color-beige: #F5F5DC; /* A classic beige */
    --color-brown: #A0522D; /* A reddish-brown */
    --color-dark-brown: #5A2D1A; /* A darker brown for text */
    --color-light-brown: #CD853F; /* A lighter brown for links */
    --color-medium-beige: #E0D8B0; /* A slightly darker beige */
}

body {
    font-family: 'Chocolate Classical Sans', sans-serif; /* New font */
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: var(--color-beige);
    color: var(--color-dark-brown); /* Default text color */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Make body at least full viewport height */
}

header {
    margin-bottom: 30px;
    padding: 0 20px; /* Add some padding to the sides */
}

header h1 {
    font-family: 'Cherry Bomb One', cursive; /* New font */
    color: var(--color-brown);
    font-size: 2.5em;
    margin: 0;
    text-align: left; /* Align header text to the left */
}

main {
    flex-grow: 1; /* Allow main content to take up available space */
    max-width: 800px; /* Keep content contained */
    margin: 0 auto; /* Center the content */
    padding: 20px;
    background-color: var(--color-medium-beige); /* Changed to darker beige */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.comic-container {
    margin-bottom: 30px;
    border: 2px solid var(--color-brown);
    padding: 10px;
    background-color: var(--color-beige); /* Nested beige inside main */
}

/* Style for comic title */
.comic-title {
    font-family: 'Faculty Glyphic', cursive; /* New font */
    text-align: center;
    color: var(--color-dark-brown);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em; /* Make the comic title slightly larger */
}


.comic-panels {
    display: flex; /* Arrange panels side-by-side */
    gap: 10px; /* Space between panels */
    justify-content: center; /* Center the panels if they don't fill the width */
    flex-wrap: wrap; /* Allow panels to wrap on smaller screens */
}

.panel {
    flex: 1; /* Allow panels to grow/shrink */
    min-width: 200px; /* Minimum width before wrapping */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center image and caption */
    text-align: center;
}

.panel img {
    max-width: 95%; /* Make images slightly smaller than their container */
    height: auto;
    border: 1px solid var(--color-light-brown); /* Subtle border around images */
    margin-bottom: 10px;
}

.caption {
    font-family: "Crimson Text", serif;
    font-style: italic; /* As per garreygoosey.md */
    font-weight: 600;
    margin: 0;
    padding: 0 5px; /* Add some padding */
    color: var(--color-dark-brown);
}

.caption.narration {
    font-style: normal;
    font-weight: 700;
}

.date {
    text-align: right;
    font-size: 0.9em;
    color: var(--color-dark-brown);
    margin-top: 15px;
}

.comic-navigation {
    display: flex;
    justify-content: space-between; /* Put Previous and Next on opposite ends */
    margin-bottom: 20px;
}

.comic-navigation a,
.comic-navigation span {
    padding: 10px 15px;
    border: 1px solid var(--color-brown);
    border-radius: 5px;
    text-decoration: none;
    color: var(--color-dark-brown);
    background-color: var(--color-light-brown);
    transition: background-color 0.3s ease;
}

.comic-navigation a:hover {
    background-color: var(--color-brown);
    color: var(--color-beige);
}

.comic-navigation span.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #ccc; /* A neutral grey for disabled */
    border-color: #bbb;
}

.comic-calendar details {
    border: 1px solid var(--color-brown);
    padding: 10px;
    border-radius: 5px;
    background-color: var(--color-light-brown);
    margin-bottom: 20px; /* Space before footer */
}

.comic-calendar summary {
    font-weight: bold;
    cursor: pointer;
    color: var(--color-dark-brown);
}

.comic-calendar ul {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap; /* Allow dates to wrap */
    gap: 5px; /* Space between date links */
}

.comic-calendar li {
    display: inline; /* Display list items inline */
}

.comic-calendar a {
    text-decoration: none;
    color: var(--color-dark-brown);
    padding: 2px 5px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.comic-calendar a:hover {
    background-color: var(--color-beige);
}

footer {
    margin-top: 20px; /* Push footer to the bottom */
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    color: var(--color-dark-brown);
    border-top: 1px solid var(--color-light-brown); /* Separator line */
}

footer a {
    color: var(--color-light-brown);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}


/* Basic Mobile Adjustments */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    header {
        padding: 0 10px;
    }

    h1 {
        font-size: 2em;
    }

    .comic-panels {
        flex-direction: column; /* Stack panels vertically on small screens */
        gap: 20px; /* More space when stacked */
    }

    .panel {
        min-width: auto; /* Remove min-width constraint */
        width: 100%; /* Take full width */
    }

    .panel img {
         max-width: 100%; /* Allow full width usage if needed */
    }

    .comic-navigation {
        flex-direction: column; /* Stack nav buttons */
        gap: 10px;
    }

     .comic-navigation a,
     .comic-navigation span {
        text-align: center; /* Center the text in buttons */
     }

     .comic-calendar ul {
        flex-direction: column; /* Stack date links too */
     }
}
