:root {
    /* Color Palette */
    --primary-color: #f8fafc;
    --secondary-color: #e2e8f0;
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-secondary: #06b6d4;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success-color: #4ade80;
    --error-color: #f87171;

    /* Typography */
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-serif: 'Cinzel', serif;
    --font-family-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Layout */
    --header-height: 60px;
    --container-max-width: 1200px;
    --border-radius: 8px;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-family-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
}

/* Layout Containers */
.task-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
    min-height: calc(100vh - var(--header-height));
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    font-family: var(--font-family-serif);
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Utility Elements */
hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-lg) 0;
}

/* Code Blocks */
pre, code {
    font-family: var(--font-family-mono);
    font-size: 0.9em;
}

code {
    background-color: var(--surface-color);
    padding: 0.2em 0.4em;
    border-radius: var(--border-radius);
    color: var(--secondary-color);
}

pre {
    background-color: var(--surface-color);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    margin-bottom: var(--spacing-md);
}

pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* Form Elements (Common in tasks) */
button, .btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: #ffffff;
    background-color: var(--accent-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

button:hover, .btn:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    text-decoration: none;
}

input[type="text"],
input[type="search"],
textarea,
select {
    display: block;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--surface-color);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
}
/* Hero Section */
.hero {
    padding: 4rem 2rem;
    text-align: center;
    background: radial-gradient(circle at top center, #1e293b 0%, #0f172a 70%);
}
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}
.cta-button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.cta-button:hover {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}
/* Features Grid */
.features {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.features h2, .modes-section h2, .simulator h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}
.feature-card i {
    width: 48px;
    height: 48px;
    color: var(--accent-secondary);
    margin-bottom: 1rem;
}
.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}
/* Modes Section */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.mode-card {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}
.mode-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: white;
}
/* Simulator Styles */
.simulator {
    padding: 4rem 2rem;
    background: #020617;
}
.simulator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: #1e293b;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.sim-controls {
    padding: 2rem;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.control-group {
    margin-bottom: 1.5rem;
}
.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.run-button {
    width: 100%;
    background: var(--accent-secondary);
    color: #0f172a;
    font-weight: 800;
    padding: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
}
.run-button:hover {
    background: #22d3ee;
}
.sim-output {
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #0f172a;
}
.tabs {
    display: flex;
    border-bottom: 1px solid #334155;
}
.tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.tab.active {
    color: white;
    border-bottom-color: var(--accent-secondary);
}
.tab-content {
    display: none;
    padding: 2rem;
    overflow-y: auto;
    height: 400px;
    font-family: monospace;
}
.tab-content.active {
    display: block;
}
.plan-step { margin-bottom: 10px; padding: 10px; background: #1e293b; border-radius: 4px; }
.chat-log { margin-bottom: 10px; }
.chat-log.ai { color: var(--accent-secondary); }
.tree-node { color: var(--accent-color); }
@media (max-width: 768px) {
    .simulator-container { grid-template-columns: 1fr; }
    .sim-controls { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
}

/* FileTree Dark Mode Overrides */
.jqueryFileTree { font-family: var(--font-mono); font-size: 0.9rem; }
.jqueryFileTree li a { color: var(--text-main); text-decoration: none; }
.jqueryFileTree li a:hover { color: var(--accent-primary); font-weight: bold; }
.jqueryFileTree .directory a { color: var(--text-dim); }

