/* ============================================
   GeoSoft Chatbot - Enhanced Design System
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    --accent-color: #8b5cf6;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --warning-color: #f59e0b;

    /* Neutrals */
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --bg-dark: #1f2937;
    --bg-sidebar: #111827;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-light: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Sidebar Styles
   ============================================ */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--bg-sidebar) 0%, #0f172a 100%);
    color: var(--text-light);
    height: 100vh;
    overflow-y: auto;
    transition: margin-left var(--transition-slow), width var(--transition-slow);
    position: relative;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar.hidden {
    margin-left: -280px;
}

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

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

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
}

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

/* New Chat Button */
.new-chat-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #f8fafc 100%);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--font-size-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

.new-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

/* Chat Items */
.chat-item {
    cursor: pointer;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    margin: 0.25rem 0.5rem;
    transition: all var(--transition-fast);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: 1px solid transparent;
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.chat-item.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.chat-item-content {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-light);
}

.chat-item-actions {
    display: none;
    gap: 0.25rem;
}

.chat-item:hover .chat-item-actions {
    display: flex;
}

.chat-item-actions button {
    padding: 0.375rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: var(--font-size-xs);
}

.chat-item-actions button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-item-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    width: 100%;
    outline: none;
    transition: border-color var(--transition-fast);
}

.chat-item-input:focus {
    border-color: var(--primary-color);
}

/* User Profile Section */
.user-profile {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: white;
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--bg-primary);
    position: relative;
}

/* Toggle Sidebar Button */
.toggle-btn {
    position: fixed;
    left: 290px;
    top: 1rem;
    z-index: 1000;
    transition: left var(--transition-slow);
    padding: 0.625rem;
    background: var(--bg-dark);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.toggle-btn:hover {
    background: #374151;
}

.toggle-btn.sidebar-hidden {
    left: 1rem;
}

/* Header */
.header {
    border-bottom: 1px solid var(--border-color);
    padding: 0.875rem 1.5rem;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.header h1 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* Messages Area */
.messages-area {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-primary);
}

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

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

.messages-area::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.messages-area::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-icon {
    width: 4.5rem;
    height: 4.5rem;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #374151 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.welcome-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Suggestion Cards */
.suggestion-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: 48rem;
    width: 100%;
    margin-top: 1.5rem;
}

.suggestion-card {
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    text-align: left;
}

.suggestion-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.suggestion-card p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   Message Styles
   ============================================ */
.message-wrapper {
    position: relative;
    padding: 0;
    border: none;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-wrapper.user-message {
    background: transparent;
}

.message-wrapper.assistant-message {
    background: transparent;
}

.message-content-wrapper {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 1rem;
}

.message-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.message-avatar.user {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
}

.message-avatar.assistant {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #34d399 100%);
}

.message-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
    display: flex;
    gap: 0.25rem;
}

.message-wrapper:hover .message-actions {
    opacity: 1;
}

.message-action-btn {
    padding: 0.375rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--font-size-xs);
    transition: all var(--transition-fast);
}

.message-action-btn:hover {
    background: var(--bg-primary);
    border-color: var(--text-muted);
}

/* ============================================
   Feedback Buttons
   ============================================ */
.feedback-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.feedback-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.feedback-btn:hover {
    border-color: var(--text-muted);
    background: var(--bg-primary);
}

.feedback-btn.active-up {
    background: #dcfce7;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.feedback-btn.active-down {
    background: #fee2e2;
    border-color: var(--danger-color);
    color: var(--danger-color);
}

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

/* ============================================
   Markdown Content Styles
   ============================================ */
.markdown-content {
    line-height: 1.75;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.markdown-content h1 {
    font-size: 1.625rem;
    font-weight: 700;
    margin: 1.5rem 0 1rem 0;
    color: var(--text-primary);
    line-height: 1.3;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.markdown-content h2 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 1.25rem 0 0.75rem 0;
    color: var(--text-primary);
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.4;
}

.markdown-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.4;
}

.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.875rem 0 0.375rem 0;
    color: var(--text-secondary);
    line-height: 1.4;
}

.markdown-content p {
    margin: 0.875rem 0;
    color: var(--text-secondary);
}

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

.markdown-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.markdown-content ul,
.markdown-content ol {
    margin: 0.875rem 0;
    padding-left: 1.75rem;
    color: var(--text-secondary);
}

.markdown-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.markdown-content li::marker {
    color: var(--primary-color);
}

.markdown-content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 1rem 0;
    padding: 0.75rem 0 0.75rem 1.25rem;
    background: var(--primary-light);
    color: var(--text-secondary);
    font-style: italic;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.markdown-content code {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875em;
    color: var(--text-primary);
}

.markdown-content pre {
    background: var(--bg-dark);
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 1rem 0;
    font-size: var(--font-size-sm);
    box-shadow: var(--shadow-md);
}

.markdown-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    border: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    text-align: left;
    color: var(--text-secondary);
}

.markdown-content th {
    background: var(--bg-primary);
    font-weight: 600;
    color: var(--text-primary);
}

.markdown-content tr:nth-child(even) {
    background: var(--bg-primary);
}

/* ============================================
   Thinking Panel
   ============================================ */
.thinking-panel {
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin: 0.75rem 0 1rem 0;
    overflow: hidden;
    transition: opacity var(--transition-base);
}

.thinking-panel.faded {
    opacity: 0.7;
}

.thinking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.thinking-header:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.thinking-title {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.thinking-count {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: 500;
}

.thinking-body {
    padding: 0.75rem;
    background: #fafbfc;
}

.thinking-body.collapsed {
    display: none;
}

.chevron {
    transition: transform var(--transition-base);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.chevron.rotated {
    transform: rotate(-90deg);
}

.reasoning-step {
    background: var(--bg-secondary);
    border-left: 3px solid var(--primary-color);
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    animation: slideIn var(--transition-slow) ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Client Requirements Box
   ============================================ */
.client-requirements {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.client-requirements h3 {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   Input Area
   ============================================ */
.input-area {
    background: var(--bg-secondary);
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.input-container {
    max-width: 48rem;
    margin: 0 auto;
}

.file-preview {
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn var(--transition-base) ease-out;
}

.file-preview.hidden {
    display: none;
}

.file-preview-close {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    font-weight: 700;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color var(--transition-fast);
}

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

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.file-upload-label {
    cursor: pointer;
    padding: 0.625rem;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    font-size: var(--font-size-lg);
}

.file-upload-label:hover {
    background: var(--bg-primary);
}

.message-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.5rem 0.75rem;
    resize: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9375rem;
    max-height: 200px;
    line-height: 1.5;
}

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

.send-button {
    padding: 0.75rem;
    background: var(--bg-dark);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 2.75rem;
    font-size: var(--font-size-lg);
}

.send-button:hover {
    background: #374151;
    transform: translateY(-1px);
}

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

.send-button.stop {
    background: var(--danger-color);
}

.send-button.stop:hover {
    background: var(--danger-hover);
}

/* ============================================
   Download/Action Buttons
   ============================================ */
.actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border: 1px solid;
}

.action-btn.secondary {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.action-btn.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

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

.action-btn.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   Ellipsis Animation
   ============================================ */
.ellipsis {
    display: inline-block;
    margin-left: 4px;
    width: 18px;
    text-align: left;
}

.ellipsis-dot {
    display: inline-block;
    animation: blink 1.2s infinite;
    opacity: 0.2;
}

.ellipsis-dot:nth-child(1) {
    animation-delay: 0s;
}

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

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

@keyframes blink {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }
}

/* ============================================
   Edit Input
   ============================================ */
.edit-input {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.875rem;
    width: 100%;
    resize: none;
    min-height: 80px;
    font-family: var(--font-family);
    font-size: 0.9375rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 100;
        width: 280px;
    }

    .sidebar.hidden {
        margin-left: -280px;
    }

    .toggle-btn {
        left: 1rem;
    }

    .toggle-btn.sidebar-hidden {
        left: 1rem;
    }

    .suggestion-grid {
        grid-template-columns: 1fr;
    }

    .message-content-wrapper {
        padding: 0 1rem;
    }

    .input-area {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: var(--font-size-xl);
    }

    .suggestion-card {
        padding: 1rem;
    }

    .actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

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

.text-sm {
    font-size: var(--font-size-sm);
}

.text-xs {
    font-size: var(--font-size-xs);
}

.font-semibold {
    font-weight: 600;
}

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

.text-danger {
    color: var(--danger-color);
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: var(--radius-full);
}

.bg-white {
    background: var(--bg-secondary);
}

.border-b {
    border-bottom: 1px solid var(--border-color);
}

.overflow-y-auto {
    overflow-y: auto;
}

.h-screen {
    height: 100vh;
}

.w-full {
    width: 100%;
}

.max-w-3xl {
    max-width: 48rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Print Styles */
@media print {

    .sidebar,
    .toggle-btn,
    .input-area,
    .message-actions,
    .actions,
    .thinking-panel {
        display: none !important;
    }

    .main-content {
        height: auto;
        overflow: visible;
    }

    .messages-area {
        overflow: visible;
    }
}