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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

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

header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 15px;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.user-info {
    color: #7f8c8d;
}

.back-link {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    display: inline-block;
}

.back-link:hover {
    color: #2980b9;
}

main {
    min-height: 60vh;
}

.progress-overview {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.progress-overview h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
}

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

.module-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.module-card.unlocked:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.module-card.locked {
    opacity: 0.6;
    background: #ecf0f1;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.module-number {
    font-weight: bold;
    color: #3498db;
}

.module-status {
    font-size: 14px;
    color: #27ae60;
}

.locked-badge {
    color: #95a5a6;
}

.module-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.module-card p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
}

.module-actions {
    margin-top: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.certificate-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin-top: 30px;
}

.certificate-section h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.certificate-section .btn-success {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 16px;
}

.module-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.module-content section {
    margin-bottom: 30px;
}

.module-content h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.video-wrapper {
    margin-top: 20px;
}

.video-placeholder {
    background: #ecf0f1;
    padding: 60px 20px;
    text-align: center;
    border-radius: 8px;
    border: 2px dashed #bdc3c7;
}

.video-placeholder code {
    background: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    color: #e74c3c;
}

.watched-indicator {
    color: #27ae60;
    font-weight: bold;
    margin-top: 15px;
}

.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 20px;
    border-radius: 4px;
}

.materials-list {
    margin-top: 15px;
}

.material-link {
    display: inline-block;
    padding: 15px 25px;
    background: #fff;
    border: 2px solid #3498db;
    color: #3498db;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s;
}

.material-link:hover {
    background: #3498db;
    color: white;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.quiz-container {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quiz-info {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.question-block {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
}

.question-header {
    margin-bottom: 15px;
}

.question-number {
    background: #3498db;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.question-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #2c3e50;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.option:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.form-actions .btn {
    padding: 15px 40px;
    font-size: 16px;
}

.result-container {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-box {
    text-align: center;
    padding: 40px;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.result-box.success {
    background: #e8f5e9;
    border-radius: 8px;
}

.result-box.success .result-icon {
    color: #27ae60;
}

.result-box.failure {
    background: #ffebee;
    border-radius: 8px;
}

.result-box.failure .result-icon {
    color: #e74c3c;
}

.score-display {
    font-size: 72px;
    font-weight: bold;
    margin: 20px 0;
}

.result-box.success .score-display {
    color: #27ae60;
}

.result-box.failure .score-display {
    color: #e74c3c;
}

.score-label {
    font-size: 36px;
}

.retry-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.result-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
    }
}
