:root {
    --primary: #6366f1;
    --secondary: #a855f7;
    --accent: #ec4899;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-dim: #94a3b8;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --error: #ef4444;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0f172a 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Main Layout */
.app-container {
    display: grid;
    grid-template-columns: 320px 1fr 350px;
    height: 100vh;
    gap: 0;
}

/* Sidebar - Left (Workflow Types) */
.sidebar-left {
    padding: 2rem;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.brand {
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: -1.5rem;
    display: block;
}

/* Sidebar - Right (Coding Bar) */
.sidebar-right {
    padding: 1.5rem;
    border-left: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

/* Main Canvas */
#main-canvas {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

/* Workflow Options Buttons */
.workflow-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-item {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: var(--glass);
    border-color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* Coding Bar Phases */
.phase-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.phase-card:hover {
    transform: translateY(-5px);
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.phase-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.phase-step {
    background: var(--glass-border);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.code-editor-mini {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    margin-top: 1rem;
    border: 1px solid #333;
}

/* Interaction Controls */
.controls-bar {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
}

/* Workflow Content Levels */
.level-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    align-items: center;
    width: 100%;
}

.workflow-node {
    width: 100%;
    max-width: 600px;
    padding: 1.5rem;
    animation: fadeIn 0.5s ease;
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.node-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.node-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.node-image-vessel {
    width: 100%;
    height: 150px;
    background: var(--glass-border);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.node-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

.node-prompts {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.prompt-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--primary);
    border-radius: 20px;
    font-size: 0.7rem;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
    cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.sidebar-left {
    animation: slideIn 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.sidebar-right {
    animation: slideIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) reverse;
}

#main-canvas {
    animation: fadeIn 1s ease;
}

.signature {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    z-index: 1000;
}

/* 3D Effects */
.perspective {
    perspective: 1000px;
}

.three-d-card {
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.three-d-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

/* Mouse tracking will be handled in JS */

/* Comments Section */
.comments-panel {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.comment-input {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.8rem;
    color: white;
    margin-bottom: 0.5rem;
}