body {
    background: #181818;
    color: #f0f0f0;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
}
.container {
    max-width: 900px;
    margin: 30px auto;
    background: #232323;
    border-radius: 10px;
    box-shadow: 0 4px 24px #000a;
    padding: 32px 24px;
}
h1, h2 {
    color: #ffb347;
    margin-top: 0;
}

.tab-bar {
    display: flex;
}
.tab-btn {
    background: #232323;
    color: #ffb347;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 28px;
    font-size: 1.1em;
    cursor: pointer;
    transition: border 0.2s, background 0.2s;
    border-radius: 8px 8px 0 0;
    margin-right: 2px;
}
.tab-btn.active {
    background: #181818;
    border-bottom: 3px solid #ffb347;
    color: #fff;
    font-weight: bold;
}
.tab-content {
    background: #181818;
    border-radius: 0 0 10px 10px;
    padding: 18px 10px 10px 10px;
}
.tab {
    display: none;
}
.tab.active {
    display: block;
}

.scrollable-memory {
    min-height: 60px;
    max-height: 600px;
    overflow-y: auto;
    background: #181818;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
    white-space: pre;
    resize: vertical;
}
.memaddr {
    color: #888;
    font-size: 0.95em;
    margin-right: 6px;
    font-family: 'Fira Mono', 'Consolas', monospace;
}
.editor-section {
    margin-bottom: 16px;
}
.editor {
    background: #111;
    color: #888;
    border: 1px solid #444;
    border-radius: 6px;
    min-height: 80px;
    max-height: 600px;
    overflow-y: auto;
    font-family: 'Fira Mono', 'Consolas', monospace;
    font-size: 1.1em;
    padding: 10px;
    outline: none;
    white-space: pre-wrap;
    word-break: break-all;
    resize: vertical;
}
.bf-code {
    background: #333;
    color: #ffb347;
    padding: 4px;
    border-radius: 6px;
    overflow-x: auto;
}
.bf-cmd {
    color: #ffb347;
    font-weight: bold;
}
.bf-cmd-active {
    background: #fff;
    color: #fff !important;
    border-radius: 3px;
    padding: 0 2px;
}
button {
    background: #ffb347;
    color: #232323;
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 1em;
    margin-right: 0;
    cursor: pointer;
}
button:hover {
    background: #ffd580;
}
.controls {
    margin-bottom: 18px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}
button.stop, button.stop:hover {
    background: #e74c3c;
    color: #fff;
}
.output-section {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}
#bf-output {
    min-height: 40px;
    max-height: 100px;
    background: #111;
    color: #ffb347;
    border: 1px solid #444;
    border-radius: 6px;
    font-family: 'Fira Mono', 'Consolas', monospace;
    font-size: 1em;
    margin-bottom: 8px;
    padding: 6px;
    resize: vertical;
}
#bf-input, #screen-input {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    font-family: 'Fira Mono', 'Consolas', monospace;
    font-size: 1em;
    padding: 6px;
    margin-bottom: 8px;
}

.memory-section {
    margin-bottom: 16px;
}
.memcell {
    display: inline-block;
    width: 28px;
    text-align: center;
    margin: 1px 2px;
    padding: 2px 0;
    border-radius: 3px;
    background: #232323;
    color: #ffb347;
    border: 1px solid #333;
    transition: background 0.2s, color 0.2s;
}
.memcell.active {
    background: #ffb347;
    color: #232323;
    font-weight: bold;
}
.screen-section {
    margin-bottom: 16px;
}
#screen {
    border: 2px solid #ffb347;
    background: #111;
    display: block;
    margin: 0 auto;
    image-rendering: pixelated;
}

.example {
    padding: 16px;
    background: #222;
    margin-bottom: 8px;
    border-radius: 4px;
}
.example h3 {
    margin-top: 0;
}