body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8; /* Fallback color for the transparent background */
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    position: relative; /* Needed for the ::before pseudo-element positioning */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('highschool_ad.png'); /* Set the background image */
    background-size: cover; /* Cover the entire viewport */
    background-position: center center; /* Center the image */
    background-repeat: no-repeat; /* Do not repeat the image */
    background-attachment: fixed; /* Keep the background fixed during scroll */
    opacity: 0.4; /* Adjust this value for desired transparency (0.0 to 1.0) */
    z-index: -1; /* Place the pseudo-element behind the content */
}

.ads-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    max-width: 900px;
    width: 100%;
}

.school-ad {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.index-container {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.index-container h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.6em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.index-container ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.index-container li {
    margin: 0;
}

.index-container a {
    text-decoration: none;
    color: #007bff;
    background-color: #e9f5ff;
    padding: 8px 15px;
    border-radius: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 1em;
    white-space: nowrap; /* Prevent text wrapping */
}

.index-container a:hover {
    background-color: #007bff;
    color: white;
}

.container {
    background-color: #fff; /* This will be the background of the "binder" or area holding the notebook page */
    padding: 30px 40px; /* Padding around the notebook page */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    width: 100%;
    text-align: center; /* Center the notebook page */
}

.notebook-page {
    background-color: #fefefe;
    background-image: linear-gradient(to bottom, #fefefe 19px, #dce8f1 20px, #dce8f1 21px, #fefefe 22px);
    background-size: 100% 22px; /* Adjust line height */
    border-left: 3px solid #f44336; /* Red line on the left */
    padding: 20px 25px 20px 40px; /* Padding for margins, wider on left for red line */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: left; /* Ensure text aligns left within the notebook page */
}

.notebook-page h2 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.8em;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}

.notebook-page h2:first-of-type {
    margin-top: 0;
}

.notebook-page ul {
    list-style-type: decimal; /* Numbered list for questions */
    padding-left: 25px;
    margin-bottom: 25px;
}

.notebook-page li {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #444;
}

h1, p, #debate-questions, .spinner {
    display: none; 
}

@media (max-width: 768px) {
    .container {
        padding: 20px 25px;
    }
    .school-ad {
        max-width: 48%;
    }
    .notebook-page {
        padding: 15px 20px 15px 30px;
    }
    .notebook-page h2 {
        font-size: 1.5em;
    }
    .notebook-page li {
        font-size: 1em;
    }
    .download-pdf-button {
        max-width: 250px;
    }
    .download-text {
        font-size: 1em;
        padding: 10px 12px;
    }
    .index-container ul {
        flex-direction: column; /* Stack links vertically on smaller screens */
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px 20px;
    }
    .school-ad {
        max-width: 95%;
    }
    .ads-container {
        gap: 10px;
        margin-bottom: 20px;
    }
    .notebook-page {
        padding: 10px 15px 10px 25px;
    }
    .notebook-page h2 {
        font-size: 1.2em;
    }
    .notebook-page li {
        font-size: 0.95em;
    }
    .phrases-card {
        padding: 15px;
    }
    .phrases-card h3 {
        font-size: 1.3em;
    }
    .phrases-card li {
        font-size: 1em;
        padding: 8px 10px;
    }
    .download-pdf-button {
        max-width: 200px;
        margin-top: 20px;
    }
    .download-text {
        font-size: 0.95em;
        padding: 8px 10px;
    }
    .index-container h3 {
        font-size: 1.4em;
    }
    .index-container a {
        padding: 6px 10px;
        font-size: 0.9em;
    }
}

.phrases-card {
    background-color: #e0f2f7; /* Light blue background */
    border: 1px solid #b3e5fc; /* Matching border */
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px; /* Space from the notebook page */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
    max-width: 400px; /* Make it narrower than the notebook page */
    margin-left: auto; /* Center it */
    margin-right: auto; /* Center it */
}

.phrases-card h3 {
    color: #01579b; /* Darker blue for heading */
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-align: center;
}

.phrases-card ul {
    list-style-type: none; /* No bullets */
    padding-left: 0;
    margin: 0;
}

.phrases-card li {
    background-color: #cce9f5; /* Slightly darker background for list items */
    margin-bottom: 8px;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 1.1em;
    color: #333;
}

.download-pdf-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    text-decoration: none;
    max-width: 300px; /* Adjust max-width for the button container */
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
    overflow: hidden; /* Ensure rounded corners for the image and text area */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-pdf-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.download-pdf-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.pdf-preview-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-bottom: 2px solid #ddd; /* Separator between image and text */
}

.download-text {
    background-color: #4CAF50; /* Green background for the text part */
    color: white;
    padding: 12px 15px;
    width: 100%;
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    box-sizing: border-box; /* Include padding in width */
}

.download-pdf-button:hover .download-text {
    background-color: #45a049; /* Darker green on hover */
}