/* Reset & base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #111;
    color: #eee;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header, footer {
    text-align: center;
    padding: 1rem;
    background-color: #1a1a1a;
    border-bottom: 2px solid #444;
}

footer {
    border-top: 2px solid #444;
    border-bottom: none;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
}

/* IDE + Assets Layout */
#ide-section {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

#editor-container, #assets-container {
    background-color: #1e1e1e;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 1rem;
    flex: 1 1 300px;
    min-width: 300px;
}

#editor-container h2, #assets-container h2 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: #ffcc00;
}

#editor {
    height: 300px;
    background-color: #121212;
    border: 1px solid #333;
    border-radius: 5px;
    overflow: auto;
    padding: 0.5rem;
    font-family: monospace;
    font-size: 14px;
    color: #eee;
    margin-bottom: 0.5rem;
}

button {
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    border: none;
    border-radius: 5px;
    background-color: #ffcc00;
    color: #111;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #e6b800;
}

/* Asset list */
#asset-upload {
    display: block;
    margin-bottom: 0.5rem;
}

#asset-list {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 0.5rem;
}

#asset-list li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

/* Game Canvas */
#game-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    border: 2px solid #ffcc00;
    border-radius: 8px;
    background-color: #000;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    #ide-section {
        flex-direction: column;
    }
}
