/* Enhanced Unified Visual Theme for LottoMuse */
:root {
    --toggle-size: 32px;
    --toggle-line: 3px;
    --toggle-color: #4F46E5;
    --toggle-transition: .2s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --sidebar-padding: 16px;
    --chat-text-size: 1rem;
    --chat-text-line-height: 1.45;
    --heading-size-ratio: 1.2;
    --lucky-number-size: 40px;
    --lucky-number-font: 18px;
    --placeholder-color: #6c757d;
    --initial-prompt-bg: rgba(99, 102, 241, 0.05);
    
    /* Enhanced lottery-themed Cosmo variables with unified theme */
    --primary-purple: #5B3E90;
    --primary-blue: #1A2B63;
    --accent-teal: #36D1DC;
    --accent-blue: #5B86E5;
    --gradient-primary: linear-gradient(90deg, var(--primary-purple) 0%, var(--primary-blue) 100%);
    --gradient-accent: linear-gradient(145deg, var(--accent-teal), var(--accent-blue));
    
    --sidebar-bg: #ffffff;
    --sidebar-text: #212529;
    --sidebar-secondary: #6c757d;
    --sidebar-active: #e7f3ff;
    --sidebar-hover: #f8f9fa;
    --backdrop-bg: rgba(33, 37, 41, 0.5);
    --focus-ring: 0 0 0 3px rgba(91, 62, 144, 0.25);
    --border-subtle: #dee2e6;
    --border-enhanced: rgba(91, 62, 144, 0.3);
    --shadow-light: 0 2px 8px rgba(91, 62, 144, 0.1);
    --shadow-medium: 0 4px 12px rgba(91, 62, 144, 0.15);
    --shadow-heavy: 0 8px 24px rgba(91, 62, 144, 0.2);
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --radius-lg: 1rem;
    --floating-input-radius: 1.25rem; /* Reduced for more compact mobile look */
    --bottom-nav-height: 60px; /* Reduced from 88px for more chat space */
    --floating-input-gap: 12px; /* Reduced from 24px */
    --z-backdrop: 1040;
    --z-sidebar: 1042;
    --z-hamburger: 1043;
}

/* Modern Chat Interface Styling with ChatGPT UI */
:root {
    --toggle-size: 32px;
    --toggle-line: 3px;
    --toggle-color: #4F46E5;
    --toggle-transition: .2s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --sidebar-padding: 16px;
    --chat-text-size: 1rem;
    --chat-text-line-height: 1.45;
    --heading-size-ratio: 1.2;
    --lucky-number-size: 40px;
    --lucky-number-font: 18px;
    --placeholder-color: #6c757d;
    --initial-prompt-bg: rgba(99, 102, 241, 0.05);
      /* Enhanced lottery-themed Cosmo variables */
    --sidebar-bg: #ffffff;
    --sidebar-text: #212529;
    --sidebar-secondary: #6c757d;
    --sidebar-active: #e7f3ff;
    --sidebar-hover: #f8f9fa;
    --backdrop-bg: rgba(33, 37, 41, 0.5);
    --focus-ring: 0 0 0 3px rgba(91, 62, 144, 0.25);    --border-subtle: #dee2e6;
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --floating-input-radius: 1.5rem;
    --bottom-nav-height: 88px;
    --floating-input-gap: 24px;
    --z-backdrop: 10500;
    --z-sidebar: 10600;
    --z-hamburger: 10650;
}

/* Container styles for fluid layout */
.container-fluid {
    width: 100%;
    padding-right: 0;
    padding-left: 0;
    margin-right: auto;
    margin-left: auto;
}

/* ChatGPT-style container & sidebar/hamburger base styles */
.app-container {
    display: flex;
    height: 100vh;
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    transition: transform var(--toggle-transition);
}
.sidebar.collapsed {
    transform: translateX(-100%);
}

.hamburger {
    position: absolute;
    top: var(--sidebar-padding);
    left: var(--sidebar-padding);
    width: var(--toggle-size);
    height: var(--toggle-size);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
}
.hamburger span {
    display: block;
        padding: 20px 0;
    border-radius: 2px;
    transition: transform var(--toggle-transition), opacity var(--toggle-transition);
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* End ChatGPT-style base styles */

/* Enhanced Mobile Sidebar Backdrop */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--backdrop-bg);
    backdrop-filter: blur(4px);
    z-index: var(--z-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
    pointer-events: none;
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ChatGPT-like container structure */
.chatgpt-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 100vh; /* Full viewport height */
    width: 100%; /* Full width */
    background-color: transparent; /* Inherit body background pattern */
    overflow: visible; /* Allow independent scrolling for sidebar and main content */
    position: relative;
}

/* Enhanced Sidebar with Lottery-themed Cosmo Styling */
.chatgpt-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh; /* Fixed height for independent scrolling */
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    border-right: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-light);
    position: relative;
    z-index: var(--z-sidebar);
    transition: transform var(--transition-smooth);
    overflow: hidden; /* Prevent sidebar itself from scrolling, only sidebar-content scrolls */
}

.chat-header {
    padding: 20px 0;
    background: var(--gradient-primary);
    color: white;
    border-bottom: 3px solid #F7D046; /* Match navbar golden accent */
    box-shadow: var(--shadow-medium);
    position: relative;
    z-index: 10;
    
    /* Full-width layout with responsive constraints */
    width: 100%;
    max-width: none;
    margin: 0;
    
    /* Ensure edge-to-edge even within containers */
    margin-left: 0 !important;
    margin-right: 0 !important;
    
    /* Smooth transitions for interactive elements */
    transition: all var(--transition-smooth);
}
@media (min-width: 768px) {
    .chatgpt-sidebar {
        position: relative;
        transform: translateX(0);
        box-shadow: none;
    }
    
    .sidebar-backdrop {
        display: none;
    }
    
    .chat-container {
        margin-left: 0;
    }
}

/* Sidebar Bootstrap rows - no gutters */
.chatgpt-sidebar .row {
    margin-right: 0;
    margin-left: 0;
    width: 100%;
}

/* Hamburger row styling */
#hamburger-row {
    padding: var(--sidebar-padding) var(--sidebar-padding) 0 var(--sidebar-padding);
}

/* Enhanced Hamburger Menu with Lottery Theme */
.hamburger-container {
    position: fixed;
    top: var(--sidebar-padding);
    left: var(--sidebar-padding);
    z-index: var(--z-hamburger);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 62, 144, 0.1);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(8px);
    transition: all var(--transition-fast);    border: 1px solid rgba(91, 62, 144, 0.2);
}

.hamburger-container:hover {
    background: rgba(91, 62, 144, 0.15);
    transform: scale(1.05);
    border-color: rgba(91, 62, 144, 0.3);
}

/* ===== BOTTOM NAVIGATION BAR (Mobile Only) ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;                  /* ✅ Changed from left: 50% */
    right: 0;                 /* ✅ Added - stretches to right edge */
    transform: none;          /* ✅ Changed from translateX(-50%) */
    z-index: 1050;
    display: none;
    background: linear-gradient(160deg, rgba(26, 43, 99, 0.95) 0%, rgba(91, 62, 144, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-top: 3px solid #F7D046;
    box-shadow: 0 -6px 22px rgba(26, 43, 99, 0.35);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    width: 100%;              /* ✅ Changed from calc(100% - 2rem) */
    max-width: 100%;
    margin: 0;
    padding-left: 0;          /* ✅ Added - no left padding */
    padding-right: 0;         /* ✅ Added - no right padding */
    
    border-radius: 0;         /* ✅ Changed from 0.75rem - no rounded corners */
    border-left: none;        /* ✅ Changed from 2px solid - no side borders */
    border-right: none;       /* ✅ Changed from 2px solid - no side borders */
    min-height: var(--bottom-nav-height);
}

/* Show bottom nav only on mobile - OPTIMIZED for more chat space */
@media (max-width: 767.98px) {
    .bottom-nav {
        display: flex;
        justify-content: center;  /* Center the icons like top nav */
        align-items: center;
        padding: 4px 0; /* Reduced from 8px */
        padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
        width: 100%;          /* Ensure full width on mobile */
        left: 0;              /* Start at left edge */
        right: 0;             /* End at right edge */
        transform: none;      /* No centering offset */
        height: auto;
        min-height: var(--bottom-nav-height); /* Now 60px instead of 88px */
        gap: 12px;            /* Reduced gap between icons */
    }
    
    .chat-messages {
        /* OPTIMIZED: Use conservative padding equal to bottom nav + floating input + small spacing */
        padding-bottom: calc(var(--bottom-nav-height) + var(--floating-input-gap) + 16px + env(safe-area-inset-bottom, 0px)) !important; /* Reduced from 248px -> 16px extra */
    }
    
    #floating-chat-input {
        bottom: calc(var(--bottom-nav-height) + var(--floating-input-gap) + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Bottom Nav Item Container */
.bottom-nav-item {
    flex: 0 0 auto;       /* ✅ Don't grow or shrink, auto width */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    min-width: 60px;
    max-width: 100px;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Lottery Ball Button Styling */
.nav-ball-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    
    /* 3D lottery ball effect */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
               inset 0 -3px 8px rgba(0, 0, 0, 0.3),
               inset 0 3px 12px rgba(255, 255, 255, 0.4);
}

/* Purple ball for Menu */
.nav-ball-purple {
    background: radial-gradient(circle at 35% 35%, 
                               #9B59B6 0%, 
                               #7D3C98 60%, 
                               #5B2C6F 100%);
}

/* Blue ball for History */
.nav-ball-blue {
    background: radial-gradient(circle at 35% 35%, 
                               #3498DB 0%, 
                               #2874A6 60%, 
                               #1B4F72 100%);
}

/* Green ball for New Chat */
.nav-ball-green {
    background: radial-gradient(circle at 35% 35%, 
                               #27AE60 0%, 
                               #1E8449 60%, 
                               #145A32 100%);
}

/* Font Awesome icons inside balls */
.nav-ball-btn i {
    color: #ffffff;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Active/Press state */
.nav-ball-btn:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
               inset 0 -2px 6px rgba(0, 0, 0, 0.4),
               inset 0 2px 8px rgba(255, 255, 255, 0.3);
}

/* Hover state */
.nav-ball-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3),
               inset 0 -3px 8px rgba(0, 0, 0, 0.3),
               inset 0 3px 12px rgba(255, 255, 255, 0.5);
}

/* Active State - Golden glow for active nav item */
.bottom-nav-item.active .nav-ball-btn {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
               0 4px 16px rgba(255, 215, 0, 0.6),
               inset 0 -3px 8px rgba(0, 0, 0, 0.2),
               inset 0 3px 12px rgba(255, 255, 255, 0.6);
    border-color: #FFD700;
    transform: scale(1.05);
}

/* Active ball turns golden */
.bottom-nav-item.active .nav-ball-btn {
    background: radial-gradient(circle at 35% 35%, 
                               #FFD700 0%, 
                               #F7B500 60%, 
                               #E6A000 100%) !important;
    animation: navBallPulse 2s ease-in-out infinite;
}

@keyframes navBallPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                   0 4px 16px rgba(255, 215, 0, 0.6),
                   inset 0 -3px 8px rgba(0, 0, 0, 0.2),
                   inset 0 3px 12px rgba(255, 255, 255, 0.6);
    }
    50% {
        box-shadow: 0 0 28px rgba(255, 215, 0, 1),
                   0 6px 24px rgba(255, 215, 0, 0.8),
                   inset 0 -3px 8px rgba(0, 0, 0, 0.2),
                   inset 0 3px 12px rgba(255, 255, 255, 0.6);
    }
}

/* Nav Ball Number Text */
.nav-ball-number {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    font-weight: bold;
    fill: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Nav Ball Icon */
.nav-ball-icon {
    font-size: 10.5px;
    fill: #ffffff;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Nav Label */
.nav-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 2px;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.3px;
}

.bottom-nav-item.active .nav-label {
    color: #FFEA70; /* bright gold highlight for active item */
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 234, 112, 0.6), 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Nav Ball Bounce on Tap */
@keyframes navBallBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.15) rotate(5deg); }
    100% { transform: scale(1); }
}

.nav-ball-btn.tapped {
    animation: navBallBounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Accessibility: Focus States */
.nav-ball-btn:focus-visible {
    outline: 3px solid rgba(91, 62, 144, 0.5);
    outline-offset: 2px;
    border-radius: 50%;
}

/* Hide bottom nav on desktop */
@media (min-width: 768px) {
    .bottom-nav {
        display: none !important;
    }
}

/* ======================================================================
   Guest UX: show the bottom navigation bar but hide actionable buttons
   for unauthenticated users. Keeps the rail visible on mobile while
   removing interactive controls and visible labels.
   ====================================================================== */
.bottom-nav.guest-nav .nav-ball-btn,
.bottom-nav.guest-nav .nav-label {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

/* Legacy lottery ball toggle - hidden in favor of bottom nav */
.lottery-ball-toggle {
    display: none !important;
}

.lottery-ball-icon {
    transition: transform 0.3s ease;
}



/* Collapsed sidebar state */
.chatgpt-sidebar.collapsed {
    transform: translateX(-100%);
    margin-left: calc(-1 * var(--sidebar-width));
}

/* Sidebar header row with New Chat button */
#sidebar-header-row {
    margin-top: 10px;
}

/* Enhanced Sidebar Header with Light Lottery Theme */
.sidebar-header {
    padding: 24px var(--sidebar-padding) 16px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    background: linear-gradient(135deg, rgba(91, 62, 144, 0.08), rgba(26, 43, 99, 0.05));
}

/* Enhanced New Chat Button with Lottery Theme */
.new-chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #5B3E90, #1A2B63);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 4px rgba(91, 62, 144, 0.2);
}

.new-chat-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 62, 144, 0.3);
    background: linear-gradient(135deg, #4a3275, #152855);
}

.new-chat-button:active {
    transform: translateY(0);
}

.new-chat-button:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

/* Chat Controls Row - Search and Sort */
.chat-controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-controls-row .chat-search {
    flex: 1;
    min-width: 0;
}

.chat-controls-row .chat-search input {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.chat-controls-row .chat-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 62, 144, 0.15);
}

.chat-controls-row .chat-search input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Sort Dropdown Styles */
.chat-sort-dropdown {
    position: relative;
    flex-shrink: 0;
}

.sort-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sort-toggle-btn:hover {
    background: rgba(91, 62, 144, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.sort-toggle-btn:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

.sort-toggle-btn i {
    font-size: 0.9rem;
}

.sort-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 160px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
}

.sort-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sort-option:first-child {
    border-radius: var(--radius) var(--radius) 0 0;
}

.sort-option:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
}

.sort-option:hover {
    background: rgba(91, 62, 144, 0.08);
}

.sort-option.active {
    background: rgba(91, 62, 144, 0.12);
    color: var(--primary);
    font-weight: 500;
}

.sort-option.active i {
    color: var(--primary);
}

.sort-option i {
    width: 16px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Sidebar Content with Enhanced Scrolling for Light Theme */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--sidebar-padding);
    scrollbar-width: thin;
    scrollbar-color: rgba(91, 62, 144, 0.3) transparent;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(91, 62, 144, 0.3);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(91, 62, 144, 0.5);
}

/* Sidebar footer row */
#sidebar-footer-row {
    border-top: 1px solid var(--border-subtle);
}

/* Enhanced sidebar footer for light theme */
.sidebar-footer {
    padding: var(--sidebar-padding);
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
    background: rgba(91, 62, 144, 0.02);
}

/* All sidebar links consistent with new chat button */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.sidebar-link:hover {
    background-color: #f0f0f0;
    text-decoration: none;
    color: #333;
}

/* Chat container - expands to full width when sidebar collapses - MOVED TO CHAT-MESSAGES SECTION */

/* Desktop: Adjust main content when sidebar is open */
@media (min-width: 768px) {
    .chat-container {
        margin-left: var(--sidebar-width);
    }
    
    /* When sidebar is closed on desktop, full width */
    .chatgpt-sidebar:not(.active) ~ .chat-container {
        margin-left: 0;
    }
    
    /* Adjust chat header padding on desktop */
    .chat-header {
        padding: 20px 32px; /* Balanced horizontal padding on desktop */
    }
}

/* Mobile: Full width chat container */
@media (max-width: 767px) {
    .chat-container {
        margin-left: 0;
        width: 100%;
    }
    
    /* Keep hamburger space on mobile while adding right padding */
    .chat-header {
        padding: 15px 16px 15px 60px;
    }
}

/* Enhanced Chat Header Styling - Matches Design System */
.chat-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 20px 24px;
    background: var(--gradient-primary);
    color: white;
    border-bottom: 3px solid #F7D046; /* Match navbar golden accent */
    box-shadow: var(--shadow-medium);
    position: relative;
    z-index: 10;
    
    /* Full-width layout with responsive constraints */
    width: 100%;
    max-width: none;
    margin: 0;
    
    /* Ensure edge-to-edge even within containers */
    margin-left: 0 !important;
    margin-right: 0 !important;
    
    /* Smooth transitions for interactive elements */
    transition: all var(--transition-smooth);
    
    gap: 12px;
}

/* Chat header info section */
.chat-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 1 auto;
    min-width: 0; /* Allow text truncation */
    padding: 0 24px;
    align-self: center; /* Ensure vertical centering with nav buttons */
}

/* Chat Navigation Links Container */
.chat-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 12px;
    width: 100%;
}

@media (min-width: 992px) {
    .chat-nav-links {
        justify-content: center;
        width: auto;
    }
}

/* Profile Section - Far Right (Desktop) */
.profile-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: 8px;
}

/* Profile Status Display */
.profile-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-username {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 0.9rem;
}

.profile-username i {
    font-size: 1.1rem;
    color: #F7D046;
}

.profile-username strong {
    font-weight: 600;
}

/* Slim profile greeting variant - small avatar + "Hi, username" */
.profile-slim {
    display: inline-flex;
    align-items: center;
    gap: 10px; /* increase space between dot/avatar/text */
    color: white;
    font-size: 0.9rem;
}

/* Profile dropdown styling - override Bootstrap defaults for rounded appearance */
.profile-slim.dropdown-toggle {
    background: transparent;
    border: none;
    border-radius: 25px;
    padding: 6px 12px;
    transition: background-color 0.2s ease;
}

.profile-slim.dropdown-toggle:hover,
.profile-slim.dropdown-toggle:focus,
.profile-slim.dropdown-toggle:active,
.profile-slim.dropdown-toggle.show {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    box-shadow: none;
    outline: none;
}

/* Remove the dropdown caret arrow for cleaner look */
.profile-slim.dropdown-toggle::after {
    margin-left: 6px;
    vertical-align: middle;
}

/* Profile dropdown menu styling - rounded corners for menu items */
.dropdown .profile-slim + .dropdown-menu {
    border-radius: 12px;
    overflow: hidden;
    padding: 6px;
}

.dropdown .profile-slim + .dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    transition: background-color 0.15s ease;
}

.dropdown .profile-slim + .dropdown-menu .dropdown-item:hover,
.dropdown .profile-slim + .dropdown-menu .dropdown-item:focus,
.dropdown .profile-slim + .dropdown-menu .dropdown-item:active {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.profile-slim-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.16);
    position: relative; /* make z-index change work predictably */
    z-index: 2; /* ensure avatar appears above the status dot if spaced tightly */
}

/* Scoped rules for profile-slim to ensure dot/avatar spacing (higher specificity) */
.profile-slim .status-indicator {
    margin-right: 10px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.profile-slim .status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #6c757d;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: none; /* reduce overlapping glow */
}

.profile-slim .status-dot.status-online {
    background: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.45);
}

.profile-slim .profile-slim-avatar {
    margin-left: 0; /* remove accidental overlaps */
    margin-right: 0;
}

.profile-slim .profile-slim-text {
    color: #F7D046; /* make username text yellow */
    font-weight: 600;
}

.profile-slim .profile-slim-icon {
    color: #F7D046; /* yellow */
    font-size: 1.45rem; /* slightly larger than text */
    display: inline-block;
    margin-right: 4px;
    line-height: 1;
}

.profile-slim .profile-slim-text strong { color: #F7D046; }

/* Status Indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 6px; /* ensure spacing between dot and avatar */
    z-index: 1; /* keep dot visually behind the avatar */
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #6c757d;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: none; /* reduce overlapping glow */
}

.status-dot.status-online {
    background: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.45);
}

/* Slight spacing logic for narrow headers */
@media (max-width: 991px) {
    .profile-slim-avatar { width: 24px; height: 24px; }
    .status-dot { width: 8px; height: 8px; }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Individual Navigation Links */
.chat-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    justify-content: center;
}

.chat-nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #F7D046;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chat-nav-link:active {
    transform: translateY(0);
}

.chat-nav-link i {
    font-size: 0.9rem;
}

/* Chat Navigation Dropdown Styles */
.chat-nav-dropdown {
    position: relative;
    display: inline-flex;
}

.chat-nav-dropdown .chat-nav-link.dropdown-toggle {
    cursor: pointer;
    border: none;
}

.chat-nav-dropdown .chat-nav-link.dropdown-toggle::after {
    margin-left: 6px;
    vertical-align: middle;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.chat-nav-dropdown .dropdown-menu {
    background: linear-gradient(135deg, #3d4667 0%, #2d3452 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    min-width: 220px;
    padding: 8px 0;
    margin-top: 6px;
}

.chat-nav-dropdown .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.chat-nav-dropdown .dropdown-item:hover,
.chat-nav-dropdown .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #F7D046;
}

.chat-nav-dropdown .dropdown-item i {
    color: #F7D046;
    font-size: 0.85rem;
    width: 18px;
    text-align: center;
}

.chat-nav-dropdown .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.15);
    margin: 6px 12px;
}

/* Hide text on smaller screens, show icons only */
@media (max-width: 991px) {
    .chat-nav-link .nav-link-text {
        display: none;
    }
    
    .chat-nav-link {
        padding: 8px 10px;
        min-width: 36px;
        justify-content: center;
    }
    
    .chat-nav-dropdown .chat-nav-link.dropdown-toggle::after {
        display: none;
    }
    
    .chat-nav-links {
        gap: 4px;
        padding: 0 6px;
    }
    
    /* Hide desktop profile section on mobile - it's in the mobile menu */
    .profile-section {
        display: none !important;
    }
}

/* Mobile: Adjust header spacing but keep items on same row */
@media (max-width: 767px) {
    .chat-header {
        padding: 15px 16px 15px 60px;
    }
    
    .chat-header-info {
        padding: 0 8px;
        gap: 8px;
    }
    
    .chat-nav-links {
        justify-content: flex-end;
        padding: 0 8px;
    }
}

/* Chat header title and subtitle */
.chat-header-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0; /* Allow text truncation */
}

/* Enhanced Chat Actions */
.chat-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    padding: 0 24px;
    justify-content: center;
}

/* Enhanced Icon Buttons */
.icon-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition-smooth);
    backdrop-filter: blur(4px);
    
    /* Accessibility */
    position: relative;
    outline: none;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.icon-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.icon-button:focus {
    box-shadow: var(--focus-ring);
}

/* Tooltip for icon buttons */
.icon-button[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.icon-button[title]:hover::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    padding-bottom: 120px; /* This value should be >= the height of the input bar */
    overflow-y: auto;
    scroll-behavior: smooth; /* Smooth scrolling like ChatGPT, Claude, Gemini */
    background-color: #f8f9fa;
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(91, 62, 144, 0.05) 2%, transparent 0%), 
        radial-gradient(circle at 75px 75px, rgba(91, 62, 144, 0.07) 2%, transparent 0%);
    background-size: 100px 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Enhanced width constraints for standard chatbot layout */
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Ensure chat container centers content properly */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh; /* Full viewport height for independent scrolling */
    background-color: transparent; /* Inherit body background pattern */
    overflow-y: auto; /* Allow vertical scrolling independent of sidebar */
    overflow-x: hidden;
    transition: margin-left var(--transition-smooth);
    margin-left: 0;
    position: relative; /* Enable absolute positioning for child elements */
    /* Center content for better chatbot experience */
    align-items: center;
}

/* Chat modal styling */
.chat-modal {
    display: none;
    position: fixed;
    z-index: 10800; /* Ensure all modals appear on top of all other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.chat-modal-content {
    background-color: white;
    margin: 5vh auto;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.chat-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    border: none;
    background: transparent;
    padding: 4px; /* small hit target to support ring */
    border-radius: 50%; /* make focus ring circular instead of squared */
}

.chat-modal-close:hover {
    color: #333;
}

.chat-modal-close:focus,
.chat-modal-close:focus-visible {
    outline: none !important; /* remove default outline */
    box-shadow: none !important; /* override any global focus box-shadow */
}

/* Provide an accessible but non-square focus ring */
.chat-modal-close:focus-visible {
    box-shadow: 0 0 0 3px rgba(91, 62, 144, 0.15) !important;
    border-radius: 50% !important;
}

.settings-form {
    padding: 10px 0;
}

.form-group {
    margin-bottom: 16px;
}

.input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
}

/* ChatGPT-style Auto-growing Textarea */
.chat-form textarea {
    width: 100%;
    min-height: 52px;
    max-height: 200px;
    padding: 14px 16px;
    overflow-y: auto;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;

    .chat-actions {
        position: static;
        transform: none;
        justify-content: center;
        order: 2;
        padding: 0 15px;
    }
    scrollbar-width: thin;
    scrollbar-color: rgba(91, 62, 144, 0.3) transparent;
}

/* Enhanced textarea focus state */
.chat-form textarea:focus {
    outline: none;
    border-color: #5B3E90;
    box-shadow: 0 0 0 3px rgba(91, 62, 144, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

/* Custom scrollbar for textarea */
.chat-form textarea::-webkit-scrollbar {
    width: 4px;
}

.chat-form textarea::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 2px;
}

.chat-form textarea::-webkit-scrollbar-thumb {
    background: rgba(91, 62, 144, 0.3);
    border-radius: 2px;
}

.chat-form textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(91, 62, 144, 0.5);
}

/* Placeholder styling */
.chat-form textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Legacy input support (fallback) */
.chat-form input {
    width: 100%;
    min-height: 52px;
    max-height: 200px;
    padding: 14px 16px;
    padding-right: 80px;
    border-radius: 24px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    overflow-y: auto;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
    scrollbar-width: thin;
    scrollbar-color: rgba(91, 62, 144, 0.3) transparent;
}

.chat-form input:focus {
    outline: none;
    border-color: #5B3E90;
    box-shadow: 0 0 0 3px rgba(91, 62, 144, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.input-actions {
    position: absolute;
    right: 10px;
    top: 14px;
    display: flex;
    gap: 5px;
    align-items: center;
    height: 24px;
    transition: all 0.2s ease-in-out;
}

/* Icon buttons in input actions */
.input-actions .icon-button,
.input-actions button {
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    font-size: 12px;
}

.input-actions .icon-button:hover,
.input-actions button:hover {
    color: #5B3E90;
    background: rgba(91, 62, 144, 0.1);
}

/* Enhanced Chat History Item Styling for Light Lottery Theme */
.chat-history-item {
    padding: 12px 16px;
    border-radius: var(--radius);
    background-color: var(--sidebar-bg);
    margin-bottom: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 3px rgba(91, 62, 144, 0.08);
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border: 1px solid transparent;
    color: var(--sidebar-text);
}

.chat-history-item:hover {
    background-color: var(--sidebar-hover);
    box-shadow: 0 2px 6px rgba(91, 62, 144, 0.12);
    border-color: rgba(91, 62, 144, 0.1);
}

.chat-history-content {
    flex: 1;
    min-width: 0; /* Allow content to shrink */
}

.chat-history-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--sidebar-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-history-time {
    font-size: 0.75rem;
    color: var(--sidebar-secondary);
}

.chat-history-delete {
    background: none;
    border: none;
    color: var(--sidebar-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 14px;
    line-height: 1;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s, background-color 0.2s;
}

.chat-history-item:hover .chat-history-delete {
    opacity: 1;
}

.chat-history-delete:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.chat-history-delete:focus {
    outline: var(--focus-ring);
    outline-offset: 2px;
    opacity: 1;
}

/* Confirmation dialog for session deletion */
.delete-session-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.delete-session-modal.show {
    display: flex;
}

.delete-session-dialog {
    background: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delete-session-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.delete-session-message {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.delete-session-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.delete-session-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.delete-session-btn.cancel {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.delete-session-btn.cancel:hover {
    background-color: #e9ecef;
}

.delete-session-btn.confirm {
    background-color: #dc3545;
    color: white;
}

.delete-session-btn.confirm:hover {
    background-color: #c82333;
}

.delete-session-btn:focus {
    outline: 2px solid #4F46E5;
    outline-offset: 2px;
}

.empty-history {
    text-align: center;
    color: var(--sidebar-secondary);
    padding: 24px 16px;
    font-size: 0.875rem;
    font-style: italic;
}

/* Improved styling for the settings form */
.settings-form .form-group {
    margin-bottom: 1rem;
}

.settings-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.settings-form .form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.settings-form .form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #5B3E90;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(91, 62, 144, 0.25);
}

.settings-form .btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.settings-form .btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #5B3E90 0%, #1A2B63 100%);
    border-color: #5B3E90;
}

.settings-form .btn-primary:hover {
    background: linear-gradient(135deg, #4a3275 0%, #152855 100%);
    border-color: #4a3275;
}

/* Update message content styling to use the variable */
.message-content {
    word-break: break-word;
    font-size: var(--chat-text-size);
    line-height: var(--chat-text-line-height);
}

.message-content h1 {
    font-size: calc(var(--chat-text-size) * 1.8);
    margin: 0.8em 0 0.4em 0;
}

.message-content h2 {
    font-size: calc(var(--chat-text-size) * 1.5);
    margin: 0.7em 0 0.3em 0;
}

.message-content h3 {
    font-size: calc(var(--chat-text-size) * 1.2);
    margin: 0.6em 0 0.3em 0;
}

/* Text size controls for settings panel */
.text-size-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.text-size-btn {
    padding: 5px 10px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.text-size-btn.active {
    background: #6366F1;
    color: white;
    border-color: #4F46E5;
}

/* Keep existing styles below */
.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid white;
}

/* Enhanced Chat Header Typography */
.chat-header h3 {
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
    color: #F7D046; /* Golden accent color like navbar */
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    
    /* Text truncation for long titles */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.chat-subtitle {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.25px;
    
    /* Text truncation for long subtitles */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Online status indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2px;
    margin-left: 0.4rem;
    margin-right: 0.4rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981; /* Green for online */
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    animation: pulse-status 2s infinite;
}

.status-dot.offline {
    background: #6B7280; /* Gray for offline */
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.3);
    animation: none;
}

/* LottoMuse title styling */
#lottomuse-title {
    margin-left: 0.4rem;
}

@keyframes pulse-status {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1);
    }
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: fadeIn 0.3s ease-in-out;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    align-self: flex-end;
}

.message.assistant {
    align-self: flex-start;
}

.message.system {
    align-self: center;
    max-width: 90%;
    opacity: 0.8;
}

.message-content {
    padding: 12px 16px;
    padding-right: 40px; /* Extra padding on right for copy button */
    border-radius: 18px;
    position: relative;
    line-height: 1.5;
    word-break: break-word;
    min-height: 48px; /* Ensure enough height for the copy button */
}

.message.user .message-content {
    background-color: #6366F1;
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.assistant .message-content {
    background-color: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.system .message-content {
    background-color: #f0f0f0;
    color: #666;
    font-size: 0.9rem;
    border-radius: 10px;
    text-align: center;
}

.message.error .message-content {
    background-color: #fdd;
    color: #c00;
}

.lucky-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.lucky-number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9500 0%, #FF5E3A 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(255, 94, 58, 0.3);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lucky-number:nth-child(1) { animation-delay: 0.1s; }
.lucky-number:nth-child(2) { animation-delay: 0.2s; }
.lucky-number:nth-child(3) { animation-delay: 0.3s; }
.lucky-number:nth-child(4) { animation-delay: 0.4s; }
.lucky-number:nth-child(5) { animation-delay: 0.5s; }
.lucky-number:nth-child(6) { animation-delay: 0.6s; }

.typing-indicator {
    display: flex;
    padding: 10px 20px;
    align-items: center;
    margin-bottom: 5px;
    max-width: 50%;
}

.typing-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 8px;
    overflow: hidden;
}

.typing-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.typing-bubbles {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #aaa;
    border-radius: 50%;
    margin: 0 2px;
    animation: bubble 1.2s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bubble {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* ===== FLOATING CHAT INPUT STYLES ===== */

/* Base Container Styling */
#floating-chat-input {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 750px;
    z-index: 1051;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: var(--floating-input-radius);
    background-clip: padding-box;
    box-shadow: 0 8px 32px rgba(99,102,241,0.10);
    padding: 1rem;
    margin: 0 auto;
    overflow: visible;
    transition: all 0.35s cubic-bezier(.4,2,.6,1), box-shadow 0.2s;
    /* Fix: Ensure vertical stacking of form and suggestions */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Chat Suggestions */
.chat-suggestions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 0 12px 0;
    width: 100%;
}

.suggestion-btn {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 120px;
    padding: 10px 16px;
    border-radius: 20px;
    border: 2px solid #e0e0ff;
    background-color: #f5f5ff;
    color: #6366F1;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    /* ChatGPT-style smooth transitions */
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.15s ease,
                box-shadow 0.2s ease,
                opacity 0.2s ease;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Idle state (no text in input) - Browse mode */
.suggestion-btn.idle {
    opacity: 0.85;
    background-color: #f5f5ff;
    border-color: #e0e0ff;
}

/* Ready state (text in input) - Submit mode with visual emphasis */
.suggestion-btn.ready {
    opacity: 1;
    background-color: var(--primary-purple, #5B3E90);
    border-color: var(--primary-purple, #5B3E90);
    color: white;
    box-shadow: 0 2px 8px rgba(91, 62, 144, 0.3);
}

.suggestion-btn.ready:hover {
    background-color: #4a3275;
    border-color: #4a3275;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(91, 62, 144, 0.4);
}

.suggestion-btn:hover {
    background-color: #e0e0ff;
    transform: translateY(-1px);
}

.suggestion-btn:focus {
    outline: 2px solid #6366F1;
    outline-offset: 2px;
}

.suggestion-btn:focus-visible {
    outline: 3px solid var(--primary-purple, #5B3E90);
    outline-offset: 2px;
}

/* Processing/sending state */
.suggestion-btn.sending {
    opacity: 0.7;
    pointer-events: none;
    cursor: wait;
}

/* Disabled state (guest limit reached, etc.) */
.suggestion-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Chat Form Layout */
.chat-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
}

/* Input Wrapper */
.input-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Textarea Styling - ChatGPT-style focus animations */
.input-wrapper textarea {
    flex-grow: 1;
    resize: none;
    padding: 12px 18px;
    font-size: 16px;
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
    border: 2px solid #dcdfe6;
    border-radius: 22px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    color: #212529;
    font-family: inherit;
    /* ChatGPT-style smooth transitions for height, focus, and interactions */
    transition: height 0.1s ease-out,
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.15s ease;
}

.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-purple, #5B3E90);
    box-shadow: 0 0 0 4px rgba(91, 62, 144, 0.2);
    transform: scale(1.01);
}

/* Enhanced keyboard navigation focus */
.input-wrapper textarea:focus-visible {
    box-shadow: 0 0 0 4px rgba(91, 62, 144, 0.35);
}

/* Subtle animation when textarea is empty and not focused */
@keyframes textarea-subtle-pulse {
    0%, 100% { border-color: #dcdfe6; }
    50% { border-color: #c8c8e0; }
}

.input-wrapper textarea:placeholder-shown:not(:focus) {
    animation: textarea-subtle-pulse 3s ease-in-out infinite;
}

.input-wrapper textarea::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Custom scrollbar for textarea */
.input-wrapper textarea::-webkit-scrollbar {
    width: 4px;
}

.input-wrapper textarea::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 2px;
}

.input-wrapper textarea::-webkit-scrollbar-thumb {
    background: rgba(91, 62, 144, 0.3);
    border-radius: 2px;
}

.input-wrapper textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(91, 62, 144, 0.5);
}

/* Character Counter */
#char-counter {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: right;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

#char-counter.warning {
    color: #f39c12;
}

#char-counter.danger {
    color: #e74c3c;
}

/* Send Button */
.send-button {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: #2563eb;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.send-button:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.send-button:active {
    transform: scale(0.95);
}

.send-button:disabled {
    background-color: #dee2e6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.send-button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Disabled textarea styling for non-authenticated users */
.input-wrapper textarea:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
    border-color: #e0e0e0;
}

.input-wrapper textarea:disabled::placeholder {
    color: #adb5bd;
}

/* Tooltip wrapper for disabled input */
.input-wrapper[data-bs-toggle="tooltip"] {
    cursor: help;
}

/* Tooltip positioning fix for floating chat input */
#floating-chat-input .tooltip {
    position: absolute !important;
}

/* Custom themed tooltip styling - Purple theme for LottoMuse */
.tooltip {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tooltip-inner {
    max-width: 320px;
    padding: 12px 16px;
    background: var(--primary-purple, #5B3E90) !important;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(91, 62, 144, 0.3);
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #fff !important;
}

/* Premium feature tooltip - ensure full content displays */
.premium-feature-tooltip .tooltip-inner {
    max-width: 380px;
    white-space: normal;
    word-wrap: break-word;
    background: var(--primary-purple, #5B3E90) !important;
}

.premium-feature-tooltip {
    z-index: 10900 !important;
}

.tooltip-arrow::before {
    border-top-color: var(--primary-purple, #5B3E90) !important;
}

/* Ensure arrow on all sides matches purple theme */
.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: var(--primary-purple, #5B3E90) !important;
}

.bs-tooltip-bottom .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: var(--primary-purple, #5B3E90) !important;
}

.bs-tooltip-start .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
    border-left-color: var(--primary-purple, #5B3E90) !important;
}

.bs-tooltip-end .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
    border-right-color: var(--primary-purple, #5B3E90) !important;
}

/* Desktop Responsive Adjustments */
@media (min-width: 992px) {
    #floating-chat-input {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 4rem);
        max-width: 750px;
    }
}

/* Medium screen adjustments */
@media (max-width: 991.98px) {
    #floating-chat-input {
        left: 1rem;
        right: 1rem;
            padding: 20px 24px;
        transform: none;
        max-width: none;
    }
}

/* Mobile Responsive Design */
@media (max-width: 767.98px) {
    #floating-chat-input {
        position: fixed !important;
    bottom: calc(var(--bottom-nav-height) + var(--floating-input-gap) + env(safe-area-inset-bottom, 0px)) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 2rem) !important;
        max-width: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
        margin-bottom: 8px !important;
        border-radius: var(--floating-input-radius) !important;
        background: white !important;
        border: 2px solid #e0e0e0 !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    }
    
    
    /* Mobile Layout - Keep textarea and send button side-by-side */
    .chat-form {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        gap: 0.5rem !important;
    }
    
    .input-wrapper {
        width: 100% !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    #chat-message {
        width: 100% !important;
        max-width: 100% !important;
        resize: none !important;
        margin: 0 !important;
        padding: 0.875rem !important;
        border-radius: 0.75rem !important;
        font-size: 16px !important; /* Prevent iOS zoom */
        min-height: 52px !important;
        border: 2px solid #e0e0e0 !important;
    }

    #char-counter {
        display: none !important; /* Hidden on small/xs screens */
    }

    .send-button {
        flex-shrink: 0 !important;
        width: 48px !important;
        height: 48px !important;
        padding: 0 !important;
        font-size: 1rem !important;
        border-radius: 50% !important;
        margin: 0 !important;
        margin-bottom: 0.25rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }    .send-button i {
        font-size: 1.1rem !important;
    }
    
    /* Chat suggestions mobile layout - enforce three equal columns */
    .chat-suggestions {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0.5rem !important;
        margin-bottom: 0.75rem !important;
        padding: 0 0 0.75rem 0 !important;
        width: 100% !important;
    }
    
    .suggestion-btn {
        width: 100% !important;
        padding: 0.65rem 0.4rem !important;
        font-size: 0.8rem !important;
        border-radius: 0.75rem !important;
        min-height: 44px !important;
        white-space: normal !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
    }
}

/* Animation for showing/hiding */
#floating-chat-input.hidden-content {
    display: none !important;
}

/* Safe area support for devices with notches */
@supports (env(safe-area-inset-bottom)) {
    @media (max-width: 767.98px) {
        #floating-chat-input {
            padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
        }
    }
}

/* --- Full-Width Layout Enhancements --- */
.chatgpt-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Ensure chat content uses full width on larger screens */
@media (min-width: 992px) {
    .chat-container {
        max-width: none;
        width: 100%;
    }
    
    #chat-messages {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 24px;
    }
    
    #floating-chat-input.anchored {
        padding-left: calc((100vw - 1200px) / 2 + 24px);
        padding-right: calc((100vw - 1200px) / 2 + 24px);
    }
}

/* Improved mobile layout */
@media (max-width: 991px) {
    .chatgpt-container {
        height: 100vh;
        position: relative;
    }
    
    .chat-container {
        height: calc(100vh - 160px); /* Account for header */
        display: flex;
        flex-direction: column;
    }
    
    #chat-messages {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 120px; /* Space for fixed footer */
    }
}

/* Enhanced body padding for footer */
body {
    padding-bottom: 120px; /* Ensure content doesn't get hidden behind fixed footer */
}

@media (max-width: 768px) {
    body {
        padding-bottom: 100px;
    }
}

/* Mobile Responsive styles - Override for proper sidebar behavior */
@media (max-width: 767.98px) {
    .chatgpt-container {
        position: relative;
        height: 100vh;
        overflow: hidden;
    }
    
    .chatgpt-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 280px !important;
        height: 100vh !important;
        transform: translateX(-100%) !important;
        z-index: 10700 !important;
        border-right: none;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .chatgpt-sidebar.active {
        transform: translateX(0) !important;
    }
    
    .chat-container {
        width: 100% !important;
        height: 100vh !important;
        margin-left: 0 !important;
        position: relative;
    }
      .sidebar-backdrop {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 1040 !important;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        touch-action: none; /* Prevent scrolling behind backdrop */
    }
    
    .sidebar-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
}
@media (max-width: 576px) {
    .chatgpt-container {
        height: auto;
        min-height: 100vh;
        border-radius: 0;
    }
    .chatgpt-sidebar {
        height: 100vh !important;
        max-height: 100vh !important;
        min-height: 100vh !important;
    }
    .chat-container {
        min-height: 60vh;
        max-height: none;
        border-radius: 0;
        padding: 0;
    }
    .chat-messages {
        padding: 10px 4px;
        font-size: 0.98rem;
    }
    .message {
        max-width: 98%;
        font-size: 0.98rem;
    }
    .chat-form {
        gap: 6px;
        padding: 10px 4px;
    }    
 
    .input-wrapper {
        flex: 1 1 100%;
    }
    
    /* Mobile-optimized textarea */
    .chat-form textarea,
    .chat-form input {
        min-height: 48px;
        max-height: 150px;
        padding: 12px 14px;
        padding-right: 70px;
        font-size: 1rem;
        border-radius: 20px;
    }
    
    .send-button {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    .chat-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 8px;
    }
    .chat-suggestions {
        flex-wrap: wrap;
        gap: 4px;
        padding: 4px 0 8px 0;
    }
    .suggestion-btn {
        font-size: 0.95rem;
        padding: 6px 10px;
    }
    .lucky-numbers {
        gap: 4px;
        padding: 6px;
    }
    .lucky-number {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* Ensure chat area always visible and scrollable on mobile */
.chatgpt-container, .chat-container, #chat-container.chat-container {
    min-height: 100vh;
    height: auto;
    max-height: none;
}

/* Fix for chat-messages scroll on mobile */
.chat-messages {
    max-height: 60vh;
    min-height: 200px;
    overflow-y: auto;
}

/* Prevent sidebar from covering chat on mobile */
@media (max-width: 768px) {
    .chatgpt-sidebar.collapsed {
        display: none !important;
    }
}

/* Make modals full width on mobile */
@media (max-width: 576px) {
    .chat-modal-content, .modal-content {
        width: 98vw !important;
        max-width: 98vw !important;
        margin: 10px auto !important;
        padding: 10px 6px !important;
        max-height: 95vh !important;
        overflow-y: auto !important;
    }
}

/* Instructions modal enhancements with lottery theme */
#instructionsModal .modal-content {
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #5B3E90;
    box-shadow: 0 8px 32px rgba(91, 62, 144, 0.15);
}
#instructionsModal .modal-title {
    font-size: 1.35rem;
    gap: 8px;
}
#instructionsModal .instructions-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    text-align: left;
}
#instructionsModal ul {
    margin-bottom: 0;
}
#instructionsModal li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}
@media (max-width: 576px) {
    #instructionsModal .modal-content {
        width: 98vw !important;
        max-width: 98vw !important;
        padding: 10px 6px !important;
        max-height: 95vh !important;
        overflow-y: auto !important;
    }
}

#chat-settings-modal {
    z-index: 10700;
}

/* Enhanced Animation Performance and Hardware Acceleration */
.chatgpt-sidebar,
.sidebar-backdrop,
.hamburger-container {
    will-change: transform, opacity;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .chatgpt-sidebar,
    .sidebar-backdrop,
    .hamburger-container,
    .new-chat-button,
    .chat-history-item {
        transition: none !important;
    }
}

/* Enhanced focus management */
.chatgpt-sidebar:focus-within {
    outline: none;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 8px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 6px;
    outline: var(--focus-ring);
}

/* Enhanced sidebar footer */
.sidebar-footer {
    padding: var(--sidebar-padding);
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
    background: rgba(91, 62, 144, 0.02);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    opacity: 0.8;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    text-decoration: none;
    color: var(--sidebar-text);
    opacity: 1;
}

.sidebar-link:focus {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

.sidebar-link i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

/* Loading state for chat history */
.chat-history-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--sidebar-secondary);
    font-size: 0.875rem;
}

.chat-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--sidebar-secondary);
    font-size: 0.875rem;
    text-align: center;
    line-height: 1.5;
}

.chat-history-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Smooth scrolling for chat history */
.sidebar-content {
    scroll-behavior: smooth;
}

/* Mobile-specific enhancements */
@media (max-width: 767px) {
    /* Improve touch targets on mobile */
    .chat-history-item {
        min-height: 48px;
        padding: 16px 12px;
    }
    
    .chat-history-delete {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }
      .hamburger-container {
        width: 48px;
        height: 48px;
    }
    
    /* Prevent text selection on mobile when swiping */
    .chatgpt-sidebar {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .chat-history-title,
    .chat-history-time {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
}

/* Print styles - hide sidebar when printing */
@media print {
    .chatgpt-sidebar,
    .hamburger-container,
    .sidebar-backdrop {
        display: none !important;
    }
    
    .chat-container {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Chat History Search Input for Light Theme */
.chat-history-search {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: var(--sidebar-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 3px rgba(91, 62, 144, 0.05);
}

.chat-history-search::placeholder {
    color: var(--sidebar-secondary);
}

.chat-history-search:focus {
    outline: none;
    border-color: #5B3E90;
    background: var(--sidebar-bg);
    box-shadow: var(--focus-ring);
}

/* Visible state for performance optimizations */
.chatgpt-sidebar.visible {
    opacity: 1;
}

/* Chat History Group Styling */
.chat-history-group {
    margin-bottom: 24px;
}

.chat-history-group:last-child {
    margin-bottom: 0;
}

.chat-history-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sidebar-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    padding: 0 16px;
}

/* Session Elements */
.session-content {
    flex: 1;
    min-width: 0;
}

.session-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.session-time {
    font-size: 0.75rem;
    color: var(--sidebar-secondary);
}

.session-delete {
    background: none;
    border: none;
    color: var(--sidebar-secondary);
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.session-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.session-delete:focus {
    outline: none;
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.chat-history-item:hover .session-delete {
    opacity: 1;
}

.chat-history-item.active {
    background: rgba(91, 62, 144, 0.08);
    border-color: rgba(91, 62, 144, 0.2);
    box-shadow: 0 2px 8px rgba(91, 62, 144, 0.15);
}

.chat-history-item.active .session-title {
    color: #5B3E90;
    font-weight: 600;
}

/* Draft badge styling */
.draft-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    font-size: 10px;
    color: #6c757d; /* subtle gray */
    background: rgba(0,0,0,0.04);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
}
.chat-history-item.draft {
    opacity: 0.9;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 32px 16px;
}

.empty-state i {
    font-size: 2rem;
    color: var(--sidebar-secondary);
    margin-bottom: 12px;
    display: block;
}

.empty-state div {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sidebar-text);
    margin-bottom: 6px;
}

.empty-state small {
    font-size: 0.75rem;
    color: var(--sidebar-secondary);
    line-height: 1.4;
}

/* Search Results Styling */
.chat-history-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--sidebar-secondary);
}

.chat-history-empty i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.chat-history-empty div {
    font-size: 0.875rem;
    margin-top: 8px;
}

/* Enhanced Chat History Item Layout */
.chat-history-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 2px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    position: relative;
    gap: 12px;
}

/* Enhanced Lottery Ball in Chat Header */
.chat-header .lottery-ball {
    width: 56px;
    height: 56px;
    margin-right: 0; /* Remove default margin since we use gap */
    flex-shrink: 0;
    
    /* Enhanced visual effects */
    background: radial-gradient(circle at 35% 35%, 
                               #F7D046 0%, 
                               #E6C200 60%, 
                               #B8960A 100%);
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
               inset 0 -3px 8px rgba(0, 0, 0, 0.3),
               inset 0 3px 12px rgba(255, 255, 255, 0.4);
    
    /* Add subtle animation */
    animation: gentle-rotate 8s ease-in-out infinite;
}

.chat-header .lottery-ball .ball-number {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary-blue);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

@keyframes gentle-rotate {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

/* Responsive Chat Header Styles */
@media (max-width: 768px) {
    .chat-header {
        padding: 16px 16px 16px 60px;
    }
    
    .chat-header-info {
        gap: 12px;
        flex: 1;
        min-width: 200px;
        padding: 0 20px;
        justify-content: center;
    }
    
    .chat-header .lottery-ball {
        width: 48px;
        height: 48px;
    }
    
    .chat-header .lottery-ball .ball-number {
        font-size: 18px;
    }
    
    .chat-header h3 {
        font-size: 1.125rem;
        max-width: 180px;
    }
    
    .chat-subtitle {
        font-size: 0.8rem;
        max-width: 200px;
    }
    
    .chat-actions {
        gap: 8px;
        padding: 0 20px;
        justify-content: center;
        width: 100%;
    }
    
    .chat-nav-links {
        width: 100%;
        justify-content: center;
    }
    
    .icon-button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .chat-header {
        padding: 12px 12px 12px 56px;
    }
    
    .chat-header-info {
        gap: 8px;
        padding: 0 16px;
    }
    
    .chat-header .lottery-ball {
        width: 40px;
        height: 40px;
    }
    
    .chat-header .lottery-ball .ball-number {
        font-size: 16px;
    }
    
    .chat-header h3 {
        font-size: 1rem;
        max-width: 120px;
    }
    
    .chat-subtitle {
        font-size: 0.75rem;
        max-width: 140px;
    }
    
    .status-indicator {
        font-size: 0.7rem;
    }
    
    .chat-actions {
        gap: 6px;
    }
    
    .icon-button {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .chat-header {
        border-bottom-color: #F7D046;
    }
    
    .status-dot {
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4);
    }
}

/* --- Lottery Theme Top Navigation Bar --- */
.lottery-navbar {
    background: var(--gradient-primary) !important;
    border-bottom: 3px solid #F7D046 !important;
    box-shadow: var(--shadow-medium);
    padding: 0.5rem 1.5rem;
    z-index: 1050;
}
.lottery-navbar .navbar-brand {
    font-weight: 700;
    color: #F7D046 !important;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.08);
    transition: color var(--transition-fast);
}
.lottery-navbar .navbar-text {
    color: #F7D046;
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 500;
}
.lottery-navbar .nav-link {
    color: #fff !important;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.25rem;
    margin: 0 0.25rem;
    transition: background var(--transition-fast), color var(--transition-fast);
    position: relative;
}
.lottery-navbar .nav-link:hover,
.lottery-navbar .nav-link:focus {
    background: rgba(247, 208, 70, 0.12);
    color: #F7D046 !important;
    text-decoration: none;
}
.lottery-navbar .nav-link.active,
.lottery-navbar .nav-link[aria-current="page"] {
    background: #F7D046;
    color: #1A2B63 !important;
    font-weight: 700;
}
.lottery-navbar .navbar-toggler {
    border-color: rgba(255,255,255,0.15);
    background: rgba(91,62,144,0.08);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}
.lottery-navbar .navbar-toggler:hover {
    background: rgba(91,62,144,0.18);
}
.lottery-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,.7)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
@media (max-width: 767.98px) {
    .lottery-navbar .navbar-collapse {
        background: var(--gradient-primary);
        box-shadow: 0 4px 16px rgba(26,43,99,0.08);
        border-radius: 0 0 var(--radius) var(--radius);
        margin-top: 0.5rem;
    }
    .lottery-navbar .nav-link {
        margin: 0.25rem 0;
        padding: 0.75rem 1.25rem;
        text-align: left;
    }
}
/* --- End Lottery Theme Top Navigation Bar --- */

/* --- Lottery Theme Game Options --- */
.game-options-container {
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(91, 62, 144, 0.1);
    border: 1px solid rgba(91, 62, 144, 0.08);
}

.game-options-intro {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: #5B3E90;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(91, 62, 144, 0.1);
}

/* Lottery-Themed Game Selection Grid Layout */
.game-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(91, 62, 144, 0.03), rgba(26, 43, 99, 0.02));
    border-radius: 12px;
    border: 1px solid rgba(91, 62, 144, 0.1);
}

/* Individual Game Button Styling with Lottery Theme */
.game-buttons .game-option-btn {
    min-height: 80px;
    padding: 20px 16px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: #212529;
    font-weight: 500;
    text-align: center;
    box-shadow: 
        0 2px 8px rgba(91, 62, 144, 0.12),
        0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Lottery-themed gradient border on hover */
.game-buttons .game-option-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, #5B3E90, #F7D046, #1A2B63);
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Gold accent shimmer effect */
.game-buttons .game-option-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(247, 208, 70, 0.2), 
        transparent);
    transition: left 0.6s ease;
}

/* Hover state with lottery excitement */
.game-buttons .game-option-btn:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(91, 62, 144, 0.3);
    box-shadow: 
        0 8px 25px rgba(91, 62, 144, 0.25),
        0 4px 12px rgba(247, 208, 70, 0.15),
        0 0 0 1px rgba(91, 62, 144, 0.1);
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    color: #5B3E90;
}

.game-buttons .game-option-btn:hover::before {
    opacity: 1;
}

.game-buttons .game-option-btn:hover::after {
    left: 100%;
}

/* Active/pressed state */
.game-buttons .game-option-btn:active {
    transform: translateY(-1px) scale(1.01);
    transition: all 0.1s ease;
}

/* Focus state for accessibility */
.game-buttons .game-option-btn:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(91, 62, 144, 0.3),
        0 8px 25px rgba(91, 62, 144, 0.25),
        0 4px 12px rgba(247, 208, 70, 0.15);
}

/* Lottery ball accent for game buttons */
.game-buttons .game-option-btn .game-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5B3E90, #1A2B63);
    color: white;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(91, 62, 144, 0.3);
}

/* Premium styling for featured games */
.game-buttons .game-option-btn.featured {
    background: linear-gradient(145deg, 
        rgba(247, 208, 70, 0.1), 
        rgba(255, 255, 255, 0.95));
    border-color: rgba(247, 208, 70, 0.3);
}

.game-buttons .game-option-btn.featured:hover {
    background: linear-gradient(145deg, 
        rgba(247, 208, 70, 0.15), 
        rgba(255, 255, 255, 0.98));
    box-shadow: 
        0 8px 30px rgba(247, 208, 70, 0.3),
        0 4px 15px rgba(91, 62, 144, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }
    
    .game-buttons .game-option-btn {
        min-height: 60px;
        padding: 16px 12px;
    }
}

/* Hide parenthetical game matrix text visually while keeping accessible */
.game-matrix-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Enhanced .game-buttons styling with lottery theme */
.game-buttons .game-option-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.game-buttons .game-option-btn:hover {
    transform: translateY(-2px);
}

.game-buttons .game-option-btn:active {
    transform: translateY(0);
}

.game-buttons .game-option-btn .game-icon {
    transition: transform 0.3s ease;
}

.game-buttons .game-option-btn:hover .game-icon {
    transform: scale(1.1);
}

/* === DISCLAIMER MODAL STYLING === */
#disclaimerModal .modal-content {
    border: 2px solid #F7D046;
    box-shadow: 0 8px 32px rgba(91, 62, 144, 0.15);
    border-radius: 1rem;
    text-align: left;
}

#disclaimerModal .modal-header {
    background: linear-gradient(135deg, #ffc107, #f39c12) !important;
    border-bottom: 2px solid #F7D046;
    color: #212529 !important;
    border-radius: 1rem 1rem 0 0;
}

#disclaimerModal .modal-title {
    font-weight: 700;
    font-size: 1.25rem;
}

#disclaimerModal .modal-body {
    background: linear-gradient(135deg, rgba(247, 208, 70, 0.02), rgba(255, 255, 255, 1));
    padding: 2rem;
    line-height: 1.6;
    text-align: left;
}

#disclaimerModal .modal-body h6 {
    color: #5B3E90;
    font-weight: 700;
    border-bottom: 2px solid rgba(91, 62, 144, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

#disclaimerModal .alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
    border-color: #F7D046;
    color: #856404;
}

#disclaimerModal .alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    border-color: #dc3545;
    color: #721c24;
}

#disclaimerModal .alert-info {
    background: linear-gradient(135deg, rgba(91, 62, 144, 0.1), rgba(26, 43, 99, 0.05));
    border-color: #5B3E90;
    color: #1A2B63;
}

#disclaimerModal .modal-footer {
    background: rgba(91, 62, 144, 0.02);
    border-top: 2px solid rgba(91, 62, 144, 0.1);
    border-radius: 0 0 1rem 1rem;
}

#disclaimerModal .btn-primary {
    background: linear-gradient(135deg, #5B3E90, #1A2B63);
    border-color: #5B3E90;
    font-weight: 600;
    transition: all var(--transition-fast);
}

#disclaimerModal .btn-primary:hover {
    background: linear-gradient(135deg, #4a3275, #152855);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 62, 144, 0.3);
}

#disclaimerModal .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    font-weight: 600;
}

#disclaimerModal .btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
    transform: translateY(-1px);
}

/* Disclaimer button special styling */
#disclaimer-btn {
    background: rgba(247, 208, 70, 0.1) !important;
    border: 1px solid rgba(247, 208, 70, 0.3) !important;
    color: #F7D046 !important;
}

#disclaimer-btn:hover {
    background: rgba(247, 208, 70, 0.2) !important;
    border-color: rgba(247, 208, 70, 0.5) !important;
    color: #F7D046 !important;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px rgba(247, 208, 70, 0.4);
}

#disclaimer-btn i {
    animation: shield-pulse 2s infinite;
}

@keyframes shield-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Mobile responsive adjustments for disclaimer modal */
@media (max-width: 768px) {
    #disclaimerModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    #disclaimerModal .modal-body {
        padding: 1.5rem;
        font-size: 0.95rem;
    }
    
    #disclaimerModal .modal-title {
        font-size: 1.1rem;
    }
}

/* Print styles for disclaimer */
@media print {
    #disclaimerModal .modal-content {
        box-shadow: none;
        border: 2px solid #000;
    }
    
    #disclaimerModal .modal-footer {
        display: none;
    }
}

/* Guest user restriction styles */
.guest-disabled {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    border-color: #dee2e6 !important;
}

.guest-disabled::placeholder {
    color: #6c757d !important;
}

.guest-limited {
    position: relative;
    opacity: 0.8;
}

.guest-limited::after {
    content: "👤";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ffc107;
    color: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
}

.guest-tooltip {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.guest-limit-message {
    border: 2px solid #ffc107;
    background: linear-gradient(135deg, #fff9e6, #fffbf0);
    border-radius: 12px;
    margin: 16px 0;
}

.guest-limit-message .message-content {
    padding: 20px;
}

.system-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #856404;
    margin-bottom: 12px;
}

.guest-limit-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.guest-registration-modal {
    z-index: 10000;
}

.guest-registration-modal .chat-modal-content {
    max-width: 500px;
    text-align: center;
}

.guest-registration-modal ul {
    text-align: left;
    margin: 20px 0;
}

.guest-registration-modal .modal-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .guest-limit-actions,
    .guest-registration-modal .modal-actions {
        flex-direction: column;
    }
    
    .guest-tooltip {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Mobile container alignment fixes */
@media (max-width: 767.98px) {
    .chat-container {
        align-items: stretch;
        padding: 0;
    }

    .chat-container > .chat-header {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .chat-container > .chat-messages {
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (max-width: 575.98px) {
    .chat-container > .chat-header {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .chat-container > .chat-messages {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* ============================================
   Chat Message Overlay for Non-Authenticated Users
   Added: Dec 23, 2025
   Purpose: Visual overlay to block #chat-message input
   Updated: Dec 23, 2025 - Made fully transparent with no visible content
   ============================================ */

.chat-message-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: not-allowed;
    border-radius: 0.75rem; /* Match #chat-message radius */
    z-index: 10;
    box-sizing: border-box;
}

/* No hover effect - keep fully transparent */
.chat-message-overlay:hover {
    background: transparent;
}

/* Hide all overlay content - no lock icon or text */
.chat-message-overlay .overlay-content {
    display: none;
}

.chat-message-overlay .overlay-content i {
    display: none;
}

.chat-message-overlay .overlay-content span {
    display: none;
}

.chat-message-overlay:hover .overlay-content {
    opacity: 0;
}

/* Disabled textarea styling enhancement */
#chat-message:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.7;
}

