:root {
    --primary: #3776ab;
    --primary-dark: #2d5a87;
    --secondary: #ffd43b;
    --bg-dark: #1e1e1e;
    --bg-light: #2d2d2d;
    --text: #ffffff;
    --text-dim: #cccccc;
    --border: #404040;
    --success: #4caf50;
    --error: #f44336;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid var(--border);
}

h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.editor-section, .output-section {
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.editor-header, .output-header {
    background: var(--bg-dark);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

h2 {
    font-size: 1.2rem;
    font-weight: 500;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: #505050;
}

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    padding: 6px 12px;
}

.btn-ghost:hover {
    background: var(--border);
}

.icon {
    font-size: 16px;
}

.select {
    background: var(--bg-dark);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.editor {
    height: 500px;
}

.output {
    height: 500px;
    padding: 20px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.output-line {
    margin-bottom: 2px;
    white-space: pre-wrap;
    word-break: break-all;
}

.output-line.error {
    color: var(--error);
}

.output-line.success {
    color: var(--success);
}

.features {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.features h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.features ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.features li {
    padding: 10px;
    background: var(--bg-dark);
    border-radius: 5px;
    border-left: 3px solid var(--secondary);
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 30, 30, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading.hidden {
    display: none;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Monaco Editor Theme Override */
.monaco-editor {
    padding-top: 10px;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #505050;
}