:root {
    /* Core Palette - Dark Tech Theme */
    --bg-color: #0F172A;       /* Deep Slate */
    --card-color: #1E293B;     /* Lighter Slate */
    --text-color: #F1F5F9;     /* Off-white */
    --text-muted: #94A3B8;     /* Muted Blue-Grey */
    --heading-color: #FFFFFF;  /* Pure White */
    
    /* Accents */
    --accent-color: #38BDF8;   /* Sky Blue */
    --accent-hover: #0EA5E9;   /* Deep Sky Blue */
    --success-color: #22C55E;  /* Green */
    --error-color: #EF4444;    /* Red */
    --purple-glow: #818CF8;    /* For gradients */
    
    --border-color: #334155;
    
    /* Spacing */
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* --- Base Animations --- */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; 
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- Header/Nav Styles --- */
header {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
nav .logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent-color), var(--purple-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
}
nav .nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
nav .nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
nav .nav-links a:hover {
    color: var(--text-color);
}

/* --- Button Styles --- */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.95rem;
    display: inline-block;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #0284c7);
    color: white;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.5);
}
.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}
.btn-start {
    background-color: var(--success-color);
    color: white;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* --- User Welcome Bar --- */
.user-welcome-bar {
    background-color: var(--card-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.user-welcome-text { font-size: 1rem; color: var(--text-color); }
.user-welcome-text strong { color: var(--accent-color); }
.user-credits {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.dashboard-actions { display: flex; gap: 1rem; align-items: center; }

/* --- Layout Utilities --- */
main.container { 
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    min-height: 80vh;
}
.card {
    background: var(--card-color); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md); 
    padding: 2rem; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
h1, h2, h3 { color: var(--heading-color); margin-top: 0; }

/* --- Alerts --- */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.alert-success { background: rgba(34, 197, 94, 0.1); border: 1px solid var(--success-color); color: var(--success-color); }
.alert-danger { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--error-color); color: var(--error-color); }

/* --- Dashboard Specifics --- */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    text-align: center;
    background-color: rgba(15, 23, 42, 0.5);
    transition: all 0.2s;
}
.drop-zone.active {
    border-color: var(--accent-color);
    background-color: rgba(56, 189, 248, 0.05);
}
.status-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.status-table th { text-align: left; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; border-bottom: 1px solid var(--border-color); padding: 0.75rem 0; }
.status-table td { padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
.download-links a { color: var(--accent-color); margin-right: 10px; font-weight: 500; text-decoration: none; }

/* --- Log Modal --- */
.log-modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.log-modal-content {
    background: var(--card-color); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 2rem; width: 90%; max-width: 800px;
    max-height: 80vh; display: flex; flex-direction: column;
}
#logModalBody {
    background: #0b1120; padding: 1rem; border-radius: 6px;
    font-family: monospace; color: #cbd5e1; overflow-y: auto; flex-grow: 1;
    white-space: pre-wrap; margin-top: 1rem; border: 1px solid var(--border-color);
}


/* =========================================
   LANDING PAGE STYLES (MODERN & ANIMATED)
   ========================================= */

/* Hero Section */
.home-hero {
    text-align: center;
    padding: 8rem 1rem 6rem;
    /* Smooth blend into body color at top and bottom */
    background: linear-gradient(180deg, var(--bg-color) 0%, #1e293b 50%, var(--bg-color) 100%);
    position: relative;
    overflow: hidden;
}

/* Animated Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    animation: float 10s infinite ease-in-out;
}
.blob-1 {
    top: -10%; left: 10%; width: 500px; height: 500px;
    background: var(--accent-color);
    animation-delay: 0s;
}
.blob-2 {
    bottom: 20%; right: 10%; width: 400px; height: 400px;
    background: var(--purple-glow);
    animation-delay: -5s;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0; 
    animation: fadeUp 0.8s ease-out forwards;
}

.hero-badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.3);
    margin-bottom: 2rem;
    display: inline-block;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

.home-hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-highlight {
    background: linear-gradient(90deg, var(--accent-color), var(--purple-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* Example / Demo Section */
.demo-section {
    margin: 4rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Split 50/50 */
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.demo-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}
.demo-header {
    padding: 0.5rem 1rem;
    background: #0f172a;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}
.demo-content {
    padding: 1.5rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fake-video {
    width: 100%;
    height: 100%;
    background: #0f172a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    flex-direction: column;
}
.fake-doc p { width: 100%; height: 8px; background: #334155; margin-bottom: 8px; border-radius: 4px; }
.fake-doc h3 { width: 60%; height: 14px; background: var(--accent-color); margin-bottom: 15px; border-radius: 4px; opacity: 0.8; }

/* Feature Grid (Bento) */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 6rem 0;
}
.bento-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    opacity: 0; 
    transform: translateY(20px);
}
.bento-card.visible { opacity: 1; transform: translateY(0); }
.bento-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.bento-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px; height: 70px;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Pipeline Section (Horizontal Force Fix) */
.pipeline-section {
    text-align: center;
    margin: 8rem 0;
    padding: 5rem 2rem;
    background: linear-gradient(180deg, #0b1120 0%, #1e293b 100%);
    border-radius: 30px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.steps-container {
    display: flex;
    justify-content: space-between; /* Spread evenly */
    align-items: center;            /* Vertically center arrows */
    gap: 1.5rem;
    margin-top: 4rem;
    flex-wrap: nowrap;              /* FORCE single line on desktop */
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.step-box {
    background: var(--card-color);
    padding: 2rem;
    border-radius: 20px;
    flex: 1;              /* Grow equally */
    border: 1px solid var(--border-color);
    position: relative;
    transition: transform 0.3s;
    z-index: 2;
    min-width: 0;         /* Allow shrinking if needed */
}

.step-box:hover { 
    transform: scale(1.05); 
    z-index: 10;
}

.step-arrow {
    color: var(--border-color);
    font-size: 1.5rem;
    animation: pulse-glow 2s infinite;
    flex-shrink: 0;       /* Prevent arrow squash */
    padding: 0 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    margin-top: 4rem;
    background: #0b1120;
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    /* Tablet/Mobile: Switch to vertical stack */
    .steps-container {
        flex-direction: column;
        gap: 2rem;
    }
    .step-box {
        width: 100%;
        max-width: 350px;
    }
    .step-arrow {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }
    .home-hero h1 { font-size: 2.5rem; }
    .demo-section { grid-template-columns: 1fr; }
}