/* --- 1. GLOBAL RESET & VARIABLES --- */
:root {
    --primary: #0052FF;
    --primary-hover: #0045D8;
    --accent: #10B981;
    --accent-bg: #D1FAE5;
    --bg-main: #F4F6F8;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --text-dark: #0F172A;
    --text-med: #475569;
    --text-light: #94A3B8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important; /* <--- CRITICAL FIX: Kills side scroll */
    position: relative;
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    font-family: 'Outfit', sans-serif;
}

/* --- 2. NAVIGATION --- */
nav {
    position: sticky; top: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 5%;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.logo { font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.logo i { color: var(--primary); }

.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-link { text-decoration: none; color: var(--text-med); font-weight: 500; transition: 0.2s; }
.nav-link:hover { color: var(--primary); }

/* Buttons & Badges */
.btn { border: none; border-radius: 12px; padding: 10px 20px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.2s; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 10px rgba(0, 82, 255, 0.25); }
.wallet-badge { background: white; border: 1px solid #E2E8F0; padding: 8px 16px; border-radius: 20px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.hidden { display: none !important; }

/* Hero */
.hero { text-align: center; padding: 80px 20px 60px; max-width: 800px; margin: 0 auto; }
.pill { background: #EFF6FF; color: var(--primary); padding: 6px 16px; border-radius: 30px; font-weight: 700; text-transform: uppercase; font-size: 0.85rem; }
.hero h1 { font-size: 3.5rem; margin: 20px 0; letter-spacing: -1px; line-height: 1.1; }
.gradient-text { background: linear-gradient(135deg, #0052FF, #2563EB); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-btns { display: flex; justify-content: center; gap: 15px; }

/* Grid */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px 100px; }
.section-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 30px; display: flex; align-items: center; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 32px; }

/* Cards */
.card { background: white; border-radius: 24px; border: 1px solid rgba(226, 232, 240, 0.8); overflow: hidden; display: flex; flex-direction: column; transition: 0.3s; }
.card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.card-img { height: 220px; background-size: cover; padding: 16px; }
.status-badge { background: rgba(255,255,255,0.95); padding: 8px 12px; border-radius: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.card-body { padding: 24px; display: flex; flex-direction: column; flex-grow: 1; }
.author { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--text-med); font-weight: 600; font-size: 0.9rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; color: white; display: flex; justify-content: center; align-items: center; }
.card h3 { margin-bottom: 10px; font-size: 1.35rem; }
.progress-bar { width: 100%; height: 10px; background: #F1F5F9; border-radius: 20px; overflow: hidden; margin-top: 10px; }
.fill { height: 100%; background: var(--primary); }
.privacy-fill { background: var(--accent); }
.privacy-fill-hidden { background: repeating-linear-gradient(45deg, #E2E8F0, #E2E8F0 10px, #F1F5F9 10px, #F1F5F9 20px); width: 100% !important; }
.card-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid #F1F5F9; display: flex; justify-content: space-between; align-items: center; }
.tag { font-size: 0.8rem; font-weight: 600; padding: 6px 12px; border-radius: 8px; display: flex; align-items: center; gap: 6px; }
.tag.base { background: #EFF6FF; color: var(--primary); }
.tag.inco { background: #D1FAE5; color: var(--accent); }
.btn-icon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #E2E8F0; background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; z-index: 200; padding: 20px; }
.modal-card { background: white; width: 100%; max-width: 440px; border-radius: 24px; position: relative; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.scroll-content { overflow-y: auto; padding: 30px; }
.close-btn { position: absolute; top: 20px; right: 20px; background: #F1F5F9; border-radius: 50%; width: 32px; height: 32px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; }
.input-wrapper { margin-bottom: 20px; position: relative; }
input, .input-area { width: 100%; padding: 16px; border: 1px solid #E2E8F0; border-radius: 12px; background: #F8FAFC; font-size: 1rem; }
.currency-tag { position: absolute; right: 16px; top: 16px; font-weight: 700; color: var(--text-med); }
.full-btn { width: 100%; justify-content: center; }

/* --- MOBILE NAVIGATION (SCROLL FIX) --- */

/* 1. Hide Mobile Triggers on Desktop */
.mobile-toggle, .mobile-close {
    display: none !important;
}

/* 2. Phone Screen Styles */
@media screen and (max-width: 768px) {
    
    /* Force Navbar to be a Row */
    nav {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px 20px;
        width: 100%;
    }

    /* Hamburger Button */
    .mobile-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 2.2rem;
        cursor: pointer;
        color: var(--text-dark);
        z-index: 2000;
    }

    /* THE SIDE DRAWER */
    .nav-right {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        
        /* FIX: Use FIXED to float it above the page */
        position: fixed !important; 
        top: 0;
        right: 0;
        bottom: 0;
        height: 100vh; /* Full screen height */
        width: 80%;    /* Covers 80% of width */
        
        background: white;
        box-shadow: -10px 0 30px rgba(0,0,0,0.2);
        padding: 80px 25px;
        gap: 20px;
        
        /* HIDE IT: Push it 100% to the right */
        transform: translateX(100%); 
        transition: transform 0.3s ease-in-out;
        z-index: 9999; /* Sit on top of everything */
    }

    /* OPEN IT: Bring it back to 0 */
    .nav-right.active {
        transform: translateX(0) !important;
    }

    /* Close Button */
    .mobile-close {
        display: block !important;
        position: absolute;
        top: 25px;
        right: 25px;
        background: none;
        border: none;
        font-size: 2rem;
        cursor: pointer;
        color: #64748B;
    }

    /* Links & Wallet */
    .nav-link {
        display: block !important;
        font-size: 1.2rem;
        width: 100%;
        border-bottom: 1px solid #F1F5F9;
        padding-bottom: 10px;
    }
    
    /* Wallet Badge Visibility */
    .wallet-badge, #connectWalletBtn {
        width: 100%;
        justify-content: center;
        display: flex !important;
        margin-top: 10px;
    }
    
    .wallet-badge.hidden {
        display: none !important;
    }
}

/* --- PREMIUM WALLET MODAL --- */

.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border: 2px solid #F1F5F9;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.wallet-card:hover {
    border-color: var(--primary);
    background: #EFF6FF; /* Light blue tint on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 255, 0.1);
}

.wallet-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wallet-icon-box {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 1.5rem;
    color: var(--primary);
}

.wallet-info {
    display: flex;
    flex-direction: column;
}

.wallet-name {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
}

.wallet-sub {
    font-size: 0.8rem;
    color: var(--text-med);
}

/* "Recommended" Badge */
.chip {
    background: #DCFCE7;
    color: #166534;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-arrow {
    color: var(--text-light);
    font-size: 1.2rem;
}

/* --- TOGGLE SWITCH STYLES --- */
.privacy-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F8FAFC;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid #E2E8F0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input { 
    opacity: 0; 
    width: 0; 
    height: 0; 
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #CBD5E1; /* Grey when off */
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: #10B981; /* Green when on */
}

input:checked + .slider:before {
    transform: translateX(22px);
}