:root {
    --primary: #7c3aed;
    /* Violet */
    --primary-hover: #6d28d9;
    --secondary: #2563eb;
    /* Blue */
    --accent: #06b6d4;
    /* Cyan */
    --bg-body: #ffffff;
    --bg-surface: #f8fafc;
    /* Very light slate */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --card-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --font-family: 'Outfit', 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: var(--text-main);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.animate-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tabs */
.tab-menu {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at top right, #f3e8ff 0%, transparent 40%),
        radial-gradient(circle at bottom left, #e0f2fe 0%, transparent 40%);
    padding: 2rem;
}

.hero-badge {
    background: #f1f5f9;
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #1e1b4b, #4c1d95);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* Dashboard */
#dashboard {
    display: none;
    background: var(--bg-surface);
    min-height: 100vh;
}

.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    gap: 8px;
    align-items: center;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
}

.dashboard-content {
    padding: 3rem 0;
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    color: var(--text-main);
}

.section-subtitle {
    color: var(--text-muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: white;
    width: 90%;
    max-width: 480px;
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #f8fafc;
}

.form-input:focus {
    border-color: var(--primary);
    background: white;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notification */
#notification {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 24px;
    background: white;
    border-left: 4px solid var(--primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-weight: 600;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
}

#notification.show {
    transform: translateX(0);
}

#notification.success {
    border-color: #10b981;
}

#notification.error {
    border-color: #ef4444;
}

/* Mobile */
/* Mobile & Responsive */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.25rem;
    }

    /* Dashboard Navbar Mobile */
    .nav-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .nav-inner .flex-center {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Dashboard Grid: 2 Columns for Mobile (App Drawer Style) */
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .dashboard-content {
        padding: 1.5rem 0;
    }

    /* Upgrade Modal Mobile */
    .tab-menu {
        flex-direction: column;
        gap: 0;
        border-bottom: none;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #e2e8f0;
        padding: 12px;
        margin: 0;
    }

    /* Modal Mobile */
    .modal-card {
        padding: 20px;
        width: 90%;
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Compact Vertical Cards for 2-Col Grid */
    .card {
        display: flex;
        flex-direction: column;
        /* Icon top, Text bottom */
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px 12px;
        text-align: center;
        min-height: 120px;
        /* Uniform height */
    }

    .card-icon {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        margin-bottom: 4px;
        flex-shrink: 0;
    }

    .card h3 {
        font-size: 0.95rem;
        /* Smaller text to prevent wrapping */
        margin-bottom: 0;
        line-height: 1.2;
    }

    .card p {
        display: none;
        /* Hide 'Click to deploy' text to save space */
    }
}