body { font-family: Arial, sans-serif; background: #f4f4f9; margin: 0; padding: 0; }
header { background: #007bff; color: white; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; position: relative; }
header nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
header nav a, header nav button { color: white; text-decoration: none; font-weight: bold; cursor: pointer; background: transparent; border: none; font-size: 14px; padding: 5px 10px; }
.logout-btn { background: #dc3545; border-radius: 4px; display: none; }
.login-btn { background: #28a745; border-radius: 4px; display: inline-block; }
.expert-btn { background: #17a2b8; border-radius: 4px; display: inline-block; }
.caller-btn { background: #6f42c1; border-radius: 4px; display: inline-block; }
.wallet-nav-btn { background: #ffc107; color: black; border-radius: 4px; display: inline-block; }
.install-app-nav { background: #ff5722; border-radius: 4px; display: inline-block; }

.menu-toggle { display: none; font-size: 28px; cursor: pointer; color: white; background: none; border: none; }

.icon-nav-bar { 
    background: #e9ecef; 
    display: flex; 
    justify-content: space-around; 
    align-items: center; 
    padding: 10px 8px; 
    border-bottom: 2px solid #ddd; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}
.icon-nav-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; text-decoration: none; color: #333; font-weight: bold; font-size: 13px; position: relative; }
.icon-nav-item:hover { color: #007bff; }
.icon-nav-item .icon-symbol { font-size: 20px; margin-bottom: 3px; }
.nav-badge { position: absolute; top: 0; right: 4px; background: red; color: white; font-size: 11px; padding: 2px 6px; border-radius: 50%; display: none; }

.instagram-reels-feed { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    align-items: center; 
    max-width: 420px; 
    margin: 0 auto; 
    height: calc(100vh - 180px);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    background: #000;
    border-radius: 12px;
    padding: 10px 0;
}
.reel-card { 
    background: #000; 
    width: 100%; 
    height: 100%;
    min-height: 100%;
    border-radius: 12px; 
    overflow: hidden; 
    position: relative; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
.reel-card video, .reel-card img { width: 100%; height: 100%; object-fit: cover; }

.pause-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 5;
}
.reel-card.paused .pause-indicator {
    opacity: 1;
}

.reel-overlay { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    background: linear-gradient(transparent, rgba(0,0,0,0.85)); 
    padding: 20px 15px; 
    color: white; 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
}
.reel-overlay h4 { font-size: 15px; margin: 0 0 6px 0; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }

.inline-profile-btn { background: #007bff; color: white; padding: 3px 8px; border-radius: 4px; font-size: 11px; text-decoration: none; font-weight: bold; cursor: pointer; border: none; margin-left: 6px; vertical-align: middle; display: inline-block; }
.inline-profile-btn:hover { background: #0056b3; }

.like-btn { background: rgba(0,0,0,0.6); color: white; border: 1px solid rgba(255,255,255,0.4); padding: 8px 12px; border-radius: 20px; font-size: 13px; font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.like-btn.liked { background: #dc3545; border-color: #dc3545; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 15px; }
.grid-media-item { position: relative; width: 100%; height: 130px; border-radius: 8px; overflow: hidden; background: #000; border: 1px solid #ddd; cursor: pointer; }
.grid-media-item img, .grid-media-item video { width: 100%; height: 100%; object-fit: cover; }
.delete-media-btn { position: absolute; top: 5px; right: 5px; background: rgba(220, 53, 69, 0.9); color: white; border: none; border-radius: 50%; width: 25px; height: 25px; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 5; }

.media-modal { display: none; position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.96); justify-content: center; align-items: center; flex-direction: column; }
.media-modal-slider { display: flex; flex-direction: column; overflow-y: auto; width: 100%; height: 100%; align-items: center; scroll-snap-type: y mandatory; }
.media-modal-slide { min-width: 100%; min-height: 100%; height: 100%; display: flex; justify-content: center; align-items: center; position: relative; box-sizing: border-box; background: #000; scroll-snap-align: start; }
.media-modal-slide img, .media-modal-slide video { width: 100%; height: 100%; object-fit: contain; }
.media-modal-close { position: absolute; top: 20px; right: 20px; color: #fff; font-size: 35px; font-weight: bold; cursor: pointer; z-index: 3001; background: rgba(0,0,0,0.6); width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.media-modal-caption { position: absolute; bottom: 45px; left: 20px; right: 20px; color: #fff; font-size: 15px; text-align: left; background: rgba(0,0,0,0.7); padding: 12px 18px; border-radius: 10px; z-index: 3001; }
.scroll-next-indicator { position: absolute; bottom: 10px; left: 0; right: 0; color: #ffc107; font-size: 13px; font-weight: bold; text-align: center; z-index: 3001; animation: bounce 1.5s infinite; }

@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-6px);} 60% {transform: translateY(-3px);} }

.upload-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 9999; display: none; justify-content: center; align-items: center; flex-direction: column; color: white; }
.upload-spinner { border: 4px solid #f3f3f3; border-top: 4px solid #007bff; border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin-bottom: 15px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.post-creator-box { background: #fff; border: 1px solid #ccd0d5; border-radius: 8px; padding: 15px; margin-top: 15px; }
.post-actions { display: flex; gap: 10px; border-top: 1px solid #e4e6eb; padding-top: 10px; margin-top: 10px; flex-wrap: wrap; }
.fb-upload-btn { background: #f0f2f5; color: #4b4f56; border: none; border-radius: 20px; padding: 8px 15px; font-weight: bold; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; flex: 1; justify-content: center; }

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    header nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; background: #0056b3; padding: 10px; border-radius: 4px; margin-top: 10px; }
    header nav.active { display: flex; }
}

.container { max-width: 750px; margin: 20px auto; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,0.1); }
.section { display: none; }
.active { display: block; }
.search-container { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.search-box { flex: 1; min-width: 200px; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 15px; box-sizing: border-box; }
.profile-card, .inbox-item { background: #e9ecef; padding: 12px 15px; margin-bottom: 12px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.profile-info { display: flex; align-items: center; gap: 15px; flex-grow: 1; }
.profile-card img, .inbox-item img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: #ccc; border: 2px solid #007bff; flex-shrink: 0; }
.profile-card strong { font-size: 15px; }
.profile-card small { font-size: 12px; color: #555; }
.status-badge { font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: bold; display: inline-block; margin-top: 5px; }
.online-available { background: #28a745; color: white; }
.online-busy { background: #ffc107; color: black; }
.offline { background: #dc3545; color: white; }
.star-rating { color: #ffc107; font-size: 15px; font-weight: bold; }
input, select, textarea, button { width: 100%; padding: 10px; margin: 8px 0; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 14px; }
button { background: #28a745; color: white; font-weight: bold; cursor: pointer; border: none; }
.home-call-btn { background: #007bff; padding: 6px 12px; width: auto; font-size: 12px; border-radius: 5px; }
.detail-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; border-bottom: 1px solid #ddd; padding-bottom: 15px; }
.detail-header img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; background: #ccc; border: 2px solid #007bff; }
.btn-group { display: flex; gap: 8px; margin-top: 15px; flex-wrap: wrap; }
.audio-btn { background: #007bff; flex: 1; }
.video-btn { background: #17a2b8; flex: 1; }
.chat-btn { background: #ffc107; color: black; flex: 1; }
.edit-btn { background: #6c757d; display: none; flex: 1; }
.delete-btn { background: #dc3545; display: none; flex: 1; }
.comm-screen { background: #111; color: white; padding: 15px; text-align: center; border-radius: 8px; margin: 15px 0; position: relative; display: none; }
.video-container { position: relative; width: 100%; height: 400px; background: #000; border-radius: 8px; overflow: hidden; margin-bottom: 15px; }
.pip-vid {
    position: absolute;
    width: 110px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ffffff;
    background: #000;
    z-index: 20;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

/* Four Corner Positions */
.pip-top-right {
    top: 15px;
    right: 15px;
    left: auto;
    bottom: auto;
}

.pip-top-left {
    top: 15px;
    left: 15px;
    right: auto;
    bottom: auto;
}

.pip-bottom-right {
    bottom: 15px;
    right: 15px;
    top: auto;
    left: auto;
}

.pip-bottom-left {
    bottom: 15px;
    left: 15px;
    top: auto;
    right: auto;
}
.chat-box { border: 1px solid #ccc; border-radius: 8px; background: #fff; margin-top: 15px; display: none; overflow: hidden; }
.chat-messages { height: 250px; overflow-y: scroll; padding: 10px; background: #f9f9f9; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.msg { padding: 8px 12px; border-radius: 6px; max-width: 70%; font-size: 13px; color: #333; word-break: break-word; }
.msg.user { background: #dcf8c6; align-self: flex-end; }
.msg.expert { background: #fff; border: 1px solid #ddd; align-self: flex-start; }
.chat-input-area { display: flex; padding: 10px; background: #eee; gap: 5px; }