@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Almarai:wght@400;700;800&display=swap');

/* -------------------------------------
 * LOVABLE STYLE: VIBRANT GRADIENT UI
 * ------------------------------------- */

:root {
    --lovable-gradient: linear-gradient(135deg, #7c3aed 0%, #3b82f6 25%, #db2777 50%, #f59e0b 75%, #ef4444 100%);
    --bg-dark-glass: rgba(10, 10, 10, 0.85);
    --border-glass: rgba(255, 255, 255, 0.1);
    
    --font-main: 'Inter', 'Almarai', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-main);
    background: #000;
    color: #fff;
    overflow-x: hidden;
    direction: ltr;
}

/* -------------------------------------
 * 1. NAVBAR (Minimal Dark)
 * ------------------------------------- */
.lovable-nav {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5vw;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-wrap { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 24px; color: #fff; text-decoration: none; }
.logo-icon { width: 32px; height: 32px; background: var(--lovable-gradient); border-radius: 8px; }

.nav-links { display: flex; gap: 40px; }
.nav-links a { text-decoration: none; color: #fff; opacity: 0.7; font-size: 15px; font-weight: 500; transition: opacity 0.3s; }
.nav-links a:hover { opacity: 1; }

.nav-btns { display: flex; gap: 16px; align-items: center; }
.btn-login { color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; padding: 10px 20px; }
.btn-started { background: #fff; color: #000 !important; padding: 12px 24px; border-radius: 12px; font-weight: 700; text-decoration: none; transition: 0.3s; }
.btn-started:hover { transform: scale(1.03); box-shadow: 0 10px 30px rgba(255,255,255,0.2); }

/* -------------------------------------
 * 2. HERO SECTION
 * ------------------------------------- */
.hero-lovable {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #000;
    padding: 0 20px;
    overflow: hidden;
}

/* The Animated Vibrant Background */
.gradient-blob {
    position: absolute;
    width: 150vw;
    height: 150vw;
    background: var(--lovable-gradient);
    filter: blur(80px);
    opacity: 0.6;
    top: -50vw;
    z-index: 0;
    animation: rotate 20s infinite linear;
}

@keyframes rotate { 100% { transform: rotate(360deg); } }

.hero-content { position: relative; z-index: 10; width: 100%; max-width: 900px; }

.hero-heading {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 24px;
}

.hero-sub {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    opacity: 0.7;
    margin-bottom: 64px;
    max-width: 600px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Central Chat-Style Input */
.chat-input-box {
    width: 100%;
    max-width: 800px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    margin: 0 auto;
}

.input-placeholder { color: #555; font-size: 18px; margin-bottom: 30px; }

.input-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-icons { display: flex; gap: 20px; color: #444; font-size: 20px; }

.btn-send {
    width: 48px; height: 48px;
    background: #333;
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}
.btn-send:hover { background: #fff; color: #000; }

/* -------------------------------------
 * 3. FEATURE SECTION (Vibrant Cards)
 * ------------------------------------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    padding: 100px 5vw;
    background: #000;
    position: relative;
    z-index: 10;
}

.lovable-card {
    background: #0a0a0a;
    border-radius: 24px;
    padding: 48px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.4s;
    text-align: center;
}

.lovable-card:hover { transform: translateY(-10px); border-color: rgba(255,255,255,0.2); }

.card-icon {
    width: 80px; height: 80px;
    margin: 0 auto 32px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.card-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: inherit;
    filter: blur(10px);
    opacity: 0.4;
    z-index: -1;
}

.icon-purple { background: linear-gradient(135deg, #7c3aed, #db2777); }
.icon-blue { background: linear-gradient(135deg, #3b82f6, #7c3aed); }
.icon-orange { background: linear-gradient(135deg, #f59e0b, #ef4444); }

#loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 10000; display: flex; justify-content: center; align-items: center; }
.spinner { width: 40px; height: 40px; border: 3px solid #111; border-top: 3px solid #fff; border-radius: 50%; animation: spin 1s infinite linear; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* -------------------------------------
 * 4. DASHBOARD SPECIFIC
 * ------------------------------------- */
.dash-wrap {
    min-height: 100vh;
    background: #000;
    padding: 140px 5vw 80px; /* Increased top padding to clear navbar */
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
}

@media (max-width: 1024px) {
    .dash-grid { grid-template-columns: 1fr; }
}

.glass-panel {
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
}

.video-hero {
    width: 100%;
    aspect-ratio: 16/9;
    background: #050505;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.video-hero img { width: 100%; height: 100%; object-fit: contain; }

.hud-badge {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(0,0,0,0.8);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.2);
}

.live-pulse { width: 8px; height: 8px; background: #ff0055; border-radius: 50%; box-shadow: 0 0 10px #ff0055; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

.input-glass {
    background: #000;
    border: 1px solid #222;
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    width: 100%;
    font-family: inherit;
}
.input-glass:focus { border-color: #555; outline: none; }

/* -------------------------------------
 * 5. MOBILE RESPONSIVENESS (Advanced)
 * ------------------------------------- */

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

/* Footer Grid Base */
.master-footer {
    background: #000;
    color: #fff;
    padding: 80px 5vw 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-grid > div:first-child { grid-column: span 2; }
}

@media (max-width: 768px) {
    .lovable-nav { height: 70px; padding: 0 20px; }
    
    .mobile-menu-btn { display: block; }
    
    .nav-links {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100vh;
        background: #000;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transform: translateY(-100%);
        transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 999;
    }
    
    .nav-links.active { transform: translateY(0); }
    .nav-links a { font-size: 20px; }

    .nav-btns { display: none; } /* Simplified for mobile */
    .nav-btns.active { 
        display: flex; 
        position: fixed; 
        bottom: 50px; 
        left: 0; 
        width: 100%; 
        justify-content: center;
        z-index: 1000;
    }

    .hero-heading { font-size: 3.5rem; }
    .hero-sub { font-size: 1.1rem; margin-bottom: 40px; }
    
    .chat-input-box { padding: 20px; border-radius: 15px; }
    .input-icons { gap: 15px; }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-grid > div:first-child { grid-column: auto; }
    
    .feature-grid { padding: 60px 20px; }
    .lovable-card { padding: 30px 20px; }

    /* Home & Dashboard specific mobile overrides */
    section { padding: 60px 20px !important; }
    .hero-content { padding: 0 10px; }
    .chat-input-box { margin-top: 20px; }
    
    [style*="gap: 60px"] { gap: 30px !important; }
    [style*="margin-bottom: 120px"] { margin-bottom: 60px !important; }
    [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
    
    .dash-wrap { padding-top: 100px; }
    .dash-wrap h1 { font-size: 32px !important; }
    
    /* Adjust flex layouts that should stack */
    [style*="display: flex"][style*="justify-content: space-between"][style*="align-items: flex-end"] {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero-heading { font-size: 2.8rem; }
    .logo-wrap span { font-size: 20px; }
}