/* ==========================================
   PREMIUM GLASSMORPHIC INTERFACE SYSTEM
   Designed & Developed by @rishabhsahil
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Tokens (Luxurious Indigo/Violet Theme) */
    --bg-dark: hsl(230, 20%, 8%);
    --bg-card: hsla(230, 20%, 15%, 0.55);
    --border-glass: hsla(230, 20%, 30%, 0.25);
    --border-glass-hover: hsla(260, 80%, 60%, 0.4);
    
    --primary-neon: hsl(263, 90%, 62%);
    --primary-glow: hsla(263, 90%, 62%, 0.4);
    --secondary-neon: hsl(315, 90%, 60%);
    
    --text-white: hsl(0, 0%, 98%);
    --text-muted: hsl(230, 10%, 65%);
    --text-dim: hsl(230, 10%, 45%);
    
    --online-green: hsl(145, 85%, 50%);
    --typing-purple: hsl(270, 80%, 75%);
    
    /* Layout Tokens */
    --sidebar-width: 260px;
    --transition-speed: 0.3s;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, hsla(263, 50%, 20%, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, hsla(315, 50%, 20%, 0.12) 0%, transparent 40%);
}

/* ==========================================
   SCROLLBAR STYLING
   ========================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: hsla(230, 20%, 30%, 0.5);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-neon);
}

/* ==========================================
   GLASS LAYOUT CARD
   ========================================== */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: border var(--transition-speed), box-shadow var(--transition-speed);
}

.glass-panel:hover {
    border-color: var(--border-glass-hover);
}

/* ==========================================
   SIDEBAR & BOTTOM NAVIGATION
   ========================================== */
.nav-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: hsla(230, 25%, 6%, 0.85);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    z-index: 1000;
}

.logo-container {
    margin-bottom: 3rem;
}

.logo-container h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(45deg, var(--primary-neon), var(--secondary-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px hsla(263, 90%, 62%, 0.2);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    transition: all var(--transition-speed);
}

.nav-item a i {
    font-size: 1.3rem;
}

.nav-item.active a,
.nav-item a:hover {
    color: var(--text-white);
    background: hsla(263, 90%, 62%, 0.15);
    border: 1px solid hsla(263, 90%, 62%, 0.3);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Sidebar profile item with small avatar */
.nav-profile-pic {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--primary-neon);
}

.nav-footer-credit {
    margin-top: auto;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-align: center;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
}

.nav-footer-credit a {
    color: var(--primary-neon);
    text-decoration: none;
    font-weight: 600;
}

/* Mobile Bottom Navigation Bar (Instagram Style) */
.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: hsla(230, 25%, 5%, 0.92);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 1rem;
}

.mobile-nav-bar a {
    color: var(--text-muted);
    font-size: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.mobile-nav-bar a.active,
.mobile-nav-bar a:hover {
    color: var(--primary-neon);
    text-shadow: 0 0 8px var(--primary-glow);
}

/* ==========================================
   APP MAIN GRID LAYOUT
   ========================================== */
.app-container {
    width: 100%;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    min-height: 100vh;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ==========================================
   CREATIVE SUGGESTION UI CARD
   ========================================== */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.suggestion-card {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: all var(--transition-speed);
}

.user-avatar-container {
    position: relative;
    width: 48px;
    height: 48px;
}

.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-glass);
    transition: border var(--transition-speed);
}

.suggestion-card:hover .user-avatar {
    border-color: var(--primary-neon);
}

/* pulsing green status badge */
.status-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 11px;
    height: 11px;
    background-color: var(--online-green);
    border: 2px solid var(--bg-dark);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--online-green);
}

.status-badge.pulse {
    animation: statusPulse 1.8s infinite ease-in-out;
}

@keyframes statusPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

.suggestion-details {
    flex-grow: 1;
}

.suggestion-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-white);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.suggestion-name:hover {
    color: var(--primary-neon);
}

.suggestion-location {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.suggestion-actions {
    display: flex;
    gap: 0.5rem;
}

/* Premium gradient styling for action buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-neon), var(--secondary-neon));
    color: var(--text-white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: opacity var(--transition-speed), transform var(--transition-speed);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-secondary {
    background: hsla(230, 20%, 30%, 0.3);
    border: 1px solid var(--border-glass);
    color: var(--text-white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn-secondary:hover {
    background: hsla(230, 20%, 35%, 0.5);
    border-color: var(--text-muted);
}

/* ==========================================
   MESSAGES & CHAT LIST (TAB CONTROLS)
   ========================================== */
.chat-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 1rem;
}

.chat-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-size: 0.95rem;
}

.chat-tab-btn.active {
    color: var(--primary-neon);
    border-bottom: 2px solid var(--primary-neon);
}

.chat-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 480px;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    color: inherit;
    transition: background var(--transition-speed);
}

.chat-item:hover {
    background: hsla(230, 20%, 25%, 0.35);
}

.chat-item.unread {
    background: hsla(263, 90%, 62%, 0.08);
    border: 1px dashed hsla(263, 90%, 62%, 0.2);
}

.chat-item-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.badge-unread {
    background-color: var(--primary-neon);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    box-shadow: 0 0 8px var(--primary-glow);
}

.chat-latest-time {
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* ==========================================
   CHAT WINDOW SYSTEM
   ========================================== */
.chat-window {
    display: grid;
    grid-template-rows: 72px 1fr 80px;
    height: calc(100vh - 4rem);
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.chat-header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
}

.chat-header-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.chat-header-status {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.chat-messages-container {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-bubble-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.8rem;
    max-width: 70%;
}

.message-bubble-wrapper.self {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-sender-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.message-bubble-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.message-bubble {
    padding: 0.85rem 1.1rem;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.45;
    position: relative;
    word-break: break-word;
}

.message-bubble-wrapper.self .message-bubble {
    background: linear-gradient(135deg, var(--primary-neon), hsl(275, 80%, 55%));
    color: white;
    border-bottom-right-radius: 4px;
}

.message-bubble-wrapper.other .message-bubble {
    background: hsla(230, 20%, 20%, 0.95);
    color: var(--text-white);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-glass);
}

.message-meta {
    font-size: 0.7rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.message-bubble-wrapper.self .message-meta {
    justify-content: flex-end;
}

/* Double ticks styling for read receipts */
.tick-seen {
    color: var(--typing-purple);
}

.tick-unseen {
    color: var(--text-dim);
}

/* Chat Input Bar */
.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-glass);
}

.input-message {
    flex-grow: 1;
    background: hsla(230, 20%, 6%, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 25px;
    padding: 0.8rem 1.5rem;
    color: white;
    outline: none;
    font-family: inherit;
    font-size: 0.92rem;
    transition: border var(--transition-speed);
}

.input-message:focus {
    border-color: var(--primary-neon);
}

/* Typing indicator micro-animation */
.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 1rem;
    background: hsla(230, 20%, 15%, 0.6);
    border-radius: 15px;
    border: 1px solid var(--border-glass);
    width: max-content;
    margin-left: 3rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--typing-purple);
    border-radius: 50%;
    animation: typingAnim 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingAnim {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* ==========================================
   AUTHENTICATION & PROFILE FORMS
   ========================================== */
.auth-container {
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: 2.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.form-control {
    background: hsla(230, 20%, 6%, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 0.8rem 1rem;
    color: white;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-speed);
}

.form-control:focus {
    border-color: var(--primary-neon);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.15);
}

/* Avatar setup upload widget supporting GIF */
.avatar-upload-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 1.5rem auto;
}

.avatar-preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-neon);
    box-shadow: 0 0 15px var(--primary-glow);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: var(--primary-neon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid var(--bg-dark);
    color: white;
}

.settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-glass);
}

.settings-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.settings-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Custom gorgeous switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: hsla(230, 20%, 30%, 0.4);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--border-glass);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-neon);
    box-shadow: 0 0 8px var(--primary-glow);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* ==========================================
   RESPONSIVE LAYOUT MECHANICS
   ========================================== */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .side-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 60px; /* offset for mobile bottom navigation */
    }
    
    .nav-sidebar {
        display: none;
    }
    
    .mobile-nav-bar {
        display: flex;
    }
    
    .app-container {
        margin-left: 0;
        padding: 1rem;
    }
    
    .chat-window {
        height: calc(100vh - 120px);
    }
    
    .message-bubble-wrapper {
        max-width: 85%;
    }
}

/* ==========================================
   REPLY & DELETE MESSAGE FEATURE
   ========================================== */
.message-bubble-wrapper {
    position: relative;
}

.message-actions {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    gap: 0.4rem;
    z-index: 10;
}

.message-bubble-wrapper.self .message-actions {
    left: -65px;
}

.message-bubble-wrapper.other .message-actions {
    right: -65px;
}

.message-bubble-wrapper:hover .message-actions {
    display: flex;
}

.msg-action-btn {
    background: hsla(230, 20%, 15%, 0.95);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.msg-action-btn:hover {
    color: var(--text-white);
    border-color: var(--primary-neon);
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Reply Preview Bar above input box */
.reply-preview-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: hsla(230, 20%, 6%, 0.85);
    border: 1px solid var(--border-glass);
    border-bottom: none;
    padding: 0.6rem 1.5rem;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    margin: 0 1.5rem -1px;
}

.reply-preview-content {
    font-size: 0.82rem;
    color: var(--text-muted);
    border-left: 3px solid var(--primary-neon);
    padding-left: 0.6rem;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Quoted message box inside message bubbles */
.quoted-message-box {
    background: rgba(0, 0, 0, 0.25);
    border-left: 3.5px solid var(--typing-purple);
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    margin-bottom: 0.4rem;
    cursor: pointer;
    opacity: 0.9;
    max-width: 100%;
}

.quoted-message-box:hover {
    opacity: 1;
}

.quoted-sender {
    font-weight: 600;
    color: var(--typing-purple);
    margin-bottom: 0.1rem;
    display: block;
}

.quoted-content {
    color: var(--text-muted);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* ==========================================
   STUNNING CHAT ATTACHMENTS SYSTEM
   ========================================== */
.chat-img-attachment-wrapper {
    margin-top: 0.5rem;
    max-width: 280px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1.5px solid var(--border-glass);
    transition: border-color var(--transition-speed);
    cursor: pointer;
}
.chat-img-attachment-wrapper:hover {
    border-color: var(--primary-neon);
}
.chat-img-attachment {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 200px;
    transition: transform var(--transition-speed);
}
.chat-img-attachment-wrapper:hover .chat-img-attachment {
    transform: scale(1.03);
}

.chat-vid-attachment-wrapper {
    margin-top: 0.5rem;
    max-width: 320px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1.5px solid var(--border-glass);
}
.chat-vid-attachment {
    width: 100%;
    max-height: 220px;
    display: block;
}

.chat-doc-attachment-card {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: hsla(230, 20%, 8%, 0.55);
    border: 1px solid var(--border-glass);
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius-md);
    color: var(--text-white);
    text-decoration: none;
    transition: all var(--transition-speed);
    max-width: 300px;
}
.chat-doc-attachment-card:hover {
    background: hsla(263, 90%, 62%, 0.1);
    border-color: var(--primary-neon);
    box-shadow: 0 0 10px var(--primary-glow);
}
.chat-doc-attachment-card i {
    font-size: 1.5rem;
    color: var(--typing-purple);
}
.chat-doc-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-doc-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-doc-size {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    border-radius: var(--border-radius-md);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border: 2px solid var(--border-glass);
}
.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s;
}
.lightbox-close:hover {
    color: var(--secondary-neon);
}


/* ==========================================
   PREMIUM CENTERED LAYOUT FOR DESKTOP
   ========================================== */
.premium-centered-container {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    width: 100%;
}

@media (min-width: 769px) {
    .premium-centered-container {
        margin-left: var(--sidebar-width) !important;
        margin-right: auto !important;
        padding: 2.5rem 3rem !important;
        width: calc(100% - var(--sidebar-width)) !important;
    }
}

@media (max-width: 768px) {
    .premium-centered-container {
        margin-left: 0 !important;
        padding: 1.5rem 1rem !important;
        width: 100% !important;
    }
}

/* ==========================================
   MOBILE FULLSCREEN MESSAGING CANVAS UTILITIES
   ========================================== */

/* Show back button only on mobile screens */
.mobile-only-btn {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-only-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        color: var(--text-white) !important;
        font-size: 1.25rem !important;
        margin-right: 0.2rem !important;
        border-radius: 50%;
        background: hsla(230, 20%, 30%, 0.15);
        border: 1px solid var(--border-glass);
    }
    
    .mobile-only-btn:hover {
        background: hsla(230, 20%, 30%, 0.35);
        border-color: var(--primary-neon);
    }

    /* Immersive mobile chat screen layout overrides */
    body.mobile-chat-mode {
        padding-bottom: 0 !important;
        overflow: hidden !important;
    }

    body.mobile-chat-mode .mobile-nav-bar {
        display: none !important;
    }

    body.mobile-chat-mode .app-container {
        margin-left: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        height: 100vh !important;
        width: 100vw !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    body.mobile-chat-mode .main-content {
        padding: 0 !important;
        margin: 0 !important;
        height: 100vh !important;
        width: 100vw !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* Transform the glassmorphic chat card to a full-screen flat layout */
    body.mobile-chat-mode .glass-panel.chat-window {
        border: none !important;
        border-radius: 0 !important;
        background: var(--bg-dark) !important;
        box-shadow: none !important;
        height: 100vh !important;
        width: 100vw !important;
        display: grid !important;
        grid-template-rows: 64px 1fr 76px !important;
        position: relative !important;
        overflow: hidden !important;
    }

    body.mobile-chat-mode .chat-header {
        height: 64px !important;
        padding: 0 1rem !important;
        background: hsla(230, 25%, 6%, 0.96) !important;
        border-bottom: 1px solid var(--border-glass) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        z-index: 100 !important;
    }

    body.mobile-chat-mode .chat-messages-container {
        padding: 1.2rem 1rem !important;
        overflow-y: auto !important;
        height: calc(100vh - 140px) !important;
        margin-bottom: 76px !important; /* space for the fixed input bar */
    }

    body.mobile-chat-mode #chat-form {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: hsla(230, 25%, 5%, 0.98) !important;
        border-top: 1px solid var(--border-glass) !important;
        z-index: 1000 !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }

    body.mobile-chat-mode .chat-input-bar {
        padding: 0.6rem 1rem !important;
        height: 76px !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        border-top: none !important;
    }

    body.mobile-chat-mode .input-message {
        font-size: 0.92rem !important;
        padding: 0.75rem 1.25rem !important;
    }

    body.mobile-chat-mode .reply-preview-bar {
        margin: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        padding: 0.6rem 1rem !important;
    }
}

