:root {
    --primary: #00CEC9;
    --primary-hover: #00b5b0;
    --secondary: #81ECEC;
    --accent: #E17055;
    --background: #0A1A1A;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.1);
    --text: #FFFFFF;
    --text-muted: #A0AEC0;
    --error: #FF7675;
    --radius: 12px;
    --transition: 300ms ease;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Animations */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.4;
}

.blob {
    position: absolute;
    border-radius: 50%;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation: move 20s infinite alternate;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    right: -50px;
    animation: move 15s infinite alternate-reverse;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: var(--secondary);
    top: 50%;
    left: 50%;
    animation: move 25s infinite alternate;
}

@keyframes move {
    from { transform: translate(0, 0); }
    to { transform: translate(100px, 50px); }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo i {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.accent {
    color: var(--accent);
}

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

/* Glassmorphism */
.glass {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.mode-selector {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.4rem;
    border-radius: 10px;
}

.btn-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

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

.btn-tab:not(.active):hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.setting-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.glass-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem;
    border-radius: 8px;
    outline: none;
}

/* Editor Grid */
.editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.editor-pane {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.pane-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.pane-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.pane-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.btn-icon i {
    width: 18px;
    height: 18px;
}

textarea {
    flex-grow: 1;
    background: transparent;
    border: none;
    padding: 1.5rem;
    color: var(--text);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    resize: none;
    outline: none;
}

/* Footer Actions */
.actions-footer {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--background);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 206, 201, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 206, 201, 0.4);
}

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

.btn-primary i {
    width: 20px;
    height: 20px;
}

/* Error Toast */
.error-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--error);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 100;
    transition: var(--transition);
}

.error-toast.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }

    .editor-pane {
        min-height: 300px;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .setting-group {
        justify-content: space-between;
    }
}
