:root {
    --bg-dark: #0f172a;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --success: #10b981;
    --error: #ef4444;
    --font-ui: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-ui);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(239, 68, 68, 0.1) 0%, transparent 50%);
    overflow: hidden;
}

.app-container {
    width: 90%;
    max-width: 1400px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header {
    text-align: left;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

h1 .highlight {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
}

header p {
    color: var(--text-secondary);
    margin-top: 5px;
    font-size: 0.95rem;
}

.workspace {
    display: flex;
    flex: 1;
    gap: 24px;
    min-height: 0;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-pane {
    flex: 1;
}

.terminal-pane {
    flex: 1;
}

.pane-header {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pane-header h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn:active {
    transform: translateY(0);
}

.code-area {
    flex: 1;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 1.05rem;
    padding: 20px;
    resize: none;
    outline: none;
    line-height: 1.6;
    tab-size: 4;
}

.terminal-window {
    flex: 1;
    background: #000;
    padding: 20px;
    font-family: var(--font-mono);
    color: #34d399; /* Green hue for text */
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-y: auto;
    white-space: pre-wrap; /* Preserve spaces perfectly for the ^ pointer */
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.idle {
    background: var(--text-secondary);
}

.dot.compiling {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
    animation: pulse 1s infinite alternate;
}

.dot.success {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.dot.error {
    background: var(--error);
    box-shadow: 0 0 8px var(--error);
}

/* Loader */
.loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

.hidden {
    display: none;
}

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

@keyframes pulse {
    from { opacity: 0.6; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1.1); }
}
