/* Chat Page Styles */

:root {
    --accent-color: #667eea;
    --accent-color-2: #764ba2;
}

body.light-mode {
    --bg-primary: #f7f7f8;
    --bg-secondary: #ffffff;
    --text-primary: #111111;
}

.chat-page-main {
    margin-top: 80px;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 80px);
    background: #000000;
    display: flex;
    flex-direction: column;
}

/* Chat Menu Toggle Button */
.chat-menu-toggle {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 999;
    background: rgba(42, 42, 42, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-menu-toggle:hover {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
    border-color: color-mix(in srgb, var(--accent-color) 40%, transparent);
    color: var(--accent-color);
}

/* Chat History Sidebar */
.chat-history-sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    width: 320px;
    height: calc(100vh - 80px);
    background: rgba(20, 20, 20, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.chat-history-sidebar.active {
    transform: translateX(0);
}

.chat-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-history-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chat-history-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.chat-history-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.chat-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.chat-history-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 2rem 1rem;
    font-size: 0.875rem;
}

.chat-history-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: rgba(42, 42, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-history-item:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.chat-history-item.active {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
}

.chat-history-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-history-item-preview {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.5rem;
}

.chat-history-item-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Sidebar Backdrop */
.chat-sidebar-backdrop {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.chat-sidebar-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* Scrollbar styling for history list */
.chat-history-list::-webkit-scrollbar {
    width: 6px;
}

.chat-history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chat-history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Upgrade Button - macOS Tahoe Glass Effect */
.upgrade-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(102, 126, 234, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.25);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 12px;
}

.upgrade-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
}

.upgrade-btn i {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 16px;
}

/* User Menu in Navigation */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-color) 30%, transparent);
    border-radius: 24px;
    padding: 8px 16px 8px 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.user-menu-btn:hover {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
    border-color: color-mix(in srgb, var(--accent-color) 40%, transparent);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(42, 42, 42, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 200px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.user-dropdown.active {
    display: flex;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.user-dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.user-dropdown-item svg {
    flex-shrink: 0;
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* Chat Section */
.chat-page-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 20px;
    background: #000000;
    position: relative;
}

/* Incognito Mode Notice */
.incognito-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
    padding-top: 8rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.incognito-notice.hidden {
    opacity: 0;
}

.incognito-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    text-align: center;
    max-width: 500px;
    line-height: 1.6;
    margin: 0;
}

.chat-page-container {
    width: 100%;
    max-width: 950px; /* Expanded for wider chat view */
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-page-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 2rem 200px 2rem; /* Large bottom padding for input bubble */
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Reduced gap */
    width: 100%;
    max-width: 950px; /* Expanded for wider chat view */
    margin-left: auto;
    margin-right: auto;
    min-height: 0; /* Allow flex child to shrink */
}

.chat-page-message {
    padding: 0.6rem 1.1rem; /* Reduced padding */
    border-radius: 16px; /* Reduced radius */
    max-width: 70%;
    animation: slideIn 0.3s ease;
    word-wrap: break-word;
    font-size: 0.9rem; /* Slightly smaller text */
}

/* Ensure message text always flows horizontally (guards against injected vertical styles) */
.chat-page-message,
.chat-page-message * {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
    white-space: normal;
    word-break: break-word;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Fade in animation for message content */
.chat-page-message.assistant h1,
.chat-page-message.assistant h2,
.chat-page-message.assistant h3,
.chat-page-message.assistant p,
.chat-page-message.assistant ul,
.chat-page-message.assistant ol {
    animation: fadeInUp 0.4s ease-out backwards;
}

.chat-page-message.assistant h1 { animation-delay: 0.05s; }
.chat-page-message.assistant p:nth-child(2) { animation-delay: 0.1s; }
.chat-page-message.assistant p:nth-child(3) { animation-delay: 0.15s; }
.chat-page-message.assistant ul { animation-delay: 0.1s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-page-message.user {
    align-self: flex-end;
    margin-left: auto;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}

/* User message with attached image */
.user-message-image {
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
}

.user-message-image img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    display: block;
    object-fit: cover;
}

.chat-page-message.assistant {
    align-self: flex-start;
    margin-right: auto;
    margin-top: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0;
    max-width: 100%;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Enhanced Typography for Assistant Messages */
.chat-page-message.assistant h1,
.chat-page-message.assistant h2,
.chat-page-message.assistant h3 {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    line-height: 1.3;
}

/* H1 - Main Title (Large, with separator) */
.chat-page-message.assistant h1 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.chat-page-message.assistant h1:first-child {
    margin-top: 0.5rem;
}

/* H2 - Section Headers (Medium, with subtle separator) */
.chat-page-message.assistant h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-page-message.assistant h2:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0.5rem;
}

/* H3 - Subsection Headers */
.chat-page-message.assistant h3 {
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Lists */
.chat-page-message.assistant ul,
.chat-page-message.assistant ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.chat-page-message.assistant li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.chat-page-message.assistant li strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

/* Phosphor Icons in chat messages (replacing emojis) */
.chat-page-message.assistant i.ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    vertical-align: -0.1em;
    margin: 0 0.15em;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0.9;
}

/* Icon colors based on context */
.chat-page-message.assistant i.ph-check-circle { color: #34C759; }
.chat-page-message.assistant i.ph-x-circle { color: #FF3B30; }
.chat-page-message.assistant i.ph-warning { color: #FF9500; }
.chat-page-message.assistant i.ph-info { color: #5AC8FA; }
.chat-page-message.assistant i.ph-lightbulb { color: #FFD60A; }
.chat-page-message.assistant i.ph-sparkle { color: #BF5AF2; }
.chat-page-message.assistant i.ph-fire { color: #FF6B35; }
.chat-page-message.assistant i.ph-star,
.chat-page-message.assistant i.ph-star-four { color: #FFD60A; }
.chat-page-message.assistant i.ph-heart { color: #FF2D55; }
.chat-page-message.assistant i.ph-sun { color: #FFD60A; }
.chat-page-message.assistant i.ph-map-pin { color: #FF3B30; }
.chat-page-message.assistant i.ph-rocket-launch { color: #5AC8FA; }

/* Tables */
.chat-page-message.assistant table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(30, 30, 35, 0.4);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-page-message.assistant thead {
    background: rgba(102, 126, 234, 0.15);
}

.chat-page-message.assistant th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    font-size: 0.9rem;
}

.chat-page-message.assistant td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
}

.chat-page-message.assistant tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.chat-page-message.assistant tbody tr:last-child td {
    border-bottom: none;
}

/* Code blocks */
/* Enhanced Code Blocks */
.chat-page-message.assistant pre {
    background: #1E1E1E; /* VS Code background color */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0;
    margin: 1rem 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    position: relative;
}

.chat-page-message.assistant pre.code-block-enhanced {
    padding-top: 0;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-block-language {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.75rem;
    color: rgba(102, 126, 234, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.code-block-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-block-copy:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    color: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.code-block-copy.copied {
    background: rgba(52, 199, 89, 0.2);
    border-color: rgba(52, 199, 89, 0.5);
    color: rgba(52, 199, 89, 1);
}

.code-block-copy i {
    font-size: 1rem;
}

.chat-page-message.assistant code {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
}

.chat-page-message.assistant pre code {
    background: transparent;
    padding: 16px;
    border: none;
    display: block;
    overflow-x: auto;
    color: #abb2bf !important; /* Base code color, will be overridden by hljs */
}

/* Allow highlight.js to override inherited colors */
.chat-page-message.assistant pre code *,
.chat-page-message.assistant pre code .hljs-keyword,
.chat-page-message.assistant pre code .hljs-string,
.chat-page-message.assistant pre code .hljs-number,
.chat-page-message.assistant pre code .hljs-comment,
.chat-page-message.assistant pre code .hljs-function,
.chat-page-message.assistant pre code .hljs-class,
.chat-page-message.assistant pre code .hljs-title,
.chat-page-message.assistant pre code .hljs-params,
.chat-page-message.assistant pre code .hljs-variable,
.chat-page-message.assistant pre code .hljs-tag,
.chat-page-message.assistant pre code .hljs-name,
.chat-page-message.assistant pre code .hljs-attr,
.chat-page-message.assistant pre code .hljs-built_in,
.chat-page-message.assistant pre code .hljs-selector-tag,
.chat-page-message.assistant pre code .hljs-selector-class {
    color: inherit !important;
    font-family: inherit;
}

/* Inline code */
.chat-page-message.assistant :not(pre) > code {
    background: rgba(102, 126, 234, 0.15);
    padding: 3px 8px;
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.88em;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* Blockquotes */
.chat-page-message.assistant blockquote {
    border-left: 3px solid rgba(102, 126, 234, 0.5);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 0 8px 8px 0;
}

/* Section separators */
.chat-page-message.assistant hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
}

/* Paragraphs */
.chat-page-message.assistant p {
    margin: 0.75rem 0;
}

.chat-page-message.assistant p:first-child {
    margin-top: 0;
}

.chat-page-message.assistant p:last-child {
    margin-bottom: 0;
}

/* Strong emphasis */
.chat-page-message.assistant strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

/* Links */
.chat-page-message.assistant a {
    color: rgba(102, 126, 234, 1);
    text-decoration: none;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
    transition: all 0.2s ease;
    position: relative;
}

.chat-page-message.assistant a:hover {
    color: rgba(132, 156, 255, 1);
    border-bottom-color: rgba(102, 126, 234, 0.8);
    background: rgba(102, 126, 234, 0.05);
    padding: 0 2px;
    border-radius: 3px;
}

/* Em (italic) */
.chat-page-message.assistant em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
}

/* Message actions */
.message-text { white-space: pre-wrap; }
.message-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.chat-page-message.assistant:hover .message-actions {
    opacity: 1;
}
.msg-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.75);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.msg-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.95);
    transform: translateY(-1px);
}
.msg-btn.active {
    border-color: color-mix(in srgb, var(--accent-color) 50%, transparent);
    color: var(--accent-color);
    background: rgba(102, 126, 234, 0.15);
}

/* ============================================
   IMAGE CARDS - Modern Grid Layout
   ============================================ */

.image-cards-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px !important;
    padding: 16px 0 !important;
    margin: 16px 0 !important;
    overflow-x: visible !important;
}

.image-card {
    flex: unset !important;
    width: 100% !important;
    cursor: pointer;
    border-radius: 12px !important;
    overflow: hidden;
    background: rgba(30, 30, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    animation: imageCardFadeIn 0.5s ease-out backwards;
}

.image-card:nth-child(1) { animation-delay: 0.1s; }
.image-card:nth-child(2) { animation-delay: 0.2s; }
.image-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes imageCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.image-card:hover {
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(102, 126, 234, 0.3);
}

.image-card:hover::before {
    opacity: 1;
}

.image-card img {
    width: 100%;
    height: 180px !important;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image-card:hover img {
    transform: scale(1.05);
}

.image-card > div:last-child {
    padding: 14px !important;
    background: rgba(20, 20, 25, 0.85) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    z-index: 2;
}

.image-card > div:last-child > div:first-child {
    font-weight: 600 !important;
    margin-bottom: 6px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 13px !important;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal !important;
}

.image-card > div:last-child > div:last-child {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-weight: 400;
}

/* Responsive image grid */
@media (max-width: 768px) {
    .image-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px !important;
        padding: 16px 0 !important;
    }

    .image-card img {
        height: 140px !important;
    }
}

@media (max-width: 480px) {
    .image-cards-container {
        grid-template-columns: 1fr;
        gap: 12px !important;
    }

    .image-card img {
        height: 200px !important;
    }
}

/* Loading skeleton for images */
.image-card.loading {
    background: linear-gradient(
        90deg,
        rgba(30, 30, 35, 0.6) 25%,
        rgba(40, 40, 45, 0.6) 50%,
        rgba(30, 30, 35, 0.6) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Archived Modal */
.archived-content { padding: 0.5rem 1rem; max-height: 70vh; overflow-y: auto; }
.archived-list { display: flex; flex-direction: column; gap: 2px; }
.archived-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}
.archived-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}
.archived-item-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    font-size: 0.9rem;
}
.archived-item-menu-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.archived-item:hover .archived-item-menu-btn {
    opacity: 1;
}
.archived-item-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}
.archived-item-menu-btn i {
    font-size: 18px;
}
.archived-item-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 140px;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
}
.archived-item-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}
.archived-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}
.archived-dropdown-item:first-child { border-radius: 8px 8px 0 0; }
.archived-dropdown-item:last-child { border-radius: 0 0 8px 8px; }
.archived-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}
.archived-dropdown-item.delete {
    color: #ff6b6b;
}
.archived-dropdown-item i {
    font-size: 16px;
    width: 18px;
}

/* History archive button */
.history-archive-btn { float: right; background: transparent; border:none; color: rgba(255,255,255,0.5); cursor: pointer; }
.history-archive-btn:hover { color: rgba(255,255,255,0.9); }

/* Editable settings item */
.settings-item-editable {
    cursor: pointer;
}
.settings-item-editable:hover {
    background: rgba(255, 255, 255, 0.05);
}
.settings-item-value-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-edit-icon {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.settings-item-editable:hover .settings-edit-icon {
    opacity: 1;
}

/* Phone Verification Modal - macOS Tahoe Style Glass */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-dialog {
    /* macOS Tahoe black glass effect */
    background: rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(80px) saturate(180%);
    backdrop-filter: blur(80px) saturate(180%);
    border-radius: 14px;
    border: 0.5px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 1px 0 rgba(255, 255, 255, 0.05) inset;
    max-width: 340px;
    width: 90%;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
    overflow: hidden;
}
.modal-overlay.active .modal-dialog {
    transform: scale(1) translateY(0);
}
/* Phone Verify Header - macOS Tahoe window chrome style */
.phone-verify-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    padding: 16px 48px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}
.phone-verify-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -0.01em;
}
/* Close button in header - macOS style */
.modal-close-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    z-index: 10;
}
.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
}
.modal-close-btn i {
    font-size: 16px;
    line-height: 1;
}
/* Phone Verify Content - Reduced transparency */
.phone-verify-content {
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}
.phone-verify-step h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.phone-verify-desc {
    margin: 0 0 20px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}
/* Section separators */
.phone-verify-step {
    padding: 0;
}
.phone-verify-step + .phone-verify-step:not(.hidden) {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 20px;
    padding-top: 20px;
}
/* Phone input group with country code */
.phone-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.country-code-wrapper {
    flex-shrink: 0;
}
.country-code-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 14px 28px 14px 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: all 0.15s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.country-code-select:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
}
.country-code-select option {
    background: #1a1a1a;
    color: #fff;
}
.phone-input-wrapper {
    flex: 1;
}
.code-input-wrapper {
    margin-bottom: 20px;
}
.phone-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.15s ease;
}
.phone-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}
.code-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.15s ease;
    font-family: monospace;
}
.code-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}
/* Neutral glass buttons (macOS Tahoe style) */
.phone-verify-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: all 0.15s ease;
}
.phone-verify-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}
.phone-verify-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* Neutral resend link */
.phone-resend-btn {
    margin-top: 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 0.875rem;
    transition: color 0.15s ease;
}
.phone-resend-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}
.phone-verify-error {
    margin-top: 16px;
    color: #ff6b6b;
    font-size: 0.875rem;
}

.chat-page-input-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1rem;
    z-index: 10;
}

.chat-page-input-wrapper.centered {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

.chat-page-input-wrapper.bottom {
    top: auto;
    bottom: 0;
    transform: none;
}

.chat-page-welcome-text {
    margin-bottom: 2rem;
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-page-welcome-text.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.chat-page-welcome-text h2 {
    font-size: 1.5rem; /* Reduced from 2rem */
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
}

.chat-page-input-container {
    width: 100%;
    max-width: 700px; /* Reduced from 850px */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: rgba(42, 42, 42, 0.6);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 22px; /* Reduced from 28px */
    padding: 0.75rem 1rem; /* Reduced padding */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.chat-page-input-container:focus-within {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Incognito mode input styling */
.chat-page-container.incognito .chat-page-input-container {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    background: transparent;
}

.chat-page-container.incognito .chat-page-input-container:focus-within {
    border: 2px dashed rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

/* Chat Attachment Button & Menu */
.chat-attachment-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.chat-attachment-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.4rem; /* Reduced from 0.5rem */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.chat-attachment-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}

.chat-attachment-btn i {
    font-size: 20px; /* Reduced from 24px */
}

.chat-attachment-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: rgba(42, 42, 42, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    min-width: 240px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

/* Position menu at bottom when input is centered */
.chat-page-input-wrapper.centered .chat-attachment-menu {
    top: calc(100% + 8px);
    bottom: auto;
}

.chat-attachment-menu.active {
    display: flex;
}

.chat-attachment-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.chat-attachment-menu-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.chat-attachment-menu-item i {
    font-size: 20px;
    flex-shrink: 0;
}

/* Image Generation Row */
.image-gen-row {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
}

.image-gen-row.active {
    display: flex;
}

/* Image Generation Chip */
.image-gen-chip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 18px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.image-gen-chip .chip-icon {
    font-size: 18px;
    color: #667eea;
    transition: opacity 0.2s ease;
}

.image-gen-chip .chip-remove-icon {
    font-size: 18px;
    color: #667eea;
    opacity: 0;
    position: absolute;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.image-gen-chip:hover .chip-icon {
    opacity: 0;
}

.image-gen-chip:hover .chip-remove-icon {
    opacity: 1;
}

.image-gen-chip span {
    user-select: none;
}

/* Attached Images Row (for captured/uploaded images) */
.attached-images-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 4px;
}

.attached-image-token {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    cursor: default;
    transition: all 0.2s ease;
}

.attached-image-token:hover {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.5);
}

.attached-image-token .token-thumbnail {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.attached-image-token .token-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attached-image-token .token-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    padding: 0;
}

.attached-image-token:hover .token-remove {
    opacity: 1;
}

.attached-image-token .token-remove:hover {
    background: rgba(255, 59, 48, 0.3);
    color: #ff3b30;
}

/* Attachment Tokens (for Image, Document, etc.) */
.attachment-token {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.attachment-token:hover {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.5);
}

.attachment-token .token-icon {
    font-size: 18px;
    color: #667eea;
    transition: opacity 0.2s ease;
}

.attachment-token .token-remove-icon {
    font-size: 18px;
    color: #667eea;
    opacity: 0;
    position: absolute;
    left: 12px;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.attachment-token:hover .token-icon {
    opacity: 0;
}

.attachment-token:hover .token-remove-icon {
    opacity: 1;
}

.attachment-token .token-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    user-select: none;
}

/* Image Style Selector */
.image-style-selector {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.image-style-selector::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.image-style-option {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.image-style-option:hover {
    color: #667eea;
}

.image-style-option.active {
    color: #667eea;
}

.style-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    background: rgba(42, 42, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-style-option:hover .style-icon {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.image-style-option.active .style-icon {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

.style-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-page-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem; /* Reduced from 1.05rem */
    padding: 0.5rem 0.4rem; /* Increased vertical padding to prevent text clipping */
    resize: none;
    overflow-y: auto;
    min-height: 24px;
    max-height: 150px; /* Reduced from 200px */
    line-height: 1.5; /* Increased line-height for better readability */
    font-family: inherit;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chat-page-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chat-page-attach-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.4rem; /* Reduced from 0.5rem */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.chat-page-attach-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}

.chat-page-send-btn {
    background: var(--accent-color, #667eea);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem; /* Reduced padding */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 16px; /* Reduced from 18px */
}

.chat-page-send-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

#fileUpload {
    display: none;
}

/* Scrollbar styling */
.chat-page-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-page-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chat-page-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-page-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    /* Remove all page scroll */
    html, body {
        overflow: hidden !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Chat main fills entire viewport */
    .chat-page-main {
        margin-top: 0 !important;
        padding-top: 0 !important;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
    }

    /* Container fills parent */
    .chat-page-container {
        height: 100% !important;
        max-height: 100% !important;
        max-width: 100% !important;
    }

    /* Messages area takes available space */
    .chat-page-messages {
        padding: 0.75rem 1rem 180px 1rem !important;
        width: calc(100% - 80px) !important;
        margin-left: 80px !important;
        height: 100% !important;
    }

    .chat-page-welcome-text h2 {
        font-size: 1.5rem;
    }

    .chat-page-message {
        max-width: 90%;
        margin-bottom: 1.25rem !important;
    }

    .chat-page-message.assistant {
        padding: 0.75rem;
        font-size: 0.92rem;
    }

    .chat-page-message.assistant h1 {
        font-size: 1.2rem;
    }

    /* Full width input */
    .chat-page-input-container {
        max-width: 100% !important;
        padding: 0.8rem 1.1rem !important;
        border-radius: 24px !important;
    }

    /* Position input at bottom above taskbar */
    .chat-page-input-wrapper,
    .chat-page-input-wrapper.bottom {
        bottom: 30px !important;
        padding: 0 10px 0 90px !important;
    }

    /* Narrow left menu on mobile */
    .left-side-menu {
        width: 70px;
        padding-top: 0 !important;
    }

    .side-menu-header {
        padding: 10px 8px !important;
    }

    .chat-menu-toggle {
        top: 16px;
        left: 16px;
        padding: 10px;
    }

    .user-name {
        display: none;
    }

    .user-menu-btn {
        padding: 8px;
    }

    .chat-history-sidebar {
        width: 100%;
        max-width: 320px;
    }
}

/* Settings Modal (centered popup) */
.settings-page {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;                /* hidden by default */
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55); /* dim backdrop */
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.settings-page.active {
    display: flex;                /* show as modal overlay */
}

.settings-dialog {
    width: min(720px, calc(100% - 2rem));
    max-height: min(85vh, 900px);
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    overflow: hidden;             /* contain scrolling area */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
}

/* Settings Header */
.settings-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 10, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.settings-back-btn {
    background: transparent;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.settings-back-btn:hover {
    opacity: 0.7;
}

.settings-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.settings-upgrade-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.settings-upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.settings-upgrade-btn i {
    font-size: 1rem;
}

/* Settings Content */
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.settings-section {
    margin-top: 2rem;
}

.settings-section:first-child {
    margin-top: 1.5rem;
}

.settings-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.5rem 1.5rem;
}

.settings-section-footer {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0.75rem 1.5rem 0 1.5rem;
    line-height: 1.4;
}

/* Settings List (iOS grouped style) */
.settings-list {
    background: rgba(20, 20, 20, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item-nav {
    cursor: pointer;
}

.settings-item-nav:active {
    background: rgba(255, 255, 255, 0.05);
}

.settings-item-label {
    font-size: 1rem;
    color: var(--text-primary);
}

.settings-item-value {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.settings-item-nav svg {
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

/* Settings Item Value with Status Indicator */
.settings-item-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.status-running {
    background: #34c759;
    box-shadow: 0 0 6px rgba(52, 199, 89, 0.5);
}

.status-indicator.status-stopped {
    background: #ff3b30;
}

.status-indicator.status-starting {
    background: #ff9500;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator.status-unknown {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Auth Provider Badge */
.settings-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.settings-auth-badge.auth-google {
    background: rgba(66, 133, 244, 0.15);
    color: #4285F4;
}

.settings-auth-badge.auth-apple {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.settings-auth-badge .auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-auth-badge .auth-icon svg {
    width: 16px;
    height: 16px;
}

/* Archived Chats List */
.archived-chats-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.archived-chat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: background 0.15s ease;
}

.archived-chat-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.archived-chat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.archived-chat-title {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archived-chat-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.archived-chat-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.archived-chat-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.15s ease;
}

.archived-chat-actions button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
}

.archived-chat-actions .archived-chat-delete:hover {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinning {
    animation: spin 1s linear infinite;
}

/* Settings Action Buttons */
.settings-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--accent-color, #0a84ff);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.settings-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.settings-action-btn:active {
    background: rgba(255, 255, 255, 0.08);
}

.settings-action-btn svg {
    flex-shrink: 0;
}

.settings-action-btn-danger {
    color: #ff3b30;
}

/* Settings Info Box */
.settings-info-box {
    display: flex;
    gap: 12px;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin: 0.5rem 1rem;
}

.settings-info-box svg {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.settings-info-box p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
}

.settings-info-box kbd {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Settings Select (Picker style) */
.settings-select {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    padding: 0;
    cursor: pointer;
    outline: none;
    text-align: right;
}

.settings-select option {
    background: #1a1a1a;
    color: var(--text-primary);
}

/* Toggle Switch (iOS style) */
.settings-toggle {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    cursor: pointer;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15.5px;
    transition: all 0.3s ease;
}

.settings-toggle-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.settings-toggle input:checked + .settings-toggle-slider {
    background: #34C759;
}

.settings-toggle input:checked + .settings-toggle-slider:before {
    transform: translateX(20px);
}

/* Settings Accordion */
.settings-accordion {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0.25rem;
}

.settings-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.settings-accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.settings-accordion-header .settings-item-label {
    font-size: 1rem;
    color: white;
}

.settings-accordion-icon {
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.settings-accordion.active .settings-accordion-icon {
    transform: rotate(180deg);
}

.settings-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(0, 0, 0, 0.2);
}

.settings-accordion.active .settings-accordion-content {
    max-height: 1000px;
}

.settings-accordion-section {
    padding: 1rem 1rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-accordion-section:first-child {
    border-top: none;
}

.settings-accordion-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.settings-accordion-footer {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.5;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.settings-accordion-section .settings-item {
    padding: 0.75rem 0;
    border-bottom: none;
}

.settings-accordion-section .settings-action-btn {
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

/* MFA Setup Section (Accordion) */
.mfa-setup-section {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mfa-qr-container {
    text-align: center;
    margin-bottom: 1rem;
}

.mfa-qr-code {
    display: inline-block;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.mfa-qr-code img {
    display: block;
    width: 160px;
    height: 160px;
}

.mfa-instruction {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.mfa-manual-entry {
    margin-bottom: 1rem;
}

.mfa-manual-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.mfa-secret-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 8px;
}

.mfa-secret {
    flex: 1;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.1em;
    background: none;
}

.mfa-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mfa-copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.mfa-verify-section {
    margin-top: 1rem;
}

.mfa-verify-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.mfa-code-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.mfa-code-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-align: center;
}

.mfa-code-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.1);
}

.mfa-verify-btn {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.mfa-verify-btn:hover {
    opacity: 0.9;
}

.mfa-error {
    color: #FF3B30;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.mfa-success {
    color: #34C759;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Active Sessions (Expandable) */
.settings-item-expandable {
    cursor: pointer;
    transition: background 0.2s ease;
}

.settings-item-expandable:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sessions-expand-icon {
    transition: transform 0.2s ease;
}

.sessions-expand-icon.expanded {
    transform: rotate(180deg);
}

.sessions-list-container {
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.15);
}

.sessions-list {
    max-height: 300px;
    overflow-y: auto;
}

.sessions-loading,
.sessions-error,
.sessions-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.sessions-error {
    color: #FF6B6B;
}

.session-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease, opacity 0.2s ease, transform 0.2s ease;
}

.session-item:last-child {
    border-bottom: none;
}

.session-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.session-item.session-current {
    background: rgba(102, 126, 234, 0.08);
}

.session-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    flex-shrink: 0;
}

.session-icon i {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

.session-info {
    flex: 1;
    min-width: 0;
}

.session-device {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-details {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.15rem;
}

.session-ip::after {
    content: '•';
    margin-left: 0.5rem;
}

.session-badge {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border: 1px solid rgba(102, 126, 234, 0.4);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
}

.session-revoke-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: 6px;
    color: #FF6B6B;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.session-revoke-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: rgba(255, 59, 48, 0.4);
}

.session-revoke-btn i {
    font-size: 1rem;
}

/* Settings Action Buttons */
.settings-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.settings-action-btn-danger {
    color: #FF3B30;
    border-color: rgba(255, 59, 48, 0.2);
}

.settings-action-btn-danger:hover {
    background: rgba(255, 59, 48, 0.1);
}

/* Logout Button */
.settings-logout-btn {
    width: calc(100% - 3rem);
    margin: 2rem 1.5rem;
    padding: 0.875rem;
    background: transparent;
    border: none;
    color: #FF3B30;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.settings-logout-btn:active {
    background: rgba(255, 59, 48, 0.1);
}

/* MFA Options */
.mfa-options {
    margin-top: 0;
}

.mfa-options.hidden {
    display: none;
}

/* MFA Display (QR + key) */
.mfa-display {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mfa-display.hidden { display: none; }

.mfa-qr-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

#mfaQr canvas, #mfaQr img {
    background: #ffffff;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    width: 200px;
    height: 200px;
}

.mfa-key-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mfa-key-row code {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.95rem;
    padding: 8px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: var(--text-primary);
}

.mfa-copy-btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    cursor: pointer;
}

.mfa-copy-btn:hover { background: rgba(102,126,234,0.25); }

.mfa-hint {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
}

.mfa-verify-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mfa-code-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    outline: none;
}

.mfa-verify-btn {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(52, 199, 89, 0.4);
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
    cursor: pointer;
}

.mfa-verify-msg {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

/* Scrollbar for settings content */
.settings-content::-webkit-scrollbar {
    width: 6px;
}

.settings-content::-webkit-scrollbar-track {
    background: transparent;
}

.settings-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.settings-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Settings */
@media (max-width: 768px) {
    .settings-page {
        padding: 0; /* maximize space on small screens */
    }

    .settings-dialog {
        width: 100%;
        max-height: 100vh;
        border-radius: 0; /* full-bleed on mobile */
        border-left: none;
        border-right: none;
    }
    .settings-header {
        padding: 0.875rem 1rem;
    }

    .settings-section-title {
        margin-left: 1rem;
    }

    .settings-item {
        padding: 0.75rem 1rem;
    }

    .settings-logout-btn {
        width: calc(100% - 2rem);
        margin: 1.5rem 1rem;
    }
}

/* ============================================
   Appointment Cards
   ============================================ */

.appointment-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.appointment-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.appointment-card:hover {
    background: rgba(35, 35, 35, 0.7);
    border-color: rgba(103, 126, 234, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(103, 126, 234, 0.15);
}

.appointment-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, rgba(103, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.appointment-date {
    display: flex;
    align-items: center;
    gap: 12px;
}

.appointment-date .material-icons {
    font-size: 28px;
    color: var(--accent-color);
}

.date-line {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.time-line {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.appointment-type {
    background: rgba(103, 126, 234, 0.2);
    color: var(--accent-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: 1px solid rgba(103, 126, 234, 0.3);
}

.appointment-card-body {
    padding: 20px;
}

.patient-info {
    margin-bottom: 14px;
}

.patient-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.patient-name .material-icons {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
}

.patient-mrn {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    margin-left: 30px;
}

.appointment-summary {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid rgba(103, 126, 234, 0.4);
}

.appointment-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 10px;
}

.appointment-location .material-icons {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.4);
}

.appointment-card-footer {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
}

.view-chart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-color-2));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(103, 126, 234, 0.3);
}

.view-chart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(103, 126, 234, 0.4);
}

.view-chart-btn:active {
    transform: translateY(0);
}

.view-chart-btn .material-icons {
    font-size: 18px;
}

.chat-message.assistant .message-text {
    margin-bottom: 12px;
}

/* Responsive adjustments for appointment cards */
@media (max-width: 768px) {
    .appointment-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .appointment-type {
        align-self: flex-start;
    }
}

/* ============================================
   Research Cards
   ============================================ */

.research-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    padding-bottom: 20px; /* Extra space for scrolling */
}

.research-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.research-card:hover {
    background: rgba(35, 35, 35, 0.7);
    border-color: rgba(52, 211, 153, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(52, 211, 153, 0.15);
}

.research-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(16, 185, 129, 0.15));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.research-journal {
    font-size: 13px;
    font-weight: 700;
    color: rgba(52, 211, 153, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.research-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.research-card-body {
    padding: 20px;
}

.research-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0 0 14px 0;
}

.research-authors {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.research-authors .material-icons {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.4);
}

.research-card-footer {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-pubmed-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(52, 211, 153, 1), rgba(16, 185, 129, 1));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3);
    text-decoration: none;
}

.view-pubmed-btn:hover {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.9), rgba(16, 185, 129, 0.9));
    box-shadow: 0 6px 16px rgba(52, 211, 153, 0.4);
    transform: translateY(-2px);
}

.view-pubmed-btn .material-icons {
    font-size: 18px;
}

.research-pmid {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Thinking indicator styles (matching homepage chat) */
.thinking-status {
    display: flex;
    align-items: center;
    padding: 12px 16px !important;
}

.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.thinking-icon {
    flex-shrink: 0;
    color: #6366f1;
}

.thinking-text {
    font-weight: 400;
}

.typewriter-cursor {
    color: #6366f1;
    font-weight: 300;
    animation: blink 0.7s infinite;
    margin-left: 1px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ============================================
   Authenticated User UI
   ============================================ */

/* Hide header and footer for authenticated users */
body.authenticated header.authenticated-hidden,
body.authenticated footer.authenticated-hidden {
    display: none;
}

/* Hide old chat menu toggle for authenticated users */
body.authenticated .chat-menu-toggle {
    display: none;
}

/* Adjust main content when authenticated */
body.authenticated .chat-page-main {
    margin-top: 0;
    min-height: 100vh;
}

body.authenticated .chat-history-sidebar {
    top: 0;
    height: 100vh;
}

body.authenticated .chat-sidebar-backdrop {
    top: 0;
    height: 100vh;
}

/* Left Taskbar (Vertical sidebar - ALWAYS VISIBLE, hides when menu opens) */
.left-taskbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 56px;
    height: 100vh;
    background: rgba(18, 18, 18, 0.7);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1001;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
}

/* Hide taskbar when side menu is open */
.left-side-menu.open ~ .left-taskbar {
    transform: translateX(-100%);
}

/* Taskbar buttons - match side menu item styles */
.taskbar-menu-btn,
.taskbar-home-btn,
.taskbar-chat-btn,
.taskbar-search-btn,
.taskbar-dreamdev-btn,
.taskbar-agentos-btn,
.taskbar-workspace-btn,
.taskbar-media-btn,
.taskbar-settings-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 100%;
    border-radius: 8px;
}

.taskbar-menu-btn:hover,
.taskbar-home-btn:hover,
.taskbar-chat-btn:hover,
.taskbar-search-btn:hover,
.taskbar-dreamdev-btn:hover,
.taskbar-agentos-btn:hover,
.taskbar-workspace-btn:hover,
.taskbar-media-btn:hover,
.taskbar-settings-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1);
}

.taskbar-menu-btn i,
.taskbar-home-btn i,
.taskbar-chat-btn i,
.taskbar-search-btn i,
.taskbar-dreamdev-btn i,
.taskbar-agentos-btn i,
.taskbar-workspace-btn i,
.taskbar-media-btn i,
.taskbar-settings-btn i {
    font-size: 24px;
}

/* Taskbar spacer - pushes items to bottom */
.taskbar-spacer {
    flex: 1;
}

/* Taskbar Logo Container */
.taskbar-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
}

.taskbar-logo {
    width: 28px;
    height: 28px;
}

/* Left Side Menu (Replaces taskbar when open) */
.left-side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px; /* Reduced from 280px */
    height: 100vh;
    background: rgba(20, 20, 20, 0.5); /* Increased transparency, darker base */
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
    backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1002; /* Above taskbar */
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.left-side-menu.open {
    transform: translateX(0);
}

/* Side Menu Header */
.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.side-menu-logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.side-menu-logo {
    width: 32px;
    height: 32px;
}

/* Side Menu Close Button - match taskbar button styles */
.side-menu-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.side-menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1);
}

.side-menu-close-btn i {
    font-size: 20px;
}

/* Top Right Chat Menu Dropdown */
.chat-menu-dropdown-wrapper {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1003;
    display: none; /* Hidden by default */
}

body.authenticated .chat-menu-dropdown-wrapper {
    display: block;
}

.chat-menu-item {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.chat-menu-item:hover {
    color: var(--accent-color);
}

.chat-menu-item i {
    font-size: 24px;
}

.chat-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(42, 42, 42, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 180px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.chat-menu-dropdown.active {
    display: flex;
}

.chat-menu-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.chat-menu-dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.chat-menu-dropdown-item i {
    font-size: 18px;
    flex-shrink: 0;
}

/* Incognito Dropdown */
.incognito-dropdown {
    display: none !important;
}

.incognito-dropdown.active {
    display: flex !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .left-taskbar {
        width: 50px;
    }

    .left-taskbar.open {
        width: 100%;
        max-width: 280px;
    }

    .fixed-corner-logo img {
        height: 50px;
    }

    .sidebar-toggle-btn {
        top: 85px;
        left: 15px;
        padding: 8px;
    }

    .left-taskbar.open ~ .sidebar-toggle-btn {
        left: calc(100% - 60px);
        margin-left: 250px;
    }

    .toggle-icon {
        width: 20px;
        height: 20px;
    }
}

/* Chat Settings Modal (macOS Glass Style) */
.chat-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    pointer-events: none;
}

.chat-settings-modal.active {
    display: flex;
    pointer-events: auto;
}

.chat-settings-content {
    background: rgba(30, 30, 30, 0.85);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px; /* Reduced from 20px */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%; /* Reduced from 95% */
    max-width: 1000px; /* Reduced from 1200px */
    height: 80vh; /* Reduced from 85vh */
    max-height: 750px; /* Reduced from 900px */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-settings-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 16px; /* Reduced padding */
    background: var(--accent-color, #667eea);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-settings-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 20px; /* Reduced from 24px */
}

.chat-settings-close:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.chat-settings-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left Navigation Menu */
.chat-settings-nav {
    width: 160px; /* Reduced from 200px */
    background: rgba(20, 20, 20, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0; /* Reduced padding */
    overflow-y: auto;
}

.chat-settings-nav-item {
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 16px; /* Reduced padding */
    text-align: left;
    font-size: 0.9rem; /* Reduced from 1rem */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px; /* Reduced gap */
}

.chat-settings-nav-item i {
    font-size: 16px; /* Reduced from 18px */
}

.chat-settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.chat-settings-nav-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-color, #667eea);
    border-left-color: var(--accent-color, #667eea);
}

/* Right Content Pages */
.chat-settings-pages {
    flex: 1;
    overflow: visible;
    padding: 24px; /* Reduced from 32px */
    position: relative;
}

.chat-settings-page {
    display: none;
}

.chat-settings-page.active {
    display: block;
}

.chat-settings-page h2 {
    font-size: 1.3rem; /* Reduced from 1.5rem */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0; /* Reduced margin */
    padding-bottom: 10px; /* Reduced padding */
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.chat-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0; /* Reduced from 18px */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-settings-item:last-child {
    border-bottom: none;
}

.chat-settings-item label {
    font-size: 0.9rem; /* Reduced from 1rem */
    color: var(--text-primary);
    font-weight: 500;
}

/* Custom Dropdown */
.chat-settings-dropdown {
    position: relative;
    min-width: 180px;
    z-index: 10000;
}

.chat-settings-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.chat-settings-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.chat-settings-dropdown-btn i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.chat-settings-dropdown:hover .chat-settings-dropdown-btn i {
    transform: rotate(180deg);
}

.chat-settings-dropdown-options {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: rgba(40, 40, 40, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    min-width: 180px;
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 10001;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.chat-settings-dropdown:hover .chat-settings-dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-option {
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 16px;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.dropdown-option.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-color, #667eea);
    font-weight: 600;
}

.dropdown-current {
    font-weight: 500;
}

/* Settings Sections */
.chat-settings-section {
    margin-bottom: 36px;
}

.chat-settings-section:last-child {
    margin-bottom: 0;
}

.chat-settings-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form Fields */
.chat-settings-field {
    margin-bottom: 20px;
}

.chat-settings-field:last-child {
    margin-bottom: 0;
}

.chat-settings-field label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.chat-settings-input {
    width: 100%;
    background: rgba(42, 42, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.chat-settings-input:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.chat-settings-input:focus {
    border-color: var(--accent-color, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-settings-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-settings-textarea {
    width: 100%;
    background: rgba(42, 42, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.chat-settings-textarea:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.chat-settings-textarea:focus {
    border-color: var(--accent-color, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-settings-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* AI Personality Grid - Brutal Futuristic Style */
.chat-settings-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.personality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.personality-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.personality-loading i {
    font-size: 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.personality-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.personality-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.personality-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.personality-card:hover::before {
    opacity: 1;
}

.personality-card.active {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.6);
}

.personality-card.active::before {
    opacity: 1;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 1), transparent);
}

.personality-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.personality-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.personality-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    flex: 1;
}

.personality-check {
    color: rgba(102, 126, 234, 1);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.personality-card.active .personality-check {
    opacity: 1;
}

.personality-desc {
    font-size: 0.825rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Personality Loading State */
.personality-loading,
.personality-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

.personality-loading i,
.personality-error i {
    font-size: 1.5rem;
}

.personality-loading i {
    animation: spin 1s linear infinite;
}

.personality-error {
    color: rgba(255, 100, 100, 0.8);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Account Section */
.account-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-tier-row,
.account-renew-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.account-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.account-tier-badge {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.account-renew-date {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.account-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.account-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.account-btn i {
    font-size: 18px;
}

.account-btn-primary {
    background: var(--accent-color, #667eea);
    color: white;
}

.account-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.account-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.account-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.account-btn.hidden {
    display: none;
}

/* Upgrade Payment Modal */
.upgrade-payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.upgrade-payment-modal.active {
    display: flex;
}

.upgrade-payment-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.upgrade-payment-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.upgrade-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 24px;
    z-index: 10;
}

.upgrade-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.upgrade-payment-wrapper {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 40px;
    align-items: start;
}

/* Left Side: Plan Info */
.upgrade-plan-info {
    background: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.upgrade-plan-header {
    text-align: center;
    margin-bottom: 24px;
}

.upgrade-plan-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

/* Billing Period Selector */
.upgrade-billing-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.upgrade-billing-option {
    display: block;
    position: relative;
    cursor: pointer;
}

.upgrade-billing-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.upgrade-option-content {
    padding: 16px 20px;
    border: 2px solid #404040;
    border-radius: 12px;
    background: #2a2a2a;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upgrade-billing-option:hover .upgrade-option-content {
    border-color: #667eea;
}

.upgrade-billing-option input[type="radio"]:checked ~ .upgrade-option-content {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.upgrade-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.upgrade-option-title {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
}

.upgrade-save-badge {
    padding: 4px 10px;
    background: #667eea;
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.upgrade-option-price {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Order Details */
.upgrade-order-details {
    margin-bottom: 20px;
}

.upgrade-order-details h3 {
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 20px 0;
}

.upgrade-order-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
}

.upgrade-order-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.upgrade-order-item-period {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.upgrade-order-price {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
}

.upgrade-credit {
    color: #10b981;
}

.upgrade-order-divider {
    height: 1px;
    background: #404040;
    margin: 8px 0;
}

.upgrade-order-total {
    font-weight: 700;
    padding-top: 16px;
}

.upgrade-order-total .upgrade-order-price {
    font-size: 18px;
}

/* Renewal Notice */
.upgrade-renewal-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 12px;
}

.upgrade-renewal-notice svg {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

.upgrade-renewal-notice p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

/* Right Side: Payment Form */
.upgrade-payment-form-container {
    background: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.upgrade-payment-form-container h2 {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 6px 0;
}

.upgrade-payment-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 24px 0;
}

#upgrade-payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Digital Wallets */
.upgrade-digital-wallets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

/* Individual Wallet Button Container */
#upgrade-apple-pay-container,
#upgrade-google-pay-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Apple Pay Button - Official Styling */
#upgrade-apple-pay-button {
    width: 100%;
    height: 48px;
    background-color: #000000;
    background-image: -webkit-named-image(apple-pay-logo-white);
    background-size: 100% 60%;
    background-origin: content-box;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    border-radius: 12px;
    padding: 0;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#upgrade-apple-pay-button:hover {
    opacity: 0.85;
}

#upgrade-apple-pay-button:active {
    opacity: 0.7;
}

/* Google Pay Button - Match Apple Pay styling */
#upgrade-google-pay-button {
    width: 100%;
    height: 48px;
    background-color: #000000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#upgrade-google-pay-button button {
    border: none !important;
}

#upgrade-google-pay-button iframe {
    border: none !important;
}

/* Payment Divider */
.upgrade-payment-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 8px 0;
}

.upgrade-payment-divider::before,
.upgrade-payment-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #404040;
}

.upgrade-payment-divider span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Form Styling */
.upgrade-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.upgrade-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upgrade-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

.upgrade-form-group input,
.upgrade-form-group select {
    padding: 12px 16px;
    border: 1px solid #404040;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: #2a2a2a;
    color: #FFFFFF;
}

.upgrade-form-group input:focus,
.upgrade-form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.upgrade-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.upgrade-form-group select option {
    background: #2a2a2a;
    color: #FFFFFF;
}

/* Card Input with Logo */
.upgrade-card-input-container {
    position: relative;
    width: 100%;
}

.upgrade-card-input-container input {
    width: 100%;
    padding-right: 56px !important;
}

.upgrade-card-type-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: auto;
    pointer-events: none;
}

/* Payment Terms */
.upgrade-payment-terms {
    padding: 0;
    background: transparent;
    border: none;
}

.upgrade-payment-terms p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* Payment Button */
.upgrade-payment-button {
    width: 100%;
    padding: 16px 32px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: inherit;
}

.upgrade-payment-button:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.upgrade-payment-button:active {
    transform: translateY(0);
}

.upgrade-payment-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.upgrade-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.upgrade-payment-status {
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.upgrade-payment-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.upgrade-payment-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.upgrade-payment-security {
    text-align: center;
    margin-top: 16px;
}

.upgrade-payment-security p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .upgrade-payment-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .upgrade-plan-info {
        position: static;
    }
}

/* Security Page Styles */
.security-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.security-item:last-child {
    border-bottom: none;
}

.security-item-border-top {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    margin-top: 20px;
}

.security-item:has(+ .security-item-border-top) {
    border-bottom: none;
}

.security-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.security-item-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.security-item-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    max-width: 500px;
}

.security-item-clickable {
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 20px;
    margin: 0 -20px;
    border-radius: 10px;
}

.security-item-clickable:hover {
    background: rgba(255, 255, 255, 0.03);
}

.security-item-action {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.security-item-action i {
    font-size: 20px;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 12px;
}

/* Security Toggle Switch */
.security-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 32px;
    cursor: pointer;
}

.security-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.security-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.security-toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.security-toggle input:checked + .security-toggle-slider {
    background-color: var(--accent-color, #667eea);
}

.security-toggle input:checked + .security-toggle-slider:before {
    transform: translateX(20px);
}

.security-toggle:hover .security-toggle-slider {
    opacity: 0.9;
}

/* Security Buttons */
.security-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.security-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.security-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.security-btn-danger {
    background: transparent;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.security-btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* ============================================================================
   IMAGE MODAL CAROUSEL
   ============================================================================ */

.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.image-modal-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.image-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.image-modal-prev,
.image-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 60px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background-color 0.2s;
    user-select: none;
}

.image-modal-prev {
    left: 20px;
}

.image-modal-next {
    right: 20px;
}

.image-modal-prev:hover,
.image-modal-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.image-modal-footer {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.image-modal-counter {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
}

.image-source-link {
    color: #a78bfa;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 8px;
    transition: all 0.2s;
}

.image-source-link:hover {
    background-color: rgba(167, 139, 250, 0.1);
    border-color: #a78bfa;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .image-modal-prev,
    .image-modal-next {
        font-size: 40px;
        padding: 5px 15px;
    }

    .image-modal-prev {
        left: 10px;
    }

    .image-modal-next {
        right: 10px;
    }

    .image-modal-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
}

/* ====================================================================
   CHAT PAGE SPECIFIC - Reduced size markdown formatting overrides
   These override the index.css styles for smaller, more compact display
   ==================================================================== */

/* Target both .chat-message.assistant (from index.css) and .chat-page-message.assistant */
.chat-message.assistant p,
.chat-page-message.assistant p {
    margin-bottom: 1rem;
    line-height: 1.75;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.chat-message.assistant p:first-child,
.chat-page-message.assistant p:first-child {
    margin-top: 0;
}

.chat-message.assistant p:last-child,
.chat-page-message.assistant p:last-child {
    margin-bottom: 0;
}

/* Headings - reduced sizes */
.chat-message.assistant h1,
.chat-message.assistant h2,
.chat-message.assistant h3,
.chat-message.assistant h4,
.chat-message.assistant h5,
.chat-message.assistant h6,
.chat-page-message.assistant h1,
.chat-page-message.assistant h2,
.chat-page-message.assistant h3,
.chat-page-message.assistant h4,
.chat-page-message.assistant h5,
.chat-page-message.assistant h6 {
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
    line-height: 1.3;
}

.chat-message.assistant h1:first-child,
.chat-message.assistant h2:first-child,
.chat-message.assistant h3:first-child,
.chat-page-message.assistant h1:first-child,
.chat-page-message.assistant h2:first-child,
.chat-page-message.assistant h3:first-child {
    margin-top: 0;
}

.chat-message.assistant h1,
.chat-page-message.assistant h1 {
    font-size: 1.35rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    padding-bottom: 0.6rem;
}

.chat-message.assistant h2,
.chat-page-message.assistant h2 {
    font-size: 1.1rem; /* Reduced from 1.3rem */
}

.chat-message.assistant h3,
.chat-page-message.assistant h3 {
    font-size: 0.95rem; /* Reduced from 1.1rem */
}

.chat-message.assistant h4,
.chat-page-message.assistant h4 {
    font-size: 0.9rem; /* Reduced from 1rem */
}

.chat-message.assistant h5,
.chat-page-message.assistant h5 {
    font-size: 0.85rem;
}

.chat-message.assistant h6,
.chat-page-message.assistant h6 {
    font-size: 0.8rem;
}

/* Lists */
.chat-message.assistant ul,
.chat-message.assistant ol,
.chat-page-message.assistant ul,
.chat-page-message.assistant ol {
    margin-bottom: 1rem;
    padding-left: 1.75rem;
    font-size: 0.95rem;
}

.chat-message.assistant ul,
.chat-page-message.assistant ul {
    list-style-type: disc;
}

.chat-message.assistant ul ul,
.chat-page-message.assistant ul ul {
    list-style-type: circle;
    margin-top: 0.4rem;
}

.chat-message.assistant ol,
.chat-page-message.assistant ol {
    list-style-type: decimal;
}

.chat-message.assistant li,
.chat-page-message.assistant li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
}

.chat-message.assistant li::marker,
.chat-page-message.assistant li::marker {
    color: rgba(102, 126, 234, 0.8);
}

.chat-message.assistant li:last-child,
.chat-page-message.assistant li:last-child {
    margin-bottom: 0;
}

/* Code blocks */
.chat-message.assistant code,
.chat-page-message.assistant code {
    background: rgba(102, 126, 234, 0.15);
    color: rgba(167, 139, 250, 0.95);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.chat-message.assistant pre,
.chat-page-message.assistant pre {
    background: rgba(15, 15, 20, 0.8);
    padding: 1rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid rgba(102, 126, 234, 0.2);
    font-size: 0.88rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chat-message.assistant pre code,
.chat-page-message.assistant pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
}

/* Blockquotes */
.chat-message.assistant blockquote,
.chat-page-message.assistant blockquote {
    border-left: 4px solid rgba(102, 126, 234, 0.6);
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin: 1rem 0;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 0 8px 8px 0;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    font-size: 0.93rem;
}

/* Horizontal rules */
.chat-message.assistant hr,
.chat-page-message.assistant hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1rem 0; /* Reduced from 1.5rem */
}

/* Tables */
.chat-message.assistant table,
.chat-page-message.assistant table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0; /* Reduced from 1rem */
    font-size: 0.85rem; /* Reduced font size */
}

.chat-message.assistant th,
.chat-message.assistant td,
.chat-page-message.assistant th,
.chat-page-message.assistant td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0.75rem; /* Reduced from 0.75rem 1rem */
    text-align: left;
}

.chat-message.assistant th,
.chat-page-message.assistant th {
    background: rgba(102, 126, 234, 0.15);
    font-weight: 600;
}

/* Strong and emphasis */
.chat-message.assistant strong,
.chat-page-message.assistant strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.chat-message.assistant em,
.chat-page-message.assistant em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

/* Links */
.chat-message.assistant a,
.chat-page-message.assistant a {
    color: #a78bfa;
    text-decoration: none;
    border-bottom: 1px solid rgba(167, 139, 250, 0.4);
    transition: all 0.2s ease;
    padding-bottom: 2px;
}

.chat-message.assistant a:hover,
.chat-page-message.assistant a:hover {
    color: #c4b5fd;
    border-bottom-color: rgba(167, 139, 250, 0.8);
    background: rgba(167, 139, 250, 0.1)
}

/* Taskbar Search Button */
.taskbar-search-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.taskbar-search-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

/* Side Menu Content */
.side-menu-content {
    padding: 8px;
    flex-shrink: 0;
}

/* Placeholder for future menu item */
.side-menu-placeholder {
    height: 48px;
}

/* Side Menu Chat History */
.side-menu-history {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 8px;
    margin-top: 8px;
}

.side-menu-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 8px 8px;
    cursor: pointer;
}

.side-menu-history-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
}

.side-menu-history-title i {
    font-size: 14px;
}

.side-menu-history-toggle {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.side-menu-history-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.side-menu-history-toggle i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.side-menu-history.collapsed .side-menu-history-toggle i {
    transform: rotate(-180deg);
}

.side-menu-history.collapsed .side-menu-history-list {
    display: none;
}

.side-menu-history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-menu-history-list::-webkit-scrollbar {
    width: 4px;
}

.side-menu-history-list::-webkit-scrollbar-track {
    background: transparent;
}

.side-menu-history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.side-menu-history-item {
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-align: left;
    transition: all 0.15s ease;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.side-menu-history-item-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    cursor: pointer;
}

.side-menu-history-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.side-menu-history-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
}

/* Three-dot menu button */
.history-item-menu-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.side-menu-history-item:hover .history-item-menu-btn {
    opacity: 1;
}

.history-item-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.history-item-menu-btn i {
    font-size: 18px;
}

/* Dropdown menu */
.history-item-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 6px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.15s ease;
}

.history-item-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.history-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.history-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.history-dropdown-item i {
    font-size: 16px;
    opacity: 0.7;
}

.history-dropdown-item.delete {
    color: #e57373;
}

.history-dropdown-item.delete:hover {
    background: rgba(229, 115, 115, 0.15);
    color: #ef5350;
}

.side-menu-history-empty {
    padding: 16px 12px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    text-align: center;
    font-style: italic;
}

/* Inline rename input */
.history-item-rename-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    padding: 4px 8px;
    outline: none;
    min-width: 0;
}

.history-item-rename-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

/* Toast notification */
.toast-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #323232;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Side Menu Footer - pushes to bottom */
.side-menu-footer {
    padding: 8px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    font-size: 14px;
    text-align: left;
}

.side-menu-item i {
    font-size: 20px;
    flex-shrink: 0;
}

.side-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1);
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.search-modal.active {
    display: flex;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.search-modal-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    background: rgba(28, 28, 30, 0.95);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    backdrop-filter: blur(40px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: searchModalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes searchModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-input-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.search-input-container:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
}

.search-input-container .search-icon {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-clear-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.search-clear-btn.visible {
    display: flex;
}

.search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.search-clear-btn i {
    font-size: 18px;
}

.search-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.search-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.search-close-btn i {
    font-size: 24px;
}

.search-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

.search-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.search-empty-state p {
    font-size: 14px;
    margin: 0;
}

.search-result-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.search-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.search-result-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.search-result-preview {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-highlight {
    background: rgba(var(--accent-color-rgb), 0.3);
    color: rgba(255, 255, 255, 0.95);
    padding: 2px 4px;
    border-radius: 3px;
}

.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.search-no-results i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.search-no-results p {
    font-size: 14px;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .search-modal-header {
        padding: 16px;
    }

    .search-input-container {
        padding: 10px 14px;
    }

    .search-input {
        font-size: 15px;
    }
}

/* Taskbar Chat Button */
.taskbar-chat-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.taskbar-chat-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

/* Side Menu Dropdown Wrapper */
.side-menu-dropdown-wrapper {
    position: relative;
}

.side-menu-item .side-menu-caret {
    margin-left: auto;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.side-menu-item.active .side-menu-caret {
    transform: rotate(180deg);
}

.side-menu-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 12px;
}

.side-menu-dropdown.active {
    max-height: 200px;
}

.side-menu-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    font-size: 14px;
    text-align: left;
    margin-bottom: 4px;
}

.side-menu-dropdown-item i {
    font-size: 18px;
    flex-shrink: 0;
}

.side-menu-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}

/* ============================================
   WORKSPACE DROPDOWN STYLES
   ============================================ */

/* Workspace menu item - make div act like button */
.workspace-menu-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
}

.workspace-menu-item .side-menu-caret {
    margin-left: auto;
    flex-shrink: 0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.workspace-menu-item .side-menu-caret:hover {
    background: rgba(255, 255, 255, 0.1);
}

.workspace-menu-item #workspaceMenuLabel {
    flex: 1;
}

/* Workspace Dropdown in Side Menu */
.workspace-dropdown-projects {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}

.workspace-dropdown-empty {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    text-align: center;
}

.workspace-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
}

.workspace-dropdown-project {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    width: 100%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.workspace-dropdown-project:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}

.workspace-dropdown-project i {
    font-size: 16px;
    flex-shrink: 0;
}

/* Workspace Close Button (in side menu) */
.workspace-close-btn {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    font-size: 12px;
}

.workspace-close-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
}

#sideMenuWorkspaceBtn:hover .workspace-close-btn {
    display: flex;
}

/* When project is active, always show close button */
#sideMenuWorkspaceBtn.project-active .workspace-close-btn {
    display: flex;
}

#sideMenuWorkspaceBtn.project-active .side-menu-caret {
    display: none;
}

/* ============================================
   AGENTOS DROPDOWN STYLES
   ============================================ */

.agentos-menu-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
}

.agentos-menu-item .side-menu-caret {
    margin-left: auto;
    flex-shrink: 0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.agentos-menu-item .side-menu-caret:hover {
    background: rgba(255, 255, 255, 0.1);
}

.agentos-dropdown-agents,
.agentos-dropdown-drafts {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}

.agentos-dropdown-empty {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    text-align: center;
}

.agentos-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
}

.agentos-category-header {
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agentos-dropdown-agent {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    width: 100%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.agentos-dropdown-agent:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}

.agentos-dropdown-agent i {
    font-size: 16px;
    flex-shrink: 0;
}

/* Status Indicator Dots */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 4px currentColor;
}

.status-indicator.healthy {
    background: #10b981;  /* Green */
    color: #10b981;
}

.status-indicator.warning {
    background: #f59e0b;  /* Orange */
    color: #f59e0b;
}

.status-indicator.error {
    background: #ef4444;  /* Red */
    color: #ef4444;
}

.status-indicator.draft {
    background: rgba(255, 255, 255, 0.3);  /* Gray */
    color: rgba(255, 255, 255, 0.3);
}

.agentos-close-btn {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    font-size: 12px;
}

.agentos-close-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
}

/* Show close button on hover or when agent is active */
#sideMenuAgentOSBtn:hover .agentos-close-btn {
    display: flex;
}

#sideMenuAgentOSBtn.agent-active .agentos-close-btn {
    display: flex;
}

#sideMenuAgentOSBtn.agent-active .side-menu-caret {
    display: none;
}

/* ============================================
   CAMERA MODALS
   ============================================ */

/* Camera Permission Modal */
.camera-permission-modal,
.camera-capture-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.camera-permission-modal.active,
.camera-capture-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.camera-permission-content {
    position: relative;
    z-index: 10001;
    background: rgba(28, 28, 30, 0.98);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.camera-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    z-index: 10002;
}

.camera-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 1);
}

.camera-close-btn i {
    font-size: 20px;
}

.camera-permission-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-permission-icon i {
    font-size: 40px;
    color: #ffffff;
}

.camera-permission-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 12px 0;
}

.camera-permission-content p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0 0 32px 0;
}

.camera-permission-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.camera-permission-btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.camera-cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.camera-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 1);
}

.camera-allow-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.camera-allow-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Camera Capture Modal */
.camera-capture-content {
    position: relative;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 24px;
    overflow: hidden;
    max-width: 800px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

.camera-view-container {
    position: relative;
    width: 100%;
    background: #000000;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#cameraVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror the video horizontally */
}

.camera-controls {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.camera-capture-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 4px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-capture-btn:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.camera-capture-btn:active {
    transform: scale(0.95);
}

.camera-capture-btn i {
    font-size: 32px;
}

/* ============================================
   CAPTURED IMAGE PREVIEW MODAL
   ============================================ */
.captured-image-preview-modal {
    display: none;
    position: fixed;
    bottom: 170px; /* Position above the text and chat input */
    left: calc(50% - 250px + 1rem); /* Center 500px container, then add 1rem padding from left */
    width: auto;
    max-width: calc(500px - 2rem);
    z-index: 9999;
    animation: slideUp 0.3s ease;
}

@media (max-width: 540px) {
    .captured-image-preview-modal {
        left: 1rem;
        max-width: calc(100vw - 2rem);
    }
}

.captured-image-preview-modal.active {
    display: block;
}

.preview-modal-overlay {
    display: none; /* No overlay needed for inline preview */
}

.preview-modal-content {
    position: relative;
    z-index: 10001;
    display: inline-block;
    animation: scaleIn 0.3s ease;
}

.preview-modal-content img {
    display: block;
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    object-fit: contain;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.preview-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10002;
}

.preview-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.preview-close-btn:active {
    transform: scale(0.95);
}

.preview-close-btn i {
    font-size: 20px;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===============================================
   Suggestion Chips
   =============================================== */

/* Container for suggestion chips */
.chat-page-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    max-width: 700px;
    width: 100%;
    justify-content: center;
}

.chat-page-suggestions.hidden {
    display: none !important;
}

/* Individual suggestion chip - matches EdgeMed style */
.chat-page-suggestions .sugg-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}

.chat-page-suggestions .sugg-chip:hover {
    border-color: var(--accent-color, #667eea);
    background: rgba(255, 255, 255, 0.08);
}

/* When input is at bottom, suggestions appear above it */
.chat-page-input-wrapper.bottom .chat-page-suggestions {
    margin-top: 0;
    margin-bottom: 10px;
}

/* ========================================================================
   DREAMDEV SECTION (VS Code Code-Server)
   ======================================================================== */

.dreamdev-section {
    position: fixed;
    top: 0;
    left: 70px;
    right: 0;
    bottom: 0;
    background: #1e1e1e;
    z-index: 10;
}

.dreamdev-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#dreamdevFrame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* DreamDev Loading Overlay */
.dreamdev-loading {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e1e1e;
}

.dreamdev-loading-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dreamdev-loading.hidden {
    display: none;
}

/* ========================================================================
   AGENTOS SECTION
   ======================================================================== */

.agentos-section {
    position: fixed;
    top: 0;
    left: 70px;
    right: 0;
    bottom: 0;
    background: #1a1a1a;
    z-index: 10;
}

.agentos-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agentos-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

/* Home button in taskbar */
.taskbar-home-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.taskbar-home-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    transform: scale(1.05);
}

.taskbar-home-btn i {
    font-size: 24px;
}

/* ========================================
   Glass Modal - macOS Tahoe Style
   ======================================== */
.glass-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.glass-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.glass-modal {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 28px 32px;
    min-width: 320px;
    max-width: 400px;
    text-align: center;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.6),
        0 0 1px rgba(255, 255, 255, 0.1) inset;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
}

.glass-modal-backdrop.active .glass-modal {
    transform: scale(1) translateY(0);
}

.glass-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-modal-icon i {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.9);
}

.glass-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.glass-modal-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.glass-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.glass-modal-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 100px;
}

.glass-modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.glass-modal-btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-color-2));
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.glass-modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Media Gallery Modal */
.media-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.media-modal.active {
    display: flex;
}

.media-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.media-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    background: rgba(28, 28, 30, 0.95);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    backdrop-filter: blur(40px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: mediaModalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes mediaModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.media-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.media-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    gap: 10px;
}

.media-modal-header h2 i {
    font-size: 22px;
    color: var(--accent-color);
}

.media-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.media-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.media-modal-close i {
    font-size: 20px;
}

.media-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.media-grid-item {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.media-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.media-grid-item:hover img {
    transform: scale(1.05);
}

.media-grid-item.document {
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.media-grid-item.document i {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.6);
}

.media-grid-item.document span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.media-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.media-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.media-empty-state p {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.media-empty-state span {
    font-size: 14px;
}

/* Responsive media grid */
@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .media-modal-content {
        width: 95%;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Scattered Phrases - Typewriter Effect */
.scattered-phrases-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.scattered-phrases-container.hidden {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scattered-phrase {
    position: absolute;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.scattered-phrase i {
    font-size: 16px;
    opacity: 0.7;
}

.scattered-phrase.visible {
    opacity: 1;
}

.scattered-phrase.fade-out {
    opacity: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .scattered-phrase {
        font-size: 12px;
    }

    .scattered-phrase i {
        font-size: 14px;
    }
}

/* ============================================
   Email Change Modals
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: #1a1a1a;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal-dialog {
    transform: translateY(0);
}

.modal-dialog.modal-small {
    max-width: 360px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-close-btn i {
    font-size: 20px;
}

.modal-body {
    padding: 24px;
}

.modal-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0 0 20px 0;
    text-align: center;
}

.modal-description span {
    color: #fff;
    font-weight: 500;
}

.modal-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 8px;
}

.modal-input-group {
    margin-bottom: 16px;
}

.modal-input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.modal-input-group input:focus {
    border-color: var(--accent-color, #667eea);
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.modal-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.modal-error {
    color: #ff4757;
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.modal-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.modal-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-btn-primary {
    background: linear-gradient(135deg, var(--accent-color, #667eea) 0%, var(--accent-color-dark, #764ba2) 100%);
    color: #fff;
}

.modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-btn-full {
    width: 100%;
}

.modal-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.modal-divider span {
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.modal-link-btn {
    background: none;
    border: none;
    color: var(--accent-color, #667eea);
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    margin-top: 12px;
    transition: opacity 0.2s;
}

.modal-link-btn:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* OAuth Switch Buttons */
.oauth-switch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    margin-bottom: 12px;
}

.oauth-switch-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.oauth-switch-btn:last-of-type {
    margin-bottom: 0;
}

/* Email Change Section */
.email-change-section {
    margin-bottom: 0;
}

.email-change-section .modal-btn {
    margin-top: 8px;
}

/* Code Input for Email Verification Modal */
.code-inputs-modal {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 24px 0;
}

.code-digit-modal {
    width: 44px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.code-digit-modal:focus {
    border-color: var(--accent-color, #667eea);
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.code-digit-modal.filled {
    border-color: var(--accent-color, #667eea);
    background: rgba(102, 126, 234, 0.1);
}

.code-digit-modal.error {
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

/* Responsive Modal */
@media (max-width: 400px) {
    .modal-dialog {
        margin: 10px;
    }

    .code-inputs-modal {
        gap: 6px;
    }

    .code-digit-modal {
        width: 40px;
        height: 48px;
        font-size: 18px;
    }
}

/* ============================================
   UNAUTHENTICATED USER STYLES
   Hide premium features for non-authenticated users
   ============================================ */

/* Hide taskbar buttons (keep: new chat, menu, logo) */
body.unauthenticated .taskbar-search-btn,
body.unauthenticated .taskbar-dreamdev-btn,
body.unauthenticated .taskbar-agentos-btn,
body.unauthenticated .taskbar-workspace-btn,
body.unauthenticated .taskbar-media-btn,
body.unauthenticated .taskbar-settings-btn {
    display: none !important;
}

/* Hide side menu items (keep: new chat) */
body.unauthenticated #sideMenuSearchBtn,
body.unauthenticated #sideMenuDreamDevBtn,
body.unauthenticated #agentosDropdownWrapper,
body.unauthenticated #workspaceDropdownWrapper,
body.unauthenticated #sideMenuMediaBtn,
body.unauthenticated .side-menu-placeholder,
body.unauthenticated .side-menu-history,
body.unauthenticated #sideMenuSettingsBtn,
body.unauthenticated #sideMenuIncognitoBtn {
    display: none !important;
}

/* Hide attachment button (no image/doc generation) */
body.unauthenticated .chat-attachment-wrapper {
    display: none !important;
}

/* Show login/signup button for unauthenticated users */
body.unauthenticated .side-menu-auth-footer {
    display: flex !important;
}

/* Login/Signup button in sidebar footer (hidden by default) */
.side-menu-auth-footer {
    display: none;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.side-menu-auth-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.side-menu-auth-btn:hover {
    background: linear-gradient(135deg, #7c8ef5 0%, #8b5cb5 100%);
    border-color: rgba(255, 255, 255, 0.4);
}
