html, body
{
    height: 100%;
}

html, body {
    background: #181a20;
    color: #e0e0e0;
    font-family: 'Segoe UI', 'Fira Mono', 'Consolas', monospace;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

canvas#GameCanvas {
    display: block;
    margin: 32px auto 16px auto;
    background: #23272e;
    border: 2px solid #2c313c;
    box-shadow: 0 2px 16px #000a;
    width: 100%;
    max-width: 800px;
    height: auto;
    flex: 1 0 auto;
}

#EditorArea {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 16px auto;
    background: #23272e;
    color: #e0e0e0;
    font-family: 'Fira Mono', 'Consolas', 'Monaco', monospace;
    font-size: 1.1em;
    border: 1.5px solid #2c313c;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 2px 8px #0006;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

#EditorArea:focus {
    border-color: #4f8cff;
    background: #20232a;
}

.Button {
    text-align: center;
    margin: 16px 16px 16px 16px;
    background: #4f8cff;
    color: #fff;
    font-family: inherit;
    font-size: 1.1em;
    border: none;
    border-radius: 6px;
    padding: 10px 32px;
    cursor: pointer;
    box-shadow: 0 2px 8px #0006;
    transition: background 0.2s;
    white-space: normal;
}

.Button:hover, .Button:focus {
    background: #357ae8;
}

footer {
    text-align: center;
    color: #888;
    font-size: 0.95em;
    margin-bottom: 16px;
    margin-top: auto;
    letter-spacing: 0.5px;
}

#EditorArea::-webkit-scrollbar {
    width: 8px;
    background: #23272e;
}
#EditorArea::-webkit-scrollbar-thumb {
    background: #2c313c;
    border-radius: 4px;
}

#MainPanel 
{
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    position: relative;
}

#LeftSideTooling 
{
    display: flex;
    flex-wrap: wrap;
    z-index: 2;
}

#TopLeftTooling 
{
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-wrap: wrap;
    z-index: 2;
}

#TabBar 
{
    display: flex;
    background: #222;
    border-bottom: 1px solid #444;
}

.TabButton 
{
    display: inline-block;
    background: #23272e;
    color: #e0e0e0;
    font-family: inherit;
    font-size: 1.05em;
    border: 1.5px solid #2c313c;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 8px 24px;
    margin-right: 4px;
    cursor: pointer;
    box-shadow: 0 2px 8px #0003;
    transition: background 0.2s, color 0.2s;
    outline: none;
}

.TabButton:hover, .TabButton:focus 
{
    background: #20232a;
    color: #4f8cff;
}

.TabButton.Active 
{
    background: #181a20;
    color: #4f8cff;
    border-bottom: 2px solid #181a20;
    font-weight: bold;
    z-index: 1;
}

.TabButton.Active 
{
  background: #444;
  color: white;
}

.EditorContainer
{
  display: none;
}

.EditorContainer.Active
{
  display: block;
}

.AddTabButton 
{
    display: inline-block;
    background: #444;
    color: white;
    font-family: inherit;
    font-size: 1.05em;
    border: 1.5px solid #2c313c;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 8px 24px;
    margin-right: 4px;
    cursor: pointer;
    box-shadow: 0 2px 8px #0003;
    transition: background 0.2s, color 0.2s;
    outline: none;
}

.AddTabButton:hover, .AddTabButton:focus 
{
    background: #20232a;
    color: #4f8cff;
}

input[type="file"] 
{
    display: none;
}

@media (max-width: 600px) 
{
    #EditorArea 
    {
        font-size: 0.9em;
        padding: 4px;
    }
    #LeftSideTooling 
    {
        width: 80px;
        padding: 4px;
    }
    #TopLeftTooling 
    {
        width: 80px;
        padding: 4px;
    }
}

@media (max-width: 800px) 
{
    #MainPanel 
    {
        flex-direction: column;
        align-items: center;
    }
}