@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@600;700;800&family=JetBrains+Mono&display=swap');

:root {
    /* Legacy Compatibility */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --bg-gradient: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
    --text-dark: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --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 -2px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    /* Premium Additions */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary-gradient: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --radius-pill: 9999px;
    --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Poppins', sans-serif;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Utilities */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-dark {
    background: var(--bg-dark);
    color: var(--white);
}

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-soft {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes breathe {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Global Buttons (Legacy/Dashboard) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-google {
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    border-radius: 20px;
    height: 44px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Global Logo & Icons */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 800;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

/* Dashboard Specific Styles */
header {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Dashboard & Builder Specific */
header .nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .dashboard-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    position: relative;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.badge {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-draft {
    background: #fee2e2;
    color: #ef4444;
}

.badge-completed {
    background: #dcfce7;
    color: #10b981;
}

.delete-btn {
    background: white;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    transform: scale(1.1);
}

/* Builder Workspace */
.builder-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .builder-layout {
        grid-template-columns: 1fr 340px;
    }
}

.roadmap-preview {
    background: #f8fafc;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.roadmap-preview h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.roadmap-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.roadmap-item.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.roadmap-item h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.roadmap-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Form Elements */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 2px solid #f1f5f9;
    background: #f8fafc;
    font-size: 1rem;
    transition: all 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-light);
    background: white;
}

.ai-btn {
    background: white;
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.ai-feedback-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8fafc;
    border-left: 4px solid #e2e8f0;
    transition: all 0.3s ease;
}

.ai-feedback-box.signal-strong {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.03);
}

.ai-feedback-box.signal-risk {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.03);
}

.ai-feedback-box.signal-blindspot {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.03);
}

.builder-nav-btns {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Premium Landing Page Overhaul Styles (Scoped) --- */
.landing-body {
    background-color: white;
}

.landing-body .landing-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.landing-body .hero-premium {
    padding: 10rem 0 6rem;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent),
        radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.05), transparent);
}

.landing-body .hero-premium h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.landing-body .hero-premium p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 3rem;
    opacity: 0.9;
}

.landing-body .badge-ai {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.landing-body .dot-pulse {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    animation: pulse-soft 2s infinite;
}

.landing-body .btn-pill {
    display: inline-flex;
    align-items: center;
    padding: 1.25rem 2.5rem;
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-pill);
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.landing-body .btn-pill:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.5);
}

/* Social Proof */
.landing-body .social-proof-minimal {
    padding: 4rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.landing-body .social-proof-minimal p {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.landing-body .brand-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem 5rem;
    opacity: 0.4;
    filter: grayscale(1);
    transition: opacity 0.3s;
}

.landing-body .brand-grid img {
    height: 24px;
    max-width: 120px;
    object-fit: contain;
}

/* Features */
.landing-body .features-premium {
    padding: 8rem 0;
    background: #fdfdff;
}

.landing-body .section-head {
    text-align: center;
    margin-bottom: 5rem;
}

.landing-body .section-head h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
}

.landing-body .feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.landing-body .f-card {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.landing-body .f-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
}

.landing-body .icon-box {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin-bottom: 2rem;
}

/* How It Works */
.landing-body .hiw-section {
    padding: 8rem 0;
}

.landing-body .hiw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.landing-body .hiw-step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.landing-body .step-badge {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
}

.landing-body .terminal-window {
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.3);
    font-family: 'JetBrains Mono', monospace;
}

.landing-body .terminal-header {
    background: #1e293b;
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
}

.landing-body .term-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.landing-body .t-red {
    background: #ff5f56;
}

.landing-body .t-yellow {
    background: #ffbd2e;
}

.landing-body .t-green {
    background: #27c93f;
}

.landing-body .terminal-body {
    padding: 2rem;
    min-height: 300px;
    font-size: 0.9rem;
}

.landing-body .line {
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.landing-body .line.cmd {
    color: #f8fafc;
}

.landing-body .line.success {
    color: #10b981;
}

.landing-body .line.process {
    color: #6366f1;
    animation: breathe 2s infinite;
}

/* Final CTA */
.landing-body .final-cta-premium {
    padding: 6rem 0;
}

.landing-body .cta-glass-card {
    background: #0f172a;
    padding: 8rem 4rem;
    border-radius: var(--radius-xl);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.landing-body .cta-glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Animations Wrapper */
.landing-body .animate-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@media (max-width: 992px) {
    .landing-body .hiw-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* --- Responsive Navigation Restoration --- */
@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }

    footer {
        padding: 6rem 0;
    }
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    z-index: 1000;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 700;
}

.bottom-nav-item.active {
    color: var(--primary);
}

/* Footer Restore */
footer {
    padding: 6rem 0 8rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: var(--text-light);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}