:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --danger: #ef4444;
    --success: #22c55e;
    --border: #334155;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}



.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

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

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}

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

.btn:active {
    transform: scale(0.98);
}

input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-color);
    color: var(--text-primary);
    margin-bottom: 1rem;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

h1,
h2,
h3 {
    margin-top: 0;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User Menu & Dropdown */
.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 150px;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}


.dropdown-item-danger {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--danger);
    text-decoration: none;
}

/* Billing Toggle */
.billing-toggle-container {
    display: flex;
    align-items: center;
    background: var(--bg-color); /* Was var(--bg-hover) which is not defined in root, likely transparent or fallback? */
    /* Wait, profile.html used var(--bg-hover) inline. Let's check if --bg-hover is defined. It's NOT in :root. */
    padding: 0.25rem;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.billing-toggle-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.terminal-window {
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
    overflow: hidden;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
}

.terminal-header {
    background: #0f172a;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.terminal-dots {
    display: flex;
    gap: 6px;
    margin-right: 1rem;
}

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

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #22c55e; }

.terminal-title {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.8;
}

.terminal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-line {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    line-height: 1.6;
}

.log-time {
    color: var(--text-secondary);
    opacity: 0.5;
    min-width: 80px;
}

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

/* Landing Page Specifics */
.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Improved How It Works Section */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

/* Connector Line for Desktop */
@media (min-width: 768px) {
    .steps-grid {
        gap: 3rem; /* More space for connectors */
    }
    
    .steps-grid::before {
        content: '';
        position: absolute;
        top: 32px; /* Center with icons (64px/2) + padding roughly */
        left: 50px;
        right: 50px;
        height: 2px;
        background: repeating-linear-gradient(90deg, 
            var(--accent) 0, 
            var(--accent) 6px, 
            transparent 6px, 
            transparent 12px
        );
        opacity: 0.3;
        z-index: -1;
    }
}

.step-card {
    position: relative;
    padding: 2.5rem 2rem;
    background: rgba(30, 41, 59, 0.7); /* More opaque */
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    transition: all 0.3s ease;
    overflow: hidden;
    backdrop-filter: blur(10px); /* Glassmorphism */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #a855f7);
    opacity: 0.7; /* Always visible hint */
    transition: opacity 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: rgba(30, 41, 59, 0.9);
}

.step-card:hover::before {
    opacity: 1;
}

.step-icon-wrapper {
    width: 64px;
    height: 64px;
    background: var(--bg-color); /* Solid background to hide line behind */
    border: 1px solid var(--accent);
    border-radius: 50%; /* Circle looks better for flow */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.step-card:hover .step-icon-wrapper {
    transform: scale(1.1);
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.step-number {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05); /* Subtle watermark */
    line-height: 0.8;
    pointer-events: none;
    font-family: monospace; /* Technical feel */
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.faq-question {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.6;
}

.trusted-by {
    filter: grayscale(100%) opacity(0.5);
    transition: all 0.3s;
}

.trusted-by:hover {
    filter: grayscale(0%) opacity(1);
}

/* Compact Pricing Section */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.pricing-card {
    padding: 1.5rem !important; /* Override generic card padding */
    display: flex;
    flex-direction: column;
}

.pricing-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 2.25rem !important;
    font-weight: 800;
    margin: 0.5rem 0 1rem 0 !important;
}

.pricing-features {
    list-style: none;
    padding: 0;
    line-height: 1.4 !important;
    margin-bottom: 1.5rem !important;
    font-size: 0.9rem;
}

.pricing-features li {
    margin-bottom: 0.5rem;
}

/* Final CTA */
.final-cta {
    text-align: center;
    margin-bottom: 4rem;
    padding: 4rem;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, rgba(30, 41, 59, 0.3) 100%);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.05);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.ph-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    color: #da552f;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #da552f;
    transition: all 0.2s;
    font-size: 1.1rem; /* Match hero button size */
}

.ph-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 85, 47, 0.2);
}

.final-cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.final-cta p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.final-cta .btn {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .final-cta {
        padding: 2rem 1.5rem;
    }

    .final-cta h2 {
        font-size: 1.75rem;
    }

    .final-cta .btn {
        width: 100%;
        box-sizing: border-box;
        padding: 1rem;
        /* Fix overlapping text */
        height: auto;
        line-height: 1.5;
        white-space: normal;
        /* Reduce font size if needed */
        font-size: 1.1rem;
    }
}
