/* The Daily Lesson - Kelly's Universal Classroom Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
}

.app-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: auto 1fr;
    grid-template-areas: 
        "header header"
        "main sidebar";
    min-height: 100vh;
    gap: 20px;
    padding: 20px;
}

/* Header */
.header {
    grid-area: header;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.logo h1 {
    font-size: 2.5rem;
    color: #4a5568;
    margin-bottom: 5px;
}

.logo p {
    color: #718096;
    font-size: 1.1rem;
}

.date-display {
    font-size: 1.2rem;
    color: #4a5568;
    font-weight: 600;
}

/* Age Selector */
.age-selector-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.age-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 15px;
}

.age-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.age-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.age-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.age-slider::-moz-range-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.age-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

#age-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.age-label-small {
    font-size: 0.9rem;
    color: #718096;
}

.age-buckets {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.age-bucket {
    padding: 10px;
    background: #f7fafc;
    border: 2px solid transparent;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.age-bucket:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.age-bucket.active {
    background: #667eea;
    color: white;
    border-color: #5a67d8;
}

/* Main Content */
.main-content {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-container {
    position: relative;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.kelly-video {
    width: 100%;
    height: auto;
    display: block;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-overlay {
    opacity: 1;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #667eea;
    width: 0%;
    transition: width 0.1s ease;
}

.time-display {
    font-size: 0.9rem;
    color: white;
    min-width: 80px;
}

/* Lesson Content */
.lesson-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.lesson-header {
    margin-bottom: 25px;
}

#lesson-title {
    font-size: 2rem;
    color: #4a5568;
    margin-bottom: 10px;
}

.lesson-meta {
    display: flex;
    gap: 20px;
    color: #718096;
    font-size: 1rem;
}

/* Interaction Area */
.interaction-area {
    margin: 25px 0;
}

.choice-container {
    display: grid;
    gap: 15px;
}

.choice-btn {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    font-size: 1.1rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.choice-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.choice-btn.selected {
    background: #667eea;
    color: white;
    border-color: #5a67d8;
}

/* Lesson Progress */
.lesson-progress {
    margin-top: 30px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    background: #f7fafc;
    border-radius: 12px;
    padding: 5px;
}

.step {
    flex: 1;
    padding: 15px;
    text-align: center;
    font-weight: 500;
    color: #718096;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.step.active {
    background: #667eea;
    color: white;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.sidebar-section h3 {
    font-size: 1.3rem;
    color: #4a5568;
    margin-bottom: 15px;
}

.sidebar-section p {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 15px;
}

.sidebar-section ul {
    list-style: none;
    color: #718096;
}

.sidebar-section li {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-section li:last-child {
    border-bottom: none;
}

.live-class-info {
    text-align: center;
}

.live-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin: 15px 0;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Teaching Moment Indicator */
.teaching-moment {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 350px;
    display: none;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.teaching-moment-content {
    text-align: center;
}

.teaching-moment-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: pulse 2s ease-in-out infinite;
}

.teaching-moment-type {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.teaching-moment-text {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
    font-style: italic;
}

/* Video Placeholder */
.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.placeholder-content {
    text-align: center;
    color: white;
    padding: 40px;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.placeholder-content h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.placeholder-content p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.placeholder-script {
    font-size: 1.1rem;
    font-style: italic;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border-left: 4px solid white;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "main"
            "sidebar";
    }
    
    .age-buckets {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 10px;
        gap: 15px;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .age-buckets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lesson-content {
        padding: 20px;
    }
    
    .sidebar-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .age-buckets {
        grid-template-columns: 1fr;
    }
    
    .video-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .time-display {
        min-width: auto;
    }
}

