/* 
   LifeInvader Core Design System 
   Inspired by GTA V's Social Ecosystem
*/

:root {
    --li-red: #E22B2F;
    --li-red-hover: #C52024;
    --li-red-soft: rgba(226, 43, 47, 0.1);
    --li-bg: #0d0d0d;
    --li-card: #181818;
    --li-border: #2a2a2a;
    --li-text: #f5f5f5;
    --li-muted: #888888;
    --li-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

/* Base Reset */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, sans-serif; }
body { background: var(--li-bg); color: var(--li-text); line-height: 1.6; overflow-x: hidden; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--li-bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--li-red); }

/* Layout System - Indestructible */
.layout { 
    display: flex; 
    justify-content: center; 
    gap: 24px; 
    max-width: 1300px; 
    margin: 0 auto; 
    padding: 24px; 
    min-height: 100vh;
}

.sidebar { width: 250px; flex-shrink: 0; position: sticky; top: 24px; height: fit-content; }
.feed { width: 620px; flex-shrink: 0; }
.sidebar-right { width: 320px; flex-shrink: 0; position: sticky; top: 24px; height: fit-content; }

@media(max-width: 1250px) { .sidebar-right { display: none; } .feed { width: 100%; max-width: 700px; } }
@media(max-width: 1000px) { .sidebar { width: 80px; } .sidebar span { display: none; } }
@media(max-width: 768px) { .layout { flex-direction: column; padding: 12px; } .sidebar, .feed { width: 100%; position: static; } }

/* LifeInvader UI Components */
.post, .widget { 
    background: var(--li-card); 
    border: 1px solid var(--li-border); 
    border-radius: 12px; 
    padding: 20px; 
    margin-bottom: 20px; 
    box-shadow: var(--li-shadow);
    transition: transform 0.2s, border-color 0.2s;
}

.post:hover { border-color: #444; }

/* Typography & Titles */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.5px; margin-bottom: 16px; }
.widget h3 { font-size: 14px; text-transform: uppercase; color: var(--li-red); border-bottom: 1px solid var(--li-border); padding-bottom: 12px; }

/* Buttons - LifeInvader Red */
.btn-li { 
    background: var(--li-red); 
    color: white; 
    border: none; 
    padding: 12px 24px; 
    border-radius: 8px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}
.btn-li:hover { background: var(--li-red-hover); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(226, 43, 47, 0.3); }

/* Navigation Menu */
.menu-item { 
    display: flex; 
    align-items: center; 
    gap: 16px; 
    padding: 14px 20px; 
    color: var(--li-text); 
    text-decoration: none; 
    border-radius: 12px; 
    font-weight: 700; 
    font-size: 16px;
    margin-bottom: 4px;
    transition: 0.2s;
}
.menu-item i { font-size: 20px; width: 24px; text-align: center; }
.menu-item:hover, .menu-item.active { background: var(--li-red-soft); color: var(--li-red); }

/* Verified Badges */
.badge { margin-left: 4px; font-size: 14px; }
.badge.blue { color: #3897f0; }
.badge.gold { color: #FFD700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }

/* Post Header & Content */
.post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.post-header img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--li-border); }
.post-content { font-size: 15px; color: #eee; margin-bottom: 16px; }
.post-actions { display: flex; gap: 32px; border-top: 1px solid var(--li-border); padding-top: 16px; color: var(--li-muted); }
.action-btn { cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.2s; font-weight: 600; }
.action-btn:hover { color: var(--li-red); }

/* Global Positioning - Fixed Elements */
/* Global Positioning - Fixed Elements */
.notif-wrapper { 
    position: fixed; top: 24px; right: 24px; 
    z-index: 5000; 
}

.notif-bell {
    position: relative;
    width: 48px; height: 48px;
    background: var(--li-card);
    border: 1px solid var(--li-border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s;
    box-shadow: var(--li-shadow);
}
.notif-bell:hover { border-color: var(--li-red); transform: scale(1.05); }
.notif-bell i { font-size: 20px; color: var(--li-text); }

.notif-badge {
    position: absolute; top: -2px; right: -2px;
    background: var(--li-red); color: white;
    width: 18px; height: 18px; border-radius: 50%;
    font-size: 10px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--li-bg);
}

.notif-dropdown {
    position: absolute; top: 60px; right: 0;
    width: 320px; background: var(--li-card);
    border: 1px solid var(--li-border);
    border-radius: 12px; box-shadow: var(--li-shadow);
    display: none; flex-direction: column;
    overflow: hidden;
}
.notif-dropdown.active { display: flex; animation: fadeInUp 0.3s ease; }

.notif-header { 
    padding: 16px; border-bottom: 1px solid var(--li-border); 
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 800; font-size: 13px; color: var(--li-red); 
    text-transform: uppercase; letter-spacing: 1px; 
}

.notif-items { max-height: 400px; overflow-y: auto; }

.notif-item { 
    padding: 14px 16px; border-bottom: 1px solid var(--li-border); 
    display: flex; gap: 12px; color: var(--li-text); 
    text-decoration: none; font-size: 14px; transition: 0.2s;
}
.notif-item:hover { background: var(--li-red-soft); }
.notif-item.unread { background: rgba(226, 43, 47, 0.05); border-left: 3px solid var(--li-red); }
.notif-item img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.notif-item-body { flex: 1; }
.notif-item-time { font-size: 11px; color: var(--li-muted); margin-top: 4px; }

.music-player { 
    position: fixed; bottom: 24px; right: 24px; 
    background: var(--li-card); 
    border: 1px solid var(--li-border); 
    padding: 12px 24px; 
    border-radius: 40px; 
    display: flex; align-items: center; gap: 15px;
    z-index: 5000;
    box-shadow: var(--li-shadow);
    animation: fadeInUp 0.5s ease;
}

.player-icon { 
    width: 32px; height: 32px; background: var(--li-red); 
    color: white; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    cursor: pointer; transition: 0.3s;
}
.player-icon:hover { transform: scale(1.1); background: var(--li-red-hover); }

/* Profile Header Specific */
.profile-hdr-v2 { background: var(--li-card); border: 1px solid var(--li-border); border-radius: 16px; overflow: hidden; margin-bottom: 24px; }
.cover-v2 { height: 200px; background: linear-gradient(45deg, #111, #222); width: 100%; object-fit: cover; }
.avatar-v2 { width: 130px; height: 130px; border-radius: 50%; border: 5px solid var(--li-card); margin-top: -65px; margin-left: 30px; position: relative; z-index: 2; object-fit: cover; box-shadow: var(--li-shadow); }

/* Hashtag Styling */
.hashtag { color: var(--li-red); text-decoration: none; font-weight: 700; }
.hashtag:hover { text-decoration: underline; }
/* Story System - LifeInvader Style */
.stories-container { 
    display: flex; gap: 12px; overflow-x: auto; padding: 10px 0; 
    margin-bottom: 24px; scrollbar-width: none; 
}
.stories-container::-webkit-scrollbar { display: none; }

.story-card { 
    flex: 0 0 100px; height: 140px; border-radius: 12px; 
    overflow: hidden; position: relative; cursor: pointer; 
    border: 2px solid var(--li-border); transition: 0.3s;
}
.story-card:hover { border-color: var(--li-red); transform: translateY(-3px); }
.story-card img { width: 100%; height: 100%; object-fit: cover; }
.story-card .story-user { 
    position: absolute; bottom: 8px; left: 8px; right: 8px; 
    font-size: 11px; font-weight: 800; text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Modal & Popups */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.9); z-index: 4000; 
    display: flex; align-items: center; justify-content: center; 
}
.modal-content { 
    background: var(--li-card); border: 1px solid var(--li-border); 
    padding: 32px; border-radius: 16px; width: 100%; max-width: 500px; 
    box-shadow: var(--li-shadow);
}

/* Marketplace System - LifeInvader Style */
.market-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px; 
}
.market-card { 
    background: var(--li-card); 
    border: 1px solid var(--li-border); 
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: var(--li-shadow);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.market-card:hover { transform: translateY(-8px); border-color: var(--li-red); }

.market-img { width: 100%; height: 180px; object-fit: cover; }
.market-body { padding: 20px; }

.category-badge { 
    background: var(--li-red-soft); 
    color: var(--li-red); 
    padding: 4px 10px; 
    border-radius: 6px; 
    font-size: 11px; 
    font-weight: 800; 
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

.price-tag { 
    color: var(--li-red); 
    font-size: 20px; 
    font-weight: 900; 
    letter-spacing: -0.5px;
}

/* Modal Enhancements */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--li-muted); margin-bottom: 8px; }

/* Marketplace Main Area Fix */
.main { flex: 1; min-width: 0; }

/* Messaging Interface */
.msg-container { height: calc(100vh - 100px); background: var(--li-card); border: 1px solid var(--li-border); border-radius: 16px; display: flex; overflow: hidden; }
.msg-sidebar { width: 300px; border-right: 1px solid var(--li-border); }
.msg-content { flex: 1; display: flex; flex-direction: column; }
.msg-bubble { padding: 12px 16px; border-radius: 18px; max-width: 70%; margin-bottom: 8px; font-size: 14px; }
.msg-bubble.me { background: var(--li-red); align-self: flex-end; color: white; border-bottom-right-radius: 4px; }
.msg-bubble.them { background: #333; align-self: flex-start; color: white; border-bottom-left-radius: 4px; }

/* Input Fields */
.form-control { 
    width: 100%; background: #111; border: 1px solid var(--li-border); 
    padding: 12px 16px; border-radius: 8px; color: white; 
    outline: none; transition: 0.2s;
}
.story-img-full { width: 100%; height: 100%; object-fit: contain; }
.story-text-full { 
    flex: 1; display: flex; align-items: center; justify-content: center; 
    padding: 40px; text-align: center; font-size: 24px; font-weight: 800; 
    background: linear-gradient(45deg, #E22B2F, #8E2DE2); color: white;
}

.post.sponsored { 
    border-left: 3px solid var(--li-red); 
    background: rgba(226, 43, 47, 0.02) !important; 
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
