* {
    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, #66eaea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #295f5f, #8e50cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.test-btn {
    background: linear-gradient(45deg, #ff3d3d, #ffae19);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    height: fit-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.sidebar h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.lesson-list {
    list-style: none;
}

.lesson-item {
    margin-bottom: 10px;
}

.lesson-link {
    display: block;
    padding: 15px 20px;
    color: #555;
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.lesson-link:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.lesson-link:hover:before {
    left: 100%;
}

.lesson-link:hover {
    background: linear-gradient(45deg, #66eaea, #764ba2);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.lesson-link.active {
    background: linear-gradient(45deg, #66eaea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.content-area {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: 600px;
}

.lesson-content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2rem;
    position: relative;
}

.lesson-content h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, #66eaea, #764ba2);
    border-radius: 2px;
}

.lesson-image {
    width: 100%;
    height: auto;
    background: linear-gradient(45deg, #ddd, #f0f0f0);
    border-radius: 15px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.lesson-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

.quiz-section {
    background: linear-gradient(135deg, #9f68ff 0%, #ff30b3 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin-top: 30px;
    text-align: center;
}

.quiz-section h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.quiz-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.quiz-btn:hover {
    background: white;
    color: #f5576c;
    transform: translateY(-2px);
}

.quiz-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    overflow-y: auto;
}

.quiz-container {
    max-width: 800px;
    margin: 20px auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.quiz-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.quiz-progress {
    background: #f0f0f0;
    height: 8px;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(45deg, #66eaea, #764ba2);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.question-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid #66eaea;
}

.question-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.6;
}

.question-image {
    width: 100%;
    max-width: 400px;
    height: 200px;
    background: linear-gradient(45deg, #ddd, #f0f0f0);
    border-radius: 10px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1rem;
}

.answer-options {
    list-style: none;
    margin: 20px 0;
}

.answer-option {
    margin-bottom: 12px;
}

.answer-label {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.answer-label:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateX(5px);
}

.answer-label input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
}

.answer-label.selected {
    border-color: #667eea;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.nav-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn.primary {
    background: linear-gradient(45deg, #66eaea, #764ba2);
    color: white;
}

.nav-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.close-quiz {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ff6b6b;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-quiz:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.results-container {
    text-align: center;
    padding: 30px;
}

.score-display {
    font-size: 3rem;
    font-weight: bold;
    margin: 20px 0;
    background: linear-gradient(45deg, #66eaea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-message {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 30px;
}

.results-section {
    text-align: left;
    margin-top: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.result-question {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.result-question:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.result-status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-status.correct {
    background: #d4edda;
    color: #155724;
}

.result-status.incorrect {
    background: #f8d7da;
    color: #721c24;
}

.user-answer,
.correct-answer {
    margin: 8px 0;
    font-size: 1rem;
}

.correct-answer {
    color: #28a745;
    font-weight: 600;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    h1 {
        font-size: 2rem;
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}