:root {
    --neon-orange: #ff7b00;
    --neon-blue: #00f3ff;
    --bg-dark: #0a0a0a;
    --glass-border: rgba(255, 255, 255, 0.1);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

body {
    margin: 0; padding: 0; background-color: var(--bg-dark); color: #fff;
    font-family: 'Inter', sans-serif; overflow-x: hidden;
    padding-bottom: 100px;
    cursor: crosshair;
    width: 100%;
}

#bgCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.6; pointer-events: none; }

.promo-banner {
    background: var(--neon-orange); color: #000; width: 100%; padding: 12px 0;
    font-family: 'JetBrains Mono'; font-weight: 800; text-transform: uppercase;
    position: fixed; top: 0; left: 0; z-index: 1000; text-align: center; font-size: 14px;
    letter-spacing: 1px; height: 40px; box-sizing: border-box;
}

/* --- INTELLIGENCE TICKER --- */
.intel-ticker {
    position: fixed; top: 40px; left: 0; width: 100%; height: 35px;
    background: rgba(0, 0, 0, 0.95); border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    display: flex; align-items: center; padding: 0 20px; z-index: 999;
    font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--neon-blue);
    backdrop-filter: blur(10px); box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

.ticker-node {
    width: 8px; height: 8px; background: var(--neon-blue); border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-blue); animation: blink 2s infinite; margin-right: 15px; flex-shrink: 0;
}
.ticker-time { color: #666; margin-right: 20px; flex-shrink: 0; border-right: 1px solid #333; padding-right: 15px; font-weight: 700; }
.ticker-feed-container { flex: 1; overflow: hidden; position: relative; height: 100%; display: flex; align-items: center; }
.ticker-text { color: #fff; white-space: nowrap; animation: fadeSlide 0.5s ease-out; }
.ticker-stat { border-left: 1px solid #333; padding-left: 15px; margin-left: 20px; color: var(--neon-orange); font-weight: 800; flex-shrink: 0; display: flex; align-items: center; gap: 5px; }

@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
@keyframes fadeSlide { from { opacity:0; transform: translateY(5px); } to { opacity:1; transform: translateY(0); } }

/* --- MAIN VIEWPORT --- */
.pricing-viewport {
    width: 100%; min-height: 100vh; display: flex; flex-direction: column; 
    align-items: center; justify-content: center; position: relative; 
    z-index: 1; padding: 160px 20px 100px 20px; 
    box-sizing: border-box;
    overflow-x: hidden;
}
.section-header { text-align: center; margin-bottom: 60px; width: 100%; }
.section-title { font-family: 'Chakra Petch'; font-size: 3rem; color: #fff; text-transform: uppercase; letter-spacing: 2px; margin: 0; }

.pricing-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 40px; 
    justify-content: center; 
    max-width: 1200px; 
    width: 100%;
    box-sizing: border-box;
}

.tier-card {
    background: rgba(10, 10, 10, 0.9); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 50px 40px; width: 100%; max-width: 450px; 
    position: relative; backdrop-filter: blur(15px);
    transition: 0.4s ease; display: flex; flex-direction: column;
    box-sizing: border-box;
}

/* HIBERNATION / ICE CARD STYLES */
.tier-card.ice {
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.05);
    opacity: 0.7; /* Dim the card */
    filter: grayscale(0.2);
}
.tier-card.ice:hover {
    opacity: 0.9;
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.15);
}
.tier-card.ice .tier-label { color: var(--neon-blue); opacity: 0.8; }
.tier-card.ice .tier-name { color: #ccc; }
.tier-card.ice .tier-price { color: #888; }
.ice-overlay {
    position: absolute; top: 15px; right: 20px;
    font-family: 'JetBrains Mono'; font-size: 10px; color: var(--neon-blue);
    border: 1px solid var(--neon-blue); padding: 4px 10px;
    background: rgba(0, 243, 255, 0.1);
}

.tier-card.god { 
    border: 1px solid var(--neon-orange); box-shadow: 0 0 50px rgba(255, 123, 0, 0.1); 
    transform: scale(1.05); z-index: 10; 
}
.tier-card.god:hover { transform: scale(1.05); box-shadow: 0 0 60px rgba(255, 123, 0, 0.3); }
.tier-card.god .tier-name, .tier-card.god .tier-price {
    color: #ffffff !important; text-shadow: 0 0 10px rgba(255, 255, 255, 0.4); letter-spacing: 1px;
}
.tier-card.god::before {
    content: "FAST TRACK DEPLOYMENT"; position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    background: var(--neon-orange); color: #000; font-family: 'JetBrains Mono'; font-weight: 800;
    padding: 4px 15px; font-size: 10px; white-space: nowrap;
}

.tier-label { font-family: 'JetBrains Mono'; color: var(--neon-blue); font-size: 12px; letter-spacing: 3px; margin-bottom: 10px; display: block; }
.tier-name { font-family: 'Chakra Petch'; font-size: 2.5rem; font-weight: 800; color: #fff; margin: 0 0 20px 0; text-transform: uppercase; }
.tier-price { font-family: 'Inter'; font-weight: 900; font-size: 3rem; color: #fff; margin-bottom: 5px; }
.tier-price span { font-size: 1rem; color: #666; font-weight: 400; text-shadow: none !important; }
.tier-desc { font-family: 'Inter'; color: #aaa; font-size: 14px; line-height: 1.6; margin-bottom: 30px; min-height: 80px; }

.feature-list { list-style: none; padding: 0; margin: 0 0 40px 0; display: flex; flex-direction: column; gap: 15px; text-align: left; }
.feature-item { font-family: 'JetBrains Mono'; font-size: 13px; color: #ddd; display: flex; align-items: center; gap: 10px; height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature-item i { color: var(--neon-orange); width: 15px; text-align: center; flex-shrink: 0; }

.disabled-list .feature-item { color: #555; }
.disabled-list .feature-item i { color: #555; }

/* --- BUTTON GROUP STYLES (NEW) --- */
.btn-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.buy-btn { width: 100%; padding: 20px; text-align: center; font-family: 'JetBrains Mono'; font-weight: 800; text-transform: uppercase; cursor: pointer; border: none; text-decoration: none; display: block; transition: 0.3s; box-sizing: border-box;}

/* God/Active Card Buttons */
.god .buy-btn { background: var(--neon-orange); color: #fff; }
.god .buy-btn:hover { box-shadow: 0 0 30px var(--neon-orange); }

/* God Card Outline Button */
.god .buy-btn.outline {
    background: transparent;
    border: 1px solid var(--neon-orange);
    color: var(--neon-orange);
    box-shadow: none;
}
.god .buy-btn.outline:hover {
    background: rgba(255, 123, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 123, 0, 0.2);
    color: #fff;
}

/* Disabled Button Style (for Ice Card) */
.buy-btn.disabled {
    background: rgba(50, 50, 50, 0.5);
    color: #888;
    border: 1px solid #333;
    cursor: not-allowed;
    pointer-events: none;
}

.slot-tracker { margin-top: 25px; font-family: 'JetBrains Mono'; font-size: 11px; color: var(--neon-orange); text-align: center; }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* --- RESTORED CHAT SUPPORT STYLES --- */
.chat-support-container {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.chat-neon-btn {
    padding: 18px 35px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    text-decoration: none;
    font-family: 'JetBrains Mono';
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: 0.3s;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    display: flex; align-items: center; gap: 12px;
    animation: neonPulse 2s infinite ease-in-out;
}

@keyframes neonPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 243, 255, 0.2); border-color: rgba(0, 243, 255, 0.5); }
    50% { box-shadow: 0 0 35px rgba(0, 243, 255, 0.5); border-color: var(--neon-blue); }
}

.chat-neon-btn:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 50px var(--neon-blue);
    transform: translateY(-3px);
}

.support-status {
    font-family: 'JetBrains Mono';
    font-size: 9px;
    color: #555;
    letter-spacing: 3px;
}

/* --- INTEGRATION & PROPOSAL MODAL STYLES --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); z-index: 20000;
    display: none; justify-content: center; align-items: flex-start;
    padding-top: 100px; backdrop-filter: blur(10px);
}
.modal-content {
    width: 90%; max-width: 600px; background: #0a0a0a;
    border: 1px solid var(--neon-blue); border-radius: 10px;
    padding: 40px; position: relative; max-height: 80vh; overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.1);
}
.close-modal-btn {
    position: absolute; top: 20px; right: 20px; font-size: 24px; color: #fff; cursor: pointer; transition: 0.2s;
}
.close-modal-btn:hover { color: var(--neon-orange); transform: rotate(90deg); }

.search-row { display: flex; gap: 10px; margin-bottom: 20px; }

#modalSearchInput {
    flex: 1;
    padding: 20px; background: rgba(0, 243, 255, 0.05);
    border: 1px solid #333; color: #fff; font-family: 'JetBrains Mono'; font-size: 16px;
    outline: none; text-transform: uppercase; border-radius: 5px;
    transition: 0.3s;
}
#modalSearchInput:focus { border-color: var(--neon-blue); box-shadow: 0 0 25px rgba(0, 243, 255, 0.2); }

.view-all-btn {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    font-family: 'JetBrains Mono';
    font-weight: 800;
    padding: 0 25px;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
    display: flex; align-items: center; justify-content: center;
    border-radius: 5px;
}
.view-all-btn:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 20px var(--neon-blue);
}

.search-results-list { list-style: none; padding: 0; margin: 0; max-height: 300px; overflow-y: auto; }
.result-item {
    padding: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    transition: 0.2s; font-family: 'JetBrains Mono';
}
.result-item:hover { background: rgba(0, 243, 255, 0.1); padding-left: 20px; border-left: 3px solid var(--neon-blue); }
.result-name { color: #fff; font-weight: bold; font-size: 14px; }
.result-cat { color: #666; font-size: 10px; text-transform: uppercase; }

#masterIntegrationData { display: none; }

.inline-link-btn {
    background: rgba(0, 243, 255, 0.1); border: 1px solid var(--neon-blue); 
    color: var(--neon-blue); font-family: 'JetBrains Mono'; font-size: 11px; 
    padding: 2px 8px; cursor: pointer; text-transform: uppercase; margin: 0 4px;
    transition: 0.2s; border-radius: 4px; font-weight: 700;
}
.inline-link-btn:hover { background: var(--neon-blue); color: #000; box-shadow: 0 0 10px var(--neon-blue); }

/* --- PROPOSAL MODAL SPECIFIC STYLES --- */
.proposal-body {
    font-family: 'Inter', sans-serif;
    color: #ccc;
    line-height: 1.6;
}

.proposal-title {
    font-family: 'Chakra Petch';
    color: var(--neon-blue);
    font-size: 24px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.proposal-subtitle {
    font-family: 'JetBrains Mono';
    color: #666;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.proposal-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--neon-blue), transparent);
    margin: 20px 0;
}

.proposal-body h3 {
    font-family: 'Chakra Petch';
    color: #fff;
    margin-top: 30px;
    border-left: 3px solid var(--neon-orange);
    padding-left: 10px;
    text-transform: uppercase;
}

.proposal-body ul {
    padding-left: 20px;
}

.proposal-body li {
    margin-bottom: 10px;
}

.proposal-body strong {
    color: #fff;
}

.proposal-footer {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

/* --- RESTRUCTURED 4-ZONE NAVIGATION --- */
.bottom-nav {
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 90px;
    background: rgba(0,0,0,0.98); 
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    display: grid; 
    /* GRID LAYOUT: [HOME] [CONTROLS] [CREATE] [CRM] */
    grid-template-columns: 1fr 200px 1fr 1fr;
    align-items: center; 
    justify-items: center;
    z-index: 9999; 
    padding-bottom: var(--safe-area-bottom);
}

.nav-group {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* --- CENTER CONTROL CLUSTER --- */
.nav-control-cluster {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    position: relative;
}

.center-btn-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-page-icon {
    position: absolute;
    bottom: 70px; /* Positioned above the button */
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    color: var(--neon-orange); /* Matching Pricing Page Theme */
    text-shadow: 0 0 10px var(--neon-orange);
    pointer-events: none;
    z-index: 10002;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

.center-master-btn {
    width: 60px; 
    height: 60px; 
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-orange), #ff4400); 
    border: 3px solid #000;
    color: #fff; 
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 123, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10001;
}

.center-master-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 30px rgba(255, 123, 0, 0.6);
}

/* --- NAV BUTTONS & STACKS --- */
.nav-trigger {
    background: none; 
    border: none; 
    color: #666; 
    font-size: 22px;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 6px;
    transition: 0.3s; 
    cursor: pointer; 
    width: 100%; 
    height: 100%;
    justify-content: center;
    user-select: none;
}

.nav-label { 
    font-size: 10px; 
    font-weight: 800; 
    font-family: 'Chakra Petch'; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.nav-trigger:hover, 
.nav-group.active .nav-trigger { 
    color: var(--neon-orange); 
    text-shadow: 0 0 15px rgba(255, 123, 0, 0.4); 
}

/* ARROWS */
.nav-arrow {
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    transition: 0.3s;
    width: 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover {
    color: var(--neon-orange);
    text-shadow: 0 0 10px rgba(255, 123, 0, 0.5);
    transform: scale(1.1);
}

/* STACKS */
.nav-stack {
    position: absolute;
    bottom: 90px; 
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: max-content; /* SHRINK-WRAP TO CONTENT */
    min-width: 100px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--glass-border);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
    overflow: hidden;
    z-index: 9990;
}

.nav-group.active .nav-stack {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    border-color: var(--neon-orange);
}

.nav-stack a {
    text-decoration: none;
    color: #ccc;
    font-family: 'JetBrains Mono';
    font-size: 10px;
    padding: 12px 15px; /* Added horizontal padding */
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap; 
}

.nav-stack a:last-child {
    border-bottom: none;
}

.nav-stack a:hover {
    background: rgba(255, 123, 0, 0.1);
    color: #fff;
    padding-left: 15px; 
}

.nav-stack a.active-link {
    color: var(--neon-orange);
    font-weight: 800;
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    .pricing-viewport {
        padding: 120px 15px 120px 15px;
    }

    .section-title { font-size: 2.2rem; }
    .pricing-container { gap: 30px; padding: 0; }

    .tier-card {
        padding: 40px 25px;
        max-width: 100%;
        transform: none !important; 
    }

    .tier-card.god {
        transform: scale(1) !important;
        border-width: 2px;
    }

    .tier-card.god:hover { transform: none !important; }

    .tier-name { font-size: 2rem; }
    .tier-price { font-size: 2.5rem; }

    .feature-item {
        font-size: 11px;
        white-space: normal;
        height: auto;
        line-height: 1.4;
        overflow: visible;
        text-overflow: clip;
    }

    /* --- MOBILE NAV ADJUSTMENTS --- */
    .bottom-nav { 
        /* Tighter grid on mobile: [Home] [Controls] [Create] [CRM] */
        grid-template-columns: 1fr 140px 1fr 1fr; 
    }

    .nav-arrow { 
        width: 30px; 
        font-size: 18px; 
        display: flex; /* Ensure displayed */
    }

    .center-master-btn {
        width: 48px;
        height: 48px;
    }

    .nav-stack {
        padding: 5px 0;
        z-index: 10000;
        width: max-content; /* SHRINK-WRAP ON MOBILE */
        min-width: 80px;
        bottom: 95px; 
    }
    
    .nav-stack a {
        font-size: 13px;
        padding: 10px 12px; /* Tightened touch targets */
        letter-spacing: 0.5px;
        white-space: nowrap; /* Prevent wrapping */
        line-height: 1.3; 
        text-align: center !important;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    /* MOBILE STACK POSITIONING */
    #stack-home {
        left: 5px; /* Standardized offset */
        right: auto;
        transform: translateY(20px);
        border-radius: 12px 12px 12px 0;
    }
    .nav-group.active #stack-home { transform: translateY(0); }

    #stack-creation {
        left: auto;
        right: 5px; /* Standardized offset */
        transform: translateY(20px);
        border-radius: 12px 12px 0 12px;
    }
    .nav-group.active #stack-creation { transform: translateY(0); }

    #stack-crm {
        left: auto; 
        right: 0px; 
        transform: translateY(20px);
        border-radius: 12px 12px 0 12px;
    }
    .nav-group.active #stack-crm { transform: translateY(0); }
    
    .chat-neon-btn {
        width: 90%;
        font-size: 11px;
        padding: 15px 10px;
    }
}