* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f0f4f8;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #6b48ff, #00ddeb);
    color: white;
    text-align: center;
    padding: 2rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    color: #6b48ff;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.editor, .canvas-controls {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.code-panes {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pane {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pane label {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

textarea, #liveOutput {
    width: 100%;
    height: 150px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    font-family: 'Courier New', monospace;
}

#liveOutput {
    background: white;
    height: 200px;
    border: 1px solid #ddd;
}

#canvasCode {
    height: 100px;
    margin-top: 0.5rem;
}

button, select {
    background-color: #6b48ff;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0.5rem 0.5rem 0.5rem 0;
}

button:hover, select:hover {
    background-color: #5439cc;
}

#gameButton {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    transition: background-color 0.2s;
}

#drawCanvas {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: crosshair;
    margin-bottom: 0.5rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.project-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#factOutput {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
}

footer {
    text-align: center;
    padding: 1rem;
    background: #333;
    color: white;
}

@media (max-width: 800px) {
    .code-panes {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    section {
        padding: 1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    #drawCanvas {
        width: 100%;
        height: 200px;
    }
}