:root {
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-color: #818cf8;
    --success-color: #10b981;
    --font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 40%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-top: 0;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Inputs */
.input-field {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* Buttons */
.btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: #334155; /* fallback grey */
}

/* Login Page */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 2rem;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 3rem;
    text-align: center;
}

/* Chat Interface */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.05em;
}

.chat-box {
    margin-bottom: 2rem;
    min-height: 200px;
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    max-width: 80%;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.message.user {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message.bot {
    background: rgba(99, 102, 241, 0.1);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.input-area {
    position: relative;
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Timeline Styles */
.timeline-container {
    margin-top: 2rem;
    padding: 2rem;
    display: none; /* Hidden by default */
}

.timeline-step {
    border-left: 2px solid var(--glass-border);
    margin-left: 1rem;
    padding-left: 2rem;
    padding-bottom: 2rem;
    position: relative;
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

.timeline-step.active, .timeline-step.completed {
    opacity: 1;
    border-left-color: var(--accent-color);
}

.timeline-step:last-child {
    border-left: none;
}

.step-circle {
    position: absolute;
    left: -0.65rem; /* Center on line (2px width) -> (1.3rem size / 2) = 0.65 */
    top: 0;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.timeline-step.active .step-circle {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.4);
    background: var(--accent-color);
}

.timeline-step.completed .step-circle {
    border-color: var(--success-color);
    background: var(--success-color);
}

.step-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.substeps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.substep-item {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.substep-item.completed {
    color: var(--text-color);
    text-decoration: line-through; /* Optional styling preference */
    text-decoration-color: var(--success-color);
}

.substep-item.completed::before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
}

.substep-item.current {
    color: var(--text-color);
}

.substep-item.current::before {
    content: "•";
    color: var(--accent-color);
    font-size: 1.5rem;
    line-height: 0.5;
}

/* Nudge Icon */
.nudge-icon {
    margin-left: auto;
    cursor: pointer;
    color: #fbbf24; /* Amber warning color */
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
}

.nudge-icon:hover {
    background: rgba(251, 191, 36, 0.2);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
