/* Kid-Friendly Styling for Python Lessons */

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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

.header::before {
    content: '✨';
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 30px;
    animation: sparkle 1.5s infinite;
}

.header::after {
    content: '🪄';
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 30px;
    animation: sparkle 1.5s infinite 0.3s;
}

.title {
    color: white;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0;
}

/* Main Content */
.main-content {
    padding: 30px 20px;
}

/* Sections */
.welcome-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff9e6;
    border-radius: 15px;
    border: 3px dashed #ffd700;
}

.greeting-text {
    font-size: 1.8em;
    color: #ff6b9d;
    font-weight: bold;
    margin-bottom: 10px;
}

.intro-text {
    font-size: 1.2em;
    color: #667eea;
    line-height: 1.6;
}

/* Story Section */
.story-section {
    margin-bottom: 40px;
}

.story-text {
    font-size: 1.2em;
    color: #333;
    line-height: 1.8;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f0f4ff;
    border-left: 5px solid #667eea;
    border-radius: 10px;
}

.wizard-container {
    text-align: center;
    margin: 30px 0;
}

.wizard-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-height: 300px;
}

/* Speech Bubble */
.speech-bubble {
    background-color: #ffe6f0;
    border: 3px solid #ff6b9d;
    border-radius: 20px;
    padding: 20px;
    margin: 25px 0;
    position: relative;
    text-align: center;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 30px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-top-color: #ff6b9d;
}

.speech-text {
    font-size: 1.4em;
    color: #ff6b9d;
    font-weight: bold;
    margin: 0;
}

.helper-text {
    font-size: 1.1em;
    color: #666;
    line-height: 1.6;
    margin: 20px 0;
    padding: 10px;
}

/* Lesson Section */
.lesson-section {
    background-color: #f0f4ff;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 3px solid #667eea;
}

.lesson-title {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 15px;
    text-align: center;
}

.lesson-description {
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

/* Code Block */
.code-block {
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-text {
    color: #4ec9b0;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    line-height: 1.5;
    margin: 0;
}

/* Magic Result */
.magic-result {
    background-color: #fff9e6;
    border: 3px dashed #ffd700;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.result-label {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.result-output {
    color: #ff6b9d;
    font-size: 1.4em;
    font-weight: bold;
    margin: 0;
}

/* Explanation Section */
.explanation-section {
    background-color: #fff3e0;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border-left: 5px solid #ff9800;
}

.explanation-title {
    color: #ff9800;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.explanation-list {
    list-style: none;
    padding: 0;
}

.explanation-item {
    font-size: 1.1em;
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 10px;
    margin-bottom: 10px;
}

.explanation-item::before {
    content: '⭐ ';
    margin-right: 10px;
}

.highlight {
    background-color: #ffe6f0;
    color: #ff6b9d;
    padding: 2px 6px;
    border-radius: 5px;
    font-weight: bold;
}

/* Next Lesson Section */
.next-lesson {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.3em;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.next-lesson p {
    margin: 0;
}

/* Footer */
.footer {
    background-color: #f5f5f5;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 1.1em;
    border-top: 2px solid #eee;
}

/* Animations */
@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .title {
        font-size: 1.8em;
    }

    .greeting-text {
        font-size: 1.5em;
    }

    .story-text,
    .lesson-description {
        font-size: 1em;
    }

    .speech-text {
        font-size: 1.2em;
    }

    .lesson-title {
        font-size: 1.4em;
    }

    .code-text {
        font-size: 0.9em;
    }

    .result-output {
        font-size: 1.2em;
    }

    .next-lesson {
        font-size: 1.1em;
    }

    .header::before,
    .header::after {
        font-size: 20px;
    }
}
