@import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap');

/* Add your CSS styles here */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f0f0f0;
  font-size: 18px; 
}

h1 {
    text-align: center;
    color: #FF0000; 
    font-family: 'Special Elite', cursive; 
    font-size: 6em; 
    font-weight: bold; 
    text-transform: uppercase; 
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.4); 
    margin-bottom: 40px; 
    transform: rotate(-2deg); 
    letter-spacing: 2px; 
}

.video-container {
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 15px; 
    margin-bottom: 40px; 
    position: relative; 
    padding-top: 40px; 
}

.video-container .instruction {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    text-align: center;
    font-style: italic;
    color: #333;
    margin-bottom: 15px; 
    font-size: 1.2em; 
}

.video-container iframe {
    width: 100%;
    max-width: 560px; 
    aspect-ratio: 16 / 9; 
    border: 3px solid #555; 
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); 
}

/* Shared Container Styles */
.quiz-container,
.fill-blanks-container,
.discussion-container,
.cloze-container { 
    background-color: #fff;
    padding: 30px 40px; 
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    max-width: 1000px; 
    margin: 50px auto; 
}

/* Specific heading styles for each container */
.quiz-container h2,
.fill-blanks-container h2,
.discussion-container h2,
.cloze-container h2 { 
    text-align: center;
    color: #cc0000;
    margin-bottom: 20px; 
    font-size: 2.5em; 
}

.discussion-container h2 {
    color: #333; 
    font-family: 'Kalam', cursive; 
    text-decoration: underline;
    text-decoration-style: wavy;
    text-decoration-color: #888;
    margin-bottom: 30px;
    position: relative; /* Needed for float clearing */
    overflow: hidden; /* Add overflow hidden to contain the float */
    padding-bottom: 10px; /* Add some space below title before content */
}

.cloze-container h2 {
    color: #006400; /* Dark Green */
    font-family: 'Special Elite', cursive;
}

/* Instructions Styling */
.quiz-instruction,
.fill-blanks-instruction,
.cloze-instruction {
    line-height: 1.7;
    margin-bottom: 30px; 
    font-size: 1.6em; 
    font-weight: bold; 
    color: #222; 
    text-align: center; 
}

/* Quiz 1 Specific Styles */
.trend-option {
    margin-bottom: 18px; 
    padding: 15px; 
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fafafa;
    display: flex; 
    align-items: flex-start; 
    transition: background-color 0.3s ease;
}

.trend-option:hover {
    background-color: #f0f0f0;
}

.trend-option input[type="checkbox"] {
    margin-right: 12px; 
    margin-top: 5px; 
    cursor: pointer;
    transform: scale(1.4); 
}

.trend-option label {
    cursor: pointer;
    flex: 1; 
    color: #333;
    font-size: 1.1em; 
    line-height: 1.6; 
}

/* Quiz 1 Feedback Styles */
.trend-option.correct-selection {
     background-color: #a2d0b0; 
    border-color: #8bc79a;
    font-weight: bold;
}

.trend-option.incorrect-selection {
     background-color: #f1b0b7; 
    border-color: #ec98a0;
     font-weight: bold;
}
.trend-option.missed-answer {
     background-color: #fff3cd; 
    border-color: #ffeeba;
     font-style: italic;
}

/* Shared Button Styles */
.quiz-container button,
.fill-blanks-container button,
.cloze-container button:not(.print-button) { 
    display: block;
    margin: 25px auto 15px; 
    padding: 15px 30px; 
    font-size: 1.4em; 
    font-weight: bold;
    color: white;
    background-color: #FF0000; 
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#cloze-form button[type="submit"] {
     background-color: #008000; /* Green */
     margin: 25px auto 15px; 
     display: block;
}

.cloze-container button {
     background-color: #008000; /* Green */
}

/* NEW Print Button Styles */
.print-button {
    display: inline-block; 
    padding: 8px 15px;
    font-size: 0.9em;
    color: #333;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    float: right; 
    margin: -40px 0 10px 10px; 
    position: relative; 
    z-index: 2; 
}

.print-button:hover {
    background-color: #dee2e6;
}

/* NEW Discussion Questions Styles */
.discussion-container {
    background-color: #fdfdfd; 
    padding-top: 20px;
    padding-bottom: 40px;
}

.notebook-page {
    background:
        linear-gradient(to bottom, transparent 29px, #a7d4f5 29px, #a7d4f5 30px, transparent 30px), 
        linear-gradient(to right, transparent 69px, #f7baba 69px, #f7baba 71px, transparent 71px); 
    background-size: 100% 30px, 100% 100%; 
    background-color: #fdfdfd; 
    border: 1px solid #ccc;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.1);
    padding: 20px 30px 20px 85px; 
    min-height: 300px; 
    position: relative; 
    font-family: 'Kalam', cursive; 
    line-height: 30px; 
    font-size: 1.2em;
    color: #2a2a2a;
    margin-bottom: 30px; 
}

.notebook-section {
    margin-bottom: 30px; 
}

.notebook-section h3 {
    font-family: 'Special Elite', cursive; 
    color: #555;
    margin-bottom: 15px;
    font-size: 1.8em;
    border-bottom: 1px dashed #bbb;
    padding-bottom: 5px;
    line-height: 1.4; 
}

.question-item {
    margin-bottom: 20px; 
}

.question-item p {
    margin: 0 0 5px 0; 
    line-height: 30px; 
    font-weight: 400; 
}

.keywords {
    font-size: 0.8em;
    font-style: italic;
    color: #666;
    display: block; 
    line-height: 1.5; 
    margin-left: 15px; 
}

/* Optional: Add hole punch effect */
.notebook-page::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 25px; 
    width: 15px;
    height: 15px;
    background-color: #f0f0f0; 
    border: 1px solid #ccc;
    border-radius: 50%;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 1; 
}
.notebook-page::after { 
    content: '';
    position: absolute;
    top: 55px; 
    left: 25px;
    width: 15px;
    height: 15px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 50%;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 1; 
}

/* Clear floats after print button */
.discussion-container h2::after,
.cloze-container h2::after {
    content: none;
}

/* NEW Style for Cloze Notebook page */
.cloze-notebook {
    background:
        linear-gradient(to bottom, transparent 29px, #b0e0e6 29px, #b0e0e6 30px, transparent 30px), 
        linear-gradient(to right, transparent 69px, #90ee90 69px, #90ee90 71px, transparent 71px); 
    background-size: 100% 30px, 100% 100%;
    background-color: #f5fffa; 
    line-height: 30px; 
}
.cloze-notebook p {
    margin-bottom: 15px; 
    line-height: 30px; 
    color: #2a2a2a; 
}

/* Styles for Cloze Exercise */
.cloze-blank {
    border: none;
    border-bottom: 1px solid #555;
    background-color: transparent;
    font-family: 'Kalam', cursive; 
    font-size: 1em; 
    line-height: 1.4; 
    padding: 0 2px;
    margin: 0 3px;
    text-align: center;
    outline: none;
    vertical-align: baseline;
    box-shadow: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    min-width: 40px; 
}

.cloze-blank.drag-over {
    background-color: #e0f7fa; 
    border-bottom: 1px solid #00acc1;
}

.cloze-blank.correct {
    background-color: #d4edda;
    color: #155724;
    border-bottom: 1px solid #8bc79a;
    font-weight: bold;
}

.cloze-blank.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border-bottom: 1px solid #ec98a0;
    font-weight: bold;
}

/* Word Bank Styles */
.word-bank-container {
    margin-top: 30px; 
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 5px;
}
.word-bank-container h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-family: 'Kalam', cursive;
}

.word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.word-bank-item {
    padding: 5px 12px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: grab;
    font-family: monospace;
    font-size: 1.1em;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    user-select: none; 
}

.word-bank-item:active {
    cursor: grabbing;
}

.word-bank-item.used {
    opacity: 0.4;
    cursor: default;
    background-color: #f8f9fa;
    text-decoration: line-through;
}

/* Disclaimer Styles */
.disclaimer {
    margin-top: 40px; 
    padding: 20px; 
    background-color: #fff3cd; 
    border: 1px solid #ffeeba;
    border-radius: 5px;
    color: #856404; 
    font-size: 1.1em; 
    text-align: center;
    line-height: 1.6;
}

/* Media query for larger screens */
@media (min-width: 768px) {
  .video-container iframe {
    width: calc(50% - 10px); 
  }
  h1 {
      font-size: 7em; 
  }
}

@media (min-width: 1200px) {
  .video-container iframe {
     width: calc(33.333% - 10px);
  }
   h1 {
      font-size: 8em; 
  }
}

/* NEW Print Styles - Refined for Single Page Poster */
@media print {
    @page {
        size: A4 portrait;
        margin: 0.75in; 
    }

    body {
        font-size: 11pt; 
        margin: 0;
        padding: 0;
        background-color: #fff;
        color: #000;
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 
        line-height: 1.4; 
    }

    /* Hide everything except the designated printing container */
    body > *:not(.printing-container) {
        display: none !important;
    }

     /* Ensure the container holding the printing section is visible and clear */
     .printing-container {
         display: block !important;
         padding: 0 !important;
         margin: 0 !important;
         border: none !important;
         box-shadow: none !important;
         background: none !important;
         width: 100% !important;
         max-width: 100% !important;
     }

    /* Show only the section being printed within its container */
    .printing-section {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important; 
        border: 2px solid #000 !important; 
        box-shadow: none !important;
        background: #fff !important; 
        page-break-inside: avoid !important;
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important; 
        line-height: 1.4 !important; 
        color: #000 !important; 
    }

    /* Style the Discussion Notebook specifically for poster print */
    .printing-section#discussion-notebook {
        padding: 0.5in !important; 
        background: none !important; 
        border: none !important; 
        min-height: 0 !important; 
    }

    /* Hide elements within the printing section that shouldn't print */
    .printing-section .print-button,
    .printing-section .keywords,
    .printing-section::before, 
    .printing-section::after,  
    .printing-section .notebook-section h3::after 
     {
        display: none !important;
    }

    /* Style the main Title (H2 inside the container) */
     .printing-container > h2 {
        display: block !important; 
        text-align: center !important;
        font-size: 22pt !important; 
        font-family: 'Arial Black', Gadget, sans-serif; 
        color: #000 !important;
        margin: 0 0 0.4in 0 !important; 
        text-decoration: none !important; 
        border-bottom: 2px solid #000 !important;
        padding-bottom: 8px !important;
        overflow: visible !important; 
        font-weight: bold;
     }

    /* Style section headings (H3) within the discussion notebook */
    .printing-section#discussion-notebook .notebook-section h3 {
        font-size: 14pt !important;
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important; 
        font-weight: bold !important;
        color: #000 !important;
        border-bottom: 1px solid #555 !important; 
        padding-bottom: 4px !important;
        margin-top: 0.3in !important; 
        margin-bottom: 0.15in !important; 
        text-align: left !important;
        page-break-after: avoid !important;
        line-height: 1.3 !important; 
        text-decoration: none !important; 
    }
     .printing-section#discussion-notebook .notebook-section:first-of-type h3 {
         margin-top: 0 !important; 
     }

    /* Style the question paragraphs */
    .printing-section#discussion-notebook .question-item p {
        font-size: 11pt !important; 
        line-height: 1.5 !important; 
        margin: 0 0 0.15in 0 !important; 
        color: #000 !important;
        font-weight: normal !important;
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
        page-break-inside: avoid !important;
    }

    /* Remove video container, other quizzes, cloze, disclaimer etc. */
     h1, .video-container, .quiz-container, .fill-blanks-container, .cloze-container, .disclaimer {
         display: none !important;
     }

     /* Force elements to not break across pages where possible */
     h2, h3, p, .notebook-section, .question-item {
        page-break-inside: avoid;
     }
     /* Prevent the container from breaking */
    .printing-container {
        page-break-inside: avoid !important;
    }
}