/* ===========================
   NEXAI - Premium CSS Styling
   Professional Dark Theme with Glassmorphism
   =========================== */

:root {
    /* Colors */
    --primary-color: #ff1744;
    --primary-dark: #c41c3b;
    --primary-light: #ff5252;
    
    /* Background */
    --bg-primary: #0a0e27;
    --bg-secondary: #141829;
    --bg-tertiary: #1a1f3a;
    --bg-quaternary: #242a47;
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #b0b3c1;
    --text-muted: #6e7490;
    
    /* Borders & Effects */
    --border-color: rgba(255, 23, 68, 0.1);
    --glass-bg: rgba(20, 24, 41, 0.6);
    --glass-border: rgba(255, 23, 68, 0.15);
    
    /* Semantic */
    --success-color: #00ff88;
    --warning-color: #ffaa00;
    --danger-color: #ff4444;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
}

/* ===========================
   LAYOUT & CONTAINER
   =========================== */

.container {
    display: flex;
    height: 100vh;
    gap: 0;
}

/* ===========================
   SIDEBAR STYLING
   =========================== */

.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Sidebar Header */

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    height: 24px;
    padding: 0;
}

.sidebar-toggle span {
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    font-size: 24px;
}

/* New Chat Button */

.new-chat-btn {
    margin: 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    font-size: 14px;
    flex-shrink: 0;
}

.new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 23, 68, 0.3);
}

.new-chat-btn:active {
    transform: translateY(0);
}

/* Search Bar */

.search-wrapper {
    position: relative;
    padding: 0 15px 10px 15px;
    flex-shrink: 0;
}

.search-icon {
    position: absolute;
    left: 25px;
    top: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.chat-search {
    width: 100%;
    padding: 8px 12px 8px 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: var(--transition-fast);
}

.chat-search:focus {
    border-color: var(--primary-color);
    background: var(--bg-quaternary);
}

.chat-search::placeholder {
    color: var(--text-muted);
}

/* Chat List */

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-list::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-track {
    background: transparent;
}

.chat-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 15px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 32px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 13px;
}

/* Chat Item */

.chat-item {
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    overflow: hidden;
    group: true;
}

.chat-item:hover {
    background: rgba(255, 23, 68, 0.1);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.chat-item.active {
    background: rgba(255, 23, 68, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.chat-item-main {
    flex: 1;
    overflow: hidden;
    cursor: pointer;
}

.chat-item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-menu {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    opacity: 0;
    transition: var(--transition-fast);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-item:hover .chat-item-menu {
    opacity: 1;
}

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

/* Sidebar Footer */

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 23, 68, 0.05);
    flex-shrink: 0;
}

.creator-info {
    text-align: center;
}

.creator-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.creator-name {
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   CHAT CONTAINER
   =========================== */

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Header */

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.1), transparent);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    flex: 1;
}

.chat-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.chat-title i {
    font-size: 28px;
}

.header-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===========================
   MESSAGES AREA
   =========================== */

.messages-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

.messages-wrapper::-webkit-scrollbar {
    width: 8px;
}

.messages-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.messages-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Message */

.message {
    display: flex;
    gap: 12px;
    animation: messageSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

/* Message Avatar */

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.message.user .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.message.assistant .message-avatar {
    background: var(--bg-tertiary);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.message.user .message-avatar:hover {
    transform: scale(1.1);
}

/* Message Content */

.message-content {
    max-width: 600px;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.6;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.message.user .message-content {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 12px 4px 12px 12px;
}

.message.assistant .message-content {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px 12px 12px 12px;
}

/* Message Content Formatting */

.message-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.message.user .message-content strong {
    color: white;
}

.message-content em {
    color: var(--success-color);
    font-style: italic;
}

.message.user .message-content em {
    color: white;
}

.message-content a,
.message-content .message-link {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 2px solid var(--primary-color);
    transition: var(--transition-fast);
    cursor: pointer;
    font-weight: 500;
}

.message.user .message-content a,
.message.user .message-content .message-link {
    color: white;
    border-bottom-color: white;
}

.message-content a:hover,
.message-content .message-link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.message-content code {
    background: rgba(255, 23, 68, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: var(--success-color);
}

.message.user .message-content code {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Stop Button for Streaming */

.stop-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff1744, #c20030);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 23, 68, 0.3);
}

.stop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.5);
}

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

/* Loading Indicator */

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

.loading-indicator.hidden {
    display: none;
}

.loader {
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: dotBounce 1.4s infinite;
}

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

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

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

.loading-indicator span {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===========================
   INPUT AREA
   =========================== */

.input-area {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(to top, var(--bg-primary), rgba(255, 23, 68, 0.02));
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    gap: 8px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.2);
    background: rgba(20, 24, 41, 0.8);
}

/* Message Input */

.message-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    padding: 8px 12px;
    font-family: inherit;
}

.message-input::placeholder {
    color: var(--text-muted);
}

/* Input Buttons */

.input-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
}

.input-btn:hover {
    color: var(--primary-color);
    background: rgba(255, 23, 68, 0.1);
}

.input-btn:active {
    transform: scale(0.95);
}

/* Voice Button */

.voice-btn.listening {
    color: var(--primary-color);
    animation: voiceGlow 1s ease-in-out infinite;
}

@keyframes voiceGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 23, 68, 0);
    }
}

/* Send Button */

.send-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-weight: bold;
}

.send-btn:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.3);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Input Hint */

.input-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    letter-spacing: 0.5px;
}

/* File Input */

.file-input {
    display: none;
}

.hidden {
    display: none;
}

/* ===========================
   MODAL STYLING
   =========================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    animation: fadeIn 0.2s ease;
}

.modal.hidden {
    display: none;
}

.modal:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Action Groups */

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

.action-group label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-input {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: var(--transition-fast);
}

.action-input:focus {
    border-color: var(--primary-color);
    background: var(--bg-quaternary);
}

.action-btn {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:hover {
    background: rgba(255, 23, 68, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.action-btn.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.action-btn.primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
}

.action-btn.danger {
    color: var(--danger-color);
}

.action-btn.danger:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: var(--danger-color);
}

/* Memory */

.memory-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.memory-item {
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.memory-item.global-memory {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.08), rgba(255, 23, 68, 0.02));
    border: 1px solid rgba(255, 23, 68, 0.3);
}

.memory-section {
    margin-bottom: 15px;
}

.memory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.memory-key {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.memory-value {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

.memory-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.memory-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition-fast);
}

.memory-delete:hover {
    color: var(--danger-color);
}

.memory-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-size: 13px;
}

/* ===========================
   SIDEBAR OVERLAY
   =========================== */

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        width: 280px;
        transform: translateX(-100%);
        z-index: 101;
        transition: var(--transition);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
    }

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

    .sidebar-toggle {
        display: flex;
    }

    .chat-container {
        width: 100%;
    }

    .messages-wrapper {
        padding: 16px 12px;
        gap: 12px;
    }

    .message-content {
        max-width: 85vw;
    }

    .messages {
        max-width: 100%;
    }

    .input-area {
        padding: 16px 12px;
    }

    .input-wrapper {
        max-width: 100%;
    }

    .input-hint {
        display: none;
    }

    .header-subtitle {
        display: none;
    }

    .chat-title {
        font-size: 20px;
    }

    .modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }

    .logo-text {
        display: none;
    }

    .logo {
        justify-content: center;
    }

    .logo-icon {
        font-size: 28px;
    }

    .chat-title {
        font-size: 18px;
    }

    .chat-title i {
        font-size: 20px;
    }

    .message-content {
        padding: 10px 12px;
        font-size: 14px;
    }

    .input-wrapper {
        padding: 6px;
        gap: 6px;
    }

    .input-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .new-chat-btn span {
        display: none;
    }

    .new-chat-btn {
        margin: 10px;
        padding: 10px;
    }

    .search-wrapper {
        padding: 0 10px 8px 10px;
    }

    .sidebar-header {
        padding: 15px;
    }

    .sidebar-footer {
        padding: 12px;
    }
}

/* ===========================
   SCROLLBAR STYLING
   =========================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===========================
   ACCESSIBILITY & ANIMATIONS
   =========================== */

@prefers-reduced-motion: reduce {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Visible for Accessibility */

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===========================
   UTILITY CLASSES
   =========================== */

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in-left {
    animation: slideUp 0.3s ease-out;
}

/* ===========================
   NEW FEATURES: MEMORY & FILES
   =========================== */

/* Header Memory Button */

.header-memory-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
    white-space: nowrap;
    font-size: 0.9em;
}

.header-memory-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.3);
}

.header-memory-btn:active {
    transform: translateY(0);
}

.header-memory-btn i {
    font-size: 1.1em;
}

/* Memory List Styling */

.memory-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.memory-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    transition: var(--transition-fast);
}

.memory-item:hover {
    background: var(--bg-quaternary);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.2);
}

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

.memory-key {
    font-weight: 600;
    color: var(--primary-light);
    font-size: 0.95em;
    word-break: break-word;
    max-width: 80%;
}

.memory-value {
    color: var(--text-primary);
    font-size: 0.9em;
    line-height: 1.4;
    word-break: break-word;
    margin-bottom: 8px;
    padding: 8px;
    background: rgba(255, 23, 68, 0.05);
    border-radius: 4px;
}

.memory-date {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-top: 6px;
}

.memory-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.9em;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.memory-delete:hover {
    color: var(--danger-color);
    transform: scale(1.15);
}

.memory-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.memory-empty i {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.memory-info {
    text-align: center;
    color: var(--text-muted);
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

/* Notification Styles */

.notification {
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Print Styles */

@media print {
    .sidebar,
    .input-area,
    .sidebar-overlay {
        display: none;
    }

    .chat-container {
        width: 100%;
    }
}
