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

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

/* Полноэкранный режим для урока */
body.fullscreen-lesson {
    background: #000;
    overflow: hidden;
}

body.fullscreen-lesson .main-content {
    padding: 0;
    margin: 0;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: inline-block;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 0.8;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.lesson-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.lesson-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.lesson-info p {
    color: #7f8c8d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.duration {
    background: #3498db;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-play {
    display: inline-block;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s;
    text-align: center;
    width: 100%;
}

.btn-play:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.video-container {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#videoPlayer {
    width: 100%;
    height: auto;
    min-height: 400px;
}

.lesson-details {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.lesson-details h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.lesson-details p {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.lesson-meta {
    border-top: 1px solid #ecf0f1;
    padding-top: 20px;
}

.lesson-meta .duration {
    background: #27ae60;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 500;
}

/* Полноэкранное видео */
.video-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 1000;
}

.video-fullscreen #videoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.lesson-info-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    border-radius: 8px;
    max-width: 400px;
    z-index: 1001;
}

.lesson-info-overlay h2 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.lesson-info-overlay p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.lesson-info-overlay .duration {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.close-lesson {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-lesson:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Хедер и футер */
.main-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    margin-bottom: 40px;
}

.main-header h1 a {
    color: white;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.main-header h1 a:hover {
    opacity: 0.8;
}

.main-content {
    min-height: calc(100vh - 200px);
}

.main-footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    color: white;
}

.main-footer p {
    margin: 0;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-header h1 {
        font-size: 2rem;
    }
    
    .lessons-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .lesson-card {
        padding: 20px;
    }
    
    #videoPlayer {
        min-height: 250px;
    }
    
    .lesson-info-overlay {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        padding: 10px;
    }
    
    .close-lesson {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}
