:root { 
    --cobalt: #0052cc; --cobalt-glow: rgba(0, 82, 204, 0.3);
    --harvest: #2E8B57; --dark: #0a0a0c; --card: #141419; --card-hover: #1c1c24;
    --text: #f0f0f5; --text-muted: #8e8e9e; --accent: #FFD700; --danger: #e5484d; 
    --verified: #1DA1F2; --border: rgba(255,255,255,0.08);
    --god-gold: #FFD700;
}
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background: var(--dark); 
    color: var(--text); 
    margin: 0; 
    padding-bottom: 90px; 
    overflow-x: hidden;
}

body.god-mode-active #headerAvatar { 
    border-color: var(--god-gold) !important; 
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8) !important; 
    transition: all 0.3s ease;
}

        
        /* Typography & Utilities */
        h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.5px; }
        input, textarea, select { font-family: inherit; color: var(--text); background: var(--dark); border: 1px solid var(--border); border-radius: 8px; padding: 10px; outline: none; transition: 0.2s; }
        input:focus, textarea:focus, select:focus { border-color: var(--cobalt); box-shadow: 0 0 0 2px var(--cobalt-glow); }
        button { font-family: inherit; border: none; cursor: pointer; transition: 0.2s; }
        button:hover { opacity: 0.9; transform: translateY(-1px); }
        button:active { transform: translateY(0); }
        
        .hidden { display: none !important; }
        
        /* Navigation */
        .app-header { background: rgba(10, 10, 12, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--border); transition: background 0.3s; }
        .logo-container { display: flex; align-items: center; gap: 10px; }
        .logo-icon { color: var(--harvest); font-size: 1.8rem; }
        .logo-text { font-size: 1.2rem; font-weight: 700; background: linear-gradient(45deg, var(--harvest), var(--cobalt)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
        .header-actions { display: flex; align-items: center; gap: 15px; }
        .nav-icon-btn { background: transparent; color: var(--text); font-size: 1.4rem; padding: 5px; border-radius: 50%; display: flex; position: relative; }
        .nav-icon-btn:hover { background: var(--border); color: var(--cobalt); }
        .notif-badge { position: absolute; top: 0; right: 0; background: var(--danger); width: 8px; height: 8px; border-radius: 50%; }
        
        .bottom-nav { position: fixed; bottom: 0; width: 100%; background: rgba(20, 20, 25, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 12px 0 20px 0; z-index: 1000; }
        .nav-item { color: var(--text-muted); text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 500; transition: 0.2s; width: 60px; }
        .nav-item i { font-size: 1.5rem; transition: 0.2s; }
        .nav-item.active { color: var(--cobalt); }
        .nav-item.active i { transform: translateY(-2px); }
        .nav-item:hover:not(.active) { color: var(--text); }
        .nav-fab { background: var(--cobalt); color: white; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-top: -24px; box-shadow: 0 4px 20px var(--cobalt-glow); transition: 0.3s; }
        .nav-fab:hover { transform: scale(1.05) translateY(-2px); background: #1a6ff0; }


        /* Dropdowns & Menus */
        .dropdown-menu { position: absolute; top: 60px; right: 20px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); z-index: 2000; min-width: 200px; transform-origin: top right; transition: 0.2s; }
        .dropdown-item { padding: 12px 16px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 0.9rem; transition: 0.2s; }
        .dropdown-item i { font-size: 1.1rem; color: var(--text-muted); }
        .dropdown-item:hover { background: var(--card-hover); color: var(--cobalt); }
        .dropdown-item:hover i { color: var(--cobalt); }
        .dropdown-divider { height: 1px; background: var(--border); margin: 8px 0; }
        .dropdown-item.danger:hover { color: var(--danger); background: rgba(229, 72, 77, 0.1); }
        .dropdown-item.danger:hover i { color: var(--danger); }


/* Phase 3 Ribbon CSS */
.ribbon-item { flex: 0 0 140px; scroll-snap-align: start; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; transition: 0.2s; }
.ribbon-item img { width: 100%; height: 90px; object-fit: cover; border-bottom: 1px solid var(--border); }
.ribbon-item .info { padding: 8px; }
.ribbon-item .title { font-weight: bold; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; color: white; }
.ribbon-item .subtitle { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }




        /* Main Container */
        .app-container { max-width: 600px; margin: 0 auto; padding: 20px; min-height: 100vh; }
        .view-section { display: none; animation: fadeIn 0.3s ease; }
        .view-section.active { display: block; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }


        /* Modals */
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: none; justify-content: center; align-items: center; z-index: 3000; padding: 20px; box-sizing: border-box; }
        .modal-content { background: var(--dark); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 500px; padding: 24px; box-shadow: 0 20px 40px rgba(0,0,0,0.5); max-height: 90vh; overflow-y: auto; position: relative; }
        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        
        /* Chat Overrides */
        .chat-container { display: flex; flex-direction: column; height: calc(100vh - 200px); }
        .chat-messages { flex: 1; overflow-y: auto; padding-right: 10px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
        .chat-msg { max-width: 80%; padding: 12px 16px; border-radius: 16px; font-size: 0.95rem; line-height: 1.4; position: relative; }
        .chat-msg.sent { background: var(--cobalt); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
        .chat-msg.received { background: var(--card); border: 1px solid var(--border); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
        .chat-msg img { max-width: 100%; border-radius: 8px; margin-top: 8px; }


#cookieBanner { 
    display: none; position: fixed; bottom: 0; left: 0; width: 100%; 
    background: var(--cobalt); color: white; z-index: 9999; padding: 15px 20px; 
    flex-direction: column; gap: 10px; align-items: center; 
    box-shadow: 0 -4px 15px rgba(0,0,0,0.5); box-sizing: border-box;
}


.header-search-container { 
    display: flex; align-items: center; background: transparent; border-radius: 20px; 
    padding: 5px; transition: all 0.3s ease; width: 28px; overflow: hidden; border: 1px solid transparent;
}
.header-search-container.expanded { 
    width: 180px; background: rgba(0,0,0,0.4); border-color: var(--cobalt); padding: 5px 10px;
}
.header-search-input { 
    background: transparent; border: none; color: white; outline: none; width: 100%; 
    display: none; margin-left: 8px; font-size: 0.9rem;
}
.header-search-container.expanded .header-search-input { display: block; };


body.modal-open { overflow: hidden; }

/* --- AMBIENT LOGIN GRADIENT --- */
@keyframes ambientShift { 
    0% { background-position: 0% 50%; } 
    50% { background-position: 100% 50%; } 
    100% { background-position: 0% 50%; } 
}
.ambient-bg { 
    background: linear-gradient(-45deg, var(--dark), var(--cobalt), #0a111a, var(--harvest)); 
    background-size: 400% 400%; 
    animation: ambientShift 15s ease infinite; 
}

/* --- STAGGERED ENTRANCE ANIMATIONS --- */
.fade-slide-up { opacity: 0; transform: translateY(20px); animation: fadeSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes fadeSlideUp { to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* --- THE GRAND REVEAL BLUR --- */
.blur-tease { filter: blur(15px); transition: filter 1.5s ease-out; pointer-events: none; }
.blur-clear { filter: blur(0px); pointer-events: auto; }

/* --- ONBOARDING BUBBLES & PULSE --- */
.interest-bubble { 
    border: 1px solid var(--border); border-radius: 20px; padding: 10px 18px; 
    cursor: pointer; transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); 
    background: rgba(0,0,0,0.2); color: var(--text-muted); 
    display: inline-block; margin: 5px; font-size: 0.9rem; font-weight: bold;
}
.interest-bubble:hover { border-color: var(--text); color: var(--text); }
.interest-bubble.selected { 
    background: var(--cobalt); color: white; border-color: var(--cobalt); 
    transform: scale(1.05); box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

@keyframes pulseNext { 
    0% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.6); } 
    70% { box-shadow: 0 0 0 10px rgba(0, 122, 255, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0); } 
}
.btn-pulse { animation: pulseNext 2s infinite; }

.notif-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--danger); color: white;
    font-size: 0.65rem; font-weight: 800;
    min-width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    padding: 0 4px; border: 2px solid var(--dark);
    box-sizing: border-box;
}
/* Phase 4: Dex UI */
.dex-cat-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
}
.dex-cat-btn:hover, .dex-cat-btn.active {
    background: var(--accent);
    color: black;
    border-color: var(--accent);
}
