* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #16213e;
    padding: 1rem 2rem;
    border-bottom: 3px solid #e94560;
}

header h1 {
    color: #e94560;
    font-size: 1.5rem;
}

header .subtitle {
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

main {
    flex: 1;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toolbar select {
    padding: 0.5rem 0.75rem;
    background: #16213e;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 200px;
}

.toolbar button {
    padding: 0.5rem 1.25rem;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.toolbar button:hover:not(:disabled) {
    background: #ff6b81;
}

.toolbar button:disabled {
    background: #555;
    cursor: not-allowed;
}

#status {
    color: #888;
    font-size: 0.85rem;
}

.editor-panel {
    flex: 1;
    display: flex;
    gap: 1rem;
    min-height: 400px;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    border-radius: 6px;
    overflow: hidden;
}

.panel-header {
    background: #16213e;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: bold;
    color: #e94560;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#editor {
    flex: 1;
    background: #0f0f23;
    color: #cccccc;
    border: none;
    padding: 1rem;
    font-family: "Fira Code", "JetBrains Mono", "Cascadia Code", "Source Code Pro", monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    tab-size: 4;
    outline: none;
}

#editor:focus {
    outline: 2px solid #e94560;
    outline-offset: -2px;
}

#editor::placeholder {
    color: #555;
}

#output {
    flex: 1;
    background: #0f0f23;
    color: #cccccc;
    padding: 1rem;
    font-family: "Fira Code", "JetBrains Mono", "Cascadia Code", "Source Code Pro", monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#output.error {
    color: #e94560;
}

footer {
    background: #16213e;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
    border-top: 1px solid #333;
}

footer a {
    color: #e94560;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .editor-panel {
        flex-direction: column;
    }

    main {
        padding: 0.5rem;
    }

    .toolbar {
        flex-wrap: wrap;
    }
}
