:root {
    /* Primary Color Palette */
    --purple: #8a2be2;
    --dark-green: #2e8b57;
    --grey: #6c757d;
    --blue: #4169e1;
    
    /* Secondary Colors */
    --purple-light: #ac7ff2;
    --purple-dark: #6a21b2;
    --green-light: #4eb082;
    --green-dark: #1e5b37;
    --grey-light: #adb5bd;
    --grey-dark: #343a40;
    --blue-light: #6b8ff2;
    --blue-dark: #2743b1;
    
    /* Functional Colors */
    --background-light: #f8f9fa;
    --background-dark: #1a1a2e;
    --text-dark: #202124;
    --text-light: #e9ecef;
    --border-light: #dee2e6;
    --border-dark: #3f3f5a;
    
    /* Accent Colors */
    --accent: var(--purple);
    --accent-secondary: var(--dark-green);
    --gradient: linear-gradient(135deg, var(--purple), var(--blue));
    --error: #ff4444;
    --success: #00c851;
    --warning: #ffbb33;
    --info: #33b5e5;
    
    /* Default Theme (Light) */
    --background: var(--background-light);
    --text: var(--text-dark);
    --border: var(--border-light);
    --card-bg: #ffffff;
    --sidebar-bg: #f0f0f5;
    --input-bg: #ffffff;
}

/* Dark Mode Color Scheme */
body.dark-mode {
    --background: var(--background-dark);
    --text: var(--text-light);
    --border: var(--border-dark);
    --card-bg: #232336;
    --sidebar-bg: #202033;
    --input-bg: #2d2d45;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

button:hover {
    background-color: rgba(138, 43, 226, 0.1);
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.3);
}

.material-icons {
    font-size: 1.2rem;
    vertical-align: middle;
}

/* Container Layout */
.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    background-color: var(--background);
    transition: margin-left 0.3s;
}

/* Header Styles */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.model-selector {
    position: relative;
}

.model-selector select {
    appearance: none;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.5rem 2rem 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 180px;
}

.model-selector select:hover {
    border-color: var(--accent);
}

.model-selector select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.2);
    outline: none;
}

.model-selector::after {
    content: "expand_more";
    font-family: 'Material Icons';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--grey);
}

/* Token Meter with Label Styles */
.token-meter-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.token-label {
    font-size: 0.8rem;
    color: var(--grey);
    margin-bottom: 0.25rem;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    position: relative;
    z-index: 200;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 auto;
    letter-spacing: -0.5px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.new-chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem;
    padding: 0.8rem;
    background-color: var(--accent);
    color: white;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    width: calc(100% - 2rem);
    box-shadow: 0 3px 10px rgba(138, 43, 226, 0.2);
}

.new-chat-button:hover {
    background-color: var(--purple-dark);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.new-chat-button .material-icons {
    margin-right: 0.5rem;
}

.recent-chats {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.recent-chats h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey);
    margin-bottom: 1rem;
}

.recent-chats ul {
    list-style: none;
    margin-bottom: 1rem;
}

.recent-chats li {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.recent-chats li:hover {
    background-color: rgba(138, 43, 226, 0.1);
}

.recent-chats li.active {
    background-color: rgba(138, 43, 226, 0.15);
    border-left: 3px solid var(--accent);
}

.recent-chats li .material-icons {
    margin-right: 0.75rem;
    color: var(--grey);
}

.chat-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.delete-chat-button {
    opacity: 0;
    transition: opacity 0.2s;
    padding: 0.2rem;
    color: var(--grey);
}

.recent-chats li:hover .delete-chat-button {
    opacity: 0.7;
}

.delete-chat-button:hover {
    color: var(--error);
    opacity: 1 !important;
}

.show-more {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    color: var(--accent);
    margin-top: 0.5rem;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.show-more:hover {
    background-color: rgba(138, 43, 226, 0.1);
}

.sidebar-nav {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.sidebar-nav h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey);
    margin-bottom: 1rem;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-nav li:hover {
    background-color: rgba(138, 43, 226, 0.1);
}

.sidebar-nav .material-icons {
    margin-right: 0.75rem;
    color: var(--accent);
}

.sidebar-nav .admin-link {
    color: var(--accent);
    display: flex;
    align-items: center;
    width: 100%;
}

.sidebar-nav .admin-link .material-icons {
    color: var(--success);
}

.user-info {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--border);
    gap: 0.75rem;
}

.user-info .material-icons {
    color: var(--grey);
}

.user-info span:nth-child(2) {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-link {
    color: var(--grey);
    transition: color 0.2s;
}

.logout-link:hover {
    color: var(--error);
}

/* Chat Box Styles */
.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-behavior: smooth;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(138, 43, 226, 0.03) 1%, transparent 8%),
        radial-gradient(circle at 75% 75%, rgba(65, 105, 225, 0.03) 1%, transparent 8%);
    background-size: 60px 60px;
    background-position: 0 0;
}

.user-message, .bot-message, .error-message {
    padding: 1.2rem;
    border-radius: 0.75rem;
    max-width: 90%;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
    animation: messageAppear 0.3s ease-out;
}

.user-message {
    align-self: flex-end;
    background: var(--gradient);
    color: white;
    margin-left: 10%;
    border-bottom-right-radius: 0.1rem;
}

.bot-message {
    align-self: flex-start;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    margin-right: 10%;
    border-bottom-left-radius: 0.1rem;
}

.error-message {
    align-self: center;
    background-color: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    margin: 1rem 10%;
}

.message-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.image-attachment {
    max-width: 300px;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.image-attachment img {
    width: 100%;
    height: auto;
    display: block;
}

.image-attachment:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.welcome-message {
    text-align: center;
    margin: auto;
    max-width: 800px;
    padding: 2rem;
    animation: fadeIn 0.6s ease-out;
}

.welcome-message h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    color: var(--accent);
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.welcome-message h2 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: var(--grey);
}

.welcome-message p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.suggestion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.suggestion-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.suggestion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.suggestion-card .material-icons {
    font-size: 2.2rem;
    color: var(--accent);
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.suggestion-card h3 {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.suggestion-card p {
    color: var(--grey);
    font-size: 0.9rem;
    margin: 0;
}

/* Chat Input Styles */
.chat-input {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border);
    position: relative;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    width: 100%;
    position: relative;
}

.input-icon {
    background: none;
    border: none;
    color: var(--grey);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    border-radius: 50%;
    transition: all 0.2s;
    cursor: pointer;
}

.input-icon:hover {
    color: var(--accent);
    background-color: rgba(138, 43, 226, 0.1);
}

#user-input {
    flex: 1;
    resize: none;
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 1rem 1.5rem;
    max-height: 150px;
    min-height: 3rem;
    background-color: var(--input-bg);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.2s;
    overflow: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#user-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
}

#send-button {
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(138, 43, 226, 0.3);
}

#send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(138, 43, 226, 0.4);
}

#send-button .material-icons {
    font-size: 1.3rem;
}

#voice-input-button.active {
    background-color: var(--accent);
    color: white;
}

.attachment-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.attachment-preview {
    position: relative;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 2px solid var(--accent);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.attachment-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-attachment {
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 0;
    padding: 0.25rem;
    font-size: 0.8rem;
    border-radius: 0 0 0 0.5rem;
    transition: all 0.2s;
}

.remove-attachment:hover {
    background-color: rgba(255, 0, 0, 0.7);
}

.input-features {
    font-size: 0.8rem;
    color: var(--grey);
    text-align: center;
    padding: 0 1.5rem;
}

.input-features kbd {
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    color: var(--text);
    display: inline-block;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    margin: 0 0.2rem;
}

.privacy-banner {
    padding: 0.75rem 1.5rem;
    background-color: rgba(46, 139, 87, 0.1);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--dark-green);
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    animation: slideDown 0.5s ease-out;
}

.privacy-banner .material-icons {
    color: var(--dark-green);
}

/* Code Snippet Styles */
.code-snippet {
    margin: 1rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #282c34;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.code-snippet-header {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: #21252b;
    color: #abb2bf;
    font-family: monospace;
}

.code-snippet pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
}

.code-snippet code {
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace;
    tab-size: 4;
}

.copy-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #abb2bf;
    transition: color 0.2s;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.copy-button:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Token Meter Styles */
.token-meter {
    width: 150px;
    height: 8px;
    background-color: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-right: 0.5rem;
    cursor: help;
    position: relative;
}

.token-meter-fill {
    height: 100%;
    width: 0;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--grey);
    align-self: center;
    font-style: italic;
    animation: pulse 1.5s infinite alternate;
}

.rotating {
    animation: rotate 1.5s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* User Profile Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    padding: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.user-dropdown-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.user-dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    width: 200px;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
    margin-top: 0.5rem;
    overflow: hidden;
    animation: dropdownAppear 0.3s ease-out;
}

.user-dropdown-content a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.2rem;
    color: var(--text);
    transition: all 0.2s;
    font-weight: 500;
}

.user-dropdown-content a:hover {
    background-color: rgba(138, 43, 226, 0.1);
    text-decoration: none;
    color: var(--accent);
}

.user-dropdown-content.show {
    display: block;
}

/* Image Overlay for Fullscreen */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.image-overlay-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    animation: zoomIn 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.image-overlay-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: 0.5rem;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.25);
}

.close-overlay {
    position: absolute;
    top: -2rem;
    right: -2rem;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.close-overlay:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Main Navigation Styles */
.main-nav {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
    text-decoration: none;
}

.register-btn {
    background-color: var(--accent);
    color: white !important;
    padding: 0.5rem 1.2rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 3px 8px rgba(138, 43, 226, 0.2);
}

.register-btn:hover {
    background-color: var(--purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
    text-decoration: none;
}

.theme-button {
    background: none;
    border: none;
    color: var(--grey);
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-button:hover {
    color: var(--accent);
    background-color: rgba(138, 43, 226, 0.1);
    transform: rotate(30deg);
}

/* Page Container Styles */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Chat Application Container */
.chat-application {
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Footer Styles */
.main-footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--grey);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--accent);
    transition: all 0.2s;
}

.footer-links a:hover {
    color: var(--purple-dark);
    transform: translateY(-1px);
}

/* Notification Styles */
.notification-area {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 350px;
}

.notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 0.75rem;
    background-color: var(--card-bg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease forwards;
    border-left: 4px solid var(--info);
}

.notification.success {
    border-left-color: var(--success);
}

.notification.error {
    border-left-color: var(--error);
}

.notification.warning {
    border-left-color: var(--warning);
}

.notification-message {
    margin-right: 1rem;
}

.notification-close {
    background: none;
    border: none;
    color: var(--grey);
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.2s;
    border-radius: 50%;
}

.notification-close:hover {
    color: var(--error);
    background-color: rgba(255, 68, 68, 0.1);
}

.notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* Sidebar Toggle for Mobile */
#sidebar-toggle {
    display: none;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 300;
    background: var(--gradient);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

/* Resizer for Sidebar */
.resizer {
    width: 5px;
    height: 100%;
    background-color: transparent;
    position: absolute;
    right: 0;
    top: 0;
    cursor: col-resize;
    z-index: 100;
    transition: background-color 0.2s;
}

.resizer:hover {
    background-color: rgba(138, 43, 226, 0.3);
}

.resizer:active {
    background-color: var(--accent);
}

/* Drag and Drop Styles */
.chat-box.drag-over {
    background-color: rgba(138, 43, 226, 0.05);
    outline: 2px dashed var(--accent);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes messageAppear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes dropdownAppear {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Markdown Styles */
.bot-message h1, .bot-message h2, .bot-message h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.bot-message p {
    margin-bottom: 1rem;
}

.bot-message ul, .bot-message ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.bot-message li {
    margin-bottom: 0.5rem;
}

.bot-message blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    margin-bottom: 1rem;
}

.bot-message hr {
    border: 0;
    height: 1px;
    background-color: var(--border);
    margin: 2rem 0;
}

.bot-message code {
    font-family: 'Fira Code', monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .model-selector select {
        min-width: 150px;
    }
    
    .token-meter {
        width: 100px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 1000;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    #sidebar-toggle {
        display: flex;
    }
    
    .main-content {
        padding-left: 0;
    }
    
    header {
        padding-left: 4rem;
    }
    
    .model-selector select {
        min-width: auto;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .token-meter-container {
        display: none;
    }
    
    .user-message, .bot-message {
        max-width: 95%;
    }
    
    .suggestion-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 576px) {
    .chat-input {
        padding: 0.75rem;
    }
    
    #user-input {
        padding: 0.75rem 1rem;
    }
    
    .chat-input button {
        padding: 0.5rem;
    }
    
    .suggestion-grid {
        grid-template-columns: 1fr;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .welcome-message h1 {
        font-size: 1.8rem;
    }
    
    .welcome-message h2 {
        font-size: 1.1rem;
    }
    
    .welcome-message p {
        font-size: 1rem;
    }
    
    .input-features {
        display: none;
    }
}

/* Authentication Pages Styles */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--purple-dark), var(--blue-dark));
    padding: 2rem 0;
}

.auth-container {
    display: flex;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-card {
    flex: 1;
    padding: 3rem;
    background-color: var(--card-bg);
    border-radius: 0 1rem 1rem 0;
    max-width: 500px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--grey);
    margin-bottom: 1rem;
}

/* Form Styles (for login/register pages) */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background-color: var(--input-bg);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.2);
    outline: none;
}

.form-submit {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.form-submit:hover {
    background-color: var(--purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.2);
}

.form-text {
    margin-top: 1rem;
    text-align: center;
    color: var(--grey);
}

.form-text a {
    color: var(--accent);
}

/* Auth Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .material-icons {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--grey);
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 3rem;
}

.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--grey);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.toggle-password:hover {
    color: var(--accent);
}

.password-strength-meter {
    height: 4px;
    background-color: var(--border);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.helper-text {
    color: var(--grey);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.terms-agreement {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.terms-agreement input[type="checkbox"] {
    margin-top: 0.25rem;
}

.terms-agreement a {
    color: var(--accent);
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--grey);
}

.auth-features {
    flex: 1;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.7), rgba(65, 105, 225, 0.7));
    padding: 3rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

.feature-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.15);
}

.feature-card .material-icons {
    font-size: 2.5rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.auth-page-footer {
    margin-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0.5rem;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #e74c3c;
    color: #e74c3c;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 4px solid #2ecc71;
    color: #2ecc71;
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    border-left: 4px solid #f39c12;
    color: #f39c12;
}

.alert .material-icons {
    font-size: 1.5rem;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.2);
}

.btn-full {
    width: 100%;
}

.btn-link {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive Auth Pages */
@media (max-width: 992px) {
    .auth-container {
        flex-direction: column;
        max-width: 500px;
    }
    
    .auth-card, .auth-features {
        width: 100%;
        max-width: 100%;
    }
    
    .auth-features {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 2rem;
    }
    
    .feature-card {
        flex: 1 1 calc(50% - 1rem);
        min-width: 200px;
    }
}

@media (max-width: 576px) {
    .auth-card, .auth-features {
        padding: 2rem;
    }
    
    .auth-features {
        flex-direction: column;
    }
    
    .feature-card {
        flex: 1 1 100%;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
}