/* ============================================
   ProjectFlow - Modern Minimal CSS
   ============================================ */

/* === Variables === */
:root {
    /* Colors - Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-hover: #e2e8f0;
    
    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-primary-light: #818cf8;
    --accent-primary-dark: #4f46e5;
    
    --color-green: #10b981;
    --color-green-light: #d1fae5;
    --color-cyan: #06b6d4;
    --color-cyan-light: #cffafe;
    --color-violet: #8b5cf6;
    --color-violet-light: #ede9fe;
    --color-orange: #f97316;
    --color-orange-light: #ffedd5;
    --color-gold: #eab308;
    --color-gold-light: #fef9c3;
    --color-red: #ef4444;
    --color-red-light: #fee2e2;
    
    /* Borders */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Spacing */
    --header-height: 64px;
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea {
    font-family: inherit;
    font-size: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* === Container === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--color-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: var(--accent-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-white {
    background: var(--bg-primary);
    color: var(--accent-primary);
}

.btn-white:hover {
    background: var(--bg-secondary);
}

.btn-ghost-white {
    background: transparent;
    color: var(--text-inverse);
    border: 1.5px solid rgba(255,255,255,0.3);
}

.btn-ghost-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--color-cyan));
    color: white;
    border-radius: var(--radius-md);
    font-size: 18px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* === Hero Section === */
.hero {
    padding: 140px 0 100px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--color-violet-light);
    color: var(--color-violet);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--color-violet);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

/* === Hero Stats (continued) === */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* === Hero Visual === */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flow-preview {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.preview-line {
    position: absolute;
    top: 50%;
    right: 80px;
    left: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-cyan), var(--color-green), var(--color-gold));
    border-radius: 2px;
    transform: translateY(-50%);
    z-index: 1;
}

.preview-node {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.preview-node .node-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.preview-node .node-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.preview-node.node-genesis .node-icon {
    background: linear-gradient(135deg, var(--color-cyan), var(--accent-primary));
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.preview-node.node-milestone .node-icon {
    background: linear-gradient(135deg, var(--color-green), #059669);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.preview-node.node-challenge .node-icon {
    background: linear-gradient(135deg, var(--color-orange), var(--color-red));
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
    animation: challengePulse 2s infinite;
}

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

.preview-node.node-active .node-icon {
    background: linear-gradient(135deg, var(--color-gold), var(--color-orange));
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.3);
}

.challenge-pilots {
    display: flex;
    margin-top: 4px;
}

.mini-pilot {
    width: 20px;
    height: 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    margin-right: -6px;
}

.preview-dots {
    display: flex;
    gap: 6px;
    padding-right: 20px;
}

.preview-dots span {
    width: 8px;
    height: 8px;
    background: var(--color-gold);
    border-radius: 50%;
    animation: dotPulse 1s infinite;
}

.preview-dots span:nth-child(2) { animation-delay: 0.2s; }
.preview-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* === Features Section === */
.features {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.feature-icon.icon-ai {
    background: var(--color-cyan-light);
    color: var(--color-cyan);
}

.feature-icon.icon-pilots {
    background: var(--color-violet-light);
    color: var(--color-violet);
}

.feature-icon.icon-nft {
    background: var(--color-gold-light);
    color: var(--color-gold);
}

.feature-icon.icon-branch {
    background: var(--color-green-light);
    color: var(--color-green);
}

.feature-icon.icon-radar {
    background: var(--color-orange-light);
    color: var(--color-orange);
}

.feature-icon.icon-flow {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === How it Works Section === */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 24px;
}

.step-number {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    color: white;
    font-size: 24px;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 24px;
    position: relative;
    z-index: 10;
}

.step-connector {
    width: 100px;
    height: 2px;
    background: var(--border-color);
    margin-top: 28px;
    flex-shrink: 0;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === CTA Section === */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--color-violet) 100%);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.cta-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* === Footer === */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 280px;
}

.footer-tagline {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-column a {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   DASHBOARD PAGE STYLES
   ============================================ */

.dashboard-page {
    background: var(--bg-secondary);
}

/* === Dashboard Header === */
.dashboard-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.header-right,
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.dashboard-nav {
    display: flex;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-tab:hover {
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--bg-primary);
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.pilot-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nft-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: var(--color-gold);
    color: white;
    font-size: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

/* === Dashboard Main === */
.dashboard-main {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    padding: 32px;
}

/* === Radar Section === */
.radar-section {
    display: flex;
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.radar-container {
    flex: 1;
    display: flex;
    gap: 32px;
}

/* === Radar Screen === */
.radar-screen {
    position: relative;
    width: 500px;
    height: 500px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.radar-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring {
    position: absolute;
    border: 1px solid var(--border-color);
    border-radius: 50%;
}

.ring-1 { width: 25%; height: 25%; }
.ring-2 { width: 50%; height: 50%; }
.ring-3 { width: 75%; height: 75%; }
.ring-4 { width: 100%; height: 100%; }

.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    transform-origin: left center;
    animation: sweep 4s linear infinite;
}

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

.radar-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
}

.pilot-marker {
    width: 60px;
    height: 60px;
    background: var(--bg-primary);
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--shadow-md);
}

.radar-signals {
    position: absolute;
    inset: 0;
    z-index: 10;
}

/* === Signal Dots === */
.signal {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    animation: signalPulse 2s infinite;
}

.signal:hover {
    transform: scale(1.5);
    z-index: 100;
}

.signal.cyan {
    background: var(--color-cyan);
    box-shadow: 0 0 20px var(--color-cyan);
}

.signal.violet {
    background: var(--color-violet);
    box-shadow: 0 0 20px var(--color-violet);
}

.signal.orange {
    background: var(--color-orange);
    box-shadow: 0 0 20px var(--color-orange);
}

.signal.green {
    background: var(--color-green);
    box-shadow: 0 0 20px var(--color-green);
}

@keyframes signalPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* === Frequency Panel === */
.frequency-panel {
    width: 320px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.panel-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.frequency-sliders {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.slider-group {
    position: relative;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.slider-header label {
    font-size: 14px;
    font-weight: 500;
}

.slider-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-primary);
}

.freq-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
}

.freq-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
}

.freq-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.freq-slider[data-color="cyan"]::-webkit-slider-thumb { background: var(--color-cyan); }
.freq-slider[data-color="violet"]::-webkit-slider-thumb { background: var(--color-violet); }
.freq-slider[data-color="green"]::-webkit-slider-thumb { background: var(--color-green); }
.freq-slider[data-color="orange"]::-webkit-slider-thumb { background: var(--color-orange); }

/* === Signal Legend === */
.signal-legend {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.signal-legend h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.cyan { background: var(--color-cyan); }
.legend-dot.violet { background: var(--color-violet); }
.legend-dot.orange { background: var(--color-orange); }
.legend-dot.green { background: var(--color-green); }

/* === Signal Details Panel === */
.signal-details {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 420px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.signal-details.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.details-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 20px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.close-btn:hover {
    background: var(--color-red-light);
    color: var(--color-red);
}

.details-content {
    padding: 24px;
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 600px;
    max-height: 80vh;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transform: translateY(20px);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 0;
}

/* === Chat Container === */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.message.ai-message {
    align-self: flex-start;
}

.message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message-content {
    background: var(--bg-secondary);
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.6;
}

.message.user-message .message-content {
    background: var(--accent-primary);
    color: white;
}

.message-content p {
    margin-bottom: 8px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.chat-input-container {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

.chat-input:focus {
    border-color: var(--accent-primary);
}

.send-btn {
    width: 44px;
    height: 44px;
    background: var(--accent-primary);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.send-btn:hover {
    background: var(--accent-primary-dark);
}

/* === Projects Section === */
.projects-section {
    max-width: 1200px;
    margin: 0 auto;
}

.projects-section.hidden {
    display: none;
}

.section-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header-bar h2 {
    font-size: 24px;
    font-weight: 600;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-primary);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.toggle-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.toggle-btn:hover {
    color: var(--text-primary);
}

.toggle-btn.active {
    background: var(--accent-primary);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* ============================================
   PROJECT PAGE STYLES
   ============================================ */

.project-page {
    background: var(--bg-secondary);
}

/* === Project Header === */
.project-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.back-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.project-info {
    display: flex;
    flex-direction: column;
}

.project-name {
    font-size: 18px;
    font-weight: 600;
}

.project-url {
    font-size: 12px;
    color: var(--text-muted);
}

.project-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--color-green-light);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-green);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-green);
}

.status-dot.active {
    animation: pulse 2s infinite;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
}

.tower-badge {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gold-light);
    border-radius: var(--radius-md);
    font-size: 20px;
}

/* === Project Main === */
.project-main {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* === Project Sidebar === */
.project-sidebar {
    width: 300px;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    padding: 24px;
    position: fixed;
    right: 0;
    top: var(--header-height);
    bottom: 0;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    font-weight: 500;
}

.info-value.status-active {
    color: var(--color-green);
}

/* === Stats Mini === */
.stats-mini {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-mini {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* === Pilots List === */
.pilots-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pilot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.pilot-item:hover {
    background: var(--bg-tertiary);
}

.pilot-avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.pilot-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pilot-id {
    font-size: 13px;
    font-weight: 500;
}

.pilot-role {
    font-size: 11px;
    color: var(--text-muted);
}

.pilot-nft {
    color: var(--color-gold);
    font-size: 14px;
}

/* === Spinoffs List === */
.spinoffs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spinoff-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--color-cyan-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.spinoff-item:hover {
    background: rgba(6, 182, 212, 0.2);
}

.spinoff-icon {
    font-size: 20px;
}

.spinoff-info {
    display: flex;
    flex-direction: column;
}

.spinoff-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-cyan);
}

.spinoff-status {
    font-size: 11px;
    color: var(--text-muted);
}

/* === Flow Canvas === */
.flow-canvas {
    flex: 1;
    margin-right: 300px;
    padding: 40px;
    overflow-x: auto;
}

.flow-container {
    position: relative;
    min-width: max-content;
    padding: 20px 0 300px;
}

/* === Flow Line === */
.flow-line {
    position: absolute;
    top: 48px;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--color-cyan) 0%,
        var(--color-green) 40%,
        var(--color-green) 70%,
        var(--color-gold) 100%
    );
    border-radius: 2px;
    z-index: 1;
}

/* === Flow Nodes === */
.flow-nodes {
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
    z-index: 10;
}

.flow-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
    cursor: pointer;
}

.node-point {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: var(--bg-primary);
    border: 4px solid var(--border-color);
    transition: all var(--transition-base);
    z-index: 20;
}

.node-point:hover {
    transform: scale(1.1);
}

.node-point.genesis {
    background: linear-gradient(135deg, var(--color-cyan), var(--accent-primary));
    border-color: var(--color-cyan);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.node-point.milestone {
    background: linear-gradient(135deg, var(--color-green), #059669);
    border-color: var(--color-green);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.node-point.challenge {
    background: linear-gradient(135deg, var(--color-orange), var(--color-red));
    border-color: var(--color-orange);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
    animation: challengePulse 2s infinite;
}

.node-point.active {
    background: linear-gradient(135deg, var(--color-gold), var(--color-orange));
    border-color: var(--color-gold);
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.3);
    animation: activePulse 1.5s infinite;
}

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

.node-point.future {
    background: var(--bg-primary);
    border: 3px dashed var(--border-color);
    color: var(--text-muted);
    box-shadow: none;
}

.node-point.branch-point {
    width: 44px;
    height: 44px;
    font-size: 16px;
}

.node-point.branch-point.purple {
    background: linear-gradient(135deg, var(--color-violet), #a855f7);
    border-color: var(--color-violet);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.node-point.branch-point.cyan {
    background: linear-gradient(135deg, var(--color-cyan), var(--accent-primary));
    border-color: var(--color-cyan);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.node-point.spinoff {
    width: 44px;
    height: 44px;
    font-size: 16px;
    background: linear-gradient(135deg, var(--color-cyan), var(--color-green));
    border-color: var(--color-cyan);
}

.node-point.small {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.node-info {
    margin-top: 12px;
    text-align: center;
}

.node-info .node-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.node-info .node-date {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

/* === Node Panel === */
.node-panel {
    position: absolute;
    top: 100px;
    right: 50%;
    transform: translateX(50%);
    width: 320px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 100;
}

.flow-node:hover .node-panel {
    opacity: 1;
    visibility: visible;
}

.node-panel::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 50%;
    transform: translateX(50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--bg-primary);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.panel-header h4 {
    font-size: 15px;
    font-weight: 600;
}

.panel-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
}

.panel-badge.done {
    background: var(--color-green-light);
    color: var(--color-green);
}

.panel-badge.active {
    background: var(--color-gold-light);
    color: var(--color-gold);
}

.panel-badge.challenge {
    background: var(--color-orange-light);
    color: var(--color-orange);
}

.panel-badge.future {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.panel-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.panel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.panel-pilots {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.mini-pilots {
    display: flex;
}

.mini-pilots .mini-pilot {
    width: 24px;
    height: 24px;
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: -6px;
}

/* === Challenge Panel === */
.challenge-panel .branch-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.branch-btn {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.branch-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

/* === Active Panel === */
.active-panel .ai-working {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--color-green-light);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.ai-dots {
    display: flex;
    gap: 4px;
}

.ai-dots span {
    width: 6px;
    height: 6px;
    background: var(--color-green);
    border-radius: 50%;
    animation: aiDot 1.4s infinite;
}

.ai-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiDot {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.ai-working span:last-child {
    font-size: 12px;
    color: var(--color-green);
}

.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-green), var(--color-cyan));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* === Branches Container === */
.branches-container {
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.branch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 30px;
}

.branch-line {
    position: absolute;
    right: 26px;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--color-violet);
    border-radius: 2px;
}

.branch-line.cyan {
    background: var(--color-cyan);
}

.branch-nodes {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.branch-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.branch-merge {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--color-green-light);
    border-radius: var(--radius-full);
    font-size: 11px;
    color: var(--color-green);
    font-weight: 500;
}

.branch-continuing {
    display: flex;
    gap: 6px;
    align-items: center;
}

.branch-continuing span {
    width: 6px;
    height: 6px;
    background: var(--color-cyan);
    border-radius: 50%;
    animation: dotPulse 1s infinite;
}

.branch-continuing span:nth-child(2) { animation-delay: 0.2s; }
.branch-continuing span:nth-child(3) { animation-delay: 0.4s; }

/* === Flow Continuing === */
.flow-continuing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 30px;
    margin-top: 16px;
}

.flow-continuing span {
    width: 10px;
    height: 10px;
    background: var(--color-gold);
    border-radius: 50%;
    animation: dotPulse 1s infinite;
}

.flow-continuing span:nth-child(2) { animation-delay: 0.2s; }
.flow-continuing span:nth-child(3) { animation-delay: 0.4s; }

.continuing-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-right: 10px;
}

/* === Flow Legend === */
.flow-legend {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    background: var(--bg-primary);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    z-index: 500;
}

.flow-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.flow-legend .legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.flow-legend .legend-dot.genesis {
    background: linear-gradient(135deg, var(--color-cyan), var(--accent-primary));
}

.flow-legend .legend-dot.milestone {
    background: linear-gradient(135deg, var(--color-green), #059669);
}

.flow-legend .legend-dot.challenge {
    background: linear-gradient(135deg, var(--color-orange), var(--color-red));
}

.flow-legend .legend-dot.active {
    background: linear-gradient(135deg, var(--color-gold), var(--color-orange));
}

.flow-legend .legend-dot.future {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
}

/* === Utility Classes === */
.hidden {
    display: none !important;
}

/* === Responsive === */
@media (max-width: 1200px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        margin: 0 auto 32px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-sidebar {
        display: none;
    }
    
    .flow-canvas {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .navbar-content {
        padding: 0 16px;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        flex-direction: column;
        gap: 24px;
    }
    
    .step-connector {
        width: 2px;
        height: 40px;
        margin: 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 40px;
    }
    
    .radar-container {
        flex-direction: column;
    }
    
    .radar-screen {
        width: 100%;
        max-width: 400px;
        height: 400px;
        margin: 0 auto;
    }
    
    .frequency-panel {
        width: 100%;
    }
    
    .dashboard-nav {
        display: none;
    }
}