/* Lesson Page Stylesheet */

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

body {
    font-family: 'Rajdhani', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: #0a0a0a;
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 255, 249, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 255, 249, 0.03) 3px
        );
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.1) 0%, rgba(255, 0, 128, 0.1) 100%);
    background-color: rgba(10, 10, 10, 0.95);
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 255, 249, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #00fff9;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    color: #00fff9;
    font-size: 1.8em;
    font-weight: bold;
    text-decoration: none;
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 249, 0.6);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-links a {
    color: #cccccc;
    text-decoration: none;
    padding: 25px 20px;
    display: block;
    transition: all 0.3s;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #00fff9;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #00fff9;
    text-shadow: 0 0 10px rgba(0, 255, 249, 0.5);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

/* Lesson Layout */
.lesson-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding: 30px 20px;
}

/* Sidebar */
.lesson-sidebar {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 255, 249, 0.1);
    position: sticky;
    top: 90px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    border: 1px solid rgba(0, 255, 249, 0.3);
}

.lesson-sidebar h3 {
    color: #00fff9;
    margin-bottom: 20px;
    font-size: 1.2em;
    text-shadow: 0 0 10px rgba(0, 255, 249, 0.4);
}

.lesson-nav {
    list-style: none;
}

.lesson-nav li {
    margin-bottom: 8px;
}

.lesson-nav a {
    color: #cccccc;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 0.95em;
    border-left: 2px solid transparent;
}

.lesson-nav a:hover {
    background: rgba(0, 255, 249, 0.1);
    color: #00fff9;
    padding-left: 16px;
    border-left-color: #00fff9;
}

/* Main Content */
.lesson-main {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 255, 249, 0.1);
    border: 1px solid rgba(0, 255, 249, 0.3);
}

.lesson-header-section {
    margin-bottom: 40px;
}

.lesson-tag {
    display: inline-block;
    background: linear-gradient(135deg, #00fff9, rgba(0, 255, 249, 0.7));
    color: #0a0a0a;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    margin-bottom: 15px;
    border: 1px solid #00fff9;
    box-shadow: 0 0 20px rgba(0, 255, 249, 0.4);
    font-weight: 600;
}

h1 {
    color: #00fff9;
    font-size: 2.8em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 255, 249, 0.5);
}

.progress-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 10px;
    border-radius: 10px;
    margin: 25px 0 10px 0;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 249, 0.3);
}

.progress-fill {
    background: linear-gradient(90deg, #00fff9 0%, #ff0080 100%);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 255, 249, 0.5);
}

.progress-text {
    text-align: center;
    color: #cccccc;
    font-size: 0.95em;
    font-weight: 500;
}

.section {
    margin: 40px 0;
}

h2 {
    color: #ff0080;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 2em;
    border-left: 5px solid #00fff9;
    padding-left: 20px;
    text-shadow: 0 0 15px rgba(255, 0, 128, 0.4);
}

.h3 {
    color: #00fff9;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.4em;
}

p {
    margin-bottom: 15px;
    color: #cccccc;
    line-height: 1.8;
}

/* Info Boxes */
.overview-box {
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.1) 0%, rgba(0, 255, 249, 0.05) 100%);
    border-left: 5px solid #00fff9;
    padding: 30px;
    margin: 25px 0;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 249, 0.3);
    border-left-width: 5px;
}

.overview-box h3 {
    color: #00fff9;
    margin-top: 0;
}

.analogy-box {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.1) 0%, rgba(255, 184, 0, 0.05) 100%);
    border-left: 5px solid #ffb800;
    padding: 30px;
    margin: 25px 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 184, 0, 0.3);
    border-left-width: 5px;
}

.analogy-box h3 {
    color: #ffb800;
}

.analogy-box ul {
    margin: 15px 0 15px 20px;
}

.analogy-box li {
    margin-bottom: 10px;
    color: #cccccc;
}

/* Key Concepts */
.key-concepts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.concept-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    border-top: 4px solid #00fff9;
    transition: all 0.3s;
    border: 1px solid rgba(0, 255, 249, 0.3);
    border-top-width: 4px;
}

.concept-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 255, 249, 0.2);
}

.concept-card strong {
    color: #ff0080;
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.concept-card p {
    color: #cccccc;
    font-size: 0.95em;
}

/* Exercises */
.exercise {
    background: linear-gradient(135deg, rgba(0, 255, 249, 0.05) 0%, transparent 100%);
    border: 2px solid #00fff9;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0, 255, 249, 0.15);
}

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

.exercise-title {
    color: #00fff9;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 249, 0.4);
}

.exercise-status {
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: bold;
}

.status-pending {
    background: rgba(255, 184, 0, 0.2);
    color: #ffb800;
    border: 1px solid #ffb800;
}

.status-complete {
    background: rgba(0, 255, 65, 0.2);
    color: #00ff41;
    border: 1px solid #00ff41;
}

.code-editor {
    background: #2d2d2d;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border-left: 5px solid #00fff9;
    box-shadow: 0 4px 15px rgba(0, 255, 249, 0.1);
}

.code-input {
    width: 100%;
    min-height: 150px;
    background: #1e1e1e;
    color: #d4d4d4;
    border: none;
    padding: 15px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    border-radius: 8px;
    resize: vertical;
    outline: none;
    line-height: 1.5;
}

.code-input:focus {
    background: #252525;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.run-btn, .check-btn, .hint-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.run-btn {
    background: linear-gradient(135deg, #00ff41, rgba(0, 255, 65, 0.8));
    color: #0a0a0a;
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.3);
}

.run-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #00ff41, #00e63a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 65, 0.4);
}

.check-btn {
    background: linear-gradient(135deg, #00fff9, rgba(0, 255, 249, 0.8));
    color: #0a0a0a;
    box-shadow: 0 4px 15px rgba(0, 255, 249, 0.3);
}

.check-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #00fff9, #00e6e0);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 249, 0.4);
}

.hint-btn {
    background: linear-gradient(135deg, #ffb800, rgba(255, 184, 0, 0.8));
    color: #0a0a0a;
    box-shadow: 0 4px 15px rgba(255, 184, 0, 0.3);
}

.hint-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffb800, #e6a600);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 184, 0, 0.4);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.output-area {
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    min-height: 60px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.95em;
    white-space: pre-wrap;
}

.output-success {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
    color: #00ff41;
}

.output-error {
    border-color: #ff073a;
    background: rgba(255, 7, 58, 0.1);
    color: #ff073a;
}

.hint-box {
    background: rgba(255, 184, 0, 0.1);
    border-left: 4px solid #ffb800;
    padding: 20px;
    margin-top: 15px;
    border-radius: 8px;
    display: none;
    border: 1px solid rgba(255, 184, 0, 0.3);
    border-left-width: 4px;
}

.hint-box.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-area {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid #00fff9;
    border-radius: 10px;
    padding: 30px;
    margin-top: 20px;
    min-height: 120px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 255, 249, 0.15);
}

code {
    background: rgba(255, 0, 128, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', Consolas, monospace;
    color: #ff0080;
    font-size: 0.9em;
    border: 1px solid rgba(255, 0, 128, 0.3);
}

ol {
    margin: 20px 0 20px 30px;
}

ol li {
    margin-bottom: 12px;
    color: #cccccc;
    line-height: 1.8;
}

/* Demo Button */
.demo-button {
    display: inline-block;
    background: linear-gradient(135deg, #00fff9 0%, #ff0080 100%);
    color: #0a0a0a;
    padding: 18px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2em;
    margin: 25px 0;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 255, 249, 0.4);
    border: 1px solid #00fff9;
}

.demo-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 249, 0.6);
}

/* Celebration */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.overlay.show {
    display: block;
}

.celebration {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 255, 249, 0.3);
    z-index: 1000;
    text-align: center;
    max-width: 500px;
    border: 2px solid #00fff9;
}

.celebration.show {
    display: block;
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    0% { 
        transform: translate(-50%, -50%) scale(0.5); 
        opacity: 0; 
    }
    100% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1; 
    }
}

/* Lesson Footer */
.lesson-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid rgba(0, 255, 249, 0.3);
    gap: 15px;
}

.btn-secondary {
    display: inline-block;
    background: rgba(0, 255, 249, 0.1);
    color: #00fff9;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s;
    border: 1px solid #00fff9;
}

.btn-secondary:hover {
    background: rgba(0, 255, 249, 0.2);
    transform: translateX(-3px);
    box-shadow: 0 0 20px rgba(0, 255, 249, 0.3);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #050505 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 50px;
    border-top: 2px solid #00fff9;
    box-shadow: 0 -4px 20px rgba(0, 255, 249, 0.1);
}

.footer p {
    opacity: 0.8;
    margin: 5px 0;
    color: #cccccc;
}

/* Responsive */
@media (max-width: 1024px) {
    .lesson-container {
        grid-template-columns: 1fr;
    }
    
    .lesson-sidebar {
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .lesson-main {
        padding: 25px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.6em;
    }
    
    .exercise {
        padding: 20px;
    }
    
    .exercise-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .key-concepts {
        grid-template-columns: 1fr;
    }
    
    .lesson-footer {
        flex-direction: column;
    }
    
    .btn-secondary {
        text-align: center;
    }
}