:root {
    --bg-primary: #000000;
    --bg-secondary: #121212;
    --border-color: rgba(255, 255, 255, .1);
    --text-primary: #ffffff;
    --text-muted: #8899a6;
    --accent-gold: #D4AF37;
    --accent-blue: #1DA1F2;
    --nav-height: 70px;
    --top-bar-height: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, sans-serif; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg-primary); color: var(--text-primary); overflow: hidden; overscroll-behavior-y: none; }
a { text-decoration: none; color: inherit; }

.app-container { display: flex; height: 100vh; height: 100dvh; width: 100vw; flex-direction: column; }
.app-main-scroll { flex: 1; overflow-y: scroll; padding-top: var(--top-bar-height); padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.app-main-scroll::-webkit-scrollbar { display: none; }

/* Top Bar */
.app-topbar { position: fixed; top:0; left:0; width: 100%; height: var(--top-bar-height); background: rgba(0, 0, 0, .85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; padding:  15px; z-index: 9999; }
.topbar-logo { font-size: 1.3rem; font-weight: 800; display:flex; align-items:center; gap:8px; }
.topbar-right { display: flex; gap: 20px; font-size: 1.4rem; align-items: center; position: relative; }

/* Notification Badge */
.notif-badge { position: absolute; top: -5px; right: -8px; background: #E0245E; color: white; font-size: .7rem; font-weight: bold; padding: 2px 5px; border-radius: 10px; border: 2px solid var(--bg-primary); }

/* Mobile Bottom Nav */
.mobile-bottom-nav { position: fixed; bottom:0; left:0; width: 100%; height: calc(var(--nav-height) + env(safe-area-inset-bottom)); background: rgba(0, 0, 0, .9); backdrop-filter: blur(20px); border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; align-items: center; z-index: 9999; padding-bottom: env(safe-area-inset-bottom); }
.nav-item { color: var(--text-muted); font-size: 1.5rem; transition: transform .2s, color .2s; position: relative; }
.nav-item.active { color: var(--text-primary); }
.nav-item:active { transform: scale(.9); }
.nav-item-create { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--accent-gold), #ffdf00); color: #000; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; }

/* Feed UI */
.feed-container { max-width: 600px; margin:  auto; background: var(--bg-primary); min-height: 100vh; }
.stories-tray { display: flex; gap: 15px; padding: 15px; overflow-x: auto; border-bottom: 1px solid var(--border-color); }
.stories-tray::-webkit-scrollbar { display: none; }
.story-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.story-ring { width: 68px; height: 68px; border-radius: 50%; padding: 2px; background: linear-gradient(45deg, var(--accent-gold), #FF450, #C13584); }
.story-ring img { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--bg-primary); object-fit: cover; }
.story-name { font-size: .75rem; font-weight: 500; }

.verification-badge { width: 18px; height: 18px; border-radius: 50%; background-color: var(--accent-blue); display: inline-flex; justify-content: center; align-items: center; color: white; font-size: 10px; margin-left: 4px; }

.feed-post { border-bottom: 1px solid var(--border-color); padding: 20px 15px; }
.post-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.post-user { display: flex; align-items: center; gap: 12px; }
.post-user img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.post-name { font-weight: 700; font-size: 1rem; display: flex; align-items: center; }
.post-time { font-size: .8rem; color: var(--text-muted); }
.post-text { font-size: 1rem; line-height: 1.5; margin-bottom: 15px; font-weight: 300; }
.post-media { width: 100%; border-radius: 16px; overflow: hidden; background: var(--bg-secondary); border: 1px solid var(--border-color); margin-bottom: 15px; position: relative; }
.post-actions { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 1.2rem; padding:  10px; }
.action-btn { display: flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 500; }

/* Desktop Sidebar (hidden on mobile, shown 768px+) */
.desktop-sidebar { display: none; }
@media (min-width: 768px) {
    .mobile-bottom-nav { display: none !important; }
    .desktop-sidebar { display: flex !important; flex-direction: column; width: 280px; height: 100vh; position: fixed; left:0; top:0; background: var(--bg-primary); border-right: 1px solid var(--border-color); padding: 30px 20px; z-index: 100; }
    .sidebar-nav { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; }
    .sidebar-nav .nav-item { display: flex; align-items: center; gap: 15px; font-size: 1.1rem; padding: 14px 20px; border-radius: 30px; color: var(--text-primary); }
    .sidebar-nav .nav-item:hover { background: rgba(255,255,255,.1); }
    .app-topbar { display: none; }
    .app-main-scroll { padding-left: 280px; padding-top: 0; }
    .feed-container { border-left: 1px solid var(--border-color); border-right: 1px solid var(--border-color); }
}

