* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Special Elite', 'Courier New', monospace;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    margin-bottom: 10px;
}

.explanation {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.explanation-box {
    flex: 1;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 300px;
}

.explanation-box h2 {
    color: #6e8efb;
    margin-bottom: 15px;
}

.explanation-box p {
    margin-bottom: 10px;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.gallery-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.image-container {
    display: flex;
    position: relative;
}

.image-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: white;
    z-index: 1;
}

.image-half {
    flex: 1;
    height: 350px;
    position: relative;
    overflow: hidden;
}

.image-half img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

.caption {
    padding: 15px;
}

.caption h3 {
    color: #6e8efb;
    margin-bottom: 8px;
}

.caption p {
    color: #666;
    line-height: 1.5;
}

.caption .highlight {
    font-weight: bold;
    color: #a777e3;
}

.quiz-section {
    margin-top: 40px;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quiz-header {
    text-align: center;
    margin-bottom: 20px;
}

.quiz-header h2 {
    color: #6e8efb;
    margin-bottom: 10px;
}

.quiz-item {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.quiz-item:last-child {
    border-bottom: none;
}

.quiz-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.quiz-prompt {
    margin-bottom: 15px;
    font-weight: bold;
}

.quiz-input-container {
    display: flex;
    margin-bottom: 15px;
}

.quiz-input-container select, 
.quiz-input-container input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
}

.quiz-input-container select {
    width: 100px;
}

.quiz-input-container input[type="text"] {
    flex-grow: 1;
}

.check-button {
    background-color: #6e8efb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.check-button:hover {
    background-color: #5d7de3;
}

.feedback {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.correct {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

.suggestion {
    font-style: italic;
    margin-top: 5px;
}

.notebook-exercises {
    margin-top: 40px;
}

.notebook-page {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-image: 
        linear-gradient(#e8e8e8 1px, transparent 1px),
        linear-gradient(90deg, #fbfbfb 1px, transparent 1px);
    background-size: 100% 25px, 1px 100%;
    line-height: 25px;
    position: relative;
}

.notebook-page::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 60px;
    width: 1px;
    background-color: #ff9999;
}

.notebook-page h2 {
    color: #6e8efb;
    margin-bottom: 25px;
    text-align: center;
    line-height: normal;
    border-bottom: 2px solid #a777e3;
    padding-bottom: 10px;
}

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

.exercise-section h3 {
    color: #a777e3;
    margin-bottom: 10px;
    margin-left: 20px;
    line-height: normal;
}

.exercise-list {
    padding-left: 70px;
}

.exercise-list li {
    margin-bottom: 10px;
    padding-right: 20px;
}

.tense {
    color: #6e8efb;
    font-style: italic;
    margin-left: 5px;
}

.answer-line {
    display: inline-block;
    border-bottom: 1px solid #333;
    width: calc(100% - 50px);
    height: 25px;
    line-height: 25px;
}

.part-b li {
    margin-bottom: 25px;
}

.notebook-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.control-button {
    background-color: #6e8efb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.control-button:hover {
    background-color: #5d7de3;
}

.answer {
    color: #a777e3;
    font-weight: bold;
    display: none;
}

.answer.visible {
    display: inline;
}

.video-container {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gaza-examples {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.gaza-examples h2 {
    color: #6e8efb;
    margin-bottom: 15px;
    text-align: center;
}

.gaza-examples ul {
    list-style-type: none;
    padding: 0;
}

.gaza-examples li {
    margin-bottom: 10px;
    padding: 8px;
    border-bottom: 1px solid #eee;
    line-height: 1.5;
}

.gaza-examples li:last-child {
    border-bottom: none;
}

.page-nav {
    margin-top: 20px;
}

.page-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    list-style-type: none;
}

.page-nav li {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.page-nav li:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.page-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: 1fr;
    }
    
    .explanation {
        flex-direction: column;
    }
    
    .exercise-list {
        padding-left: 70px;
    }
    
    .notebook-page::before {
        left: 40px;
    }
    
    .page-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

@media print {
    body * {
        visibility: hidden;
    }
    
    .notebook-page, .notebook-page * {
        visibility: visible;
    }
    
    .notebook-controls, .notebook-controls * {
        visibility: hidden;
    }
    
    .answer {
        display: none;
    }
    
    .notebook-page {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        padding: 15px;
        font-size: 11px;
        line-height: 22px;
        background-size: 100% 22px, 1px 100%;
        margin: 0;
        page-break-inside: avoid;
    }
    
    @page {
        size: portrait;
        margin: 0.5cm;
    }
    
    .exercise-list li {
        margin-bottom: 8px;
    }
    
    .part-b li {
        margin-bottom: 15px;
    }
    
    .answer-line {
        height: 22px;
        line-height: 22px;
    }
    
    .show-answers .answer {
        display: inline !important;
        color: #a777e3;
    }
}