* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f8ff;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background-color: #ffaa00;
    color: white;
    padding: 15px 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: #fff;
    border-right: 2px solid #ddd;
    padding: 20px;
    overflow-y: auto;
}

.sidebar h3 {
    margin-bottom: 15px;
    color: #444;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 10px;
    margin-bottom: 8px;
    background-color: #e6f2ff;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.sidebar li:hover, .sidebar li.active {
    background-color: #b3d9ff;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

.lesson-info {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.lesson-info h2 {
    color: #ff6600;
    margin-bottom: 10px;
}

.ide {
    display: flex;
    min-height: 450px;
    flex-direction: column;
    flex: 1;
    background-color: #282a36;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.editor-header {
    background-color: #44475a;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: bold;
}

#run-btn {
    background-color: #50fa7b;
    color: #282a36;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
}

#run-btn:active {
    transform: scale(0.95);
}

#code-editor {
    flex: 1;
    width: 100%;
    background-color: #282a36;
    color: #f8f8f2;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    padding: 15px;
    border: none;
    resize: none;
    outline: none;
}

.console {
    height: 150px;
    background-color: #1e1f29;
    color: #bd93f9;
    border-top: 2px solid #44475a;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
}

.console span {
    font-size: 12px;
    color: #8be9fd;
    margin-bottom: 5px;
}

#console-output {
    flex: 1;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
}

.seo-about {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    color: #444;
}

.seo-about h2 {
    color: #ffaa00;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.seo-about h3 {
    color: #555;
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 10px;
}

.seo-about p {
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1rem;
}

.seo-about ul {
    margin-left: 20px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.seo-about li {
    margin-bottom: 8px;
}

.seo-faq {
    margin-top: 30px;
    border-top: 2px dashed #eee;
    padding-top: 20px;
}

.seo-faq h3 {
    color: #444;
    margin-bottom: 15px;
}

details {
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

details:hover {
    background-color: #f1f1f1;
}

summary {
    font-weight: bold;
    color: #333;
    font-size: 1.05rem;
    outline: none;
    list-style-type: '👉 '; 
}

details p {
    margin-top: 10px;
    margin-bottom: 0;
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
    cursor: text;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .ide {
        flex: none;
        margin-bottom: 20px;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #ddd;
        padding: 10px 15px;
        max-height: 140px; 
    }

    .sidebar h3 {
        margin-bottom: 10px;
        font-size: 1.1em;
    }

    .sidebar ul {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    
    .sidebar ul::-webkit-scrollbar {
        display: none;
    }

    .sidebar li {
        margin-bottom: 0;
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 15px;
    }

    .main-content {
        padding: 15px;
        overflow-y: auto;
    }

    #code-editor {
        font-size: 14px;
        padding: 10px;
    }

    .console {
        height: 120px;
        padding: 10px;
    }

    .seo-about {
        padding: 15px;
        margin-top: 20px;
    }
    .seo-about h2 {
        font-size: 1.3em;
    }
}

