/* Basic Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #f7f9fc;
    color: #333;
    padding-bottom: 100px; /* Add padding to prevent content from being hidden by the sticky footer */
}

/* Header, Tabs, Story Card, etc. (Existing styles) */
header { background-color: #fff; padding: 15px 20px; display: flex; align-items: center; border-bottom: 1px solid #eee; }
header h1 { font-size: 20px; margin: 0; flex-grow: 1; text-align: center; }
.user-icon { font-size: 24px; }
.back-arrow { font-size: 24px; text-decoration: none; color: #333; position: absolute; }
.tabs { display: flex; justify-content: center; padding: 15px; gap: 10px; }
.tab-btn { padding: 10px 20px; border: 1px solid #ddd; border-radius: 20px; background-color: #fff; font-size: 14px; cursor: pointer; }
.tab-btn.active { background-color: #e0f7ff; border-color: #007bff; color: #007bff; }
.card-container { padding: 0 15px; }
.story-card { display: block; background-color: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 15px; overflow: hidden; text-decoration: none; color: inherit; }
.story-card img { width: 100%; height: 180px; object-fit: cover; }
.card-content { padding: 15px; }
.card-content h2 { margin: 0 0 5px 0; font-size: 18px; }
.card-content p { margin: 0; font-size: 14px; color: #666; }
.story-content { padding: 20px; background-color: #fff; }
.story-hero-image { width: 100%; border-radius: 12px; margin-bottom: 20px; }
.story-content h1 { font-size: 24px; margin-bottom: 10px; }
.story-content p, .story-content h2 { line-height: 1.6; margin-bottom: 15px; }

/* --- FIX FOR STICKY BUTTON --- */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, white, rgba(255, 255, 255, 0));
    padding: 20px 20px 30px 20px;
    z-index: 10;
    display: flex;                
    justify-content: center;      
}

.challenge-btn, .finish-quiz-btn {
    display: block;
    max-width: 400px; 
    width: 100%;
    margin: 0 auto;  
    padding: 15px;
    background-color: #007bff;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}
.finish-quiz-btn {
    background-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* --- UPDATED EXERCISE STYLES --- */
.exercise-content { padding: 20px; max-width: 600px; margin: 0 auto; }
.question-block { background-color: #fff; padding: 15px; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.question-title { font-weight: bold; margin: 0 0 15px 0; font-size: 18px; }
.option { padding: 12px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s ease-in-out; }
.option:hover { background-color: #f0f8ff; }
.option.selected { border-color: #4caf50; background-color: #f0fff0; font-weight: bold; color: #2e7d32; }
.drag-option { cursor: grab; display: flex; align-items: center; }
.drag-option.dragging { opacity: 0.5; }
.drag-icon { margin-right: 10px; color: #aaa; }
.matching-container { position: relative; display: flex; justify-content: space-between; gap: 10px; }
.matching-column { width: 48%; display: flex; flex-direction: column; }
.match-option.matched { border-color: #4caf50; background-color: #f0fff0; color: #2e7d32; cursor: not-allowed; opacity: 0.7; }
.matching-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.short-answer-input { width: 100%; min-height: 80px; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; font-family: inherit; resize: vertical; box-sizing: border-box;}