:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #f43f5e;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    top: 40%;
    left: 50%;
    animation-delay: -10s;
}

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

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

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

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
}

.accent {
    color: var(--primary);
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.planner-card, .progress-card, .result-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.full-width {
    grid-column: span 2;
}

label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input, textarea, select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.radio-group {
    display: flex;
    gap: 2rem;
    padding: 0.5rem 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    cursor: pointer;
}

button {
    width: 100%;
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.hidden {
    display: none;
}

/* Pipeline Visuals */
.pipeline-visual {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3rem 0;
    position: relative;
}

.agent-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
    transition: all 0.5s ease;
    opacity: 0.3;
}

.agent-step.active {
    opacity: 1;
    transform: scale(1.1);
}

.agent-step.completed {
    opacity: 1;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid transparent;
}

.agent-step.active .step-icon {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.2);
}

.agent-step.completed .step-icon {
    background: #10b981;
    color: white;
}

.line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 10px;
    position: relative;
    top: -15px;
}

#status-text {
    text-align: center;
    font-style: italic;
    color: var(--text-muted);
}

/* Markdown Styling */
.markdown-body {
    line-height: 1.6;
}

.markdown-body h2 {
    margin: 2rem 0 1rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.markdown-body th, .markdown-body td {
    border: 1px solid var(--border);
    padding: 0.8rem;
    text-align: left;
}

.markdown-body th {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .full-width {
        grid-column: span 1;
    }
    .pipeline-visual {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .line {
        display: none;
    }
}
