:root {
    --bg-dark: #07090d;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --positive: #10b981;
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
}

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

body {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0f172a 100%);
    background-size: cover;
    color: var(--text-main);
    font-family: var(--font-inter);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Linear Flow Layout */
.root-container.linear-flow {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

/* Header & Stepper */
.minimal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    margin-bottom: 20px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-outfit);
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 0 15px var(--accent-glow);
}

.logo-text {
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.stepper {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--glass-bg);
    padding: 10px 25px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
}

.step {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: 0.3s;
}

.step.active {
    color: #fff;
    text-shadow: 0 0 10px var(--accent-glow);
}

.step.complete {
    color: var(--positive);
}

.step-divider {
    width: 20px;
    height: 1px;
    background: var(--glass-border);
}

/* Container */
.wizard-container {
    padding-bottom: 80px;
}

.wizard-card {
    padding: 40px;
    border-radius: 32px;
    margin-bottom: 30px;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.card-title-group h2 {
    font-family: var(--font-outfit);
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-title-group p {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Setup Form */
.strategy-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 40px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group-alt {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group-alt label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group-alt input, .input-group-alt textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    padding: 16px 20px;
    border-radius: 14px;
    color: #fff;
    font-family: var(--font-inter);
    outline: none;
    transition: all 0.3s;
}

.input-group-alt textarea {
    height: 150px;
    resize: vertical;
}

.input-group-alt input:focus, .input-group-alt textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: var(--font-inter);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    border: none;
}

.btn-secondary {
    background: var(--glass-bg);
    color: #fff;
    border: 1px solid var(--glass-border);
}

.btn-cta {
    width: 100%;
    padding: 20px;
    font-size: 1.1rem;
    margin-top: 20px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary:hover {
    box-shadow: 0 0 25px var(--accent-glow);
}

.btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transform: none !important;
    box-shadow: none !important;
}

/* STEP 2 Styling */
.view-header {
    text-align: center;
    margin: 40px 0;
}

.view-header h2 { font-family: var(--font-outfit); font-size: 2.2rem; margin-bottom: 5px; }
.view-header p { color: var(--text-muted); }

.table-scroll-wrap {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 20px 15px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.icp-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    margin-top: 50px;
}

.icp-header-row h3 { font-family: var(--font-outfit); font-size: 1.5rem; margin-bottom: 4px; }
.selection-counter { font-size: 0.85rem; color: var(--text-muted); }
.selection-counter span { color: var(--accent-primary); font-weight: 800; font-size: 1.1rem; }

.tab-selectors { display: flex; gap: 10px; }
.tab-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
}

.tab-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.icp-grid-dynamic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.icp-card {
    padding: 24px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.badge-mini {
    font-size: 0.65rem;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-weight: 600;
}

.icp-details-mini {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.icp-row {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.icp-row strong {
    color: var(--accent-primary);
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.icp-row.reasoning {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--glass-border);
    font-style: italic;
    font-size: 0.75rem;
}

.icp-card:hover { background: var(--glass-hover); transform: scale(1.02); }

.icp-card.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.icp-card.selected::after {
    content: "✓";
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-primary);
    color: #fff;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
}

.icp-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--positive);
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.icp-title { font-family: var(--font-outfit); font-size: 1.2rem; margin-bottom: 15px; line-height: 1.3; }

/* STEP 3 Styling */
.chart-card { padding: 40px; }
.chart-header-row { display: flex; align-items: center; gap: 50px; }
.metric-summary { flex-shrink: 0; display: flex; flex-direction: column; }
.m-val { font-size: 3.5rem; font-family: var(--font-outfit); font-weight: 800; line-height: 1; }
.m-lbl { color: var(--text-muted); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; }

.roadmap-phases {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin-top: 40px;
}

.phase-section {
    width: 100%;
}

.phase-header {
    font-family: var(--font-outfit);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 4px solid var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.phase-header::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--glass-border) 0%, transparent 100%);
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.roadmap-card {
    padding: 30px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.phase-section#phase-1 .roadmap-card {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    animation: borderPulse 4s infinite ease-in-out;
}

@keyframes borderPulse {
    0%, 100% { border-color: rgba(59, 130, 246, 0.1); box-shadow: 0 0 20px rgba(59, 130, 246, 0.05); }
    50% { border-color: rgba(59, 130, 246, 0.5); box-shadow: 0 0 40px rgba(59, 130, 246, 0.2); }
}

.roadmap-card:hover { transform: translateY(-5px); background: var(--glass-hover); }

.week-num { color: var(--accent-primary); font-family: var(--font-outfit); font-weight: 800; font-size: 1.1rem; }

.task-list { list-style: none; margin-top: 20px; }
.task-item { display: flex; gap: 10px; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.task-item span { color: var(--accent-primary); font-weight: 800; }

.action-footer {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 100px;
}

.action-footer.final { gap: 20px; }

/* Loading UI */
.centered-content { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 400px; text-align: center; }

.neural-loader {
    width: 100px;
    height: 100px;
    position: relative;
    margin-bottom: 40px;
}

.orbit, .orbit-2 {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent-primary);
    animation: spin 1.5s linear infinite;
}

.orbit-2 {
    width: 80%; height: 80%; top: 10%; left: 10%;
    border-top-color: var(--accent-secondary);
    animation: spin 1s linear infinite reverse;
}

.core {
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 40px; left: 40px;
    box-shadow: 0 0 20px var(--accent-primary);
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.log-stream {
    width: 100%;
    max-width: 500px;
    height: 100px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    margin-top: 30px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--positive);
    text-align: left;
    overflow-y: hidden;
}

/* Animations */
.animate-slide-up { animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.hidden { display: none !important; }
.active { display: block !important; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .root-container.linear-flow { padding: 0 15px; }
    .icp-grid-dynamic, .roadmap-grid, .input-row { grid-template-columns: 1fr; }
    .icp-header-row { flex-direction: column; gap: 20px; align-items: flex-start; }
    .chart-header-row { flex-direction: column; align-items: flex-start; gap: 20px; }
}
