/* =========================================
TITAN CONNECT V7.8 | MESSENGER COMPACT EDITION
Style: Ultra Cyberpunk / Deep Glass / Messenger Layout
Features: Full Suite + FIXED CALL UI 📞
========================================= */
:root {
/* --- COLORS PALETTE --- */
--bg-deep: #000000;
--bg-panel: #050505;
--bg-elevated: #0f0f13;
/* Branding Colors */
--primary: #8b5cf6;         /* Violet */
--primary-dark: #6d28d9;    
--primary-glow: rgba(139, 92, 246, 0.6);

/* Text Colors */
--text-high: #ffffff;
--text-mid: #94a3b8;        
--text-low: #475569;        

/* Functional Colors */
--accent: #f43f5e;          /* Rose */
--success: #10b981;         /* Emerald */
--warning: #f59e0b;         /* Amber */
--social: #3b82f6;          /* Blue */

/* --- LEGENDARY EFFECTS --- */
--glass-overlay: rgba(0, 0, 0, 0.65); 
--glass-blur: blur(8px);

--glass-panel: rgba(20, 20, 25, 0.75);
--glass-border: 1px solid rgba(255, 255, 255, 0.08);
--neon-border: 1px solid rgba(139, 92, 246, 0.3);

--shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.8);
--shadow-neon: 0 0 20px rgba(139, 92, 246, 0.2);

/* --- LAYOUT --- */
--safe-top: env(safe-area-inset-top, 0px);
--safe-bottom: env(safe-area-inset-bottom, 0px);
--font-main: 'Cairo', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
--transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);

--app-bg: none; 
}
/* =========================================
   🎨 TITAN THEMES SYSTEM v13
   ========================================= */
.mode-ghost  { --primary: #8b5cf6; --primary-dark: #6d28d9; --primary-glow: rgba(139,92,246,0.6); --bg-deep: #000000; --bg-panel: #050505; --bg-elevated: #0f0f13; }
.mode-social { --primary: #3b82f6; --primary-dark: #1d4ed8; --primary-glow: rgba(59,130,246,0.6); --bg-deep: #000000; --bg-panel: #020617; --bg-elevated: #0a0f1e; }

/* 1. Midnight Violet (default) */
.theme-titan  { --primary: #8b5cf6; --primary-dark: #6d28d9; --primary-glow: rgba(139,92,246,0.6); --bg-deep: #000000; --bg-panel: #050505; --bg-elevated: #0f0f13; }
/* 2. Ocean Blue */
.theme-ocean  { --primary: #0ea5e9; --primary-dark: #0369a1; --primary-glow: rgba(14,165,233,0.6); --bg-deep: #00080f; --bg-panel: #020b14; --bg-elevated: #051525; }
/* 3. Matrix Green */
.theme-matrix { --primary: #10b981; --primary-dark: #047857; --primary-glow: rgba(16,185,129,0.6); --bg-deep: #000800; --bg-panel: #020f05; --bg-elevated: #051a09; }
/* 4. Rose / Red */
.theme-rose   { --primary: #f43f5e; --primary-dark: #be123c; --primary-glow: rgba(244,63,94,0.6);  --bg-deep: #0f0005; --bg-panel: #130008; --bg-elevated: #1e000e; }
/* 5. Amber Gold */
.theme-gold   { --primary: #f59e0b; --primary-dark: #b45309; --primary-glow: rgba(245,158,11,0.6); --bg-deep: #0a0700; --bg-panel: #100900; --bg-elevated: #1a1100; }
/* 6. Cyber Teal */
.theme-teal   { --primary: #14b8a6; --primary-dark: #0f766e; --primary-glow: rgba(20,184,166,0.6); --bg-deep: #000a09; --bg-panel: #020f0e; --bg-elevated: #051a18; }
/* 7. Pure Dark */
.theme-dark   { --primary: #e2e8f0; --primary-dark: #94a3b8; --primary-glow: rgba(226,232,240,0.3); --bg-deep: #000000; --bg-panel: #080808; --bg-elevated: #111111; }
/* 8. Cosmic Pink */
.theme-cosmic { --primary: #d946ef; --primary-dark: #a21caf; --primary-glow: rgba(217,70,239,0.6); --bg-deep: #080010; --bg-panel: #0d0018; --bg-elevated: #150025; }

/* --- GLOBAL RESET --- */
*, *::before, *::after {
box-sizing: border-box; -webkit-tap-highlight-color: transparent;
outline: none; margin: 0; padding: 0; touch-action: manipulation;
}
body, html {
height: 100dvh; width: 100vw; overflow: hidden;
background-color: var(--bg-deep); color: var(--text-high);
font-family: var(--font-main); position: fixed;
overscroll-behavior: none; user-select: none; -webkit-user-select: none;
}
/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
/* Inputs Fix */
input, textarea, .swal2-input, .swal2-html-container {
user-select: text !important; -webkit-user-select: text !important;
}
/* --- SWEETALERT (Titan Style) --- */
.swal2-container {
z-index: 100000 !important;
backdrop-filter: blur(4px) !important;
background: rgba(0,0,0,0.4) !important;
}
.swal2-popup {
border-radius: 25px !important;
background: rgba(10, 10, 15, 0.95) !important;
border: 1px solid rgba(255,255,255,0.1) !important;
box-shadow: 0 0 30px rgba(0,0,0,0.8) !important;
color: white !important;
}
.swal2-title { font-family: var(--font-main) !important; }
.swal2-content { color: var(--text-mid) !important; }
/* --- BOOT SCREEN --- */
#boot-screen {
position: fixed; inset: 0; z-index: 200000; background: #000;
display: flex; flex-direction: column; align-items: center; justify-content: center;
transition: opacity 0.6s ease-in-out;
}
.boot-logo { font-size: 5rem; color: var(--primary); animation: pulse-glow 2s infinite; margin-bottom: 25px; filter: drop-shadow(0 0 20px var(--primary-glow)); }
.boot-text { font-family: var(--font-mono); color: var(--text-mid); letter-spacing: 4px; font-size: 0.8rem; margin-top: 15px; text-transform: uppercase; }
.boot-bar { width: 220px; height: 3px; background: rgba(255,255,255,0.1); margin-top: 25px; position: relative; overflow: hidden; border-radius: 2px; }
.boot-progress { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: var(--primary); transition: width 0.4s ease-out; box-shadow: 0 0 15px var(--primary); }
/* --- KEYPAD --- */
#keypad-overlay {
position: fixed; inset: 0; z-index: 99999;
background: rgba(0,0,0,0.9); backdrop-filter: blur(15px);
display: none; flex-direction: column; align-items: center; justify-content: center; padding: 20px;
animation: fadeIn 0.2s ease;
}
.keypad-display {
width: 100%; max-width: 300px; background: transparent; border: none; border-bottom: 2px solid var(--primary);
color: white; font-size: 2.2rem; text-align: center; margin-bottom: 20px; font-family: var(--font-mono); letter-spacing: 12px; padding: 15px;
text-shadow: 0 0 10px var(--primary-glow);
}
.keypad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; width: 100%; max-width: 340px; margin-bottom: 20px; }
.key-btn {
width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
color: white; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.15s; margin: auto;
font-family: var(--font-mono);
}
.key-btn:active { background: var(--primary); transform: scale(0.9); box-shadow: 0 0 15px var(--primary); }
/* --- GATEWAY --- */
#gateway-layer { position: fixed; inset: 0; z-index: 15000; background: radial-gradient(circle at 50% 0%, #1a1a2e 0%, #000000 80%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; overflow-y: auto; }
.gateway-card { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 400px; animation: slideUp 0.5s ease-out; }
.gateway-btn {
background: linear-gradient(145deg, var(--bg-elevated), var(--bg-panel));
border: var(--glass-border); padding: 25px; border-radius: 25px; cursor: pointer;
display: flex; align-items: center; gap: 20px; text-align: left; transition: var(--transition);
}
.gateway-btn:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow-neon); }
.gateway-btn i { font-size: 2.2rem; width: 60px; text-align: center; }
.g-btn-ghost i { color: #8b5cf6; filter: drop-shadow(0 0 10px #8b5cf6); }
.g-btn-social i { color: #3b82f6; filter: drop-shadow(0 0 10px #3b82f6); }
/* Saved Accounts */
#saved-accounts-wrapper { display: none; width: 100%; max-width: 400px; margin-bottom: 25px; animation: fadeIn 0.6s ease; }
.saved-accounts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.acc-card {
background: var(--bg-elevated); border: var(--glass-border); border-radius: 20px; padding: 18px 15px;
position: relative; cursor: pointer; text-align: center; transition: var(--transition);
}
.acc-card:hover { border-color: var(--primary); background: rgba(139, 92, 246, 0.05); }
.acc-avatar {
width: 55px; height: 55px; border-radius: 50%; margin: 0 auto 12px;
background-size: cover; border: 2px solid rgba(255,255,255,0.1); background-color: #1a1a2e;
flex-shrink: 0;
}
.acc-name { font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-remove {
position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; background: rgba(255,255,255,0.05);
border-radius: 50%; color: var(--text-mid); display: flex; align-items: center; justify-content: center;
font-size: 0.7rem; z-index: 2;
}
/* Auth Modal */
#auth-layer, #phone-auth-layer { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: 20px; }
.auth-box {
width: 100%; max-width: 440px; background: rgba(10, 11, 14, 0.95); backdrop-filter: blur(20px);
border: var(--glass-border); padding: 50px 35px; border-radius: 40px; text-align: center;
box-shadow: 0 30px 80px rgba(0,0,0,0.8); animation: pop 0.4s; position: relative;
}
.auth-logo { font-size: 4.5rem; color: var(--primary); margin-bottom: 30px; animation: float 6s ease-in-out infinite; }
/* Avatars */
.avatar-grid-options { display: flex; justify-content: center; gap: 10px; margin-bottom: 15px; }
.avatar-option { width: 50px; height: 50px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; background-size: cover; background-color: #1a1a2e; transition: 0.2s; flex-shrink: 0; }
.avatar-option.selected { border-color: var(--primary); transform: scale(1.15); box-shadow: 0 0 15px var(--primary-glow); }
/* Inputs */
.field-group { position: relative; margin-bottom: 20px; }
.field-group i { position: absolute; top: 18px; color: var(--text-low); transition: 0.3s; }
html[dir="rtl"] .field-group i { right: 20px; } html[dir="ltr"] .field-group i { left: 20px; }
.titan-field {
width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px;
color: white; font-family: inherit; font-size: 1rem; transition: var(--transition);
}
html[dir="rtl"] .titan-field { padding: 18px 55px 18px 20px; } html[dir="ltr"] .titan-field { padding: 18px 20px 18px 55px; }
.titan-field:focus { border-color: var(--primary); background: rgba(0,0,0,0.6); box-shadow: 0 0 10px rgba(139,92,246,0.1); }
.titan-field:focus + i { color: var(--primary); }
.btn-action {
width: 100%; padding: 18px; border: none; border-radius: 20px;
background: linear-gradient(135deg, var(--primary), var(--primary-dark));
color: white; font-weight: 800; font-size: 1.1rem; cursor: pointer;
box-shadow: 0 10px 30px var(--primary-glow); transition: var(--transition);
}
.btn-action:active { transform: scale(0.97); }
/* --- MAIN APP LAYOUT --- */
#app-root {
display: none; height: 100%; width: 100%; grid-template-columns: 400px 1fr;
opacity: 0; transition: opacity 0.5s ease; background: var(--bg-deep);
}
/* Sidebar */
.sidebar {
background: var(--bg-panel) !important; display: flex; flex-direction: column;
z-index: 2000; border-left: 1px solid rgba(255,255,255,0.03); position: relative;
}
.sidebar-header {
padding: calc(12px + var(--safe-top)) 14px 10px;
display: flex; flex-direction: column; gap: 0;
border-bottom: 1px solid rgba(255,255,255,0.05);
}
.user-chip {
display: flex; align-items: center; gap: 10px; cursor: pointer;
padding: 4px 6px; border-radius: 12px; transition: 0.2s; width: 100%;
}
.user-chip:hover { background: rgba(255,255,255,0.03); }
.avatar-main {
width: 40px; height: 40px; border-radius: 13px; background-size: cover;
border: 2px solid var(--primary); position: relative; background-color: #1a1a2e;
flex-shrink: 0;
}
.online-dot { position: absolute; bottom: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg-panel); background: var(--success); }
/* Tabs */
.sidebar-tabs { display: flex; padding: 6px 14px 0; gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.05); background: rgba(5,5,5,0.2); }
.tab-btn {
flex: 1; padding: 10px 8px; border: none; background: transparent; color: var(--text-mid);
border-bottom: 2px solid transparent; cursor: pointer; font-weight: bold; font-size: 0.85rem; opacity: 0.7; transition: 0.3s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); opacity: 1; }
.ghost-list { flex: 1; overflow-y: auto; padding: 8px 10px; scrollbar-width: none; }
/* 🔥 FIX: Sidebar Items (Compact) 🔥 */
.ghost-item {
display: flex; align-items: center; gap: 10px;
padding: 10px 12px !important;
border-radius: 14px !important;
margin-bottom: 5px !important;
cursor: pointer; transition: var(--transition);
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.02);
min-height: auto !important;
height: auto !important;
}
.ghost-item:hover { background: rgba(255,255,255,0.08); transform: translateX(5px); }
.ghost-item.active { background: rgba(139, 92, 246, 0.1); border-color: var(--primary); }
.ghost-item img,
.ghost-item .avatar-main,
.ghost-item .acc-avatar {
flex-shrink: 0 !important;
width: 45px !important;
height: 45px !important;
object-fit: cover;
border-radius: 50%;
}
/* Sidebar Metadata (Time + Unread) */
.ghost-item-meta {
display: flex; flex-direction: column; align-items: flex-end; justify-content: center; min-width: 40px;
}
.last-msg-time { font-size: 0.65rem; color: var(--text-mid); margin-bottom: 2px; font-family: var(--font-mono); }
/* Unread Styles */
.unread-badge {
background: #f43f5e; color: white; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
font-size: 0.7rem; font-weight: bold; display: flex; align-items: center; justify-content: center;
box-shadow: 0 4px 10px rgba(244, 63, 94, 0.4); animation: pop 0.3s;
}
.ghost-item.unread-active {
background: linear-gradient(90deg, rgba(244, 63, 94, 0.1), transparent); border-left: 3px solid #f43f5e;
}
.ghost-item.unread-active .ghost-name { font-weight: 900 !important; color: #fff !important; }
.ghost-item.unread-active .ghost-preview { color: #f43f5e !important; font-weight: bold !important; }
/* Buttons & Navigation */
.lang-btn { position: absolute; top: 20px; right: 20px; background: rgba(255,255,255,0.05); color: white; border: 1px solid rgba(255,255,255,0.1); padding: 8px 16px; border-radius: 20px; cursor: pointer; font-family: var(--font-mono); font-size: 0.75rem; z-index: 9500; backdrop-filter: blur(5px); }
html[dir="ltr"] .lang-btn { right: auto; left: 20px; }
/* --- CHAT AREA (THE STAGE) --- */
.chat-stage {
flex: 1; display: flex; flex-direction: column;
background-color: var(--bg-deep); background-image: var(--app-bg);
background-size: cover; background-position: center; background-attachment: fixed;
position: relative; overflow: hidden; transition: background-image 0.5s ease-in-out;
}
.chat-stage::before {
content: ''; position: absolute; inset: 0;
background: rgba(0, 0, 0, var(--overlay-opacity));
z-index: 0; pointer-events: none; backdrop-filter: blur(5px); transition: 0.5s;
}
/* Chat Header */
.chat-header {
height: calc(85px + var(--safe-top)); padding: var(--safe-top) 25px 15px;
display: flex; justify-content: space-between; align-items: center;
background: rgba(15, 15, 20, 0.7); backdrop-filter: blur(15px);
border-bottom: var(--glass-border); z-index: 500; position: sticky; top: 0; flex-shrink: 0;
}
.active-user-info {
display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
overflow: hidden;
}
.active-user-info .avatar-main { width: 48px; height: 48px; flex-shrink: 0; border: 2px solid var(--primary); box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); }
#chat-name-view { font-weight: 800; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }
.group-members-bar { display: flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--text-mid); margin-top: 2px; cursor: pointer; }
.members-count-badge { background: rgba(255,255,255,0.1); padding: 3px 8px; border-radius: 10px; font-weight: bold; border: 1px solid rgba(255,255,255,0.05); }
.btn-nav-back { display: none; width: 40px; height: 40px; border-radius: 14px; background: rgba(255,255,255,0.05); border: none; color: white; cursor: pointer; align-items: center; justify-content: center; flex-shrink: 0; margin-left: 5px; }
html[dir="ltr"] .btn-nav-back i { transform: rotate(180deg); }
/* --- MESSAGING INTERFACE (UPDATED COMPACT) --- */
#message-stream {
flex: 1; overflow-y: auto; padding: 10px 12px;
display: flex; flex-direction: column; gap: 2px !important;
z-index: 10; scroll-behavior: smooth; content-visibility: auto;
}
.msg-row {
display: flex; align-items: flex-end; width: 100%;
opacity: 0; animation: msgSlideUp 0.3s forwards ease-out;
margin-bottom: 2px !important;
}
.msg-row.me { flex-direction: row-reverse; }
.msg-row.peer { flex-direction: row; }
@keyframes msgSlideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
/* Bubbles & Content (Messenger Style) */
.bubble {
max-width: 75%; padding: 8px 14px !important;
position: relative; font-size: 0.95rem; line-height: 1.35;
word-wrap: break-word; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer;
height: auto !important; min-height: auto !important;
}
.bubble a { color: inherit; text-decoration: underline; opacity: 0.9; }
.bubble.me {
background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #ffffff;
border-radius: 18px 18px 4px 18px; margin-right: 5px;
}
.bubble.peer {
background: #202025; color: #e4e4e7;
border-radius: 18px 18px 18px 4px; margin-left: 5px;
border: 1px solid rgba(255,255,255,0.05);
}
.bubble.saved { border: 2px solid var(--warning); background: rgba(245, 158, 11, 0.1); }
.msg-avatar-mini { width: 28px; height: 28px; border-radius: 50%; background-size: cover; background-position: center; margin-bottom: 2px; box-shadow: 0 0 0 2px #000; flex-shrink: 0; }
/* 🔥 FIX: Hide Selection Circles in Private Mode */
/* Default: Shown (for groups) */
.msg-row .select-icon,
.msg-row .checkbox-circle,
.msg-row input[type="checkbox"] {
display: block; margin: 0 8px;
}
/* Hidden in Private Mode */
.chat-mode-private .msg-row .select-icon,
.chat-mode-private .msg-row .checkbox-circle,
.chat-mode-private .msg-row input[type="checkbox"] {
display: none !important;
}
/* Audio Fix */
.audio-msg-container { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 220px; padding: 2px 0; }
.audio-msg-container audio { height: 40px !important; width: 100% !important; max-width: 250px !important; border-radius: 20px; outline: none; margin: 0; }
/* Magic Translate Button */
.magic-translate-btn {
position: absolute; top: 50%; transform: translateY(-50%);
background: rgba(0, 0, 0, 0.6); color: #fbbf24; border: none; border-radius: 50%;
width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
font-size: 0.7rem; cursor: pointer; opacity: 0; transition: opacity 0.2s; z-index: 10;
}
.bubble.me .magic-translate-btn { left: -32px; }
.bubble.peer .magic-translate-btn { right: -32px; }
.msg-row:hover .magic-translate-btn { opacity: 1; }
/* Message Metadata */
.msg-meta {
display: flex; justify-content: flex-end; align-items: center;
font-size: 0.65rem; opacity: 0.7; margin-top: 2px; gap: 4px;
}
.bubble.me .msg-meta { color: rgba(255,255,255,0.8); } .bubble.peer .msg-meta { color: #a1a1aa; }
.saved-icon { position: absolute; top: -10px; left: -10px; background: var(--warning); color: #000; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; box-shadow: 0 5px 10px rgba(0,0,0,0.5); z-index: 5; animation: pop 0.3s; }
.bubble .saved-icon[style*="background: #f43f5e"] { background: var(--accent) !important; color: white !important; }
.reaction-bubble { animation: popHeart 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
@keyframes popHeart { 0% { transform: scale(0); opacity: 0; } 50% { transform: scale(1.3); } 100% { transform: scale(1); opacity: 1; } }
/* Reply & Files */
.msg-reply-context { background: rgba(0,0,0,0.2); border-left: 3px solid rgba(255,255,255,0.5); padding: 6px 10px; border-radius: 8px; margin-bottom: 8px; font-size: 0.8rem; cursor: pointer; }
.ctx-name { font-weight: bold; opacity: 0.9; font-size: 0.75rem; }
.ctx-text { opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble img { border-radius: 12px; margin-top: 5px; max-width: 100%; display: block; }
/* Group Roles */
.role-badge { font-size: 0.65rem; padding: 2px 6px; border-radius: 6px; font-weight: 800; text-transform: uppercase; }
.role-owner { background: linear-gradient(45deg, #f59e0b, #d97706); color: #000; }
.role-admin { background: linear-gradient(45deg, #3b82f6, #2563eb); color: #fff; }
.bubble.msg-owner { border: 2px solid #f59e0b !important; background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(0, 0, 0, 0.6)); }
.bubble.msg-admin { border: 2px solid #3b82f6 !important; background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(0, 0, 0, 0.6)); }
.chat-role-badge { font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; margin-right: 6px; font-weight: 900; vertical-align: middle; }
/* --- INPUT PANELS (Standard & AI) --- */
.input-panel {
padding: 15px 20px calc(20px + var(--safe-bottom)); background: rgba(20,20,25,0.8);
backdrop-filter: blur(25px); border-top: var(--glass-border); display: flex; align-items: center;
gap: 15px; z-index: 100; position: relative;
}
.input-bar {
flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.05);
border-radius: 25px; display: flex; align-items: center; padding: 0 18px; transition: var(--transition);
}
.input-bar:focus-within { border-color: var(--primary); background: rgba(0,0,0,0.4); box-shadow: 0 0 20px rgba(139, 92, 246, 0.1); }
#main-chat-input { flex: 1; background: transparent; border: none; padding: 16px 0; color: white; font-family: inherit; font-size: 1rem; }
/* AI Chat Drawer */
.ai-input-area {
display: flex; align-items: center; gap: 10px; padding: 10px 15px;
background: rgba(30, 30, 35, 0.9); border-top: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 0 0 20px 20px; flex-shrink: 0; min-height: 70px; z-index: 9999; position: relative;
}
.ai-input-area input {
flex: 1; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
color: white; padding: 12px; border-radius: 12px; font-family: inherit; font-size: 1rem; outline: none;
}
.ai-input-area input:focus { border-color: var(--primary); background: rgba(0, 0, 0, 0.5); }
.ai-input-area button {
background: var(--primary) !important; color: white !important; width: 50px !important; height: 50px !important;
border-radius: 12px !important; border: none !important; display: flex !important; align-items: center;
justify-content: center; cursor: pointer !important; pointer-events: auto !important;
box-shadow: 0 0 15px var(--primary-glow); transition: 0.2s;
}
.ai-input-area button:active { transform: scale(0.9); }
#ai-chat-stream { flex: 1; overflow-y: auto; padding: 20px; margin-bottom: 0; scroll-behavior: smooth; }
.ai-msg-container { display: flex; flex-direction: column; gap: 15px; padding-bottom: 20px; width: 100%; }
.ai-bubble {
max-width: 80%; padding: 12px 16px; border-radius: 18px; position: relative; font-size: 0.95rem; line-height: 1.5; word-wrap: break-word;
user-select: text !important; -webkit-user-select: text !important; cursor: text;
}
.ai-bubble.user { align-self: flex-end; background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.ai-bubble.bot { align-self: flex-start; background: #2d2d2d; color: #e0e0e0; border-bottom-left-radius: 4px; border: 1px solid #d946ef; }
.ai-bubble pre { background: #1a1a1a; padding: 10px; border-radius: 8px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; margin-top: 5px; }
.translated-block { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, 0.2); font-size: 0.85rem; color: #ffd700; font-family: 'Tajawal', sans-serif; line-height: 1.4; text-align: right; }
/* Magic Spin Animation */
@keyframes spin-magic { 0% { transform: rotate(0deg); color: #d946ef; } 50% { color: #facc15; } 100% { transform: rotate(360deg); color: #d946ef; } }
.magic-active { animation: spin-magic 1s linear infinite; pointer-events: none; }
/* --- TOOLS & UTILS --- */
.btn-util {
background: rgba(255,255,255,0.05); color: white; border: 1px solid transparent;
cursor: pointer; transition: 0.2s; width: 42px; height: 42px; border-radius: 14px;
display: flex; align-items: center; justify-content: center;
}
.btn-util:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.btn-util.active { background: var(--primary); color: white; box-shadow: 0 0 15px var(--primary-glow); }
.btn-util.ghost-active { background: rgba(244, 63, 94, 0.15) !important; color: #f43f5e !important; border-color: #f43f5e; animation: pulse 2s infinite; }
/* --- OVERLAYS & SETTINGS --- */
.overlay {
position: fixed; inset: 0; z-index: 100000;
background: var(--glass-overlay);
display: none; flex-direction: column;
backdrop-filter: var(--glass-blur);
animation: fadeIn 0.3s ease;
}
#settings-overlay .settings-container {
width: 100%; max-width: 550px; margin: auto; background: rgba(15, 15, 20, 0.85);
backdrop-filter: blur(25px) saturate(180%); border-radius: 35px; border: 1px solid rgba(255,255,255,0.1);
display: flex; flex-direction: column; padding: 30px;
box-shadow: 0 20px 80px rgba(0,0,0,0.7); animation: slideUp 0.4s ease;
max-height: 85vh; overflow-y: auto; scrollbar-width: thin;
}
.setting-section { margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.setting-title { font-size: 0.9rem; color: var(--text-mid); margin-bottom: 15px; font-weight: bold; letter-spacing: 1px; }
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 4px; }
.theme-option { width: 100%; height: 100px; border-radius: 10px; background-size: cover; cursor: pointer; border: 2px solid transparent; transition: transform 0.2s; }
.theme-option:hover { transform: scale(1.05); border-color: var(--primary); }
/* ── Theme Buttons (Color Swatches) ── */
.theme-btn {
    height: 56px; border-radius: 14px; cursor: pointer;
    border: 2px solid rgba(255,255,255,0.1);
    display: flex; align-items: flex-end; justify-content: center;
    padding-bottom: 6px; transition: all 0.2s; position: relative;
    overflow: hidden;
}
.theme-btn span {
    font-size: 0.6rem; font-weight: 700; color: rgba(255,255,255,0.85);
    text-transform: uppercase; letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.theme-btn:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.4); box-shadow: 0 6px 20px rgba(0,0,0,0.5); }
.theme-btn.active { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.3); }
/* --- FILE DROP (P2P) --- */
#ghost-drop-overlay { position: fixed; inset: 0; z-index: 200000; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); display: none; flex-direction: column; align-items: center; justify-content: center; transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1); }
#ghost-drop-overlay.minimized { top: auto; left: 20px; right: auto; bottom: 100px; width: 320px; height: 70px; border-radius: 20px; background: rgba(20, 20, 25, 0.95); border: 1px solid var(--primary); padding: 0 15px; box-shadow: 0 20px 50px rgba(0,0,0,0.7); flex-direction: row; justify-content: space-between; }
html[dir="rtl"] #ghost-drop-overlay.minimized { left: 20px; right: auto; } html[dir="ltr"] #ghost-drop-overlay.minimized { right: 20px; left: auto; }
.gd-full-ui { text-align: center; width: 100%; max-width: 450px; animation: pop 0.4s; } .minimized .gd-full-ui { display: none; }
.gd-progress-track { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 10px; margin: 25px 0; overflow: hidden; }
.gd-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--accent)); box-shadow: 0 0 20px var(--primary); transition: width 0.2s linear; }
/* =========================================
📞 TITAN CALL UI (FIXED & POLISHED)
إصلاح واجهة الاتصال بالكامل
========================================= */
/* 1. الخلفية والحاوية الرئيسية */
#call-overlay {
position: fixed !important;
inset: 0;
width: 100vw; height: 100dvh;
background: #000;
z-index: 200000 !important;
display: none;
flex-direction: column;
overflow: hidden;
}
/* 2. منطقة الفيديو (المسرح) */
#video-stage {
position: absolute;
inset: 0;
width: 100%; height: 100%;
z-index: 1;
}
/* فيديو الطرف الآخر (ملء الشاشة) */
#remote-video {
width: 100%; height: 100%;
object-fit: cover;
background: #1a1a1a;
}
/* الفيديو بتاعي (مربع صغير عائم) */
#local-video {
position: absolute;
bottom: 120px; right: 20px;
width: 110px; height: 150px;
background: #000;
border-radius: 15px;
border: 1px solid rgba(255,255,255,0.2);
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
object-fit: cover;
z-index: 10;
transition: all 0.3s ease;
}
/* قلب الكاميرا الأمامية عشان تكون زي المراية */
#local-video.mirror { transform: scaleX(-1); }
/* 3. طبقة التحكم والبيانات (فوق الفيديو) */
.call-ui-layer {
position: absolute;
inset: 0;
z-index: 20;
display: flex;
flex-direction: column;
justify-content: space-between;
pointer-events: none;
background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 15%, transparent 85%, rgba(0,0,0,0.8) 100%);
}
/* الأزرار العلوية */
.top-actions {
padding: 40px 20px;
display: flex;
justify-content: space-between;
pointer-events: auto;
}
.mini-btn {
width: 45px; height: 45px;
border-radius: 50%;
background: rgba(255,255,255,0.15);
backdrop-filter: blur(10px);
border: none; color: white;
font-size: 1.1rem;
display: flex; align-items: center; justify-content: center;
cursor: pointer;
}
/* معلومات المتصل */
.call-info-panel {
text-align: center;
margin-top: 20px;
}
#call-peer-name {
font-size: 1.8rem; font-weight: 900; color: white;
text-shadow: 0 2px 10px rgba(0,0,0,0.8);
margin-bottom: 5px;
}
#call-duration {
font-family: monospace; font-size: 0.9rem;
color: #4ade80; background: rgba(0,0,0,0.6);
padding: 4px 12px; border-radius: 20px;
}
/* شريط الأزرار السفلي */
.titan-call-bar {
padding: 0 0 40px 0;
display: flex;
justify-content: center;
align-items: center;
gap: 25px;
pointer-events: auto;
}
.call-btn {
width: 65px; height: 65px;
border-radius: 50%; border: none;
font-size: 1.4rem; color: white;
background: rgba(255,255,255,0.15);
backdrop-filter: blur(10px);
display: flex; align-items: center; justify-content: center;
cursor: pointer; transition: 0.2s;
}
.call-btn:active { transform: scale(0.9); }
/* زرار الغلق الأحمر */
.call-btn.hangup {
background: #ef4444;
width: 75px; height: 75px;
box-shadow: 0 5px 20px rgba(239, 68, 68, 0.4);
}
/* زرار التفعيل (المايك والكاميرا) */
.call-btn.is-active {
background: #fff; color: #000;
}
#video-grid { width: 100%; height: 100%; display: none; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; padding: 80px 10px 120px; overflow-y: auto; z-index: 2; }
.remote-card { position: relative; width: 45%; max-width: 300px; aspect-ratio: 3/4; background: #000; border-radius: 15px; overflow: hidden; border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.remote-card video { width: 100%; height: 100%; object-fit: cover; }
.remote-label { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,0.7); color: white; padding: 3px 8px; border-radius: 6px; font-size: 0.7rem; font-weight: bold; }
/* --- EXTRAS: Pinned Msg & Reply Preview --- */
#pinned-bar-container { position: absolute; top: calc(86px + var(--safe-top)); left: 0; right: 0; height: 45px; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--primary); display: none; align-items: center; padding: 0 20px; z-index: 450; cursor: pointer; animation: slideDown 0.3s ease; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.pin-icon { color: var(--primary); margin-right: 15px; font-size: 1.1rem; animation: pulse 2s infinite; }
.pin-content { flex: 1; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e2e8f0; }
.btn-unpin { background: none; border: none; color: var(--text-mid); cursor: pointer; padding: 5px; }
#reply-preview-bar { position: absolute; bottom: 100%; left: 0; right: 0; background: rgba(10, 10, 12, 0.95); border-top: 1px solid var(--primary); padding: 10px 20px; display: none; align-items: center; justify-content: space-between; backdrop-filter: blur(20px); z-index: 90; animation: slideUp 0.2s ease; }
.reply-info { border-left: 3px solid var(--primary); padding-left: 10px; flex: 1; }
.reply-to-name { color: var(--primary); font-size: 0.75rem; font-weight: bold; margin-bottom: 2px; }
.reply-to-text { font-size: 0.8rem; color: var(--text-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80vw; }
/* --- EXTRAS: Audio & Stickers --- */
#audio-rec-ui { position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 400px; background: var(--bg-elevated); border: 1px solid var(--primary); padding: 10px 20px; border-radius: 50px; display: none; align-items: center; justify-content: space-between; gap: 15px; z-index: 600; box-shadow: 0 10px 40px rgba(0,0,0,0.9); }
.recording-pulse { width: 12px; height: 12px; background: var(--accent); border-radius: 50%; animation: pulse 1s infinite; flex-shrink: 0; }
.vis-bars { display: flex; align-items: center; gap: 3px; height: 25px; }
.vis-bar { width: 3px; background: var(--primary); border-radius: 5px; height: 5px; transition: 0.1s; }
#sticker-menu { display: none; position: absolute; bottom: 85px; left: 20px; right: 20px; background: rgba(10,10,12,0.95); border: 1px solid var(--border); border-radius: 20px; padding: 15px; grid-template-columns: repeat(5, 1fr); gap: 10px; height: 220px; overflow-y: auto; z-index: 400; box-shadow: 0 10px 40px rgba(0,0,0,0.8); backdrop-filter: blur(20px); }
.sticker-item { font-size: 2rem; cursor: pointer; text-align: center; padding: 10px; border-radius: 10px; transition: 0.2s; background: rgba(255,255,255,0.02); }
.sticker-item:hover { background: rgba(255,255,255,0.1); transform: scale(1.1); }
/* --- TITAN VAULT STYLES --- */
.vault-item-card {
background: rgba(30, 30, 40, 0.7); border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 16px; padding: 16px; margin-bottom: 12px;
transition: transform 0.2s, box-shadow 0.2s; position: relative; overflow: hidden;
}
.vault-item-card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); border-color: rgba(139, 92, 246, 0.3); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.file-info { display: flex; flex-direction: column; max-width: 70%; }
.file-name { font-weight: 700; font-size: 0.9rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 0.65rem; color: rgba(255, 255, 255, 0.5); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.card-actions { display: flex; gap: 8px; }
.btn-icon-sm {
width: 32px; height: 32px; border-radius: 8px; border: none; display: flex; align-items: center; justify-content: center;
cursor: pointer; transition: all 0.2s; background: rgba(255, 255, 255, 0.05); color: var(--text-mid);
}
.btn-icon-sm:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.btn-icon-sm.delete:hover { background: rgba(244, 63, 94, 0.2); color: #f43f5e; }
.btn-icon-sm.download:hover { background: rgba(59, 130, 246, 0.2); color: #3b82f6; text-decoration: none; }
.btn-icon-sm.copy:hover { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.media-preview { width: 100%; height: 180px; border-radius: 12px; overflow: hidden; background: #000; position: relative; cursor: zoom-in; border: 1px solid rgba(255, 255, 255, 0.1); }
/* Fix Audio Preview Height */
.media-preview:has(audio), .media-preview.audio-mode { height: auto !important; min-height: 50px !important; background: transparent !important; border: none !important; padding: 5px !important; }
.media-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.media-preview:hover img { transform: scale(1.05); }
.media-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.2s; }
.media-preview:hover .media-overlay { opacity: 1; }
.media-overlay i { color: white; font-size: 1.5rem; filter: drop-shadow(0 2px 5px black); }
.file-card-visual { display: flex; align-items: center; gap: 15px; background: rgba(0, 0, 0, 0.2); padding: 15px; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, 0.1); }
.note-content { background: rgba(0, 0, 0, 0.2); padding: 12px; border-radius: 10px; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: #e2e8f0; max-height: 150px; overflow-y: auto; border-left: 3px solid var(--accent); }
/* Selection Mode & Bulk Actions */
.vault-item-card.selected { border-color: var(--primary); background: rgba(139, 92, 246, 0.15); }
.selection-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.1); z-index: 10; cursor: pointer; display: flex; align-items: flex-start; justify-content: flex-end; padding: 10px; }
.checkbox-circle { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.5); background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; color: transparent; transition: 0.2s; }
.checkbox-circle.checked { background: var(--primary); border-color: var(--primary); color: white; transform: scale(1.1); }
#vault-bulk-actions { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--bg-elevated); border: 1px solid var(--primary); padding: 10px 25px; border-radius: 50px; display: none; gap: 20px; align-items: center; z-index: 500; box-shadow: 0 10px 30px rgba(0,0,0,0.8); animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
/* --- ATTACH MENU --- */
#attach-menu { border: var(--glass-border); background: rgba(20, 20, 25, 0.95); backdrop-filter: blur(15px); box-shadow: 0 10px 40px rgba(0,0,0,0.5); border-radius: 18px; padding: 8px; }
#attach-menu button { padding: 12px 15px; border-radius: 12px; transition: 0.2s; }
#attach-menu button:hover { background: rgba(255,255,255,0.05); }
/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
#app-root { grid-template-columns: 1fr; }
.sidebar { position: fixed; inset: 0; width: 100%; transform: translateX(0); z-index: 2000; transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
html[dir="rtl"] .sidebar.hidden { transform: translateX(100%); } html[dir="ltr"] .sidebar.hidden { transform: translateX(-100%); }
.btn-nav-back { display: flex !important; }
.bubble { max-width: 85%; }
.auth-box { padding: 30px 20px; width: 90%; }
}
/* --- ANIMATIONS --- */
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); } }
@keyframes pulse-glow { 0% { opacity: 0.6; filter: drop-shadow(0 0 5px var(--primary)); } 50% { opacity: 1; filter: drop-shadow(0 0 25px var(--primary)); } 100% { opacity: 0.6; filter: drop-shadow(0 0 5px var(--primary)); } }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }
/* 🔥 Vault Overlay Fix 🔥 */
#vault-overlay { z-index: 10000 !important; }
/* =============================================
🔥 TITAN UI FIXES (HEADER, INPUT, AI CHAT) 🔥
============================================= */
/* 1. إصلاح الهيدر (منع تداخل الأزرار مع الاسم) */
.chat-header {
padding: var(--safe-top) 15px 10px !important;
gap: 10px;
}
.active-user-info {
flex: 1;
min-width: 0;
margin-right: 5px;
}
#chat-tools-view {
flex-shrink: 0;
gap: 4px !important;
}
/* تصغير زراير الهيدر شوية عشان تكفي الموبايل */
#chat-tools-view .btn-util {
width: 38px !important;
height: 38px !important;
font-size: 1rem !important;
border: 1px solid rgba(255,255,255,0.05);
background: rgba(0,0,0,0.2) !important;
}
/* 2. إصلاح بار الكتابة (Input Bar) وظهور الأزرار */
.input-panel {
gap: 8px !important;
padding: 8px 10px !important;
}
/* الحاوية اللي فيها النص والزراير الداخلية */
.input-bar {
display: flex;
align-items: center;
padding: 0 5px !important;
gap: 2px !important;
}
/* تصغير زراير الصاعقة والعصا والإيموجي */
.input-bar .btn-util {
width: 32px !important;
height: 32px !important;
font-size: 1rem !important;
padding: 0 !important;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
/* حقل الكتابة نفسه */
#main-chat-input {
padding: 10px 5px !important;
font-size: 0.95rem;
}
/* زرار المايك والإرسال */
.btn-action#btn-mic, .btn-action#btn-send {
width: 45px !important;
height: 45px !important;
flex-shrink: 0;
}
/* 3. إصلاح شكل شات AI (عشان ميبقاش غبي) */
.ai-msg-container {
display: flex;
flex-direction: column;
gap: 8px;
padding: 15px;
}
.ai-bubble {
max-width: 85%;
padding: 10px 15px;
border-radius: 18px;
font-size: 0.95rem;
line-height: 1.5;
position: relative;
word-wrap: break-word;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.ai-bubble.user {
align-self: flex-end;
background: var(--primary);
color: white;
border-bottom-right-radius: 4px;
}
.ai-bubble.bot {
align-self: flex-start;
background: #1e1e24;
color: #e2e8f0;
border-bottom-left-radius: 4px;
border: 1px solid rgba(217, 70, 239, 0.2);
}
/* تنسيق الأكواد داخل ردود الـ AI */
.ai-bubble pre {
background: #000;
padding: 10px;
border-radius: 8px;
margin-top: 5px;
overflow-x: auto;
border: 1px solid rgba(255,255,255,0.1);
}
/* 🔥 إصلاح شات الذكاء الاصطناعي (يمين وشمال) 🔥 */
#ai-chat-stream {
flex: 1;
overflow-y: auto;
padding: 15px;
display: flex;
flex-direction: column;
}
/* الحاوية الداخلية للرسايل */
.ai-msg-container {
display: flex;
flex-direction: column;
gap: 10px;
width: 100%;
}
/* شكل الفقاعة العام */
.ai-bubble {
max-width: 80%;
width: fit-content;
padding: 10px 15px;
font-size: 0.95rem;
line-height: 1.5;
word-wrap: break-word;
position: relative;
}
/* 👤 رسالتك أنت (User) -> يمين (أو حسب اتجاه اللغة) */
.ai-bubble.user {
align-self: flex-start;
background: var(--primary);
color: white;
border-radius: 18px 18px 4px 18px;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* 🤖 رسالة البوت (Bot) -> شمال */
.ai-bubble.bot {
align-self: flex-end;
background: #1e1e24;
color: #e2e8f0;
border-radius: 18px 18px 18px 4px;
border: 1px solid rgba(255,255,255,0.1);
}
/* تحسين شكل الأكواد جوه الشات */
.ai-bubble pre {
background: #000;
padding: 10px;
border-radius: 8px;
overflow-x: auto;
direction: ltr;
margin-top: 5px;
font-family: 'JetBrains Mono', monospace;
font-size: 0.85rem;
}
/* =========================================
🚀 PERFORMANCE FIX: REMOVE BACKDROP COMPLETELY
إلغاء الخلفية السوداء والضباب نهائياَ
========================================= */
/* 1. الغلاف الخارجي (اللي بيغطي الشاشة): شفاف تماماً وبدون بلوك */
.swal2-container, .overlay-container, .modal-backdrop {
background: transparent !important;
background-color: rgba(0,0,0,0) !important;
backdrop-filter: none !important;
-webkit-backdrop-filter: none !important;
}
/* 2. إلغاء أي تأثير على جسم الصفحة الأصلي */
body.swal2-shown > *:not(.swal2-container) {
filter: none !important;
}
/* 3. (اختياري) تحسين شكل القائمة نفسها عشان تظهر بوضوح فوق الشات */
.swal2-popup, .glass-panel {
box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
border: 1px solid rgba(255,255,255,0.1);
}
/* =========================================
TELEGRAM-STYLE HEADER & DROPDOWN 🎩
========================================= */
/* تنسيق الهيدر ليكون طبقتين (اسم + حالة) */
.chat-header-info {
display: flex;
flex-direction: column;
justify-content: center;
line-height: 1.2;
}
.header-title {
font-weight: 700;
font-size: 1rem;
color: #fff;
}
/* سطر الحالة المدمج */
.header-subtitle {
font-size: 0.75rem;
display: flex;
align-items: center;
gap: 6px;
font-weight: 500;
}
/* القائمة المنسدلة (Menu) */
.header-dropdown {
position: absolute;
top: 50px;
right: 10px;
background: rgba(20, 20, 25, 0.98);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
padding: 5px;
min-width: 180px;
box-shadow: 0 10px 40px rgba(0,0,0,0.5);
display: none;
flex-direction: column;
z-index: 9999;
backdrop-filter: none !important;
}
.header-dropdown.active {
display: flex;
animation: fadeIn 0.2s ease;
}
/* عناصر القائمة */
.menu-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 15px;
color: #e4e4e7;
font-size: 0.9rem;
cursor: pointer;
border-radius: 8px;
transition: background 0.2s;
}
.menu-item:hover {
background: rgba(255, 255, 255, 0.08);
}
.menu-item i {
width: 20px;
text-align: center;
color: var(--text-mid);
}
/* تمييز وضع الشبح والذكاء الاصطناعي لو شغالين */
.menu-item.active-state {
color: #fbbf24;
}
.menu-item.active-state i {
color: #fbbf24;
}
/* =========================================
HEADER UPDATES (Group Support)
========================================= */
/* جعل الهيدر قابل للضغط في المجموعات */
.group-header-clickable {
cursor: pointer;
border-radius: 8px;
padding: 2px 8px;
transition: background 0.2s;
}
.group-header-clickable:active {
background: rgba(255,255,255,0.1);
}
/* تحسين شكل القائمة */
.header-dropdown {
width: 220px !important;
}
/* =========================================
🔥 TELEGRAM PROFESSIONAL HEADER FIX
========================================= */
/* 1. الحاوية الرئيسية للهيدر */
.chat-header {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
padding: 8px 12px !important;
background: rgba(18, 18, 20, 0.95) !important;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
height: 60px;
box-sizing: border-box;
position: relative;
z-index: 100;
}
/* 2. الأزرار الاحترافية (الكبيرة والشفافة) */
.header-icon-btn {
width: 42px !important;
height: 42px !important;
border-radius: 50% !important;
border: none !important;
background: transparent !important;
color: #e4e4e7 !important;
font-size: 1.2rem !important;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.2s ease, transform 0.1s;
margin: 0 2px;
}
/* تأثير الضغط (Ripple Effect) */
.header-icon-btn:active {
background: rgba(255, 255, 255, 0.1) !important;
transform: scale(0.95);
}
/* 3. ترتيب الجزء الأيسر (زر الرجوع + الصورة + الاسم) */
.header-left-section {
display: flex;
align-items: center;
gap: 10px;
flex: 1;
overflow: hidden;
}
/* زر الرجوع (تحسين الشكل) */
.back-btn-custom {
margin-right: 5px;
}
/* 4. معلومات الشات (الاسم والحالة) */
.chat-info-block {
display: flex;
flex-direction: column;
justify-content: center;
line-height: 1.3;
}
.chat-title-text {
font-size: 1rem;
font-weight: 700;
color: #fff;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-subtitle-text {
font-size: 0.75rem;
color: #a1a1aa;
display: flex;
align-items: center;
gap: 5px;
}
/* 5. القائمة المنسدلة (تحسينات الظهور) */
.header-dropdown {
top: 55px !important;
right: 8px !important;
border-radius: 12px !important;
background: #18181b !important;
border: 1px solid rgba(255,255,255,0.1);
box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
width: 200px;
}
.menu-item {
padding: 12px 16px !important;
font-size: 0.95rem !important;
}
/* --- 📰 TITAN NEWS STYLES --- */
#games-overlay {
position: fixed; inset: 0; background: rgba(0,0,0,0.85);
backdrop-filter: blur(10px); z-index: 2000;
display: none; align-items: center; justify-content: center;
}
.games-container {
width: 90%; max-width: 600px; height: 85vh;
background: #0f0f11; border: 1px solid var(--border);
border-radius: 20px; display: flex; flex-direction: column;
box-shadow: 0 0 50px rgba(16, 185, 129, 0.1);
animation: slideUp 0.3s ease-out;
}
.games-header {
padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
display: flex; justify-content: space-between; align-items: center;
background: linear-gradient(90deg, rgba(16, 185, 129, 0.05), transparent);
}
.games-brand { font-family: 'JetBrains Mono', monospace; font-weight: bold; font-size: 1.2rem; color: #fff; }
.games-ticker {
background: rgba(0,0,0,0.3); padding: 8px 20px;
font-size: 0.75rem; color: #10b981; font-family: monospace;
border-bottom: 1px dashed rgba(255,255,255,0.1);
}
.games-feed { flex: 1; overflow-y: auto; padding: 20px; }
/* تصميم الكارت */
.games-card {
background: rgba(255,255,255,0.03); border-left: 3px solid var(--primary);
margin-bottom: 15px; padding: 15px; border-radius: 0 10px 10px 0;
position: relative; transition: transform 0.2s;
}
.games-card:hover { transform: translateX(5px); background: rgba(255,255,255,0.05); }
.nc-badge {
position: absolute; top: 10px; right: 10px;
font-size: 0.6rem; padding: 2px 6px; border-radius: 4px;
background: rgba(255,255,255,0.1); color: #aaa; text-transform: uppercase;
}
.nc-title { font-weight: bold; color: #e2e8f0; font-size: 1rem; margin-bottom: 8px; padding-right: 60px; line-height: 1.4; }
.nc-summary { font-size: 0.85rem; color: #94a3b8; line-height: 1.5; }
.nc-meta { margin-top: 12px; font-size: 0.7rem; color: #64748b; display: flex; justify-content: space-between; font-family: monospace; }
.games-loader { text-align: center; color: #64748b; margin-top: 50px; font-family: monospace; }
/* إصلاح شاشة الحظر */
#ban-screen {
position: fixed;
top: 0; left: 0; width: 100%; height: 100%;
z-index: 999999 !important;
background: #000000 !important;
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 20px;
}
/* إصلاح تداخل الجريدة */
#games-overlay { z-index: 20000 !important; }
/* =========================================
إصلاح الترمينال (SHADOW TERMINAL FIX) 🛡️
========================================= */
#shadow-terminal {
position: fixed; bottom: 0; left: 0; right: 0;
height: 60vh;
background: rgba(10, 10, 10, 0.98);
border-top: 2px solid #10b981;
z-index: 30000;
display: none;
flex-direction: column;
box-shadow: 0 -10px 50px rgba(16, 185, 129, 0.2);
}
/* كلاس بنضيفه بالـ JS لما الأدمن يكتب الأمر */
#shadow-terminal.active-mode { display: flex; animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.term-header { padding: 10px 15px; background: rgba(16, 185, 129, 0.1); color: #10b981; font-family: monospace; font-weight: bold; display: flex; justify-content: space-between; }
.term-body { flex: 1; padding: 15px; overflow-y: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: #e2e8f0; }
/* =========================================
2. تصميم الجريدة الجديد (TITAN GAZETTE V2) 📰
========================================= */
#games-overlay .games-container {
width: 95%; max-width: 600px; height: 90vh;
background: #09090b; border: 1px solid rgba(255,255,255,0.1);
border-radius: 20px; display: flex; flex-direction: column;
overflow: hidden;
}
.games-feed { flex: 1; overflow-y: auto; padding: 15px; background: #000; }
/* كارت الخبر المطور */
.games-card {
background: #121214; border: 1px solid rgba(255,255,255,0.08);
border-radius: 12px; overflow: hidden; margin-bottom: 20px;
position: relative; transition: all 0.3s ease;
}
.games-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
/* الصورة */
.nc-image-area {
height: 140px; width: 100%; background-size: cover; background-position: center;
position: relative;
}
.nc-overlay-grad {
position: absolute; inset: 0;
background: linear-gradient(to top, #121214 0%, transparent 100%);
}
.nc-badge {
position: absolute; top: 10px; right: 10px;
font-size: 0.65rem; padding: 4px 8px; border-radius: 4px;
background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
color: #fff; font-weight: bold; text-transform: uppercase; border: 1px solid rgba(255,255,255,0.1);
}
/* المحتوى */
.nc-content { padding: 15px; position: relative; }
.nc-meta {
display: flex; justify-content: space-between; font-size: 0.7rem;
color: var(--text-mid); margin-bottom: 8px; font-family: monospace;
}
.nc-source { color: var(--primary); display: flex; align-items: center; gap: 5px; }
.nc-title {
font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 8px;
line-height: 1.3;
}
.nc-summary {
font-size: 0.9rem; color: #a1a1aa; line-height: 1.6; margin-bottom: 15px;
}
/* أزرار التفاعل  */
.nc-actions {
display: flex; gap: 10px; border-top: 1px dashed rgba(255,255,255,0.1); padding-top: 10px;
}
.btn-news-action {
flex: 1; background: rgba(255,255,255,0.03); border:  none; color: #e4e4e7;
padding: 8px; border-radius: 8px; font-size: 0.8rem; cursor: pointer;
display: flex; align-items: center; justify-content: center; gap: 6px;
transition: 0.2s ;
}
.btn-news-action:active { background: rgba(255,255,255,0.1); }
.btn-trans { color: var(--accent); }
/*  تنسيق سطر أوامر التيرمينال  */
.term-input-area {
display: flex; align-items: center;
padding: 10px; background: #000; border-top: 1px solid #333;
}
.term-prompt { color: #10b981; font-weight: bold; margin-right: 10px; font-family: monospace; }
#term-cmd-input {
flex: 1; background: transparent; border: none; color: #fff;
font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; outline: none;
}
/*  تعديل مكان شريط الحالة في المكالمة  */
.call-info-panel {
position: absolute !important;
top: 60px !important;
left: 0;
width: 100%;
text-align: center;
z-index: 10;
background: transparent !important;
text-shadow: 0 2px 4px rgba(0,0,0,0.8);
pointer-events: none;
}

/* 🔥 FIX: مكان زر إضافة صديق (معدل لتجنب التداخل) 🔥 */
#t-add-btn {
    position: fixed !important;
    /* حساب ذكي: ارتفاع الـ Bottom Nav (64px) + هامش أمان (16px) + Safe Area للموبايل */
    bottom: calc(64px + 16px + env(safe-area-inset-bottom, 0px)) !important;
    
    /* دعم RTL/LTR تلقائي */
    right: auto !important;
    left: 20px !important;
    
    width: 56px !important;
    height: 56px !important;
    border-radius: 16px !important; /* زوايا شبه دائرية أنسق للماسنجر */
    background: linear-gradient(135deg, #6366f1, #a855f7) !important;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45) !important;
    border: none !important;
    z-index: 3100 !important; /* فوق الـ Nav (3000) وأقل من الـ Modals */
    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    isolation: isolate; /* عزل الطبقة عشان ميبوظش الـ backdrop-filter */
}
/* عكس الاتجاه للغة الإنجليزية */
html[dir="ltr"] #t-add-btn { left: auto !important; right: 20px !important; }

#t-add-btn:active { transform: scale(0.92); }
#t-add-btn i { font-size: 22px !important; color: white !important; margin: 0 !important; }
#t-add-btn span { display: none !important; }

/* =========================================
🔥 TITAN CRYSTAL UI (True Glassmorphism)
========================================= */
#audio-rec-ui {
/* التموضع: عائم فوق الكيبورد */
position: fixed !important;
bottom: 100px !important;
left: 0 !important; right: 0 !important;
margin: 0 auto !important;
transform: none !important;
/* الأبعاد: كبسولة رشيقة */
width: auto !important;
min-width: 260px !important;
max-width: 320px !important;
height: 55px !important;

/* 🔥 سر الزجاج: خلفية شفافة جداَ + تشبع ألوان + غبشة عالية */
background: rgba(10, 10, 12, 0.4) !important; 
backdrop-filter: blur(25px) saturate(200%) !important;
-webkit-backdrop-filter: blur(25px) saturate(200%) !important;

/* حدود مضيئة رفيعة */
border: 1px solid rgba(255, 255, 255, 0.15) !important;
border-radius: 50px !important;

/* ظل ناعم للعمق */
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;

display: none; /* JS هيغير دي لـ flex */
align-items: center;
justify-content: space-between;
padding: 0 10px !important;
gap: 10px !important;
z-index: 2147483647 !important;
}
/* --- 🌊 أنيميشن الموجات (The Equalizer) --- */
#rec-visualizer {
display: flex !important;
align-items: center !important;
justify-content: center !important;
gap: 3px !important;
height: 100% !important;
flex: 1 !important;
}
.vis-bar {
width: 4px !important;
background: #a78bfa !important;
border-radius: 10px !important;
animation: wave-move 0.6s ease-in-out infinite alternate !important;
box-shadow: 0 0 8px rgba(139, 92, 246, 0.4) !important;
}
/* تنويع الحركة عشان يبان طبيعي */
.vis-bar:nth-child(1) { height: 10px; animation-delay: 0.0s; }
.vis-bar:nth-child(2) { height: 20px; animation-delay: 0.2s; background: #8b5cf6 !important; }
.vis-bar:nth-child(3) { height: 15px; animation-delay: 0.4s; }
.vis-bar:nth-child(4) { height: 25px; animation-delay: 0.1s; background: #c084fc !important; }
.vis-bar:nth-child(5) { height: 12px; animation-delay: 0.3s; }
@keyframes wave-move {
0% { transform: scaleY(0.5); opacity: 0.7; }
100% { transform: scaleY(1.5); opacity: 1; }
}
/* --- الأزرار --- */
#audio-rec-ui button { cursor: pointer !important; transition: 0.2s !important; }
/* زرار الحذف (خفي وبسيط) */
#audio-rec-ui button:first-of-type {
background: transparent !important;
color: #94a3b8 !important;
border: none !important;
width: 35px !important;
height: 35px !important;
border-radius: 50% !important;
display: flex; align-items: center; justify-content: center;
}
#audio-rec-ui button:first-of-type:hover { background: rgba(239, 68, 68, 0.2) !important; color: #ef4444 !important; }
/* زرار الإرسال (الجوهرة) */
#audio-rec-ui button:last-of-type {
background: linear-gradient(135deg, #8b5cf6, #3b82f6) !important;
color: white !important;
border: none !important;
width: 42px !important;
height: 42px !important;
border-radius: 50% !important;
box-shadow: 0 0 15px rgba(139, 92, 246, 0.5) !important;
display: flex; align-items: center; justify-content: center;
}
#audio-rec-ui button:last-of-type:active { transform: scale(0.9); }
/* العداد */
#rec-timer {
font-family: monospace !important;
color: #e2e8f0 !important;
font-weight: bold;
font-size: 0.9rem !important;
min-width: 45px;
text-align: center;
}
/* =========================================
🔥 FIX RTL CENTERING (The Bulletproof Way)
========================================= */
#audio-rec-ui {
/* 1. نلغي حسابات الـ Left والـ Transform اللي بتبوظ في العربي */
left: 0 !important;
right: 0 !important;
transform: none !important;
/* 2. السحر: نخلي الهوامش الجانبية تلقائية عشان يتسنتر لوحده */
margin: 0 auto !important;

/* 3. تثبيت المكان والشكل */
position: fixed !important;
bottom: 35px !important;

width: 90% !important;
max-width: 380px !important;
height: 75px !important;

/* 4. الستايل (Dark Mode Professional) */
background: rgba(24, 24, 27, 0.95) !important;
backdrop-filter: blur(12px) !important;
border: 1px solid rgba(139, 92, 246, 0.3) !important;
border-radius: 50px !important;
box-shadow: 0 15px 40px rgba(0,0,0,0.5) !important;

/* 5. الطبقات والتوزيع */
z-index: 2147483647 !important;
display: none;
align-items: center;
justify-content: space-between;
padding: 0 25px !important;
}
/* --- 🔔 Notification System --- */
.notif-badge {
position: absolute;
top: 5px;
right: 5px;
width: 10px;
height: 10px;
background: #ef4444;
border-radius: 50%;
border: 2px solid #09090b;
box-shadow: 0 0 5px #ef4444;
}
.notif-menu {
position: absolute;
top: 50px;
right: 0;
width: 300px;
max-height: 400px;
background: rgba(15, 15, 20, 0.95);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
box-shadow: 0 10px 40px rgba(0,0,0,0.5);
display: none;
flex-direction: column;
z-index: 9999;
overflow: hidden;
}
.notif-menu.active {
display: flex;
animation: slideDown 0.2s ease-out;
}
.notif-header {
padding: 12px 16px;
border-bottom: 1px solid rgba(255,255,255,0.1);
display: flex;
justify-content: space-between;
align-items: center;
font-weight: bold;
color: #fff;
}
.notif-list {
overflow-y: auto;
max-height: 350px;
}
.notif-item {
padding: 12px 16px;
border-bottom: 1px solid rgba(255,255,255,0.05);
cursor: pointer;
transition: background 0.2s;
}
.notif-item:hover {
background: rgba(255,255,255,0.05);
}
.notif-item.unread {
background: rgba(139, 92, 246, 0.1);
border-left: 3px solid #8b5cf6;
}
.notif-title {
font-size: 0.9rem;
font-weight: bold;
color: #e2e8f0;
margin-bottom: 4px;
}
.notif-body {
font-size: 0.8rem;
color: #9ca3af;
}
.notif-time {
font-size: 0.7rem;
color: #64748b;
margin-top: 4px;
text-align: right;
}
.notif-empty {
padding: 20px;
text-align: center;
color: #64748b;
font-style: italic;
}
@keyframes slideDown {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
/* --- ☢️ NEW REACTOR LOADER STYLES --- */
#nexus-loader {
position: fixed;
top: 0; left: 0; width: 100%; height: 100%;
background: radial-gradient(circle, #1a1a1a 0%, #000000 100%);
z-index: 999999;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: 'Courier New', Courier, monospace;
}
.reactor-container {
position: relative;
width: 120px; height: 120px;
margin-bottom: 30px;
}
.reactor-ring {
position: absolute; top: 0; left: 0;
width: 100%; height: 100%;
border-radius: 50%;
border: 4px solid transparent;
border-top-color: #f59e0b;
box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}
.ring-1 { animation: spin 2s linear infinite; }
.ring-2 {
top: 10px; left: 10px; width: 100px; height: 100px;
border-top-color: transparent;
border-bottom-color: #f59e0b;
animation: spin-reverse 1.5s linear infinite;
}
.ring-3 {
top: 20px; left: 20px; width: 80px; height: 80px;
border-top-color: transparent;
border-right-color: #fca5a5;
animation: spin 1s linear infinite;
}
.titan-core {
position: absolute; top: 50%; left: 50%;
transform: translate(-50%, -50%);
color: #f59e0b; font-size: 40px; font-weight: 900;
text-shadow: 0 0 15px #f59e0b;
animation: heartbeat 1.5s infinite ease-in-out;
}
.loader-text {
color: #f59e0b; font-size: 16px; letter-spacing: 5px;
font-weight: bold; text-shadow: 0 0 5px rgba(245, 158, 11, 0.5);
animation: blink 2s infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes spin-reverse { 0% { transform: rotate(0deg); } 100% { transform: rotate(-360deg); } }
@keyframes heartbeat { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; } 50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; text-shadow: 0 0 30px #f59e0b; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes dots-anim { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.dots { animation: dots-anim 1.5s infinite steps(4); display: inline-block; width: 20px; text-align: left; }
/* =============================================
🔻 TITAN BOTTOM NAVIGATION v13
5-tab nav: Chats · Immersion · Explore · Vault · More
Mobile only — hidden on desktop (>900px)
============================================= */
/* ── Sidebar layout adjustment for bottom nav ── */
.sidebar {
padding-bottom: 70px !important;
}
/* ── Bottom Nav Bar ── */
.titan-bottom-nav {
position: fixed;
bottom: 0; left: 0; right: 0;
height: 64px;
background: rgba(8, 8, 12, 0.97);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-top: 1px solid rgba(255,255,255,0.07);
display: flex;
align-items: center;
justify-content: space-around;
z-index: 3000;
padding: 0 4px;
padding-bottom: env(safe-area-inset-bottom, 0px);
box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
}
/* Hide on desktop */
@media (min-width: 901px) {
.titan-bottom-nav { display: none !important; }
.sidebar { padding-bottom: 0 !important; }
}
/* ── Nav Item ── */
.tbn-item {
flex: 1;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
gap: 4px;
height: 100%;
background: none; border: none;
color: var(--text-low);
font-family: var(--font-main);
font-size: 0.62rem; font-weight: 600;
cursor: pointer;
transition: color 0.2s;
padding: 6px 2px;
position: relative;
border-radius: 0;
-webkit-tap-highlight-color: transparent;
}
.tbn-item i {
font-size: 1.15rem;
transition: transform 0.2s, color 0.2s;
}
.tbn-item:active i { transform: scale(0.88); }
/* Active state */
.tbn-item.active {
color: var(--primary);
}
.tbn-item.active i {
filter: drop-shadow(0 0 6px var(--primary-glow));
}
.tbn-item.active::before {
content: '';
position: absolute;
top: 0; left: 50%;
transform: translateX(-50%);
width: 28px; height: 3px;
background: var(--primary);
border-radius: 0 0 4px 4px;
}
/* ── Explore center button (slightly elevated) ── */
.tbn-explore .tbn-explore-icon {
width: 46px; height: 46px;
border-radius: 50%;
background: linear-gradient(135deg, var(--primary), #6d28d9);
display: flex; align-items: center; justify-content: center;
box-shadow: 0 4px 16px rgba(139,92,246,0.45);
transition: transform 0.2s, box-shadow 0.2s;
margin-top: -12px;
margin-bottom: 2px;
flex-shrink: 0;
}
.tbn-explore .tbn-explore-icon i {
color: #fff;
font-size: 1.1rem;
}
.tbn-explore:active .tbn-explore-icon {
transform: scale(0.92);
}
.tbn-explore.active .tbn-explore-icon {
box-shadow: 0 4px 24px rgba(139,92,246,0.7);
}
/* Explore doesn't use the top bar indicator */
.tbn-explore.active::before { display: none; }
/* ── Popup menus (Explore + More) ── */
.tbn-popup {
position: fixed;
bottom: 72px;
left: 12px; right: 12px;
background: rgba(14, 14, 20, 0.98);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 20px;
padding: 16px;
z-index: 3500;
box-shadow: 0 -8px 40px rgba(0,0,0,0.7);
animation: tbn-popup-in 0.22s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes tbn-popup-in {
from { opacity:0; transform: translateY(12px) scale(0.97); }
to   { opacity:1; transform: translateY(0) scale(1); }
}
.tbn-popup-grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 8px;
}
.tbn-popup-item {
display: flex; flex-direction: column;
align-items: center; gap: 7px;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(255,255,255,0.07);
border-radius: 14px; padding: 14px 8px;
cursor: pointer; color: var(--text-mid);
font-family: var(--font-main);
font-size: 0.7rem; font-weight: 600;
transition: all 0.2s;
}
.tbn-popup-item i { font-size: 1.25rem; }
.tbn-popup-item:hover, .tbn-popup-item:active {
background: rgba(139,92,246,0.1);
border-color: rgba(139,92,246,0.25);
color: #fff;
transform: translateY(-2px);
}
/* ── ghost-list: see original definition above ── */

/* =========================================
   🎨 THEME ACTIVE INDICATOR
   ========================================= */
/* لما theme-btn يتضغط — visual feedback */
.theme-btn:active { transform: scale(0.95); }

/* =========================================================================
   [TITAN ULTIMATE UPGRADE] — New Component Styles
   ========================================================================= */

/* ── 1. Custom Titan Audio Player ─────────────────────────────────────── */
.titan-audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 8px 14px 8px 8px;
    min-width: 230px;
    max-width: 280px;
    position: relative;
    backdrop-filter: blur(8px);
    transition: border-color 0.2s ease;
}
.titan-audio-player:hover { border-color: rgba(var(--primary-rgb, 0,132,255), 0.4); }

.tap-play-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary, #0084ff);
    border: none; cursor: pointer; color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,132,255,0.35);
    transition: transform 0.15s ease, background 0.2s ease;
}
.tap-play-btn:active { transform: scale(0.92); }
.tap-play-btn i { font-size: 0.85rem; pointer-events: none; }
.tap-play-btn .fa-play { margin-left: 2px; }

.tap-audio-track {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.tap-progress-wrap {
    position: relative;
    height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}
.tap-progress-fill {
    position: absolute;
    left: 0; top: 0; height: 100%;
    background: var(--primary, #0084ff);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}
.tap-progress-input {
    position: absolute;
    left: 0; top: -6px;
    width: 100%; height: 16px;
    opacity: 0;
    cursor: pointer;
    margin: 0; padding: 0;
}

.tap-time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tap-time-cur, .tap-time-total {
    font-size: 0.65rem;
    color: var(--text-mid, #9ca3af);
    font-variant-numeric: tabular-nums;
    font-family: monospace;
}
.tap-audio-speed {
    font-size: 0.6rem;
    background: rgba(255,255,255,0.08);
    border: none; border-radius: 10px;
    color: var(--text-mid, #9ca3af);
    padding: 2px 6px; cursor: pointer;
    transition: background 0.15s;
}
.tap-audio-speed:hover { background: rgba(255,255,255,0.16); }

/* ── 2. Image Gallery Wrapper (Glassmorphism) ──────────────────────────── */
.titan-img-wrapper {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 4px 18px rgba(0,0,0,0.4),
                inset 0 1px 0 rgba(255,255,255,0.08);
    display: inline-block;
    position: relative;
    max-width: 260px;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.titan-img-wrapper:active { transform: scale(0.97); }
.titan-img-wrapper img {
    display: block;
    width: 100%;
    border-radius: 12px;
    min-width: 120px;
    min-height: 80px;
}
.titan-img-save-btn {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff; border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.8rem;
    backdrop-filter: blur(4px);
    opacity: 0; transition: opacity 0.2s ease;
}
.titan-img-wrapper:hover .titan-img-save-btn { opacity: 1; }

/* ── 3. TitanCinema Video Thumbnail ────────────────────────────────────── */
.titan-cinema-thumb {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    min-width: 220px;
    max-width: 290px;
    cursor: pointer;
    border: 1px solid rgba(139,92,246,0.35);
    box-shadow: 0 4px 22px rgba(109,40,217,0.22);
    background: #050208;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.titan-cinema-thumb .thumb-bg {
    position: absolute; inset: 0;
    object-fit: cover; width: 100%; height: 100%;
    filter: brightness(0.55);
    border-radius: 14px;
}
.titan-cinema-play-icon {
    position: relative; z-index: 2;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(139,92,246,0.82);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 8px rgba(139,92,246,0.18);
    transition: transform 0.18s ease, background 0.18s ease;
}
.titan-cinema-thumb:hover .titan-cinema-play-icon {
    transform: scale(1.08);
    background: rgba(139,92,246,1);
}
.titan-cinema-play-icon i { color:#fff; font-size:1.2rem; margin-left:3px; }
.titan-cinema-thumb .thumb-meta {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    display: flex; align-items: center; justify-content: space-between;
    z-index: 2;
}
.titan-cinema-thumb .thumb-name {
    font-size: 0.72rem; color: #e5e7eb;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 140px;
}
.titan-cinema-thumb .thumb-size {
    font-size: 0.65rem; color: #a78bfa;
    white-space: nowrap;
}

/* ── 4. Seen ACK — blue double tick ────────────────────────────────────── */
.tick-seen i { color: #3b82f6 !important; }

/* ── 5. Delete-for-Me danger item ──────────────────────────────────────── */
.action-item.danger-me i { color: #f59e0b; }
.action-item.danger-me   { color: #f59e0b; }

        /* ── Notification tab filter ── */
        .ntab { background:none; border:none; color:#4b5563; font-size:0.78rem; padding:8px 12px; cursor:pointer; border-bottom:2px solid transparent; transition:color 0.2s,border-color 0.2s; white-space:nowrap; }
        .ntab:hover { color:#e2e8f0; }
        .ntab.ntab-active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }
