*{margin:0;padding:0;box-sizing:border-box}
body{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;
  background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);
  min-height:100vh;
  min-height:100dvh;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
.container{
  display:flex;height:100vh;height:100dvh;max-width:1400px;margin:0 auto;background:#fff;
  box-shadow:0 20px 60px rgba(0,0,0,.18);position:relative;overflow:hidden;
}
/* Login */
.login-screen{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  min-height:100vh;
  min-height:100dvh;
  padding:24px;
  background-color:#f5f0fa;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'><g fill='%23764ba2' fill-opacity='0.10' stroke='%23764ba2' stroke-opacity='0.14' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path fill='none' d='M20 30 a8 8 0 0 1 8 -8 h36 a8 8 0 0 1 8 8 v16 a8 8 0 0 1 -8 8 h-22 l-12 10 v-10 a8 8 0 0 1 -10 -8 z'/><path stroke='none' d='M180 56 s-15 -8 -15 -19 a7.5 7.5 0 0 1 15 -3 a7.5 7.5 0 0 1 15 3 c0 11 -15 19 -15 19 z'/><ellipse stroke='none' cx='95' cy='135' rx='6' ry='5'/><ellipse stroke='none' cx='123' cy='130' rx='6' ry='5'/><path fill='none' d='M101 135 v-30 l28 -5 v30 M101 105 l28 -5'/><circle fill='none' cx='200' cy='135' r='15'/><circle stroke='none' cx='195' cy='131' r='1.6'/><circle stroke='none' cx='205' cy='131' r='1.6'/><path fill='none' d='M193 139 q7 6 14 0'/><rect fill='none' x='30' y='195' width='52' height='34' rx='5'/><path fill='none' d='M44 195 l4 -7 h14 l4 7'/><circle fill='none' cx='56' cy='212' r='9'/><rect fill='none' x='175' y='200' width='28' height='22' rx='3'/><path fill='none' d='M180 200 v-5 a9 9 0 0 1 18 0 v5'/><path stroke='none' d='M120 60 l34 9 l-17 13 l-3 16 l-8 -11 l-14 -4 z'/></g></svg>");
  background-repeat:repeat;
  background-size:260px 260px;
}
.login-box{
  background:rgba(255,255,255,0.96);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  padding:32px 28px;
  width:100%;
  max-width:420px;
  border-radius:22px;
  border:2px solid #764ba2;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  box-shadow:0 20px 60px rgba(118,75,162,0.25);
  text-align:center;
  position:relative;
}
.login-box h1{color:#000;margin-bottom:8px;font-size:28px}
.login-box p{color:#666;margin-bottom:12px}
.google-btn{
  width:100%;padding:12px;border-radius:10px;border:none;cursor:pointer;font-weight:700;
  background:#fff;color:#444;box-shadow:0 1px 3px rgba(0,0,0,.12);display:flex;gap:10px;
  align-items:center;justify-content:center;margin-bottom:12px
}
.google-icon{width:18px;height:18px}
.login-box input{
  width:100%;padding:12px;border:2px solid #e0e0e0;border-radius:10px;font-size:15px;
  margin-bottom:10px;transition:.25s border
}
.login-box input:focus{outline:none;border-color:#667eea}
.login-box button.primary{
  width:100%;padding:12px;background:linear-gradient(135deg,#e81919 0%,#764ba2 100%);
  color:#fff;border:none;border-radius:10px;font-size:15px;font-weight:700;cursor:pointer;
  transition:transform .12s
}

.login-icon-new {width: 100px; height: auto; margin-bottom: 15px; display: block;}
.login-footer {position: relative; width: 100%; text-align: center; font-size: 13px; color: #764ba2; font-weight: 600; margin-top: 20px; padding-top: 14px; border-top: 1px dashed rgba(118,75,162,0.3); line-height: 1.5;}

/* Sidebar */
.sidebar{
  width:320px;background:#f8f9fa;border-right:1px solid #e6e6e6;display:flex;flex-direction:column;
  transition:transform .25s ease, box-shadow .25s;
}
.sidebar.hidden-mobile{
  transform:translateX(-110%);
  position:fixed;z-index:30;left:0;top:0;height:100vh;height:100dvh;box-shadow:8px 0 30px rgba(0,0,0,.12);
}
.sidebar-header{padding:18px;background:linear-gradient(135deg,#3164ca 0%,#764ba2 100%);color:#fff}
.user-info{display:flex;align-items:center;margin-bottom:12px}
.user-avatar{width:50px;height:50px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;font-weight:bold;color:#667eea;margin-right:12px;font-size:18px}
.user-details h3{font-size:16px;margin-bottom:4px}
.logout-btn{padding:8px 14px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.2);color:#fff;border-radius:18px;cursor:pointer;font-size:13px}

.chat-tabs{display:flex;padding:0;background:#fff;border-bottom:1px solid #e6e6e6}
.chat-tab{flex:1;padding:12px;text-align:center;cursor:pointer;border-bottom:3px solid transparent;font-weight:600;color:#666}
.chat-tab.active{color:#667eea;border-bottom-color:#667eea}

/* Random Video button in the Sidebar */
.random-video-area {
  padding: 15px;
  background: #f0f2f5;
  border-bottom: 1px solid #e6e6e6;
  text-align: center;
}
.random-video-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 6px rgba(255, 75, 43, 0.2);
  transition: transform 0.2s;
}
.random-video-btn:hover { transform: scale(1.02); }
.random-video-desc {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    line-height: 1.3;
}

/* Refer and Win button */
.indique-ganhe-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #88ddf9 0%, #a4f4f8 100%);
  color: rgb(248, 22, 22);
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 6px rgba(5, 5, 5, 0.958);
  transition: transform 0.2s;
  margin-top: 10px;
}
.indique-ganhe-btn:hover { transform: scale(1.02); }
.indique-ganhe-desc {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    line-height: 1.3;
}

.users-list{
  flex:1;
  overflow-y:auto;
  padding:8px 0;
  max-height:calc(100vh - 340px);
  max-height:calc(100dvh - 340px);
}

.sidebar-footer {padding: 15px; border-top: 1px solid #e6e6e6; background: #fff;}
.support-btn-link {display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px; background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); color: #fff; text-decoration: none; border-radius: 8px; font-weight: bold; transition: opacity 0.2s;}
.support-btn-link:hover {opacity: 0.9;}
.support-icon {width: 24px; height: 24px; object-fit: contain; filter: brightness(0) invert(1);}

.user-item{padding:12px 16px;cursor:pointer;display:flex;align-items:center;position:relative;border-radius:8px;margin:6px 8px;transition:background .12s}
.user-item:hover{background:#eef2ff}
.user-item.active{background:#e7eaf6}
.user-item-avatar{width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);display:flex;align-items:center;justify-content:center;font-weight:bold;color:#fff;margin-right:12px;font-size:16px}
.user-item-info h4{font-size:14px;margin-bottom:3px;color:#333}
.online-indicator{width:10px;height:10px;background:#10b981;border-radius:50%;position:absolute;right:18px;top:50%;transform:translateY(-50%)}

.tab-badge{display:inline-flex;align-items:center;justify-content:center;background:#ef4444;color:#fff;font-size:11px;font-weight:700;min-width:18px;height:18px;border-radius:9px;padding:0 5px;margin-left:6px;animation:badgePop .25s ease}
.user-item-badge{display:inline-flex;align-items:center;justify-content:center;background:#ef4444;color:#fff;font-size:11px;font-weight:700;min-width:20px;height:20px;border-radius:10px;padding:0 5px;position:absolute;right:16px;top:50%;transform:translateY(-50%);animation:badgePop .25s ease}
@keyframes badgePop{from{transform:scale(0) translateY(-50%)}to{transform:scale(1) translateY(-50%)}}

.private-list-heading{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#764ba2;padding:10px 16px 6px;background:#eef2ff;margin-top:4px}
.private-list-heading:first-child{margin-top:0}
.private-list-empty{font-size:12px;color:#888;padding:4px 16px 10px}
.user-item-trail{margin-left:auto;display:flex;align-items:center;gap:8px;flex-shrink:0}
.conv-delete-btn{flex-shrink:0;background:transparent;border:none;cursor:pointer;padding:8px 6px;font-size:15px;color:#9ca3af;line-height:1;border-radius:8px}
.conv-delete-btn:hover{color:#c53030;background:#fef2f2}
.online-indicator--inline{position:relative!important;right:auto!important;top:auto!important;transform:none!important}
.user-item .online-indicator{right:14px}
.status-offline{font-size:12px;color:#9ca3af;font-weight:500}
.conv-unread-pill{display:inline-flex;align-items:center;justify-content:center;background:#ef4444;color:#fff;font-size:11px;font-weight:700;min-width:20px;height:20px;border-radius:10px;padding:0 6px;animation:badgePopInline .25s ease}
@keyframes badgePopInline{from{transform:scale(0)}to{transform:scale(1)}}

/* Chat area */
.chat-area{flex:1;display:flex;flex-direction:column;background:#fff;position:relative;min-width:0}
.chat-header{padding:14px 16px;background:#fff;border-bottom:1px solid #e6e6e6;display:flex;align-items:center;justify-content:space-between}
.chat-header-info{display:flex;align-items:center}
.chat-header-avatar{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);display:flex;align-items:center;justify-content:center;font-weight:bold;color:#fff;margin-right:12px;font-size:16px}
.chat-header-details h3{font-size:15px;margin-bottom:3px}
.chat-header-details p{font-size:12px;color:#10b981}

/* Compact radio style with scroll animation */
.radio-player-container {
    background: #f4f6fa;
    padding: 5px 8px;
    border-bottom: 1px solid #e6e6e6;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease-in-out;
    max-height: 120px;
    opacity: 1;
    overflow: hidden;
}

/* Class added via JS when scrolling down */
.radio-player-container.radio-hidden {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom: none;
    margin: 0;
}

.radio-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: #fff;
    padding: 4px 8px;
    border-radius: 50px;
    border: 1px solid #dcdcdc;
    flex: 1 1 200px;
    max-width: 100%;
}
.radio-label {
    font-size: 11px;
    font-weight: 700;
    color: #764ba2;
    white-space: nowrap;
}
.radio-player-container audio {
    height: 24px;
    width: 100%;
    max-width: 180px;
    border-radius: 12px;
    outline: none;
}
@media (max-width: 600px) {
    .radio-box {
         padding: 3px 6px;
         margin: 0;
    }
    .radio-player-container audio {
         max-width: none;
    }
}

.menu-btn{display:none;background:transparent;border:none;font-size:22px;cursor:pointer;margin-right:8px}
.alert-btn{background:#fff;border:2px solid #f59e0b;color:#b45309;font-weight:800;border-radius:9999px; padding:8px 12px;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.08)}

/* Private message notification icon in the public chat header */
.header-private-notif{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:50%;
  background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);
  color:#fff;
  border:none;
  cursor:pointer;
  font-size:18px;
  box-shadow:0 4px 12px rgba(118,75,162,.35);
  transition:transform .15s ease, box-shadow .15s ease;
  margin:0 8px;
  flex-shrink:0;
  animation:headerNotifPulse 1.6s ease-in-out infinite;
}
.header-private-notif:hover{
  transform:scale(1.08);
  box-shadow:0 6px 16px rgba(118,75,162,.45);
}
.header-private-notif:active{transform:scale(.96)}
.header-private-notif-count{
  position:absolute;
  top:-4px;
  right:-4px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  background:#ef4444;
  color:#fff;
  font-size:11px;
  font-weight:800;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:2px solid #fff;
  line-height:1;
  box-shadow:0 1px 3px rgba(0,0,0,.2);
}
@keyframes headerNotifPulse{
  0%,100%{box-shadow:0 4px 12px rgba(118,75,162,.35), 0 0 0 0 rgba(239,68,68,.55)}
  50%{box-shadow:0 4px 12px rgba(118,75,162,.35), 0 0 0 8px rgba(239,68,68,0)}
}
@media (max-width:480px){
  .header-private-notif{width:36px;height:36px;font-size:16px;margin:0 6px}
  .header-private-notif-count{min-width:18px;height:18px;font-size:10px;top:-3px;right:-3px}
}

.messages-container{flex:1;overflow-y:auto;padding:18px;background:#f7f8fb}
.message{margin-bottom:12px;display:flex;align-items:flex-start;animation:messageSlide .18s ease}
@keyframes messageSlide{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.message.own{flex-direction:row-reverse}
.message-avatar{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);display:flex;align-items:center;justify-content:center;font-weight:bold;color:#fff;font-size:13px;flex-shrink:0}
.message-content{max-width:65%;margin:0 8px}
.message-sender{font-size:12px;color:#666;margin-bottom:4px;font-weight:700}
.message-bubble{padding:10px 14px;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.06);word-wrap:break-word}
.message.own .message-bubble{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff}

.message-image{max-width:260px;border-radius:10px;margin-top:6px;cursor:pointer;transition:transform .12s}
.message-image:hover{transform:scale(1.02)}
.message-video{max-width:280px;border-radius:10px;margin-top:6px;background:#000;display:block;}
.message-time{font-size:11px;color:#999;margin-top:6px}
.delete-btn{background:transparent; border:none; cursor:pointer; font-size:14px; color:#c53030; margin-left:8px; padding:4px; border-radius:6px;}
.message-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.message-actions{display:flex;gap:6px;align-items:center}

/* Trigger button on each message to open the actions bar */
.msg-action-trigger{
  background:transparent;border:none;cursor:pointer;font-size:18px;color:#888;
  padding:0 6px;border-radius:6px;line-height:1;font-weight:700
}
.msg-action-trigger:hover{background:#eef0f4;color:#333}

/* Floating action bar (Reply + Reactions) */
.msg-actions-bar{
  position:fixed;display:none;flex-wrap:wrap;background:#fff;border:1px solid #e6e6e6;
  border-radius:24px;box-shadow:0 10px 28px rgba(0,0,0,.22);padding:6px;z-index:9500;gap:4px;
  animation:msgActionsPop .14s ease-out
}
.msg-actions-bar.show{display:flex}
@keyframes msgActionsPop{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}
.msg-act-btn{
  background:transparent;border:none;cursor:pointer;font-size:20px;width:40px;height:40px;
  border-radius:50%;display:flex;align-items:center;justify-content:center;
  transition:transform .12s, background .12s
}
.msg-act-btn:hover{background:#f5f0fa;transform:scale(1.15)}
.msg-act-btn.reply-action{font-size:16px;color:#764ba2}
.msg-act-btn.reply-action:hover{background:#e7eaf6}

/* Quoted reply inside a message */
.reply-quote{
  background:rgba(118,75,162,.10);border-left:3px solid #764ba2;padding:6px 10px;
  border-radius:8px;margin-bottom:6px;cursor:pointer;max-width:100%;overflow:hidden;
  transition:background .12s
}
.reply-quote:hover{background:rgba(118,75,162,.18)}
.message.own .reply-quote{background:rgba(255,255,255,.20);border-left-color:#fff}
.message.own .reply-quote:hover{background:rgba(255,255,255,.30)}
.reply-quote-name{font-size:11px;font-weight:700;color:#764ba2;margin-bottom:2px}
.message.own .reply-quote-name{color:#fff}
.reply-quote-text{font-size:12px;color:#555;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.message.own .reply-quote-text{color:rgba(255,255,255,.92)}

/* Reactions row below the bubble */
.reactions-row{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.message.own .reactions-row{justify-content:flex-end}
.reaction-pill{
  background:#fff;border:1px solid #e6e6e6;border-radius:14px;padding:2px 8px;font-size:14px;
  cursor:pointer;display:inline-flex;align-items:center;gap:4px;
  transition:transform .12s, background .12s, border-color .12s;
  box-shadow:0 1px 2px rgba(0,0,0,.05)
}
.reaction-pill:hover{transform:scale(1.08)}
.reaction-pill.active{background:#f5f0fa;border-color:#764ba2}
.reaction-pill .reaction-count{font-size:11px;color:#666;font-weight:700}
.reaction-pill.active .reaction-count{color:#764ba2}

/* Reply preview above input area */
.reply-preview{
  display:none;align-items:center;gap:10px;padding:8px 14px;background:#f5f0fa;
  border-top:1px solid #e6e6e6;border-left:3px solid #764ba2
}
.reply-preview.show{display:flex}
.reply-preview-icon{font-size:18px;color:#764ba2;font-weight:700}
.reply-preview-info{flex:1;min-width:0;overflow:hidden}
.reply-preview-name{font-size:12px;font-weight:700;color:#764ba2;line-height:1.2}
.reply-preview-text{font-size:12px;color:#555;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.reply-preview-close{
  background:transparent;border:none;cursor:pointer;font-size:18px;color:#888;
  padding:4px 10px;border-radius:6px;line-height:1
}
.reply-preview-close:hover{color:#c53030;background:#fef2f2}

/* Flash highlight when scrolling to original message via reply quote */
@keyframes msgFlash{
  0%{background:rgba(118,75,162,.22)}
  60%{background:rgba(118,75,162,.18)}
  100%{background:transparent}
}
.message.flash-highlight .message-content{
  animation:msgFlash 1.6s ease;
  border-radius:12px
}

/* Mobile: keep floating reply preview pinned above the fixed input */
@media (max-width:720px){
  .reply-preview{
    position:fixed;left:0;right:0;bottom:calc(70px + env(safe-area-inset-bottom, 0px));
    z-index:24;box-shadow:0 -2px 8px rgba(0,0,0,.06)
  }
}

.input-area{padding:12px;background:#fff;border-top:1px solid #e6e6e6;display:flex;gap:8px;align-items:center;position:relative}
.input-area input[type="file"]{display:none!important}
.input-area input[type="text"]{flex:1;padding:10px 14px;border:2px solid #eaeaea;border-radius:999px;font-size:14px;outline:none}
.attach-btn{width:44px;height:44px;border-radius:50%;background:#f0f0f0;color:#667eea;border:none;cursor:pointer;font-size:20px;display:flex;align-items:center;justify-content:center}
.attach-menu{position:absolute;bottom:64px;left:12px;background:#fff;border:1px solid #e6e6e6;border-radius:14px;box-shadow:0 12px 28px rgba(0,0,0,.18);padding:6px;min-width:260px;z-index:80;display:none}
.attach-menu.open{display:block;animation:messageSlide .14s ease}
.attach-menu-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;cursor:pointer;font-size:14px;color:#333;background:transparent;border:none;width:100%;text-align:left}
.attach-menu-item:hover{background:#f5f0fa}
.attach-menu-item .am-icon{font-size:20px;width:28px;text-align:center}
.attach-menu-item .am-title{font-weight:700}
.attach-menu-item .am-sub{display:block;font-size:11px;color:#888;font-weight:400;margin-top:2px}
.transfer-modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:9000;align-items:center;justify-content:center;padding:18px}
.transfer-modal.open{display:flex}
.transfer-modal-box{background:#fff;border-radius:16px;max-width:460px;width:100%;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.transfer-modal-box h3{margin-bottom:8px;color:#764ba2}
.transfer-modal-box p{font-size:13px;color:#555;line-height:1.45;margin-bottom:12px}
.transfer-modal-box input{width:100%;padding:10px 12px;border:2px solid #eaeaea;border-radius:10px;font-size:14px;outline:none}
.transfer-modal-box input:focus{border-color:#764ba2}
.transfer-modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:14px;flex-wrap:wrap}
.transfer-modal-actions button{padding:9px 14px;border-radius:9px;border:none;font-weight:700;cursor:pointer;font-size:13px}
.btn-cancel{background:#eee;color:#444}
.btn-open-transfer{background:#fff;border:2px solid #764ba2!important;color:#764ba2}
.btn-send-link{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff}
.message-link{display:inline-flex;align-items:center;gap:6px;padding:10px 14px;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.06);color:#764ba2;text-decoration:none;font-weight:600;word-break:break-all;max-width:100%}
.message-link:hover{text-decoration:underline}
.message.own .message-link{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff}
.msg-inline-link{color:#764ba2;text-decoration:underline;word-break:break-all}
.message.own .msg-inline-link{color:#fff;text-decoration:underline}
.send-btn{width:46px;height:46px;border-radius:50%;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;border:none;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;transition:all 0.3s;}
.send-btn:disabled{opacity:.5;cursor:not-allowed;background:#ccc;}

.empty-state{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999;padding:40px}
.empty-state-icon{font-size:64px;margin-bottom:14px}
.hidden{display:none!important}

/* Image Modal */
.image-modal{display:none;position:fixed;z-index:9999;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.9);justify-content:center;align-items:center}
.image-modal.show{display:flex}
.image-modal img{max-width:92%;max-height:92%;border-radius:8px}
.image-modal-close{position:absolute;top:18px;right:26px;color:#fff;font-size:34px;font-weight:bold;cursor:pointer}

/* Alert Modal */
.alert-modal{position:fixed;inset:0;background:rgba(0,0,0,.6);display:none;align-items:center;justify-content:center;z-index:10000;padding:12px}
.alert-modal.show{display:flex}
.alert-card{background:#fff;max-width:680px;width:100%;border-radius:12px;padding:16px;max-height:90vh;overflow:auto}

/* VIDEO CALL MODAL (OMEGLE STYLE) */
.video-call-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    z-index: 20000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.video-call-modal.show { display: flex; }

.video-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 80%;
    gap: 10px;
    padding: 10px;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Remote video (larger) */
.remote-video-container {
    width: 100%;
    max-width: 800px;
    height: 100%;
    background: #222;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
video#remoteVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Local video (smaller, floating) */
.local-video-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 120px;
    height: 160px;
    background: #000;
    border: 2px solid #fff;
    border-radius: 8px;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
video#localVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.video-controls {
    height: 20%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: #111;
    padding: 20px;
}

.video-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}
.video-btn:hover { transform: scale(1.05); }
.btn-stop { background: #c53030; color: white; }
.btn-next { background: #fff; color: #000; }
.status-text { color: #fff; position: absolute; top: 20px; left: 20px; background: rgba(0,0,0,0.5); padding: 5px 10px; border-radius: 4px; z-index: 5;}

@media (min-width: 768px) {
    .video-grid { flex-direction: row; }
    .local-video-container {
         width: 160px; height: 213px;
    }
}
@media (max-width:900px){.sidebar{width:260px}.message-content{max-width:72%}}
@media (max-width:720px){
  .container{max-width:100%}
  .sidebar{display:block}
  .menu-btn{display:inline-block}
  .sidebar{transform:translateX(0)}
  .sidebar.hidden-mobile{transform:translateX(-110%)}
  .sidebar.open-mobile{transform:translateX(0)}
  .sidebar-overlay{display:block;position:fixed;inset:0;z-index:20;background:rgba(0,0,0,.3)}
  .input-area{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:25;
    padding-bottom:calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow:0 -4px 12px rgba(0,0,0,.08);
  }
  .messages-container{
    padding-bottom:calc(18px + 76px + env(safe-area-inset-bottom, 0px));
  }
  .input-area input[type="text"]{max-width:calc(100% - 100px);padding:8px 12px;font-size:13px}
}

/* ===========================================
   GUIDED TOUR
   =========================================== */
.tour-spotlight {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 12px;
  box-shadow: 0 0 0 4px #fff, 0 0 0 8px rgba(118, 75, 162, 0.9), 0 0 0 9999px rgba(0, 0, 0, 0.7);
  z-index: 30000;
  pointer-events: none;
  transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
  display: none;
}
.tour-spotlight.show { display: block; }

.tour-tooltip {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  max-width: 360px;
  width: calc(100% - 32px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  z-index: 30001;
  display: none;
  transition: top 0.35s ease, left 0.35s ease, transform 0.35s ease;
}
.tour-tooltip.show { display: block; }

.tour-step-counter {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #764ba2;
  margin-bottom: 6px;
}

.tour-tooltip h3 {
  font-size: 18px;
  color: #222;
  margin: 0 0 10px 0;
}

.tour-tooltip p {
  font-size: 14px;
  line-height: 1.5;
  color: #444;
  margin: 0 0 16px 0;
}

.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tour-actions-right {
  display: flex;
  gap: 6px;
}

.tour-btn {
  padding: 9px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.15s, opacity 0.15s;
}
.tour-btn:hover { transform: scale(1.03); }

.tour-btn-skip {
  background: transparent;
  color: #888;
  padding: 9px 8px;
}
.tour-btn-skip:hover { color: #333; transform: none; }

.tour-btn-prev {
  background: #eef0f4;
  color: #444;
}

.tour-btn-next {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

@media (max-width: 480px) {
  .tour-tooltip {
    max-width: calc(100% - 24px);
    padding: 16px;
  }
  .tour-tooltip h3 { font-size: 16px; }
  .tour-tooltip p { font-size: 13px; }
}

