:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --text: #1f2937;
    --bg: #ffffff;
    --card-bg: #f9fafb;
    --editor-bg: #1e1e1e;
    --editor-text: #f8f8f2;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --text: #f3f4f6;
    --bg: #111827;
    --card-bg: #1f2937;
    --editor-bg: #1e1e1e;
    --editor-text: #f8f8f2;
    --border: #374151;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

.compiler-wrapper {
    max-width: 1400px;
    margin-top: 80px;
    padding: 20px;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--primary);
    color: #fff;
}

.compiler-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: calc(100vh - 120px);
}

.code-area, .output-area {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px var(--shadow);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.area-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

#editor {
    flex: 1;
    border-radius: 8px;
    background-color: var(--editor-bg);
    color: var(--editor-text);
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    border: 1px solid var(--border);
}

.run-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.run-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.run-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.output-content {
    flex: 1;
    background: var(--editor-bg);
    color: var(--editor-text);
    padding: 15px;
    border-radius: 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    white-space: pre-wrap;
    overflow-y: auto;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.output-error {
    color: #ef4444;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .compiler-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .code-area, .output-area {
        height: 50vh;
    }
}

@media (max-width: 768px) {
    .compiler-wrapper {
        padding: 10px;
    }

    .header-controls {
        flex-direction: column;
        gap: 10px;
    }

    .code-area, .output-area {
        height: 400px;
    }
}