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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 28px;
    font-weight: 600;
}

.toolbar {
    display: flex;
    gap: 10px;
}

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

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-small:hover {
    background: #da190b;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
    overflow: hidden;
}

.editor-container, .console-container {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
}

.console-container {
    border-right: none;
}

.editor-header, .console-header {
    background: #f5f5f5;
    padding: 12px 20px;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#code-editor {
    flex: 1;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
    border: none;
    outline: none;
    resize: none;
    background: #282c34;
    color: #abb2bf;
}

.CodeMirror {
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
    height: 100% !important;
}

.console-output {
    flex: 1;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: #1e1e1e;
    color: #d4d4d4;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.console-output .output-line {
    margin-bottom: 8px;
    padding: 4px 0;
}

.console-output .error {
    color: #f48771;
}

.console-output .success {
    color: #4ec9b0;
}

.console-output .info {
    color: #9cdcfe;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }
    
    .editor-container {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}

