:root {
    --primary: #ff006e;
    --primary-grad: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    --bg-grad: linear-gradient(135deg, #10002b 0%, #240046 50%, #3c096c 100%);
    --chat-bg: #0f0f1a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #e0aaff;
    --accent: #ff006e;
    --success: #00b894;
    --danger: #ff4757;
    --warning: #ff9f43;
    --nav-height: 70px;
    --header-height: 60px;
}
                
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; -webkit-tap-highlight-color: transparent; }

body { 
    background: var(--bg-grad); 
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-main); 
    overflow: hidden; 
    height: 100vh; 
    overscroll-behavior: none;
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- 🚀 QUALITY ENHANCED UI UX --- */
#splash-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #ffffff; /* Pure Studio White */
    z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

/* Exit Cinematic Blur */
#splash-screen.splash-hide {
    opacity: 0;
    transform: scale(1.1);
    filter: blur(10px);
    pointer-events: none;
}

.quality-wrapper { text-align: center; width: 85%; max-width: 400px; }

/* --- ❤️ MINIMALIST HEART LOGO (STATIC) --- */
.logo-viewport {
    position: relative; width: 120px; height: 120px;
    margin: 0 auto 30px;
    display: flex; align-items: center; justify-content: center;
}

.premium-heart {
    font-size: 5rem;
    color: #ff006e;
    filter: drop-shadow(0 15px 30px rgba(255, 0, 110, 0.25));
    position: relative; z-index: 5;
}

.glass-bg {
    position: absolute; width: 100%; height: 100%;
    background: rgba(255, 0, 110, 0.03);
    border-radius: 40%; transform: rotate(-15deg);
    border: 1px solid rgba(255, 0, 110, 0.1);
}

/* --- 🖋️ PREMIUM TYPOGRAPHY --- */
.app-name-premium {
    font-size: 2rem; font-weight: 900; color: #10002b;
    letter-spacing: 8px; margin-bottom: 5px;
    background: linear-gradient(135deg, #10002b 0%, #ff006e 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.app-tagline {
    font-size: 0.7rem; font-weight: 800; color: #cbd5e1;
    letter-spacing: 3px; margin-bottom: 60px;
}

/* --- ⚡ LIQUID LOADER SYSTEM --- */
.loader-container-premium { width: 100%; }

.status-row {
    display: flex; justify-content: space-between;
    margin-bottom: 12px; font-size: 0.75rem;
    font-weight: 900; color: #94a3b8;
}

#load-pc { color: #ff006e; }

.liquid-track {
    width: 100%; height: 10px; background: #f8fafc;
    border-radius: 20px; overflow: hidden; position: relative;
    border: 1px solid #f1f5f9;
}

.liquid-fill {
    position: absolute; top: 0; left: 0;
    width: 0%; height: 100%;
    background: linear-gradient(90deg, #ff006e, #8338ec);
    border-radius: 20px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
}

/* 🌊 LIQUID GLOW EFFECT */
.liquid-glow {
    position: absolute; top: 0; right: 0;
    width: 30px; height: 100%;
    background: white; opacity: 0.5;
    filter: blur(5px);
}

.footer-secure {
    margin-top: 40px; font-size: 0.6rem; font-weight: 900;
    color: #e2e8f0; letter-spacing: 2px;
}
/* --- NETWORK STATUS --- */
#network-status {
    position: fixed; top: 15px; left: 50%; transform: translateX(-50%) translateY(-150%);
    background: rgba(30, 30, 30, 0.9); backdrop-filter: blur(10px);
    padding: 8px 20px; border-radius: 30px;
    color: white; font-size: 0.85rem; font-weight: 600;
    display: flex; align-items: center; gap: 10px;
    z-index: 9999; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 20px rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
}
#network-status.show { transform: translateX(-50%) translateY(0); }
.net-dot { width: 8px; height: 8px; border-radius: 50%; }
.net-offline .net-dot { background: var(--danger); box-shadow: 0 0 10px var(--danger); animation: blink 1s infinite; }
.net-online .net-dot { background: var(--success); box-shadow: 0 0 10px var(--success); }
.net-slow .net-dot { background: var(--warning); box-shadow: 0 0 10px var(--warning); }
@keyframes blink { 50% { opacity: 0.4; } }

/* SKELETON LOADING */
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 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; } }
.post-skeleton { padding: 15px; margin-bottom: 15px; background: rgba(255,255,255,0.02); }
.sk-header { display: flex; gap: 10px; align-items: center; margin-bottom: 15px; }
.sk-avatar { width: 40px; height: 40px; border-radius: 50%; }
.sk-name { width: 120px; height: 14px; }
.sk-img { width: 100%; aspect-ratio: 4/5; margin-bottom: 10px; }
.sk-text { width: 80%; height: 12px; margin-bottom: 5px; }

/* Notification Permission Banner */
#notif-perm-banner {
    background: linear-gradient(90deg, #ff9e00, #ff006e);
    color: white; padding: 10px; text-align: center;
    font-size: 0.9rem; display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px; border-radius: 12px; margin: 10px 15px;
    box-shadow: 0 5px 15px rgba(255, 0, 110, 0.3);
    cursor: pointer;
}
.perm-btn { background: white; color: var(--primary); border: none; padding: 5px 15px; border-radius: 20px; font-weight: bold; font-size: 0.8rem; cursor: pointer; }

/* VIEW TRANSITIONS */
.view-section {
    opacity: 0; transform: scale(0.98);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; overflow-y: hidden; background: var(--bg-grad);
    padding-top: var(--header-height); z-index: 10;
}
.view-section.active-view { opacity: 1; transform: scale(1); pointer-events: all; position: relative; overflow-y: auto; z-index: 20; scroll-behavior: smooth; }

/* PULL TO REFRESH LOADER CONTAINER */
#ptr-loader {
    position: absolute;
    top: calc(var(--header-height) + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    pointer-events: none;
}
#ptr-loader i { color: var(--primary); font-size: 1.2rem; }
#ptr-loader.loading { transform: translateX(-50%) scale(1) !important; animation: bounceLoader 0.6s infinite alternate; }
@keyframes bounceLoader { from { top: 70px; } to { top: 80px; } }


/* Auth Screen */
#auth-section { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; background: radial-gradient(circle at center, #3c096c, #10002b); z-index: 1000; position: absolute; width: 100%; top: 0; }
.auth-card { background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(25px); padding: 2.5rem; border-radius: 30px; width: 90%; max-width: 380px; border: 1px solid var(--glass-border); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.logo-text { font-size: 2.5rem; font-weight: 800; background: linear-gradient(to right, #fff, #ff9e00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 2rem; letter-spacing: -1px; filter: drop-shadow(0 0 15px rgba(255,0,110,0.4)); }
.input-group { position: relative; margin-bottom: 1rem; }
.input-group input { width: 100%; padding: 16px; background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border); border-radius: 14px; color: white; outline: none; transition: 0.3s; font-size: 1rem; }
.input-group input:focus { border-color: var(--primary); background: rgba(0,0,0,0.4); box-shadow: 0 0 15px rgba(255, 0, 110, 0.2); }

.username-status { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-size: 1.1rem; }
.status-valid { color: var(--success); }
.status-invalid { color: var(--danger); }

.btn-primary { width: 100%; padding: 16px; background: var(--primary-grad); border: none; border-radius: 14px; color: white; font-weight: 600; font-size: 1rem; cursor: pointer; transition: 0.2s; box-shadow: 0 5px 20px rgba(255, 0, 110, 0.3); }
.btn-primary:active { transform: scale(0.96); }
.btn-primary:disabled { background: #555; cursor: not-allowed; box-shadow: none; }
.auth-switch { margin-top: 1.5rem; color: var(--text-muted); font-size: 0.9rem; cursor: pointer; }

/* Layout */
#app-container { height: 100vh; display: flex; flex-direction: column; max-width: 600px; margin: 0 auto; background: transparent; position: relative; box-shadow: 0 0 50px rgba(0,0,0,0.5); }
header { height: var(--header-height); display: flex; justify-content: space-between; align-items: center; padding: 0 20px; background: rgba(16, 0, 43, 0.95); backdrop-filter: blur(15px); border-bottom: 1px solid var(--glass-border); position: fixed; top: 0; width: 100%; max-width: 600px; z-index: 100; }
.header-logo { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.5px; background: linear-gradient(45deg, #fff, #ff006e); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-actions { display: flex; gap: 20px; align-items: center; }
.icon-btn { font-size: 1.3rem; color: var(--text-main); cursor: pointer; position: relative; }
.notif-badge { position: absolute; top: -5px; right: -5px; background: var(--accent); color: white; font-size: 0.6rem; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; display: none; }
#notif-dropdown { position: absolute; top: 60px; right: 10px; width: 320px; background: #240046; border: 1px solid var(--glass-border); border-radius: 16px; padding: 0; box-shadow: 0 10px 40px rgba(0,0,0,0.5); z-index: 1000; display: none; max-height: 400px; overflow-y: auto; }
.notif-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.9rem; cursor: pointer; transition: 0.2s; }
.notif-item:hover { background: rgba(255,255,255,0.1); }
.notif-item.unread { background: rgba(255, 0, 110, 0.15); border-left: 3px solid var(--primary); }
.notif-item img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid #ff006e; }

main { 
    flex: 1; 
    position: relative; 
    overflow: hidden; 
    padding-bottom: 0px; 
}


/* Modals */
#create-post-modal, #edit-profile-modal, #comments-modal, #post-view-modal, #user-list-modal, #share-modal, #story-viewers-modal, #progress-modal, #exit-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(16, 0, 43, 0.9); backdrop-filter: blur(8px); z-index: 200; display: flex; justify-content: center; align-items: center; }
.modal-content { background: rgba(36, 0, 70, 0.95); width: 90%; max-width: 450px; padding: 25px; border-radius: 24px; text-align: center; border: 1px solid var(--glass-border); max-height: 85vh; overflow-y: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.modal-input { width: 100%; padding: 14px; margin: 10px 0; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); color: white; border-radius: 12px; outline: none; font-size: 1rem; }
.file-upload-label { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 120px; background: rgba(0,0,0,0.2); border: 2px dashed var(--text-muted); border-radius: 16px; margin: 20px 0; cursor: pointer; color: var(--text-muted); transition: 0.2s; }
.comment-item { display: flex; gap: 12px; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); text-align: left; align-items: flex-start; }
.comment-avatar { width: 34px; height: 34px; border-radius: 50%; background: #333; object-fit: cover; border: 1px solid #ff006e; cursor: pointer; }
.comment-body { flex: 1; }
.comment-text { font-size: 0.9rem; color: #ddd; margin-top: 2px; }
.comment-user { font-weight: 700; color: #fff; font-size: 0.9rem; margin-right: 5px; cursor: pointer; }
.comment-like-container { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #aaa; font-size: 0.8rem; cursor: pointer; }
.comment-like-btn.liked { color: var(--accent); }

/* SHARE MODAL FIXED */
#share-modal { z-index: 2000 !important; }
#share-modal .modal-content { display: flex; flex-direction: column; max-height: 70vh; padding: 0; background: #240046; }
#share-options { flex: 1; overflow-y: auto; padding: 10px; padding-bottom: 70px; }
.share-option { display: flex; align-items: center; gap: 15px; padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; transition: 0.2s; text-align: left; position: relative; }
.share-option:hover { background: rgba(255,255,255,0.05); }
.share-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--primary); }

.share-user-selected { background: rgba(255, 0, 110, 0.15) !important; }
.share-user-selected .share-avatar { border: 2px solid var(--success); }
.check-icon { position: absolute; right: 20px; color: var(--success); font-size: 1.2rem; }

#btn-send-share {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: var(--primary-grad); color: white; border: none; 
    padding: 12px 40px; border-radius: 30px; font-weight: bold; font-size: 1rem;
    box-shadow: 0 5px 20px rgba(255,0,110,0.4); cursor: pointer;
    z-index: 10; display: none; width: 80%;
}

#post-view-modal, #story-view-modal, #media-viewer-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 400 !important; display: flex; justify-content: center; align-items: center; }
#post-view-modal.hidden, #story-view-modal.hidden { display: none; }
#media-viewer-modal { opacity: 0; pointer-events: none; transition: opacity 0.3s; background: #000; }
#media-viewer-modal.active { opacity: 1; pointer-events: all; }

.close-viewer-btn { position: absolute; top: 30px; right: 30px; color: white; font-size: 2rem; cursor: pointer; z-index: 401; background: rgba(0,0,0,0.5); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.btn-msg { background: var(--primary); color: white; border: none; padding: 8px 20px; border-radius: 20px; font-weight: 600; cursor: pointer; }
.btn-edit { background: rgba(255,255,255,0.1); color: white; border: 1px solid var(--glass-border); padding: 8px 20px; border-radius: 20px; font-weight: 600; cursor: pointer; }
.btn-follow { background: var(--primary); color: white; border: none; padding: 8px 20px; border-radius: 20px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-following { background: transparent; border: 1px solid #aaa; color: #ddd; }
.loading-spinner-feed { text-align: center; padding: 20px; display: none; }
.loading-spinner-feed.active { display: block; }
.refresh-loader { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); z-index: 99; background: white; border-radius: 50%; width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; box-shadow: 0 5px 15px rgba(0,0,0,0.3); opacity: 0; pointer-events: none; transition: 0.3s; }
.refresh-loader.active { opacity: 1; top: 90px; }




/* MESSAGE OPTIONS BOTTOM SHEET */
#msg-options-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 5000;
    display: flex; justify-content: center; align-items: center;
}

.msg-options-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(4px); 
    animation: fadeInOverlay 0.2s ease-out;
}

.msg-options-popup {
    position: relative;
    width: 85%; max-width: 320px;
    background: #1e1e2d; 
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    transform: scale(0.8); opacity: 0;
    animation: popInMenu 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; 
}

@keyframes popInMenu {
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeInOverlay {
    from { opacity: 0; } to { opacity: 1; }
}

.popup-header {
    text-align: center; font-weight: 700; color: rgba(255,255,255,0.5);
    font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase;
    margin-bottom: 20px;
}

.msg-option-item {
    display: flex; align-items: center; gap: 15px;
    padding: 12px; margin-bottom: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    cursor: pointer; transition: 0.2s;
}

.msg-option-item:active { transform: scale(0.95); background: rgba(255,255,255,0.1); }

.icon-circle {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: white;
}

.msg-option-item span { font-weight: 600; font-size: 1rem; color: #eee; }

.delete-item { background: rgba(255, 71, 87, 0.1); }
.delete-circle { background: rgba(255, 71, 87, 0.2); color: #ff4757; }
.delete-item span { color: #ff4757; }
.msg-deleted-text { font-style: italic; color: rgba(255,255,255,0.5); display: flex; align-items: center; gap: 5px; }

/* REACTION BAR STYLES */
.reaction-bar {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 50px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    animation: popInMenu 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reaction-emoji {
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.reaction-emoji:hover {
    transform: scale(1.4) translateY(-5px);
}

.reaction-emoji:active {
    transform: scale(0.9);
}

/* SUPER REACTION ANIMATION */
.super-reaction-emoji {
    position: fixed;
    font-size: 2rem;
    pointer-events: none;
    z-index: 9999;
    animation: emojiFloat var(--duration) ease-out forwards;
    opacity: 0;
}

@keyframes emojiFloat {
    0% { transform: translate(0, 0) scale(0.5); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: translate(var(--x), var(--y)) scale(1.5) rotate(var(--r)); opacity: 0; }
}

/* REACTION WITH DP STYLES */
.msg-reactions-container {
    position: absolute;
    bottom: -15px; 
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.reaction-pill {
    background: #1e1e2d;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reaction-emoji-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.reaction-dp-cluster {
    display: flex;
    align-items: center;
    margin-left: 2px;
}

.reaction-dp {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #1e1e2d; 
    object-fit: cover;
    margin-left: -6px; 
}

.reaction-dp:first-child {
    margin-left: 0;
}

.msg-out .msg-reactions-container {
    right: 10px;
    flex-direction: row-reverse; 
}
.message { margin-bottom: 20px !important; }
/* --- REPLY FEATURE STYLES --- */

/* Wrapper to hold Input + Reply Box */
.chat-input-wrapper {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 95%; max-width: 580px; z-index: 20;
    display: flex; flex-direction: column;
}

/* Adjust original input area to be inside wrapper */
.chat-input-area {
    position: relative; bottom: auto; left: auto; transform: none; width: 100%;
    background: rgba(30, 30, 50, 0.95); backdrop-filter: blur(25px);
    border-radius: 0 0 25px 25px; /* Bottom rounded only when replying */
    transition: 0.3s;
}

/* The Reply Preview Box */
.reply-preview-bar {
    background: rgba(20, 20, 30, 0.95);
    border-radius: 20px 20px 0 0;
    padding: 10px 15px;
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    animation: slideUpReply 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.reply-content { display: flex; gap: 10px; align-items: center; flex: 1; overflow: hidden; }
.reply-bar-line { width: 4px; height: 35px; background: var(--primary); border-radius: 5px; }
.reply-to-name { font-size: 0.85rem; font-weight: 700; color: var(--primary); }
.reply-to-text { font-size: 0.8rem; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.close-reply-btn { cursor: pointer; color: #aaa; padding: 5px; font-size: 1.1rem; }

/* Styles for Quoted Message inside the Chat Bubble */
.quoted-msg-bubble {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
    border-left: 4px solid var(--primary);
    display: flex; flex-direction: column;
    cursor: pointer;
    font-size: 0.85rem;
}
.quoted-name { font-weight: bold; color: var(--text-muted); font-size: 0.75rem; margin-bottom: 2px; }
.quoted-text { color: rgba(255,255,255,0.8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Swipe Animation Classes */
.message { transition: transform 0.2s ease-out; touch-action: pan-y; } /* Allow vertical scroll */
.swiping-active { transition: none; }
.reply-icon-overlay {
    position: absolute; left: -40px; top: 50%; transform: translateY(-50%);
    color: var(--primary); font-size: 1.5rem; opacity: 0; transition: opacity 0.2s;
}
/* --- IMPROVED SWIPE TO REPLY STYLES --- */

/* Message Wrapper to hold Icon + Bubble */
.msg-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    margin-bottom: 8px; /* Spacing between messages */
}

/* Alignment logic moved to wrapper */
.msg-wrapper.out { justify-content: flex-end; }
.msg-wrapper.in { justify-content: flex-start; }

/* The Reply Icon (Hidden by default) */
.swipe-reply-icon {
    position: absolute;
    left: -40px; /* Hide off-screen initially */
    color: var(--primary);
    font-size: 1.2rem;
    background: rgba(30, 30, 40, 0.8);
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Reset margin on message bubble because wrapper handles spacing */
.message {
    margin-bottom: 0 !important;
    transition: transform 0.1s linear; /* Ultra fast response for drag */
    z-index: 10;
}

/* Animation class for snapping back */
.message.snap-back {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
/* --- UNREAD MESSAGE BADGE --- */
.unread-badge {
    background: #00b894; /* हरा रंग (Green) */
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px; /* पूरा गोल */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    margin-left: 10px;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.4);
    animation: popInBadge 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popInBadge {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* अगर अनरीड मैसेज हैं, तो टाइम/स्टेटस को थोड़ा डिम (Dim) करें ताकि फोकस बैज पर हो */
.chat-item-meta {
    display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
}


/* style.css में इसे जोड़ें या अपडेट करें */

/* --- ACTIVE NOW BAR STYLES --- */
.active-now-bar {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 15px 15px;
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    min-height: 95px; /* हाइट बढ़ाई ताकि रिंग कटे नहीं */
}

.active-now-bar::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.active-now-bar.hidden { display: none !important; }

.active-item {
    display: flex; flex-direction: column; align-items: center;
    width: 64px; flex-shrink: 0; position: relative;
}

.active-img-container {
    position: relative;
    width: 56px; height: 56px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}
.active-img-container:active { transform: scale(0.9); }

/* सामान्य इमेज (बिना स्टोरी) */
.active-img {
    width: 100%; height: 100%;
    border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1); /* साधारण बॉर्डर */
    padding: 2px;
}

/* अगर स्टोरी है तो यह क्लास लगेगी (रंगीन बॉर्डर) */

/* --- PROGRESSIVE IMAGE LOADING (मक्खन जैसी लोडिंग) --- */

/* इमेज का कंटेनर (जब तक फोटो न आए, यह बैकग्राउंड दिखेगा) */
.img-placeholder {
    background-color: #2a2a3d; /* डार्क ग्रे रंग */
    background-image: linear-gradient(90deg, #2a2a3d 0%, #32324a 50%, #2a2a3d 100%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* इमेज की शुरुआती अवस्था (धुंधली और गायब) */
.smooth-img {
    opacity: 0;
    filter: blur(15px); /* धुंधलापन */
    transform: scale(1.05); /* थोड़ा बड़ा ताकि किनारे न कटें */
    transition: opacity 0.5s ease-out, filter 0.5s ease-out, transform 0.5s ease-out;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* इमेज लोड होने के बाद (साफ़ और दिखने वाली) */
.smooth-img.loaded {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

/* पोस्ट मीडिया कंटेनर को अपडेट करें */
.post-media-container {
    position: relative;
    width: 100%;
    /* aspect-ratio हटाकर इसे इमेज के हिसाब से एडजस्ट होने दें, या फिक्स रखें */
    aspect-ratio: 4/5; 
    background: #1a1a2e;
    overflow: hidden;
}
/* लॉक की गई चैट लिस्ट आइटम के लिए */
.locked-chat-badge {
    position: absolute;
    bottom: -2px;
    left: -2px;
    background: #10002b;
    color: #ff4757;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--danger);
    z-index: 5;
}

/* =================================================== */
/* --- PROFILE TABS (POSTS vs REELS) --- */
/* =================================================== */
.profile-tabs {
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 15px;
    background: rgba(0,0,0,0.2);
}
.profile-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    border-bottom: 2px solid transparent;
}
.profile-tab.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}
.profile-tab:active {
    background: rgba(255,255,255,0.05);
}
/* =================================================== */
/* --- SMART BACK BUTTON (CHAT TO REELS) --- */
/* =================================================== */
#smart-back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(16, 0, 43, 0.85);
    backdrop-filter: blur(15px);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2000;
    border: 1px solid rgba(255,0,110,0.5);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6), 0 0 15px rgba(255,0,110,0.3);
    cursor: pointer;
    transition: 0.3s;
}
#smart-back-btn:active {
    transform: scale(0.9);
}
/* =================================================== */
/* --- NEARBY RADAR (OFFLINE SIMULATION) STYLES --- */
/* =================================================== */

.radar-container {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(131, 56, 236, 0.15) 0%, rgba(16, 0, 43, 0.9) 80%);
    border: 2px solid rgba(255, 0, 110, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(131, 56, 236, 0.3), inset 0 0 30px rgba(255, 0, 110, 0.2);
}

.radar-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--primary-grad);
    box-shadow: 0 0 20px var(--primary);
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
}

.radar-sweep {
    position: absolute;
    top: 50%; left: 50%;
    width: 160px; height: 160px;
    background: conic-gradient(from 0deg, rgba(0, 184, 148, 0.1) 0%, rgba(0, 184, 148, 0.8) 100%);
    transform-origin: 0 0;
    animation: radarSweep 2s linear infinite;
    z-index: 5;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

@keyframes radarSweep {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.radar-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}
.ring-1 { width: 100px; height: 100px; }
.ring-2 { width: 200px; height: 200px; }
.ring-3 { width: 300px; height: 300px; }

.radar-user-dot {
    position: absolute;
    width: 45px; height: 45px;
    border-radius: 50%;
    border: 2px solid #00b894;
    transform: translate(-50%, -50%) scale(0);
    cursor: pointer;
    box-shadow: 0 0 15px #00b894;
    z-index: 20;
    animation: radarPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes radarPop {
    to { transform: translate(-50%, -50%) scale(1); }
}

.radar-user-name {
    position: absolute;
    bottom: -20px; left: 50%;
    transform: translateX(-50%);
    color: white; font-size: 0.7rem; font-weight: bold;
    background: rgba(0,0,0,0.7); padding: 2px 6px; border-radius: 10px;
    white-space: nowrap;
}
/* =================================================== */
/* --- NEW: SMOOTH TOP JUMP ANIMATION FOR CHATS --- */
/* =================================================== */
.chat-item {
    transition: background 0.3s ease, transform 0.3s ease;
}

.chat-item.move-top {
    animation: popToTop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    background: rgba(255, 0, 110, 0.15) !important; /* हल्का पिंक हाईलाइट */
    border-left: 4px solid var(--primary);
}

@keyframes popToTop {
    0% { transform: translateY(-30px) scale(0.95); opacity: 0; }
    50% { background: rgba(255, 0, 110, 0.25); }
    100% { transform: translateY(0) scale(1); opacity: 1; background: transparent; }
}
/* ==========================================


/* Auth Page Instagram Link Styling */
.insta-auth-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 18px;
    border-radius: 20px;
    color: #ff006e; /* पिंक थीम */
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 0, 110, 0.3);
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.insta-auth-link i {
    font-size: 1.2rem;
    background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.insta-auth-link:active {
    transform: scale(0.95);
    background: rgba(255, 0, 110, 0.1);
}

/* एनीमेशन */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Profile Actions Container */
#profile-actions {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 10px 15px;
    display: block !important;
}

/* Instagram Button Gradient */
.btn-insta-support {
    background: linear-gradient(45deg, #f09433, #dc2743, #bc1888) !important;
    border: none !important;
    color: white !important;
    font-weight: 700 !important;
    border-radius: 16px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(220, 39, 67, 0.3);
}

/* Share Button Gradient (Unique Blue/Purple) */
.btn-share-app {
    background: linear-gradient(135deg, #8338ec 0%, #3a86ff 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 700 !important;
    border-radius: 16px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(131, 56, 236, 0.3);
    cursor: pointer;
}

.btn-share-app:active {
    transform: scale(0.96);
}

.btn-share-app i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.music-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-bottom: 1px solid #111;
    cursor: pointer;
    transition: background 0.2s;
}
.music-item:active { background: #222; }
.music-cover {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}
.music-info b { display: block; color: white; font-size: 0.95rem; }
.music-info span { color: #888; font-size: 0.8rem; }
.play-icon { margin-left: auto; color: var(--primary); font-size: 1.2rem; }


/* POST CARD QUALITY UPGRADE */
.post-card {
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.9), rgba(10, 10, 20, 0.95));
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
}

.post-media-container {
    background: #000;
    border-radius: 12px;
    margin: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

/* Action Icons Animation */
.action-btn {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.action-btn:active {
    transform: scale(0.7) rotate(-10deg);
}

.action-btn.liked {
    filter: drop-shadow(0 0 8px var(--primary-neon));
}
:root {
    --primary-neon: #ff006e;
    --secondary-neon: #8338ec;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* मक्खन जैसी स्मूथ स्क्रॉलिंग और फ़ास्ट रेंडरिंग */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    overscroll-behavior-y: contain; /* पुल टू रिफ्रेश ग्लिच रोकता है */
    background: #05050a; /* Deep pitch black for quality */
}

/* GPU Acceleration for smooth animations */
.view-section, .post-card, .modal-content, #single-post-view-modal {
    transform: translateZ(0);
    will-change: transform, opacity;
    backface-visibility: hidden;
}
.btn-primary, .btn-follow, .btn-edit {
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary:active {
    transform: scale(0.95);
    filter: brightness(1.2);
}


/* --- 🏠 MODAL & SEARCH BOX BASE --- */
.modal-content {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: none !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
}

.modal-input {
    background: #f0f2f5 !important;
    color: #1a1a1a !important;
    border: 1px solid #ddd !important;
}

#global-search-modal {
    background: #ffffff !important;
}

#global-search-input {
    background: #f0f2f5 !important;
    color: #1a1a1a !important;
    border: 1px solid #e0e0e0 !important;
}

/* --- 🎭 ADVANCED CARD BOARD LOOK (Accounts & Posts) --- */
/* अब कार्ड सफेद नहीं, बल्कि हल्के ग्रे/नीले रंग के होंगे और कोनों पर कलर्स होंगे */
#global-search-results .chat-item, 
.search-post-item {
    background: #f1f4f9 !important; /* कार्ड का बैकग्राउंड सफेद नहीं है */
    border-radius: 18px !important;
    margin-bottom: 15px !important;
    padding: 12px 15px !important;
    position: relative !important;
    border: 2px solid transparent !important;
    
    /* 🌈 4 कोनों पर कलर वाला मैजिक (Gradient Border) */
    background-image: linear-gradient(#f1f4f9, #f1f4f9), 
                      linear-gradient(135deg, #ff006e, #8338ec, #00b894, #ffbe0b) !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;
    
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    transition: 0.3s ease;
}

/* --- 🖋️ TEXT ON CARD BOARDS (No more white text) --- */
#global-search-results .chat-item div, 
#global-search-results .chat-item span,
.search-post-info .search-post-caption {
    color: #1a1a1a !important; /* नाम और कैप्शन अब गहरा काला है */
    font-weight: 700 !important;
}

/* यूजरनेम (@username) का कलर */
#global-search-results .chat-item div[style*="color: var(--text-muted)"],
.search-post-type {
    color: #666666 !important; /* हल्का काला/ग्रे */
    font-weight: 500 !important;
}

/* Explore Posts की हेडिंग */
.search-section-title {
    color: #333333 !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    border-bottom: 2px solid #ff006e;
    display: inline-block;
    margin-bottom: 15px !important;
}

/* सर्च में दिखने वाली इमेज/थंबनेल के किनारे */
.search-post-thumb {
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
}

/* कार्ड पर टैप करने पर हल्का सा असर */
#global-search-results .chat-item:active, 
.search-post-item:active {
    transform: scale(0.97);
    filter: brightness(0.95);
}

/* --- 💬 COMMENTS & 📤 SHARE MODAL (3D PREMIUM LOOK) --- */
/* =================================================== */

/* 1. पॉप-अप का मुख्य बैकग्राउंड (सफेद नहीं, हल्का ग्रे) */
#comments-modal .modal-content, 
#share-modal .modal-content,
#user-list-modal .modal-content {
    background: #e5e7eb !important; /* Platinum Background */
    border: none !important;
    border-top: 4px solid var(--primary) !important;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2) !important;
}

/* 2. यूजर कार्ड बोर्ड (सफेद नहीं - 3D Card Board) */
/* कमेंट्स और शेयर लिस्ट के आइटम्स के लिए */
.comment-item, 
.share-option,
#user-list-content .chat-item {
    background: #f1f5f9 !important; /* हल्का ग्रे-नीला शेड */
    margin: 10px 12px !important;
    padding: 12px !important;
    border-radius: 18px !important;
    position: relative !important;
    border: 2.5px solid transparent !important;
    
    /* 🌈 4 कोनों पर कलर वाला ग्रेडिएंट बॉर्डर (Consistency) */
    background-image: linear-gradient(#f1f5f9, #f1f4f9), 
                      linear-gradient(135deg, #ff006e, #8338ec, #00b894, #ffbe0b) !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;
    
    /* 3D Depth Shadow */
    box-shadow: 0 6px 15px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8) !important;
    transition: 0.2s ease;
    display: flex !important;
    align-items: center !important;
}

/* 3. टेक्स्ट कलर्स (No White Text) */
.comment-user, 
.comment-text,
.share-option div,
#user-list-content .chat-item div {
    color: #1a1a1a !important; /* गहरा काला टेक्स्ट */
    font-weight: 700 !important;
}

/* @username या छोटा टेक्स्ट */
.comment-time, 
.share-option span,
.search-post-type {
    color: #64748b !important; /* गहरा ग्रे */
    font-weight: 600 !important;
}

/* 4. इनपुट बॉक्स और सर्च बार (सफेद नहीं) */
#comment-input, 
#share-list-search,
#user-list-search {
    background: #f8fafc !important;
    color: #1a1a1a !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 15px !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05) !important;
}

/* 5. शेयर स्क्रीन पर 'Selected User' का लुक */
.share-user-selected {
    background: #ecfdf5 !important; /* बहुत हल्का हरा शेड */
    background-image: linear-gradient(#ecfdf5, #ecfdf5), 
                      linear-gradient(135deg, #00b894, #00b894) !important; /* सिर्फ ग्रीन बॉर्डर */
}

/* 6. अवतार (Profile Photo) का बॉर्डर */
.comment-avatar, 
.share-avatar {
    border: 2px solid #ff006e !important;
    box-shadow: 0 2px 8px rgba(255,0,110,0.2) !important;
}

/* 7. सेंड बटन (Share Button) */
#btn-send-share {
    background: linear-gradient(135deg, #ff006e, #8338ec) !important;
    color: white !important;
    border-radius: 30px !important;
    font-weight: 800 !important;
    box-shadow: 0 8px 20px rgba(255,0,110,0.4) !important;
}

/* क्लिक करने पर एनीमेशन */
.comment-item:active, .share-option:active {
    transform: scale(0.98);
}

/* =================================================== */
/* --- 🏠 HOME FEED PREMIUM 3D SKELETON LOADER --- */
/* =================================================== */

/* 1. लोडिंग कार्ड का मुख्य ढांचा (Matches Post Card) */
.post-skeleton {
    background: #f1f5f9 !important; /* Platinum Blue Base */
    margin: 20px 15px 30px 15px !important;
    border-radius: 28px !important;
    padding: 15px !important;
    position: relative !important;
    overflow: hidden !important;
    border: 3.5px solid transparent !important;
    
    /* 🌈 4 कोनों पर कलर वाला ग्रेडिएंट बॉर्डर (Consistency) */
    background-image: linear-gradient(#f1f5f9, #f1f5f9), 
                      linear-gradient(135deg, #ff006e, #8338ec, #00b894, #ffbe0b) !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;
    
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
}

/* 2. शाइन/चमक वाला एनीमेशन (Ultra Smooth Shimmer) */
.skeleton {
    background: #e2e8f0 !important; /* गहरा ग्रे बेस */
    background-image: linear-gradient(
        90deg, 
        #e2e8f0 0%, 
        #f8fafc 50%, 
        #e2e8f0 100%
    ) !important;
    background-size: 200% 100% !important;
    animation: premiumShimmer 1.2s infinite linear !important;
    border-radius: 12px !important;
}

@keyframes premiumShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 3. लोडिंग एलिमेंट्स के साइज और शेप */

/* अवतार (Avatar Circle) */
.sk-avatar {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    border: 2px solid #fff !important;
}

/* नाम (Name Line) */
.sk-name {
    width: 120px !important;
    height: 14px !important;
    margin-left: 12px !important;
    border-radius: 8px !important;
}

/* मुख्य इमेज बॉक्स (Media Box) */
.sk-img {
    width: 100% !important;
    aspect-ratio: 4/5 !important;
    margin: 15px 0 !important;
    border-radius: 20px !important;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05) !important;
}

/* कैप्शन लाइन्स (Text Lines) */
.sk-text {
    width: 85% !important;
    height: 12px !important;
    margin-bottom: 8px !important;
    border-radius: 6px !important;
}

.sk-text-short {
    width: 50% !important;
    height: 12px !important;
    border-radius: 6px !important;
}

/* एक्शन बटन्स का लोडर (Small dots) */
.sk-actions {
    display: flex !important;
    gap: 20px !important;
    margin-top: 10px !important;
}

.sk-action-dot {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
}

/* 4. हेडर लेआउट */
.sk-header {
    display: flex !important;
    align-items: center !important;
}
/* =================================================== */
/* --- 🟢 ACTIVE NOW (ONLINE BAR) 3D PREMIUM LOOK --- */
/* =================================================== */

/* 1. ऑनलाइन बार का मुख्य 3D कार्ड बोर्ड */
.active-now-bar {
    background: #f1f5f9 !important; /* Platinum Blue Base */
    margin: 10px 15px 20px 15px !important; /* किनारों से जगह */
    padding: 15px 10px !important;
    border-radius: 24px !important;
    display: flex !important;
    gap: 15px !important;
    overflow-x: auto !important;
    position: relative !important;
    border: 3px solid transparent !important;
    
    /* 🌈 4 कोनों पर कलर वाला ग्रेडिएंट बॉर्डर (Theme Consistency) */
    background-image: linear-gradient(#f1f5f9, #f1f5f9), 
                      linear-gradient(135deg, #ff006e, #8338ec, #00b894, #ffbe0b) !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;
    
    /* 3D Depth Shadow */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), inset 0 2px 5px rgba(255, 255, 255, 0.9) !important;
    border-bottom: none !important;
}

/* 2. बार के अंदर के यूजर आइटम्स */
.active-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-width: 65px !important;
}

/* 3. ऑनलाइन यूजर का नाम (Black Text) */
.active-name {
    color: #1a1a1a !important; /* गहरा काला */
    font-weight: 800 !important;
    font-size: 0.75rem !important;
    margin-top: 8px !important;
    text-shadow: none !important;
}

/* 4. अवतार (DP) और ग्रीन डॉट का लुक */
.active-img-container img {
    border: 2.5px solid #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    background: #ffffff !important;
}

/* ग्रीन ऑनलाइन डॉट (चमकदार और साफ़) */
.active-dot-badge {
    background: #00b894 !important;
    border: 2.5px solid #f1f5f9 !important; /* बार के कलर से मैचिंग */
    box-shadow: 0 0 8px rgba(0, 184, 148, 0.5) !important;
    width: 15px !important;
    height: 15px !important;
}

/* 5. अगर ऑनलाइन यूजर की स्टोरी है (Ring Style) */
.story-ring-border {
    padding: 2.5px !important;
    background: linear-gradient(45deg, #ff006e, #ffbe0b) !important;
}

/* बार के स्क्रॉल को साफ़ किया */
.active-now-bar::-webkit-scrollbar {
    height: 0px !important; /* स्क्रॉल बार छुपाया ताकि साफ़ दिखे */
}

/* 6. "Messages" टाइटल और बार के बीच का गैप फिक्स */
#chat-view div[style*="font-size:1.8rem"] {
    margin-bottom: 5px !important;
    padding-left: 20px !important;
}



/* =================================================== */
/* --- 👤 PROFILE SCREEN 3D PREMIUM LOOK (SUNLIGHT) --- */
/* =================================================== */

/* 1. प्रोफाइल स्क्रीन का मुख्य बैकग्राउंड (पूरा पेज सफेद) */
#profile-view {
    background-color: #ffffff !important;
    background-image: none !important;
}

/* 2. प्रोफाइल इन्फो कार्ड (सफेद नहीं - 3D Platinum Board) */
.profile-info-card {
    background: #f1f5f9 !important; /* Premium Platinum Blue */
    margin: 20px auto !important;
    border-radius: 26px !important;
    padding: 20px !important;
    position: relative !important;
    border: 3.5px solid transparent !important;
    
    /* 🌈 4 कोनों पर कलर वाला ग्रेडिएंट बॉर्डर */
    background-image: linear-gradient(#f1f5f9, #f1f5f9), 
                      linear-gradient(135deg, #ff006e, #8338ec, #00b894, #ffbe0b) !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;
    
    /* 💎 3D Depth Shadow */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    text-align: center !important;
}

/* नाम और यूजरनेम (Black Text) */
#profile-name { color: #000000 !important; font-weight: 900 !important; }
#profile-username { color: #ff006e !important; font-weight: 800 !important; }
#profile-bio { color: #334155 !important; font-weight: 600 !important; }

/* 3. स्टेट्स बार (Posts, Followers, Following) - 3D Card */
.profile-stats {
    background: #f1f5f9 !important;
    margin: 15px !important;
    padding: 12px !important;
    border-radius: 20px !important;
    display: flex !important;
    justify-content: space-around !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
}

.stat-val { color: #000000 !important; font-weight: 900 !important; }
.stat-label { color: #64748b !important; font-weight: 700 !important; }

/* 4. रेफरल कार्ड बोर्ड (Special Platinum 3D) */
#my-referral-card {
    background: #f1f5f9 !important;
    border: 3px solid transparent !important;
    background-image: linear-gradient(#f1f5f9, #f1f5f9), 
                      linear-gradient(135deg, #8338ec, #3a86ff) !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;
    box-shadow: 0 10px 25px rgba(131, 56, 236, 0.1) !important;
}

#profile-refer-code {
    background: #ffffff !important;
    color: #8338ec !important;
    border-radius: 12px !important;
    padding: 10px !important;
    border: 1.5px solid #e2e8f0 !important;
}

/* 5. प्रोफाइल फोटो (DP) का 3D रिंग */
#profile-img {
    border: 4px solid #ffffff !important;
    box-shadow: 0 0 0 3px #ff006e, 0 10px 25px rgba(255, 0, 110, 0.2) !important;
    background: #ffffff !important;
}

/* 6. प्रोफाइल बटन्स (Edit, Settings, Insta) - 3D Boards */
.btn-edit, .btn-msg, .btn-insta-support, .btn-share-app {
    border-radius: 16px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: 0.2s !important;
    border: none !important;
}

/* Edit & Settings (Platinum 3D) */
.btn-edit {
    background: #f1f5f9 !important;
    color: #1a1a1a !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
}

/* 7. टैब्स एरिया (Posts/Reels Switcher) */
.profile-tabs {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.profile-tab { color: #94a3b8 !important; }
.profile-tab.active { color: #ff006e !important; border-bottom: 3px solid #ff006e !important; }

/* 8. 'Follows You' बैज */
#profile-follows-you-card {
    background: #ecfdf5 !important;
    color: #059669 !important;
    border: 1.5px solid #a7f3d0 !important;
    font-weight: 800 !important;
}



/* --- AUTH SECTION (Premium White Theme) --- */
#auth-section { 
    height: 100vh; 
    display: flex; flex-direction: column; 
    justify-content: center; align-items: center; 
    background: #ffffff; /* बैकग्राउंड एकदम साफ सफेद */
    z-index: 1000; position: absolute; width: 100%; top: 0; 
}

.auth-card { 
    background: #ffffff; /* कार्ड भी सफेद */
    padding: 2.5rem; 
    border-radius: 35px; 
    width: 90%; max-width: 380px; 
    border: 1px solid #e2e8f0; /* हल्का ग्रे बॉर्डर */
    text-align: center; 
    /* 3D शैडो (ताकि कार्ड व्हाइट बैकग्राउंड पर ऊपर उठा हुआ दिखे) */
    box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
}

.logo-text { 
    font-size: 2.2rem; font-weight: 800; 
    background: linear-gradient(135deg, #10002b, #ff006e); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; 
    margin-bottom: 2rem; letter-spacing: -1px; 
}

.input-group input { 
    width: 100%; padding: 16px; 
    background: #f1f5f9; /* लाइट ग्रे इनपुट फील्ड */
    border: 2px solid #e2e8f0; 
    border-radius: 16px; 
    color: #1a1a1a; /* डार्क टेक्स्ट */
    outline: none; transition: 0.3s; font-size: 1rem; 
}

.input-group input:focus { 
    border-color: #ff006e; 
    background: #ffffff; 
    box-shadow: 0 0 0 4px rgba(255, 0, 110, 0.1); 
}

.btn-primary { 
    width: 100%; padding: 16px; 
    background: linear-gradient(135deg, #ff006e, #8338ec); 
    border: none; border-radius: 16px; 
    color: white; font-weight: 700; font-size: 1rem; 
    cursor: pointer; transition: 0.2s; 
    box-shadow: 0 8px 20px rgba(255, 0, 110, 0.3);
}

.auth-switch { 
    margin-top: 1.5rem; 
    color: #64748b; /* ग्रे टेक्स्ट */
    font-size: 0.9rem; cursor: pointer; font-weight: 600;
}

/* इनपुट के अंदर के आइकन्स का रंग (सफेद बैकग्राउंड पर दिखने के लिए) */
#login-user-icon { color: #94a3b8 !important; }




/* ==========================================
   --- ADVANCED GLOBAL SEARCH UI ---
   ========================================== */
.search-section-title {
    font-size: 0.85rem; color: #aaa; font-weight: 700; 
    text-transform: uppercase; letter-spacing: 1px; 
    margin: 15px 5px 10px; display: flex; justify-content: space-between;
}
.clear-history-btn {
    color: var(--primary); cursor: pointer; text-transform: none; 
    font-weight: 600; letter-spacing: 0;
}
.history-delete-btn {
    color: #666; font-size: 1.1rem; padding: 5px; cursor: pointer; transition: 0.2s;
}
.history-delete-btn:hover { color: var(--danger); }

/* Post Search Result Style */
.search-post-item {
    display: flex; align-items: center; gap: 12px; padding: 10px; 
    background: rgba(255,255,255,0.02); border-radius: 12px; 
    margin-bottom: 8px; border: 1px solid rgba(255,255,255,0.05); cursor: pointer;
}
.search-post-thumb {
    width: 50px; height: 50px; border-radius: 8px; object-fit: cover;
}
.search-post-info { flex: 1; overflow: hidden; }
.search-post-caption {
    font-size: 0.85rem; color: #ddd; white-space: nowrap; 
    overflow: hidden; text-overflow: ellipsis;
}
.search-post-type { font-size: 0.7rem; color: var(--primary); font-weight: bold; margin-top: 3px; }
.btn-insta-support {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(220, 39, 67, 0.4);
    transition: 0.3s ease;
    width: 100%;
    margin-top: 5px;
}

.btn-insta-support:hover {
    filter: brightness(1.1);
    box-shadow: 0 10px 25px rgba(220, 39, 67, 0.5);
}

.btn-insta-support:active {
    transform: scale(0.96);
}
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 5px; /* साइड पैडिंग थोड़ी कम करें */
}

.bottom-nav .nav-item {
    font-size: 1.2rem; /* मोबाइल पर ओवरलैपिंग से बचने के लिए साइज को थोड़ा बैलेंस रखें */
}
/* ==========================================================================
   SMART POP-UP COMMENTS & 3D CARD BOARD NOTIFICATIONS
   ========================================================================== */

/* कमेंट्स मोडल को बॉटम-शीट पॉप-अप में बदलना */
#comments-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(16, 0, 43, 0.6);
    backdrop-filter: blur(8px);
    z-index: 6500;
    display: flex;
    align-items: flex-end; /* नीचे से पॉप-अप होने के लिए */
    justify-content: center;
    transition: opacity 0.3s ease;
}

#comments-modal.hidden {
    display: none !important;
}

/* कमेंट्स की मुख्य बॉडी */
#comments-modal .modal-content {
    background: #ffffff !important;
    color: #1e293b !important;
    width: 100%;
    max-width: 500px;
    height: 75vh; /* स्क्रीन का 75% हिस्सा कवर करेगा */
    border-radius: 30px 30px 0 0; /* ऊपर के कोने गोल */
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    transform: translate3d(0, 100%, 0); /* नीचे छिपा रहेगा */
    animation: slideUpComments 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    will-change: transform;
}

@keyframes slideUpComments {
    to {
        transform: translate3d(0, 0, 0);
    }
}

/* कमेंट हेडर (पुल-डाउन बार के साथ) */
.comment-header-indicator {
    width: 40px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 10px;
    margin: 10px auto 5px;
}

/* कमेंट सेंड एरिया */
.comment-input-box {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0;
    padding: 15px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.comment-input-field {
    flex: 1;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 20px !important;
    padding: 12px 18px !important;
    color: #000000 !important;
    font-size: 0.95rem;
    outline: none;
    transition: 0.2s;
}

.comment-input-field:focus {
    border-color: #ff006e !important;
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.1);
}

/* 3D कार्ड बोर्ड नोटिफिकेशन डिजाइन */
.notif-cardboard-3d {
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05), inset 0 2px 3px rgba(255,255,255,1) !important;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1) !important;
}

.notif-cardboard-3d:active {
    transform: scale(0.97) translateY(2px) !important;
}
/* --- 📱 FULL SCREEN SHARE TRANSITIONS --- */
#share-modal:not(.hidden) {
    display: flex !important;
}

/* इनफिनिटी स्क्रॉल लोडर का स्मूथ रोटेशन */
@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* टच डिवाइस पर लिस्ट स्क्रॉल को स्मूथ बनाने के लिए */
#share-options {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
#share-options::-webkit-scrollbar {
    display: none;
}
