/* style.css */
:root {
    --primary-bg: #1a1a1a;
    --editor-bg: #1f1f1f;
    --accent-color: #00ff88;
    --text-primary: #ffffff;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --error-color: #ff4444;
}

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

body {
    background: #1a1a1a;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

/* Left Side - Editors */
.editor-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--primary-bg);
    border-right: 2px solid #2d2d2d;
}

.editor-tabs {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #141414;
}

.tab {
    background: none;
    border: none;
    color: #666;
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.tab.active {
    background: var(--accent-color);
    color: var(--primary-bg);
    font-weight: 600;
}

.editor-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.code-editor {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 1rem;
    display: none;
    background: var(--editor-bg);
}

.code-editor.active {
    display: block;
}

textarea {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    resize: none;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    padding: 1rem;
    line-height: 1.5;
}

textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-color);
}

/* Right Side - Preview */
.preview-side {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #141414;
    border-bottom: 2px solid #2d2d2d;
}

.preview-controls {
    margin-left: auto;
    display: flex;
    gap: 0.8rem;
}

.btn {
    background: var(--accent-color);
    border: none;
    color: var(--primary-bg);
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.btn i {
    pointer-events: none;
}

.reset-btn {
    background: var(--error-color);
}

#output {
    flex: 1;
    border: none;
    background: white;
}

/* Fullscreen styles */
:fullscreen .preview-side {
    width: 100vw;
    height: 100vh;
}

/* Status indicator */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--error-color);
    margin-left: 8px;
}

.status-indicator.active {
    background-color: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-color);
}