/* --- BRAND IDENTITY: MINT DARK --- */
:root {
    --bg-primary: #080A08;
    --bg-secondary: #121612;
    --bg-glass: rgba(18, 22, 18, 0.95);
    --accent: #00FF9D;
    --accent-glow: rgba(0, 255, 157, 0.25);
    --text-primary: #FFFFFF;
    --text-secondary: #8A938A;
    --border: rgba(255, 255, 255, 0.08);
    --error: #FF3B3B;
    --success: #00FF9D;
}

/* --- GLOBAL RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; }

/* --- iOS OPTIMIZATIONS (Simplified for iOS 18) --- */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overscroll-behavior-y: none;
}

/* --- DISABLE IOS LONG-PRESS MENU ON ALL IMAGES/VIDEOS --- */
img, video {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    pointer-events: auto;
}

/* Ensure it applies to all contexts */
* img, * video {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

/* --- SCROLLBAR HIDING --- */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

body {
    font-family: 'Quicksand', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: auto; 
    -webkit-user-select: none; user-select: none;
    min-height: 100vh;
}

#app {
    max-width: 500px; 
    margin: 0 auto; 
    min-height: 100vh;
    display: flex; 
    flex-direction: column; 
    position: relative;
}

#mainContent { 
    flex: 1; 
    padding-bottom: 80px;
}

/* --- HEADER --- */
#header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(8, 10, 8, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 15px 20px;
    padding-top: max(15px, env(safe-area-inset-top));
    border-bottom: 1px solid var(--border);
}
.header-content { display: flex; justify-content: space-between; align-items: center; }

.logo-container { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.logo-symbol { width: 32px; height: 32px; position: relative; display: flex; align-items: center; justify-content: center; }
.ring-outer { position: absolute; width: 100%; height: 100%; border: 2px solid var(--accent); border-radius: 50%; opacity: 0.2; }
.ring-inner { width: 60%; height: 60%; border: 3px solid var(--accent); border-radius: 50%; box-shadow: 0 0 10px var(--accent-glow); }
.logo-text { font-size: 22px; font-weight: 700; letter-spacing: -1px; text-transform: lowercase; }
.logo-text span { color: var(--accent); }

.header-right { display: flex; align-items: center; gap: 16px; }
.bell-container { position: relative; cursor: pointer; color: var(--text-secondary); }
.bell-badge {
    position: absolute; top: -2px; right: -2px;
    background: var(--error); color: white; font-size: 10px; font-weight: bold;
    width: 14px; height: 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-primary);
}
.header-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    border: 2px solid var(--accent); object-fit: cover;
    box-shadow: 0 0 10px var(--accent-glow); cursor: pointer;
}

/* --- STORIES --- */
.stories-section { padding: 15px 0; overflow-x: auto; scrollbar-width: none; }
.stories-section::-webkit-scrollbar { display: none; }
.stories-container { display: flex; gap: 15px; padding: 0 20px; }
.story-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; flex-shrink: 0; }
.story-ring {
    width: 68px; height: 68px; border-radius: 50%; padding: 2px;
    background: linear-gradient(45deg, var(--accent), transparent);
    position: relative;
}
.story-ring.add-new { background: var(--bg-secondary); border: 2px dashed var(--accent); display: flex; align-items: center; justify-content: center; padding: 0; opacity: 0.7; }
.story-avatar { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--bg-primary); object-fit: cover; background: #1a1a1a; }
.story-name { font-size: 11px; color: var(--text-secondary); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================================
   INSTAGRAM-STYLE POST LAYOUT - NO CARDS, EDGE TO EDGE
   ================================================================ */

/* Post Container - NO background, NO border-radius, NO card */
.post-card {
    background: transparent;
    margin-bottom: 20px;
    border: none;
    overflow: visible;
}

/* 1. POST HEADER - Avatar, Username, Menu */
.post-header { 
    padding: 12px 16px;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    background: var(--bg-primary);
}
.post-user-block { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    cursor: pointer; 
}
.post-user-block > div { display: flex; flex-direction: column; }
.post-avatar { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 1px solid var(--border); 
    background: var(--bg-secondary); 
}
.post-username { 
    font-weight: 600; 
    font-size: 14px; 
    display: block; 
}
.post-time { 
    font-size: 11px; 
    color: var(--text-secondary); 
}

.menu-btn { 
    background: none; 
    border: none; 
    color: var(--text-secondary); 
    cursor: pointer; 
    padding: 5px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.menu-btn svg { width: 24px; height: 24px; fill: currentColor; }

/* 2. MEDIA CONTAINER - EDGE TO EDGE, BETTER SIZING */
.post-img-container { 
    width: 100%;
    aspect-ratio: 3/4; /* Taller ratio for better visibility */
    min-height: 450px; /* Ensure minimum visibility */
    max-height: 600px; /* Cap for very tall screens */
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0; /* No margin - edge to edge */
}
.post-media { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.like-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 80px;
    height: 80px;
    fill: var(--accent);
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}
.like-animation.animate { animation: popHeart 0.8s ease-out; }
@keyframes popHeart {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* 3. POST ACTIONS - Like, Comment */
.post-actions { 
    padding: 8px 16px;
    display: flex;
    gap: 16px;
    background: var(--bg-primary);
}
.post-action-btn { 
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
}
.post-action-btn svg { 
    width: 26px;
    height: 26px;
    stroke-width: 2px;
    stroke: currentColor;
    fill: none;
}

/* 4. POST FOOTER - Likes, Caption, Comments, Time */
.post-footer {
    padding: 0 16px 12px;
    background: var(--bg-primary);
}

.post-likes {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.post-caption {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
    color: white;
}

.post-caption b {
    font-weight: 600;
    margin-right: 6px;
}

.view-comments {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    cursor: pointer;
}

.view-comments:hover {
    color: var(--text-primary);
}

.post-time {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

/* Comments Section */
.comments-section { 
    padding: 0;
    max-height: 0;
    overflow: hidden;
    border-top: none;
    background: var(--bg-primary);
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.comments-section.open { 
    max-height: 400px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
}
.comment-list { 
    margin: 0 0 10px;
    font-size: 13px;
    color: #ccc;
    max-height: 200px;
    overflow-y: auto;
}
.comment-item { 
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    animation: fadeInComment 0.2s ease;
}
@keyframes fadeInComment { 
    from { opacity: 0; transform: translateY(-5px); } 
    to { opacity: 1; transform: translateY(0); } 
}
.comment-text { flex: 1; }
.comment-text b { 
    color: white;
    font-weight: 600;
    margin-right: 5px;
    cursor: pointer;
}
.comment-input-wrapper { 
    display: flex; 
    gap: 10px; 
    align-items: center; 
    width: 100%;
    padding: 0;
}
.comment-input { 
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: 25px;
    color: white;
    font-size: 15px;
    font-family: inherit;
    min-height: 48px;
    width: 100%;
}
.comment-input:focus { border-color: var(--accent); }
.comment-post-btn { 
    color: var(--accent);
    background: none;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    padding: 10px;
}
.comment-post-btn:disabled { opacity: 0.5; }

/* TEXT-ONLY POST LAYOUT (Instagram-style) */
.text-post-content {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.text-post-caption {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-primary);
    text-align: center;
    max-width: 90%;
    word-wrap: break-word;
    margin: 0;
    font-weight: 500;
}

.text-only-post .post-caption {
    display: none;
}

.text-only-post .post-img-container {
    display: none !important;
}

/* ================================================================
   REST OF THE APP STYLES (unchanged)
   ================================================================ */

/* --- FLOATING NAVIGATION --- */
#bottomNav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    height: 65px;
    background: rgba(8, 10, 8, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 500;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Hide nav when keyboard is open on iOS */
@supports (-webkit-touch-callout: none) {
    body.keyboard-open #bottomNav {
        display: none;
    }
}
.nav-btn {
    background: none; border: none; color: var(--text-secondary);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 10px; cursor: pointer; flex: 1; position: relative;
}
.nav-btn svg { width: 24px; height: 24px; stroke-width: 2px; stroke: currentColor; fill: none; }
.nav-btn.active { color: var(--accent); }
.nav-badge {
    position: absolute; top: 12px; right: 20px;
    width: 8px; height: 8px; background: var(--accent);
    border-radius: 50%; box-shadow: 0 0 5px var(--accent);
}

.create-circle {
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--accent); color: #000;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 20px var(--accent-glow); 
    transform: translateY(-20px);
}

/* --- MODALS --- */
.modal { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.9); backdrop-filter: blur(5px); align-items: center; justify-content: center; padding: 15px; }
.modal.active { display: flex; }
.modal-card { background: var(--bg-secondary); width: 100%; max-width: 480px; max-height: 85vh; border-radius: 35px; border: 1px solid var(--border); overflow: hidden; overflow-y: auto; animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; }

.form-input { width: 100%; padding: 16px; margin-bottom: 15px; background: #1c211c; border: 1px solid var(--border); color: white; border-radius: 18px; outline: none; font-family: inherit; transition: border 0.2s; }
.form-input:focus { border-color: var(--accent); }

.btn-full, .btn-nest { width: 100%; padding: 18px; background: var(--accent); border: none; border-radius: 22px; font-weight: 700; color: #000; font-size: 16px; font-family: inherit; cursor: pointer; box-shadow: 0 10px 25px var(--accent-glow); transition: transform 0.1s; }
.btn-full:active { transform: scale(0.97); }

.upload-box { height: 140px; border: 2px dashed var(--border); border-radius: 20px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); margin-bottom: 20px; cursor: pointer; flex-direction: column; gap: 10px; }
.upload-box:hover { border-color: var(--accent); color: var(--accent); }
.preview-img { width: 100%; border-radius: 20px; margin-bottom: 15px; display: none; }

/* --- VIEWS --- */
.view { display: none; animation: fadeIn 0.3s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- CHAT VIEW FIX --- */
#conversationView {
    display: none;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--bg-primary);
    height: 100%;
}
#conversationView.active {
    display: flex;
}

#chatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 20px; 
    display: flex; flex-direction: column; gap: 8px;
}

.chat-input-area {
    flex-shrink: 0;
    background: var(--bg-primary); 
    border-top: 1px solid var(--border); 
    display: flex; 
    gap: 10px; 
    padding: 15px;
    padding-bottom: max(15px, env(safe-area-inset-bottom));
    z-index: 500;
    width: 100%;
    align-items: center;
}

/* Instagram-style input wrapper */
.chat-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 0 12px;
    height: 44px;
}

/* Icons inside input (camera & mic) */
.chat-icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.chat-icon-btn:hover {
    color: var(--text-primary);
}

.chat-icon-btn:active {
    transform: scale(0.95);
}

.chat-icon-btn svg {
    width: 22px;
    height: 22px;
}

/* Text input */
.chat-text-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 15px;
    font-family: inherit;
    padding: 0 8px;
    margin: 0;
}

.chat-text-input::placeholder {
    color: var(--text-secondary);
}

/* Send button */
.chat-send-btn {
    background: var(--accent);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.1s;
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.chat-send-btn svg {
    stroke: black;
}

/* Recording state for mic */
.mic-btn.recording {
    color: var(--error);
    animation: pulse 1s infinite;
}

.list-item { padding: 15px 20px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--border); cursor: pointer; }
.list-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.list-info h4 { font-size: 16px; margin-bottom: 4px; color: white; }
.list-info p { font-size: 13px; color: var(--text-secondary); }

/* --- CHAT BUBBLES --- */
.msg-bubble { 
    padding: 14px 18px; 
    border-radius: 20px; 
    max-width: 75%; 
    font-size: 14px; 
    line-height: 1.5; 
    word-wrap: break-word;
    position: relative;
}

/* Remove padding when bubble contains voice note */
.msg-bubble:has(.voice-note) {
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove padding when bubble contains image */
.msg-bubble:has(img) {
    padding: 0;
    overflow: hidden;
}

/* Remove padding when bubble contains video */
.msg-bubble:has(video) {
    padding: 0;
    overflow: hidden;
}

.msg-in { 
    background: linear-gradient(135deg, #1a1f1a 0%, #242924 100%);
    align-self: flex-start; 
    border-bottom-left-radius: 6px;
    color: #e0e0e0;
}
.msg-out { 
    background: linear-gradient(135deg, var(--accent) 0%, #00cc7a 100%);
    color: #000; 
    align-self: flex-end; 
    border-bottom-right-radius: 6px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 255, 157, 0.15);
}
.msg-out .voice-note { background: rgba(0, 255, 157, 0.2); border: 1px solid rgba(0, 255, 157, 0.3); }
.msg-in .voice-note { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); }
.msg-in .voice-play-btn { background: rgba(255,255,255,0.15); }
.msg-out .voice-play-btn { background: var(--accent); }
.msg-out .voice-play-btn svg { fill: black; }
.msg-in .voice-play-btn svg { fill: white; }
.msg-out .voice-progress-fill { background: rgba(0, 255, 157, 0.5); }
.msg-in .voice-progress-fill { background: rgba(255,255,255,0.3); }
.msg-out .voice-time { color: rgba(0, 0, 0, 0.6); }
.msg-in .voice-time { color: rgba(255,255,255,0.6); }
.msg-out .voice-progress-bar { background: rgba(0, 255, 157, 0.15); }
.msg-in .voice-progress-bar { background: rgba(255,255,255,0.1); }

/* --- PROFILE --- */
.profile-hero { padding: 30px 20px; text-align: center; }
.profile-pic-large { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--accent); padding: 4px; object-fit: cover; box-shadow: 0 0 20px var(--accent-glow); }
.edit-pic-badge { position: absolute; bottom: 0; right: 0; background: var(--bg-secondary); border: 1px solid var(--border); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.p-stat { text-align: center; cursor: pointer; }
.p-stat b { display: block; font-size: 18px; color: var(--accent); }
.p-stat span { font-size: 12px; color: var(--text-secondary); }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid-item { aspect-ratio: 1/1; background: #222; overflow: hidden; position: relative; cursor: pointer; }
.grid-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s ease; }
.grid-item:active img { transform: scale(0.95); }
.grid-video-icon { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.6); padding: 4px 8px; border-radius: 4px; font-size: 10px; color: white; }

.btn-small { padding: 8px 18px; border-radius: 20px; border: none; font-weight: 700; cursor: pointer; font-size: 13px; font-family: inherit; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: white; }
.btn-fill { background: var(--accent); color: black; }

/* --- STORY INSIGHTS --- */
.story-insights-btn {
    position: absolute;
    bottom: 140px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    z-index: 100;
    border: 1px solid rgba(255,255,255,0.1);
}
.story-insights-btn svg { width: 18px; height: 18px; }

.insights-list-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}
.insights-list-item:last-child { border-bottom: none; }
.insights-list-item .list-avatar { width: 44px; height: 44px; }
.insights-reaction { font-size: 20px; margin-left: auto; }

/* --- VOICE NOTE STYLES --- */
.voice-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.voice-btn.recording { color: var(--error); animation: pulse 1s infinite; }

.voice-note {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 157, 0.1);
    padding: 10px 14px;
    border-radius: 20px;
    min-width: 180px;
}
.voice-note audio { display: none; }

.voice-play-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.voice-play-btn svg { fill: black; }

.voice-progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.voice-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}
.voice-progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.1s linear;
}
.voice-time {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-secondary);
}

.voice-duration { font-size: 11px; color: var(--text-secondary); }

/* --- VOICE RECORDER UI --- */
.recording-pill {
    display: none;
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 0 16px;
    height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rec-indicator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
}
.rec-dot {
    width: 10px; height: 10px;
    background: #FF3B3B;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 10px rgba(255, 59, 59, 0.5);
}
.rec-ripple {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 1px solid #FF3B3B;
    opacity: 0;
    animation: ripple 1.5s infinite;
}
@keyframes ripple {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

.rec-timer {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 15px;
    color: white;
    min-width: 45px;
    text-align: center;
}

.rec-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    flex: 1;
    justify-content: center;
    margin: 0 15px;
}
.wave-bar {
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}
.wave-bar:nth-child(1) { height: 10px; animation-delay: 0.0s; }
.wave-bar:nth-child(2) { height: 15px; animation-delay: 0.1s; }
.wave-bar:nth-child(3) { height: 20px; animation-delay: 0.2s; }
.wave-bar:nth-child(4) { height: 15px; animation-delay: 0.3s; }
.wave-bar:nth-child(5) { height: 12px; animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { height: 5px; opacity: 0.5; }
    50% { height: 20px; opacity: 1; }
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.rec-cancel {
    background: rgba(255, 59, 59, 0.15);
    border: none;
    color: #FF3B3B;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.rec-cancel:active { transform: scale(0.9); background: rgba(255, 59, 59, 0.3); }

.rec-send {
    background: var(--accent);
    border: none;
    color: black;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    margin-left: 8px;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* --- STORY OVERLAY --- */
#storyOverlay { 
    position: fixed; 
    inset: 0; 
    background: #000; 
    z-index: 3000; 
    display: none; 
    flex-direction: column;
    /* Disable iOS long-press menu */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}
#storyOverlay.active { display: flex; }
.story-bars { display: flex; gap: 4px; margin-bottom: 15px; }
.story-bar { flex: 1; height: 3px; background: rgba(255,255,255,0.3); border-radius: 2px; overflow: hidden; }

@keyframes fillBar { from { width: 0%; } to { width: 100%; } }
.story-progress { height: 100%; background: var(--accent); width: 0%; }
.story-progress.animating { animation: fillBar 5s linear forwards; }

.story-menu-btn { 
    position: absolute; 
    top: 110px; 
    right: 20px; 
    z-index: 20000; 
    color: white; 
    background: rgba(0,0,0,0.3); 
    backdrop-filter: blur(10px); 
    border-radius: 50%; 
    width: 40px; height: 40px; 
    display: flex; align-items: center; justify-content: center; 
    cursor: pointer; 
    border: 1px solid rgba(255,255,255,0.1); 
}

.floating-emoji { position: absolute; bottom: 100px; font-size: 40px; pointer-events: none; z-index: 1000; animation: floatUp 2s ease-out forwards; }
@keyframes floatUp { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-300px) scale(1.5); opacity: 0; } }

/* --- ACTION SHEET --- */
.action-sheet { 
    position: fixed; bottom: 0; left: 0; width: 100%; 
    background: var(--bg-secondary); 
    border-top-left-radius: 25px; border-top-right-radius: 25px; 
    z-index: 21000; 
    padding: 20px; 
    transform: translateY(100%); 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    border-top: 1px solid var(--border);
}
.action-sheet.active { transform: translateY(0); }
.action-btn { 
    width: 100%; padding: 15px; 
    background: #1c211c; 
    border: 1px solid var(--border); 
    border-radius: 15px; 
    color: var(--error); 
    font-weight: 700; font-size: 16px; 
    margin-bottom: 10px; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.cancel-btn { background: transparent; color: white; border: none; margin-top: 10px; }
.sheet-overlay { 
    position: fixed; inset: 0; background: rgba(0,0,0,0.8); 
    z-index: 20999; display: none; backdrop-filter: blur(4px); 
}
.sheet-overlay.active { display: block; }

/* --- SWIPEABLE NOTIFICATION --- */
.notification-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
}
.notification-delete-bg {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(90deg, transparent, var(--error));
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.notification-delete-bg svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}
.notification-wrapper.swiping .notification-delete-bg {
    opacity: 1;
}
.notification-content {
    position: relative;
    background: var(--bg-primary);
    transition: transform 0.1s ease-out;
    will-change: transform;
}
.notification-content.removing {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: translateX(-100%) !important;
    opacity: 0;
}
.notification-wrapper.removing {
    transition: height 0.3s ease-out, margin 0.3s ease-out, padding 0.3s ease-out;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    top: max(80px, env(safe-area-inset-top) + 60px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 30000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 14px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s ease, toastFadeOut 0.3s ease 2.7s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    pointer-events: auto;
}
.toast.success { border-color: var(--accent); }
.toast.success::before { content: '✓'; color: var(--accent); font-size: 16px; }
.toast.error { border-color: var(--error); }
.toast.error::before { content: '✕'; color: var(--error); font-size: 16px; }
.toast.info { border-color: #3B82F6; }
.toast.info::before { content: 'ℹ'; color: #3B82F6; font-size: 16px; }
@keyframes toastSlideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastFadeOut { from { opacity: 1; } to { opacity: 0; } }

/* --- SKELETON LOADING --- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, rgba(255,255,255,0.08) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-story { width: 68px; height: 68px; border-radius: 50%; }
.skeleton-post { height: 400px; margin: 16px; border-radius: 30px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-circle { width: 80px; height: 80px; border-radius: 50%; }
.skeleton-text { height: 14px; border-radius: 7px; }
.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }

/* --- PULL TO REFRESH --- */
.pull-indicator {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    transition: transform 0.2s, opacity 0.2s;
}
.pull-indicator.visible { opacity: 1; transform: translateX(-50%) translateY(10px); }
.pull-indicator.refreshing svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- VERIFICATION BADGES --- */
.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 3px;
    background: var(--accent);
    border-radius: 50%;
    position: relative;
    vertical-align: middle;
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--accent-glow);
}

.verified-badge::after {
    content: '✓';
    color: black;
    font-size: 9px;
    font-weight: bold;
}

.verified-badge-large {
    width: 18px;
    height: 18px;
}

.verified-badge-large::after {
    font-size: 11px;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 3px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 50%;
    position: relative;
    vertical-align: middle;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.admin-badge::after {
    content: '✓';
    color: black;
    font-size: 9px;
    font-weight: bold;
}

.admin-badge-large {
    width: 18px;
    height: 18px;
}

.admin-badge-large::after {
    font-size: 11px;
}

/* Better scrollbar for desktop */
@media (min-width: 768px) {
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--bg-secondary); }
    ::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
}

/* ================================================================
   Z-INDEX FIX - Ensure modals stack correctly
   ================================================================ */

/* Profile Feed Modal - Medium z-index */
#profileFeedModal {
    z-index: 3000 !important;
}

#profileFeedContent {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* User List Modal (Likes, Followers, Following) - Higher z-index */
#userListModal {
    z-index: 4000 !important;
}

/* Make sure the modal backdrop for userList is also higher */
#userListModal + .sheet-overlay {
    z-index: 3999 !important;
}
/* ================================================================
   CHAT IMAGE/VIDEO - Remove padding from media bubbles
   ================================================================ */

.msg-bubble:has(img),
.msg-bubble:has(video) {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ================================================================
   IMAGE VIEWER - Floating card modal
   ================================================================ */

#imageViewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

#imageViewer.active {
    display: flex;
    opacity: 1;
}

.image-viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: imageViewerZoom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes imageViewerZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#imageViewerImg {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: 16px;
}

.image-viewer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: background 0.2s;
}

.image-viewer-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.image-viewer-close:active {
    transform: scale(0.95);
}

/* ================================================================
   MEDIA PREVIEW - Show preview of selected photo/video
   ================================================================ */

#mediaPreview {
    display: none;
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 8px 12px;
    height: 44px;
    align-items: center;
    gap: 12px;
}

#mediaPreviewContent {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

#mediaPreviewContent img,
#mediaPreviewContent video {
    max-height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.media-preview-cancel {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.media-preview-cancel:hover {
    color: var(--error);
}

/* ================================================================
   SIMPLE WORKING MEDIA PREVIEW & VOICE RECORDING
   ================================================================ */

/* Media preview - keep it simple */
#mediaPreview {
    display: none;
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 8px 12px;
    min-height: 44px;
    align-items: center;
    gap: 12px;
}

#mediaPreviewContent {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

#mediaPreviewContent img,
#mediaPreviewContent video {
    height: 60px;
    width: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.media-preview-cancel {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.media-preview-cancel:hover {
    color: var(--error);
}

/* Keep recording UI horizontal */
#voiceRecordingUI {
    flex-direction: row !important;
}

/* ================================================================
   STORY FULL-SCREEN 9:16 (Instagram Style)
   ================================================================ */

#storyContent {
    position: relative;
    overflow: hidden;
}

#storyContent img,
#storyContent video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    /* Disable iOS long-press menu on images/videos */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

/* Story preview in create modal - also 9:16 */
#storyPreviewContainer img,
#storyPreviewContainer video {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: cover;
    aspect-ratio: 9 / 16;
}
/* ================================================================
   MODERN STORY EDITOR STYLES - Add to styles.css
   ================================================================ */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=Caveat:wght@700&family=Didact+Gothic&display=swap');

/* Story Editor Frame */
#storyEditorFrame {
    display: none;
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    overflow: hidden;
}

#storyEditorFrame.active {
    display: block;
}

/* Story Canvas Layer */
.story-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

#storyCanvasLayer {
    z-index: 1;
    background: #222;
}

.story-media-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Empty State */
.story-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: 600;
    gap: 15px;
}

/* Text Sticker Styles */
.story-sticker-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    will-change: transform;
    cursor: grab;
    z-index: 10;
}

.story-sticker-content {
    padding: 10px 18px;
    border-radius: 10px;
    text-align: center;
    white-space: pre-wrap;
    min-width: 20px;
    position: relative;
    border: 2px dashed transparent;
}

.story-sticker-container.selected .story-sticker-content {
    border-color: rgba(255,255,255,0.8);
    background-color: rgba(0,0,0,0.1);
}

/* Control Handles */
.story-control-handle {
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 20;
    cursor: nwse-resize;
}

.story-delete-handle {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 24px;
    height: 24px;
    background: #ff3b30;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 20;
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.story-sticker-container.selected .story-control-handle,
.story-sticker-container.selected .story-delete-handle {
    display: flex;
}

/* Font Styles */
.story-font-classic {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

.story-font-hand {
    font-family: 'Caveat', cursive;
    font-size: 1.3em;
}

.story-font-clean {
    font-family: 'Didact Gothic', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* UI Controls */
.story-ui-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

.story-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.story-icon-btn:active {
    transform: scale(0.95);
}

.story-btn-pill {
    background: white;
    color: black;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.story-btn-pill:active {
    transform: scale(0.95);
}

/* Text Editor Overlay */
#storyTextEditorOverlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: center;
}

#storyTextEditorOverlay.active {
    display: flex;
}

#storyTextInput {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    text-align: center;
    font-size: 28px;
    width: 80%;
    resize: none;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

/* Font classes for textarea */
#storyTextInput.story-font-classic {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 28px;
}

#storyTextInput.story-font-hand {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 36px;
}

#storyTextInput.story-font-clean {
    font-family: 'Didact Gothic', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 24px;
}

/* Font Picker */
.story-font-picker {
    display: flex;
    gap: 10px;
    background: rgba(50,50,50,0.8);
    padding: 5px;
    border-radius: 20px;
}

.story-font-opt {
    padding: 6px 12px;
    border-radius: 15px;
    color: #aaa;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.story-font-opt.active {
    background: white;
    color: black;
}

/* Color Slider */
.story-color-slider {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 20px;
    flex-wrap: wrap;
}

.story-color-slider::-webkit-scrollbar {
    display: none;
}

.story-color-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.story-color-dot.active {
    transform: scale(1.25);
    border-color: white;
    border-width: 4px;
}

.story-color-dot:active {
    transform: scale(0.9);
}

/* Story swipe animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.story-swipe-left {
    animation: slideInLeft 0.3s ease-out;
}

.story-swipe-right {
    animation: slideInRight 0.3s ease-out;
}

/* ====================================
   MULTI-PHOTO CAROUSEL
   ==================================== */
.post-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0;
    background: #000;
    z-index: 1;
}

.carousel-track {
    position: relative;
    width: 100%;
    padding-bottom: 125%; /* 4:5 aspect ratio (5/4 = 1.25) */
    background: #000;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.carousel-image.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
    pointer-events: auto;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
}

.carousel-dots .dot.active {
    background: var(--accent);
    width: 20px;
    border-radius: 4px;
}

@media (max-width: 600px) {
    /* Carousel maintains 4:5 aspect ratio automatically */
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
    
    .carousel-dots {
        bottom: 10px;
    }
}

/* Photo count indicator on grid */
.grid-photo-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
/* ============================================

/* Message action menu (long-press popup) */
.message-action-menu {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 10000;
    min-width: 120px;
}

.message-action-menu button {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.message-action-menu button:hover {
    background: rgba(255,255,255,0.2);
}

.message-action-menu button:active {
    transform: scale(0.95);
}

/* Pinch to Zoom on Posts */
.post-media:not(.video-player) {
    touch-action: pan-x pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
}

/* Video player - hide controls on iOS */
.video-player {
    outline: none;
}

/* Hide ALL video controls - comprehensive approach */
.video-player::-webkit-media-controls {
    display: none !important;
    -webkit-appearance: none !important;
    opacity: 0 !important;
}

.video-player::-webkit-media-controls-enclosure {
    display: none !important;
}

.video-player::-webkit-media-controls-panel {
    display: none !important;
}

.video-player::-webkit-media-controls-play-button {
    display: none !important;
}

.video-player::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.video-player::-webkit-media-controls-timeline {
    display: none !important;
}

.video-player::-webkit-media-controls-current-time-display {
    display: none !important;
}

.video-player::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.video-player::-webkit-media-controls-mute-button {
    display: none !important;
}

.video-player::-webkit-media-controls-volume-slider {
    display: none !important;
}

.video-player::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* Additional browser-specific hiding */
.video-player::-webkit-media-controls-overlay-play-button {
    display: none !important;
}

.video-player::--webkit-media-controls-overlay-enclosure {
    display: none !important;
}

/* Remove play button overlay entirely */
.video-player[poster] {
    object-fit: cover;
}

.video-player::-webkit-media-controls-overlay-enclosure,
.video-player::-webkit-media-controls-overlay-play-button,
.video-player::-webkit-media-controls-start-playback-button {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


    border-color: rgba(74, 158, 255, 0.5);
}

/* Mentions */
.mention {
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.mention:hover {
    opacity: 0.8;
    text-decoration: underline;
}