@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #141414;
  --surface: #141414;
  --card: #181717;
  --text: #ffffff;
  --text-muted: #a1a1aa;
  --accent: #3b82f6;
  --accent-grad: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --glass: rgba(20, 20, 20, 0.9);
  --border: rgba(255, 255, 255, 0.08);
  --input: rgba(255, 255, 255, 0.05);
  --sent: #2563eb;
  --received: #27272a;
  --online: #22c55e;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #2563eb;
  --glass: rgba(255, 255, 255, 0.95);
  --border: rgba(0, 0, 0, 0.08);
  --input: #f1f5f9;
  --sent: #2563eb;
  --received: #e2e8f0;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); height: 100vh; width: 100vw; overflow: hidden; }

/* --- Optimized Lite Login Screen --- */
.login-screen {
  position: fixed;
  inset: 0;
  /* ব্লার Blobs এর বদলে সাধারণ সাবলীল গ্রাডিয়েন্ট */
  background: radial-gradient(circle at top right, rgba(59,130,246,0.1), transparent), 
              var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ভারি ::before এবং ::after ব্লার ইফেক্টগুলো বাদ দেওয়া হয়েছে */

.login-box-glass {
  width: 90%;
  max-width: 400px;
  padding: 30px;
  /* backdrop-filter এর মান কমানো হয়েছে পারফরম্যান্সের জন্য */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
  /* ব্লার কমানো হয়েছে যাতে স্ক্রল এবং টাইপিং ল্যাগ না করে */
  backdrop-filter: blur(8px); 
  position: relative;
  z-index: 30;
}

/* হোভার এনিমেশন সিম্পল করা হয়েছে */
.login-box-glass:hover { 
  transform: translateY(-2px); 
  border-color: rgba(59,130,246,0.3);
}

.brand-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
  /* infinite এনিমেশন বাদ দিয়ে স্ট্যাটিক প্রিমিয়াম লুক দেওয়া হয়েছে */
  letter-spacing: -1px;
}

.subtitle { 
  color: var(--text-muted); 
  margin-bottom: 25px; 
  font-size: 14px; 
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
}

.input-group { position: relative; margin-bottom: 16px; }

.input-group input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  transition: 0.2s;
}

/* ইনপুট ফোকাস এনিমেশন ল্যাগ-ফ্রি করা হয়েছে */
.input-group input:focus { 
  background: rgba(255,255,255,0.08);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.input-group label { 
  position: absolute; 
  left: 16px; 
  top: 14px; 
  color: var(--text-muted); 
  pointer-events: none; 
  transition: 0.2s; 
  font-size: 14px; 
}

.input-group input:focus ~ label, 
.input-group input:not(:placeholder-shown) ~ label { 
  top: -10px; 
  left: 10px; 
  font-size: 12px; 
  color: var(--accent);
  background: var(--bg); /* টেক্সট যাতে বর্ডারের ওপর ক্লিয়ার থাকে */
  padding: 0 5px;
}

.premium-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent-grad);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 4px 15px rgba(37,99,235,0.2);
}

.premium-btn:active { transform: scale(0.98); }

.switch-auth { 
  margin-top: 20px; 
  font-size: 14px; 
  color: var(--text-muted); 
}

#toggleAuth { 
  color: var(--accent); 
  cursor: pointer; 
  font-weight: 600; 
  text-decoration: underline;
}



.helper-row { display:flex; justify-content:space-between; align-items:center; margin-top:10px; gap:10px; }
.remember { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-muted); }
.forgot-link { font-size:13px; color:var(--accent); cursor:pointer; }

.social-login { display:flex; gap:10px; margin-top:16px; }
.social-btn { flex:1; padding:10px 12px; border-radius:12px; border:1px solid rgba(255,255,255,0.04); background:transparent; color:var(--text); cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; }
.social-btn.google { background: linear-gradient(90deg,#fff,#f7f7f7); color:#111; }
.social-btn.apple { background: linear-gradient(90deg,#111,#333); color:#fff; }

#toggleAuth { color: var(--accent); cursor: pointer; font-weight: 700; }

@keyframes brandShift { 0%{ background-position:0% 50% } 100%{ background-position:200% 50% } }

@media (max-width:480px) {
  .login-box-glass { padding: 26px 18px; border-radius:16px; }
  .brand-title { font-size:28px; }
}

/* --- LAYOUT FIX --- */
#app { width: 100%; height: 100%; position: relative; }

/* Sidebar View (Always visible in background) */
.sidebar-view {
    width: 100%; height: 100%;
    position: absolute; top: 0; left: 0;
    background: var(--surface);
    display: flex; flex-direction: column;
    z-index: 10;
}

/* Header */
.app-header {
    height: 60px; display: flex; justify-content: space-between; align-items: center; padding: 0 16px;
    background: var(--glass); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.logo { font-size: 22px; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.glass-btn { background: var(--input); border: 1px solid var(--border); padding: 6px 12px; border-radius: 50px; cursor: pointer; font-size: 14px; color: var(--text); }

/* Tab Buttons */
.tab-btn-wrapper { display: flex; padding: 8px 10px; border-bottom: 1px solid var(--border); gap: 5px; }
.tab-link { flex: 1; background: none; border: none; padding: 10px; border-radius: 10px; cursor: pointer; color: var(--text-muted); font-size: 18px; position: relative; }
.tab-link.active { background: var(--input); color: var(--accent); }
.badge { position: absolute; top: 6px; right: 15%; background: red; width: 8px; height: 8px; border-radius: 50%; }

/*button */
.end-call {
  background: #ff4444 !important;
  color: white !important;
  font-size: 14px !important;
  font-weight: bold;
  padding: 10px 20px !important;
  border-radius: 30px !important;
  width: auto !important;
}


/* Icons General Styling */
i {
    font-size: 20px; /* Default Icon Size */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tab Icons */
.tab-link i {
    font-size: 22px;
    transition: 0.2s;
}
.tab-link.active i {
    color: var(--accent); /* Active Color */
}

/* Header Action Icons */
.glass-btn i {
    font-size: 18px;
}

/* Search Icon */
.search-icon i {
    font-size: 18px;
    color: var(--text-muted);
}

/* Send Button Icon */
.send-fab i {
    font-size: 20px;
    margin-left: -2px; /* Center optical alignment for send plane */
}

/* Back Button & Call Button */
.back-btn i, .action-icon i {
    font-size: 24px;
}


/* Content Area */
.view-content { flex: 1; overflow-y: auto; position: relative; }
.chat-list { padding-bottom: 80px; width: 100%; } /* Important for content */

/* Search Bar */
.search-container { padding: 15px 16px 10px; }
.search-glass { display: flex; align-items: center; background: var(--input); border: 1px solid var(--border); border-radius: 16px; padding: 0 16px; height: 48px; }
.search-icon { opacity: 0.5; margin-right: 10px; }
.search-glass input { flex: 1; background: transparent; border: none; color: var(--text); height: 100%; font-size: 15px; }

.search-bar-container { padding: 15px 16px 10px; }
.search-bar { display: flex; align-items: center; background: var(--input); border: 1px solid var(--border); border-radius: 16px; padding: 0 16px; height: 48px; }
.search-bar { display: flex; align-items: center; background: var(--input); border: 1px solid var(--border); border-radius: 16px; padding: 0 16px; height: 48px; margin-bottom: 12px; }
.search-bar-icon { opacity: 0.5; margin-right: 10px; }
.search-bar input {  flex: 1; background: transparent; border: none; color: var(--text); height: 100%; font-size: 15px; }

/* User List */
.user-item { padding: 16px; border-radius: 16px; margin-bottom: 10px; background: rgba(255,255,255,0.05); cursor: pointer; transition: .2s; display: flex; align-items: center; gap: 14px; position: relative; }
.user-item:hover { background: rgba(255,255,255,0.1); }

.avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 20px; color: #000; }
.online-dot { width: 14px; height: 14px; background: var(--online); border-radius: 50%; position: absolute; bottom: 12px; left: 42px; border: 3px solid var(--card); }
.u-name { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.u-sub { font-size: 14px; color: var(--text-muted); }

/* Chat View (Overlay) */
.chat-view {
    width: 100%; height: 100%;
    position: fixed; top: 0; left: 0;
    background: var(--bg);
    z-index: 20;
    display: flex; flex-direction: column;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.chat-view.hidden { transform: translateX(100%); display: flex !important; }

.chat-header { height: 65px; display: flex; align-items: center; padding: 0 10px; background: var(--glass); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent; /* গ্লাস এফেক্টের সাথে মিশে যাবে */
    color: var(--text);
    border-radius: 50%;
    cursor: pointer;
    display: flex; /* আগে none ছিল, এখন flex দিলাম */
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 24px;
    z-index: 50; /* অন্য এলিমেন্টের উপরে থাকবে */
    transition: 0.2s;
}
.back-btn:hover { background: var(--input); }
.chat-user-info { flex: 1; display: flex; align-items: center; gap: 10px; overflow: hidden; }
.avatar-sm { width: 40px; height: 40px; border-radius: 50%; background: #444; display: flex; align-items: center; justify-content: center; color: #fff; }
.name-status .name { font-weight: 600; font-size: 16px; }
.status-text { font-size: 12px; color: var(--text-muted); }
.action-icon {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.action-icon:hover {
    background: var(--input-bg);
    color: var(--accent);
}

.chat-body { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background-image: radial-gradient(rgba(59,130,246,0.03) 1px, transparent 1px); background-size: 24px 24px; }
.message { max-width: 80%; padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.4; position: relative; }
.sent { align-self: flex-end; background: var(--sent); color: white; border-bottom-right-radius: 4px; }
.received { align-self: flex-start; background: var(--received); color: var(--text); border-bottom-left-radius: 4px; }
.msg-time { font-size: 10px; opacity: 0.7; text-align: right; margin-top: 4px; display: block; }

.chat-input-bar { padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.chat-input-bar input { flex: 1; padding: 12px 20px; border-radius: 24px; border: none; background: var(--input); color: var(--text); font-size: 15px; }
.send-fab { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: white; border: none; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Settings */
.settings-pad { padding: 20px; max-width: 600px; margin: 0 auto; }
.profile-head { text-align: center; margin-bottom: 30px; }
.avatar-lg { width: 90px; height: 90px; border-radius: 50%; background: var(--accent); margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 36px; color: #fff; }
.glass-card { background: var(--input); padding: 16px; border-radius: 16px; margin-bottom: 15px; }
.glass-card label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.row { display: flex; gap: 10px; }
.row input { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.row button { padding: 0 20px; border-radius: 8px; border: none; background: var(--accent); color: white; cursor: pointer; }
.uid-text { font-family: monospace; background: rgba(0,0,0,0.2); padding: 10px; border-radius: 8px; font-size: 13px; margin-bottom: 10px; word-break: break-all; }
.outline-btn { width: 100%; padding: 8px; background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 8px; cursor: pointer; }
.menu-list div { padding: 16px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; justify-content: space-between; font-weight: 500; }
.danger-text { color: #ef4444; }
.theme-row { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: var(--input); border-radius: 16px; margin-top: 20px; }
.toggle-switch { width: 44px; height: 24px; background: #333; border-radius: 20px; position: relative; cursor: pointer; transition: 0.3s; }
.toggle-switch::after { content:''; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: 0.3s; }
.toggle-switch.active { background: var(--accent); }
.toggle-switch.active::after { transform: translateX(20px); }

/* Utilities */
.hidden { display: none !important; }
.custom-scroll::-webkit-scrollbar { width: 4px; }
.custom-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 9999; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-box { background: var(--card); padding: 30px; border-radius: 20px; width: 85%; max-width: 320px; text-align: center; border: 1px solid var(--border); }
.modal-close { margin-top: 20px; padding: 10px 30px; border-radius: 50px; border: none; background: var(--input); color: var(--text); cursor: pointer; }
/* ====== REELS STYLING - TikTok Style ====== */
/* ====== YOUTUBE SHORTS STYLING - TikTok Style ====== */
#reelsContainer{height:calc(100vh - 64px);overflow-y:scroll;scroll-snap-type:y proximity;background:#000;-webkit-overflow-scrolling:touch}
.reel-item{position:relative;height:100vh;scroll-snap-align:start;background:#000}
.cover{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;pointer-events:auto;transition:opacity .5s}
.cover img{width:100%;height:100%;object-fit:cover}
.playicon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:80px;height:80px;background:rgba(255,255,255,.15);backdrop-filter:blur(12px);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:42px;color:#fff}
.channel{position:absolute;bottom:25px;left:20px;background:rgba(0,0,0,.7);color:#fff;padding:8px 16px;border-radius:25px;font-weight:700}
.video-iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:1}
.overlay{position:absolute;bottom:0;left:0;right:0;padding:20px;background:linear-gradient(transparent,rgba(0,0,0,.85));color:#fff;opacity:0;transition:opacity .6s;z-index:3;pointer-events:none}
.username{font-size:18px;font-weight:700;margin-bottom:8px}
.actions{position:absolute;right:15px;bottom:100px;display:flex;flex-direction:column;gap:20px}
.btn{background:rgba(255,255,255,.2);border:none;width:52px;height:52px;border-radius:50%;color:#fff;font-size:24px;backdrop-filter:blur(10px);cursor:pointer}
.reel-btn:hover {
  transform: scale(1.2);
  background: rgba(255,255,255,0.4);
}

/* Reel unmute button styling */
.reel-unmute {
  position: absolute;
  right: 16px;
  bottom: 120px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 80;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.reel-unmute:active { transform: scale(0.96); }
.reel-unmute:hover { background: rgba(0,0,0,0.65); }

@media (max-width: 480px) {
  .reel-unmute { right: 12px; bottom: 110px; width: 52px; height: 52px; font-size: 20px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
}

/* full-area tap catcher to capture touches over cross-origin iframes */
.reel-catcher { position: absolute; inset: 0; z-index: 2; pointer-events: auto; }
.reel-catcher { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }


/* ====== Updated Loading Screen Styling ====== */
#loadingScreen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

/* ব্যাকগ্রাউন্ড ব্লার ইফেক্ট */
.loading-blur-bg {
    position: absolute;
    inset: 0;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.loading-content {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* ZxCHAT টেক্সট স্টাইল */
.zx-logo {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1px;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    filter: drop-shadow(0 4px 10px rgba(59, 130, 246, 0.3));
}

/* সার্কেল লোডিং এনিমেশন */
.circle-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.loading-msg {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* লোডিং শেষ হলে হাইড করার ট্রানজিশন */
#loadingScreen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* AI Core Orb */
.ai-core{
  position:relative;
  width:90px;
  height:90px;
}

.ai-core span{
  position:absolute;
  inset:0;
  border-radius:50%;
  border:2px solid transparent;
  border-top-color:#00f2ff;
  filter:drop-shadow(0 0 12px #00f2ff);
  animation: orbit 1.8s linear infinite;
}

.ai-core span:nth-child(2){
  border-top-color:#7cffcb;
  animation-duration:2.4s;
  transform:scale(1.15);
}

.ai-core span:nth-child(3){
  border-top-color:#5b7cfa;
  animation-duration:3s;
  transform:scale(1.3);
}

/* Orb center glow */
.ai-core::after{
  content:"";
  position:absolute;
  inset:22px;
  border-radius:50%;
  background:radial-gradient(circle,#00f2ff,#003a44);
  box-shadow:0 0 30px #00f2ff;
  animation: corePulse 1.5s ease-in-out infinite;
}

/* Brand text */
.logo-text{
  margin-top:26px;
  font-size:30px;
  font-weight:900;
  letter-spacing:2px;
  background:linear-gradient(90deg,#00f2ff,#7cffcb,#5b7cfa);
  background-size:300%;
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  animation: shimmer 3s linear infinite;
}

/* Typing dots */
.typing{
  display:flex;
  gap:6px;
  margin-top:10px;
}

.typing span{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#00f2ff;
  opacity:.3;
  animation: typing 1.4s infinite;
}

.typing span:nth-child(2){ animation-delay:.2s }
.typing span:nth-child(3){ animation-delay:.4s }

/* Animations */
@keyframes orbit{
  to{ transform:rotate(360deg); }
}

@keyframes corePulse{
  0%,100%{ transform:scale(1); opacity:.8 }
  50%{ transform:scale(1.15); opacity:1 }
}

@keyframes shimmer{
  from{ background-position:0% }
  to{ background-position:300% }
}

@keyframes typing{
  0%,80%,100%{ opacity:.3 }
  40%{ opacity:1 }
}


/* Iframe fixes for mobile */
@media (max-width: 768px) {
  .reel-item iframe {
    width: 100vw;
    height: 100vh;
  }
}
.loading-text { text-align: center; margin-top: 50px; color: var(--text-muted); }

/* Positioning for Watch tab so overlay button can be absolute inside it */
#WatchTab { position: relative; }

/* Reels overlay search button (top-right of video area) */

/* ====== Login auth status + progress ====== */
.auth-status { text-align: center; margin-top: 10px; color: var(--text-muted); font-size: 13px; min-height: 18px; }
/* Auth Progress Bar (Lite Animation) */
.auth-progress { 
  height: 4px; 
  background: rgba(255,255,255,0.05); 
  border-radius: 10px; 
  margin-top: 15px; 
  overflow: hidden; 
}
.auth-progress .bar { 
  height: 100%; 
  background: var(--accent); 
  width: 50%;
  /* ভারি Slide এনিমেশনের বদলে সাধারণ পালস */
  animation: loadingPulse 1.5s ease-in-out infinite; 
}

@keyframes loadingPulse {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
/* auth status variants */
.auth-status.info { color: var(--text-muted); }
.auth-status.success { color: #22c55e; }
.auth-status.error { color: #ff4444; }

.avatar, .avatar-lg, .avatar-sm, .avatar-xl {
    background-size: cover;
    background-position: center;
    overflow: hidden;
    color: #fff; /* অক্ষরের জন্য */
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.avatar img, .avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.post-creator { margin: 15px; padding: 15px !important; }
.post-creator textarea {
    width: 100%; background: transparent; border: none; color: var(--text);
    resize: none; height: 60px; font-family: inherit; font-size: 15px;
}
.post-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.small-btn { width: 80px !important; padding: 8px !important; font-size: 14px !important; }

#postPreviewContainer { position: relative; margin-top: 10px; border-radius: 10px; overflow: hidden; }
#postPreviewImg { width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; }
#postPreviewContainer button {
    position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,0.5);
    color: white; border: none; border-radius: 50%; width: 25px; height: 25px; cursor: pointer;
}

/* Post Card */
.post-card { background: var(--card); margin: 15px; border-radius: 18px; border: 1px solid var(--border); overflow: hidden; }
.post-header { display: flex; align-items: center; gap: 12px; padding: 12px; }
.post-user-info { flex: 1; }
.post-user-name { font-weight: 700; font-size: 15px; }
.post-time { font-size: 11px; color: var(--text-muted); }
.post-caption { padding: 0 15px 12px; font-size: 15px; line-height: 1.4; }
.post-content-img { width: 100%; display: block; background: #1a1a1a; }



/* মডাল ওভারলে */
.modal-overlay {
    background: rgba(0, 0, 0, 0.85); /* একটু বেশি ডার্ক */
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

/* মডাল বক্স বড় করা হয়েছে */
.modal-box {
    background: var(--surface);
    padding: 40px 30px;
    border-radius: 28px;
    width: 92%;
    max-width: 450px; /* আগে ৩২০ ছিল, এখন ৪৫০ */
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.8); /* ওপেন হওয়ার সময় এনিমেশন হবে */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* প্রোফাইল পিকচার বড় করা হয়েছে */
.avatar-xl {
    width: 140px; /* আগে ছোট ছিল, এখন বড় */
    height: 140px;
    border-radius: 50%;
    background: var(--accent-grad);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    font-weight: bold;
    color: white;
    border: 4px solid var(--border);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    background-size: cover;
    background-position: center;
}

#friendProfName {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--text);
}

#friendProfStatus {
    font-size: 14px;
    margin-bottom: 25px;
}

.modal-details {
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 16px;
    text-align: left;
    margin-bottom: 25px;
}

.modal-details p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.modal-details span {
    color: var(--text);
    word-break: break-all;
    font-family: monospace;
}

/* ক্লোজ বাটন স্টাইল */
.modal-close {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: var(--input);
    color: var(--text);
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
}

.my-post-item {
    background: var(--input);
    padding: 15px;
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}
.my-post-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.my-post-img-preview { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; }
.my-post-actions { display: flex; gap: 10px; margin-top: 10px; }
.edit-btn { flex: 1; padding: 8px; border-radius: 8px; border: none; background: var(--accent); color: white; cursor: pointer; font-size: 13px; }
.delete-btn { flex: 1; padding: 8px; border-radius: 8px; border: none; background: #ef4444; color: white; cursor: pointer; font-size: 13px; }

.post-actions-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    border-top: 1px solid var(--border);
}

.like-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-btn i {
    transition: color 0.2s;
}

/* রিয়্যাক্ট দিলে লাল হবে */
.like-btn.liked {
    color: #ff4444;
    transform: scale(1.1);
}

.like-btn.liked i {
    animation: heartBeat 0.3s forwards;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1.1); }
}

.like-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.my-post-item {
    background: var(--card);
    padding: 16px;
    border-radius: 18px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column; /* এলিমেন্টগুলো উপর-নিচে থাকবে */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.my-post-item button {
    transition: transform 0.1s;
}

.my-post-item button:active {
    transform: scale(0.96);
}

.dialog-box {
    max-width: 320px !important;
    padding: 25px !important;
    border-radius: 20px !important;
    transform: scale(0.9);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#customDialog:not(.hidden) .dialog-box {
    transform: scale(1);
}

#dialogTitle {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
}

.outline-btn {
    background: var(--input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

/* ====== Responsive Feed for Desktop (Facebook Style) ====== */

@media (min-width: 768px) {
    /* ফিড ট্যাবটিকে মাঝখানে আনা */
    #feedTab {
        max-width: 650px; /* পোস্টের সর্বোচ্চ চওড়া কত হবে */
        margin: 0 auto !important; /* মাঝখানে পজিশনিং */
        border-left: 0px solid var(--border);
        border-right: 0px solid var(--border);
        background: var(--bg); /* দুই পাশের খালি জায়গা থেকে আলাদা দেখানোর জন্য */
    }

    /* পোস্ট ক্রিয়েটর বক্সের মার্জিন ঠিক করা */
    .post-creator {
        margin: 20px 0 !important;
        border-radius: 12px;
    }

    /* ফিড পোস্ট কার্ডের মার্জিন ঠিক করা */
    .post-card {
        margin: 0 0 20px 0 !important;
        border-radius: 12px;
    }
    
    /* ফিড কন্টেইনারের প্যাডিং */
    #feedContainer {
        padding: 0 10px;
    }
}

/* বড় ডেস্কটপ স্ক্রিনের জন্য আরও একটু চওড়া করতে চাইলে */
@media (min-width: 1200px) {
    #feedTab {
        max-width: 700px;
    }
}

/* Post Creator Box */
.post-creator {
    margin: 15px;
    padding: 15px !important;
    border-radius: 18px !important;
}

.creator-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.creator-top textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    resize: none;
    min-height: 40px;
    max-height: 250px; /* এর বেশি হলে স্ক্রল হবে */
    padding: 8px 0;
    line-height: 1.5;
    outline: none;
}

/* Image Preview Styling */
.preview-wrapper {
    position: relative;
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

#postPreviewImg {
    width: 100%;
    display: block;
    max-height: 300px;
    object-fit: cover;
}

.close-preview {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Action Bar */
.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.action-item {
    background: transparent;
    border: none;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: 0.2s;
}

.action-item:hover {
    background: var(--input);
}

.post-submit-btn {
    width: auto !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
}

#feedStatus {
    font-size: 11px;
    text-align: center;
    margin-top: 8px;
}
.circle-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* --- OFFLINE WARNING STYLE --- */
#offline-warning {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: #ff4444; /* লাল রং */
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    font-weight: 700;
    z-index: 10001; /* সবার উপরে থাকার জন্য */
    transform: translateY(-100%); /* শুরুতে লুকিয়ে থাকবে */
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
#offline-warning.active {
    transform: translateY(0); /* নিচে নেমে আসবে */
}