/* Basic Reset */
body, h1, h2, p, div {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #0056b3; /* CSX-like blue */
    font-size: 2em; /* Base font size for h1 */
}

/* Styling for Day 1 / Day 2 Section Headers */
.flashcard-container h2 {
    grid-column: 1 / -1; /* Make header span all columns */
    text-align: left;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #004080; /* A slightly darker CSX-like blue */
    border-bottom: 2px solid #0056b3;
    padding-bottom: 10px;
    font-size: 1.5em; /* Base font size for h2 */
}

.flashcard-container h2:first-of-type {
    margin-top: 0; /* Remove top margin for the very first section header */
}

.flashcard-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    perspective: 1000px; /* For 3D flip effect */
}

.flashcard {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-height: 200px;
    padding: 15px; /* Adjusted padding for potentially smaller cards */
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard .front, .flashcard .back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 15px; /* Consistent padding */
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.flashcard .front {
    z-index: 2;
}

.flashcard .back {
    transform: rotateY(180deg);
    background-color: #e9f5ff; /* Lighter blue for back */
}

.flashcard p {
    font-size: 1em; /* Base font size for card text */
}

.flashcard .front span {
    font-size: 0.75em; /* Base font size for click hint */
    color: #777;
    margin-top: 10px;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* 10% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Adjusted for mobile */
    max-width: 500px; /* Max width for larger screens */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
}

.modal-content h2 {
    margin-top: 0;
    color: #0056b3;
    font-size: 1.4em;
}

.modal-content p {
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .flashcard-container h2 {
        font-size: 1.3em;
        margin-top: 30px;
        margin-bottom: 15px;
    }

    .flashcard-container {
        grid-template-columns: 1fr; /* Stack cards in a single column */
        gap: 15px;
    }

    .flashcard {
        min-height: 180px; /* Adjust min-height for mobile */
        padding: 15px;
    }

    .flashcard p {
        font-size: 1.1em; /* Increase font size for readability on mobile */
    }

    .flashcard .front span {
        font-size: 0.85em; /* Increase font size for click hint on mobile */
    }

    .modal-content {
        margin: 15% auto;
        padding: 15px;
        width: 90%;
    }

    .modal-content h2 {
        font-size: 1.2em;
    }

    .modal-content p {
        font-size: 1em; /* Increase disclaimer font size on mobile */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }
    .flashcard-container h2 {
        font-size: 1.1em;
    }
    .flashcard p {
        font-size: 1em; /* Slightly smaller for very small screens if needed, but ensure readability */
    }
     .modal-content {
        margin: 20% auto; /* Adjust margin for very small screens */
        width: 95%;
    }
    .modal-content h2 {
        font-size: 1.1em;
    }
    .modal-content p {
        font-size: 0.95em;
    }
}

 
