/* Base styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    width: 100%;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 20px;
}

.post {
    margin-bottom: 20px;
}

.post h2 {
    font-size: 1.5em;
    margin: 0;
    cursor: pointer;
    background: #eee;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.post h2:hover {
    background-color: #ddd;
}

.post.active h2 {
    background-color: #ccc;
    border-left: 4px solid #007bff;
    /* Active post indicator */
}

.post .description {
    overflow: visible;
    /* Allow the content to expand with the image size */
    font-size: 1em;
    line-height: 1.6;
    display: none;
    transition: max-height 0.3s ease-out;
    max-height: 0;
}

.post.active .description {
    display: block;
    max-height: 500px;
    /* Adjust based on content */
    overflow-y: auto;
    padding: 10px 0;
    transition: max-height 0.3s ease-out;
}

/* Update the styling for images in the post description */
.post .description img {
    width: 100%;
    height: 100%;
    display: block;
    /* Fixes any inline spacing issues */
    margin: 10px 0;
    /* Adds some space around the image */
    object-fit: cover;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.8em;
    }

    .post h2 {
        font-size: 1.2em;
        padding: 8px;
    }

    .post .description {
        font-size: 0.95em;
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 1.6em;
    }

    .post h2 {
        font-size: 1.1em;
        padding: 6px;
    }

    .post .description {
        font-size: 0.9em;
        max-height: 250px;
    }
}

@media only screen and (max-width: 600px) {
    pre {
        font-size: 14px;
    }
}

#pagination-controls {
    text-align: center;
    margin-top: 20px;
}

#pagination-controls button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px;
    margin: 5px;
    border-radius: 4px;
    cursor: pointer;
}

#pagination-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Style for lists */
.post .description ul,
.post .description ol {
    margin-left: 20px;
    padding-left: 20px;
}

.post .description ul {
    list-style-type: disc;
}

.post .description ol {
    list-style-type: decimal;
}

/* Blockquote styling */
.post .description blockquote {
    border-left: 4px solid #ccc;
    padding-left: 10px;
    margin-left: 0;
    font-style: italic;
}

/* Preformatted text styling */
.post .description pre {
    background-color: #f4f4f4;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
}

/* Add custom styles for the controls */
.controls {
    margin: 10px 0;
    /* Add some space around the controls */
    display: flex;
    justify-content: flex-end;
    /* Align controls to the right */
    gap: 10px;
    /* Add some space between icons */
}

.control-icon {
    cursor: pointer;
}

.speed-control {
    width: 100px;
}