/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

/* Theme variables */
:root {
    /* Light theme (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #edf2f7;
    --text-primary: #333333;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --border-color-dark: #cbd5e0;
    --sidebar-bg: #2d3748;
    --sidebar-text: #e2e8f0;
    --sidebar-border: #1a202c;
    --sidebar-hover: #4a5568;
    --sidebar-active: #4299e1;
    --accent-primary: #4299e1;
    --accent-secondary: #63b3ed;
    --success-color: #38a169;
    --warning-color: #ed8936;
    --error-color: #e53e3e;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --code-bg: #edf2f7;
    --code-text: #e53e3e;
    --link-bg: transparent;
    --link-text: #1a365d;
    --link-hover-bg: #bee3f8;
    --link-hover-text: #1a365d;
    --inverted-link-bg: #2a4a6b;
    --inverted-link-text: #ffffff;
    --inverted-link-hover-bg: #3182ce;
    --inverted-link-hover-text: #ffffff;
    --user-message-bg: #4299e1;
    --user-message-text: #ffffff;
    --assistant-message-bg: #ffffff;
    --assistant-message-text: #333333;
    --scrollbar-thumb-color: rgba(0, 0, 0, 0.2);
}

/* Dark theme */
[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-tertiary: #4a5568;
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
    --border-color: #4a5568;
    --border-color-dark: #2d3748;
    --sidebar-bg: #171923;
    --sidebar-text: #e2e8f0;
    --sidebar-border: #0d1117;
    --sidebar-hover: #2d3748;
    --sidebar-active: #3182ce;
    --accent-primary: #3182ce;
    --accent-secondary: #4299e1;
    --success-color: #38a169;
    --warning-color: #ed8936;
    --error-color: #fc8181;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --code-bg: #2d3748;
    --code-text: #ffffff;
    --link-bg: #2a4a6b;
    --link-text: #ffffff;
    --link-hover-bg: #3182ce;
    --link-hover-text: #ffffff;
    --user-message-bg: #3182ce;
    --user-message-text: #ffffff;
    --assistant-message-bg: #2d3748;
    --assistant-message-text: #ffffff;
    --scrollbar-thumb-color: rgba(255, 255, 255, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    height: 100vh;
    overflow: hidden;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* General link styling for better accessibility */
a {
    color: var(--link-text);
    text-decoration: underline;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a:hover,
a:focus {
    color: var(--link-hover-text);
    outline: none;
}

.app-container {
    display: flex;
    height: 100vh;
    margin: 0 auto;
    background: var(--bg-primary);
    box-shadow: 0 0 20px var(--shadow-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Sidebar Backdrop (for mobile) */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

/* Filters Backdrop (for mobile) */
.filters-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filters-backdrop.active {
    display: block;
    opacity: 1;
}

/* Sidebar */
.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    width: 280px;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, background-color 0.3s ease;
    position: relative;
    border-right: 1px solid var(--sidebar-border);
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--sidebar-hover);
    min-height: 70px;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.sidebar-toggle:hover {
    background: var(--sidebar-hover);
}

.site-branding {
    display: flex;
    cursor: pointer;
    align-items: center;
    margin-left: 1rem;
    flex: 1;
}

.site-icon {
    color: var(--accent-primary);
    margin-right: 0.5rem;
    flex-shrink: 0;
    transition: opacity 0.3s ease;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .site-branding .app-title,
.sidebar.collapsed .site-branding .site-icon {
    opacity: 0;
    width: 0;
}

.sidebar.collapsed .site-branding {
    margin-left: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    text-align: left;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.sidebar-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text);
    border-left-color: var(--accent-secondary);
}

/* Prevent New Chat button from showing active state */
.sidebar-item.new-chat-item.active {
    background: var(--success-color);
    border-left: none;
}

.sidebar-item.new-chat-item.active:hover {
    background: #2f855a;
}

.sidebar-icon {
    min-width: 20px;
    min-height: 20px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.sidebar-text {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-text {
    opacity: 0;
    width: 0;
}

.sidebar.collapsed .sidebar-icon {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .sidebar-item.new-chat-item {
    margin: 0 0.25rem 1rem 0.375rem;
}

/* Sidebar Footer with Theme Toggle */
.sidebar-footer {
    border-top: 1px solid var(--sidebar-hover);
    padding: 0.5rem 0;
    margin-top: auto;
}

.theme-toggle-sidebar {
    border-left: 3px solid transparent !important;
}

.theme-toggle-sidebar:hover {
    background: var(--sidebar-hover);
}

.theme-toggle-sidebar .theme-icon {
    transition: all 0.3s ease;
}

.theme-toggle-sidebar .sun-icon {
    display: block;
}

.theme-toggle-sidebar .moon-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle-sidebar .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle-sidebar .moon-icon {
    display: block;
}

/* Main Container */
.main-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    overflow-x: hidden;
    max-width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
}

.mobile-menu-toggle:hover {
    background: var(--border-color);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Mobile Menu Tooltip */
.mobile-menu-tooltip {
    display: none;
    position: absolute;
    top: 60px;
    left: 10px;
    background: var(--accent-primary);
    color: white;
    border-radius: 12px;
    padding: 0;
    z-index: 1100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    max-width: 250px;
    animation: tooltipFadeIn 0.3s ease-out;
}

.mobile-menu-tooltip.visible {
    display: block;
}

.tooltip-arrow {
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--accent-primary);
}

.tooltip-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.tooltip-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.tooltip-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

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

/* Theme Toggle - now in sidebar, old styles removed */

.theme-icon .stars {
    animation: twinkle 2s infinite alternate;
}

@keyframes twinkle {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.telemetry-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #718096;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.telemetry-btn:hover {
    border-color: #cbd5e0;
    color: #4a5568;
}

.telemetry-btn.disabled {
    background: #fed7d7;
    border-color: #feb2b2;
    color: #e53e3e;
}

/* Remove old header/tab styles */
.nav-tabs {
    display: none;
}

.nav-tab {
    display: none;
}

/* Chat header - removed since New Chat is now in sidebar */

/* Chat container */
.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 1rem 2rem;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.welcome-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.welcome-message h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Message styles */
.message {
    margin-bottom: 1.5rem;
    max-width: 100%;
}

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

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

.message-content {
    max-width: 80%;
    padding: 1rem;
    border-radius: 12px;
    word-wrap: break-word;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.message.user .message-content {
    background: var(--user-message-bg);
    color: var(--user-message-text);
}

.message.assistant .message-content {
    position: relative;
    background: var(--assistant-message-bg);
    border: 1px solid var(--border-color);
    color: var(--assistant-message-text);
}

/* Feedback Controls */
.feedback-controls {
    display: none;
    position: absolute;
    bottom: -20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color-dark);
    border-radius: 6px;
    box-shadow: 0 2px 8px var(--shadow-color);
    padding: 6px;
    gap: 4px;
    z-index: 10;
}

.message.assistant:hover .feedback-controls {
    display: flex;
}

.feedback-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.feedback-btn:hover {
    background: var(--bg-tertiary);
    opacity: 1;
}

.feedback-btn svg {
    color: var(--text-secondary);
}

.feedback-btn.selected {
    opacity: 1;
    background: var(--accent-primary);
    color: white;
}

.feedback-btn svg {
    width: 16px;
    height: 16px;
    transition: all 0.2s ease;
}

/* Feedback Modal */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.feedback-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px var(--shadow-color);
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }

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

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

.feedback-modal-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.feedback-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.feedback-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.feedback-modal-body {
    padding: 1.5rem;
}

.feedback-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.feedback-type svg {
    width: 20px;
    height: 20px;
}

.feedback-comment-group {
    margin-bottom: 1.5rem;
}

.feedback-comment-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.feedback-comment {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.feedback-comment:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.feedback-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.feedback-btn-secondary,
.feedback-btn-primary {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.9rem;
}

.feedback-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.feedback-btn-secondary:hover {
    background: var(--bg-tertiary);
}

.feedback-btn-primary {
    background: var(--accent-primary);
    color: white;
}

.feedback-btn-primary:hover {
    background: var(--accent-secondary);
}

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

/* Markdown content styling */
.message-content h1,
.message-content h2,
.message-content h3 {
    margin: 1rem 0 0.5rem 0;
}

.message-content p {
    margin: 0.5rem 0;
}

/* Inline code styling */
.message-content code:not(pre code) {
    background: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--code-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}


.message-content code {
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.message-content code::-webkit-scrollbar {
    height: 8px;
}

.message-content code::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
    margin: 0px 10px;
}

.message-content code::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-color);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.message-content ul,
.message-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

/* Suggestions */
.suggestions-container {
    padding: 0 2rem;
    border-top: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.suggestions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    overflow-x: auto;
}

.suggestion-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    margin: 0px 2px;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.suggestion-btn:hover {
    background: var(--border-color);
    border-color: var(--border-color-dark);
}

.suggestion-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Input form */
.input-form {
    padding: 1rem 2rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.input-container {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.question-input {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    transition: border-color 0.2s ease, background-color 0.3s ease, color 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.question-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.send-btn {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    transition: background-color 0.2s ease;
}

.send-btn:hover {
    background: var(--accent-secondary);
}

.send-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.send-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* Options button and configuration */
.options-container {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.options-summary {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.375rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    transition: all 0.3s ease;
}

.options-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.options-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color-dark);
}

.options-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.options-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #4a5568;
}

.options-btn:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.options-btn svg {
    width: 16px;
    height: 16px;
}

/* Options modal */
.options-modal-content {
    max-width: 500px;
    width: 90%;
}

.options-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.option-select,
.option-input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease;
}

.option-select:focus,
.option-input:focus {
    outline: none;
    border-color: #4299e1;
}

.option-input {
    margin-top: 0.5rem;
}

/* Experimental warning */
.experimental-notice {
    margin-top: 1rem;
}

.experimental-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #fef5e7;
    border: 1px solid #f6ad55;
    border-radius: 8px;
    color: #c05621;
    font-size: 0.875rem;
}

.experimental-warning svg {
    flex-shrink: 0;
    color: #ed8936;
}

.stop-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    transition: background-color 0.2s ease;
}

.stop-btn:hover {
    background: #c53030;
}

.stop-btn:focus {
    outline: 2px solid #e53e3e;
    outline-offset: 2px;
}

/* Loading animation */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #718096;
    font-style: italic;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .app-container {
        height: 100vh;
    }

    /* Hide sidebar by default on mobile */
    .sidebar {
        display: none;
    }

    /* Show sidebar as overlay when expanded on mobile */
    .sidebar.expanded {
        display: flex;
        width: 280px;
        position: fixed;
        z-index: 1000;
        height: 100vh;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
        top: 0;
        left: 0;
        overflow-y: auto;
    }

    .sidebar-header {
        flex-shrink: 0;
    }

    .main-container {
        margin-left: 0;
        width: 100%;
    }

    /* Show mobile menu toggle on mobile */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Show tooltip only on mobile */
    .mobile-menu-tooltip {
        display: none;
    }

    .mobile-menu-tooltip.visible {
        display: block;
    }

    .suggestions-container,
    .input-form {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .chat-messages {
        padding: 1rem;
    }
    
    .chat-header {
        padding: 0.75rem 1rem;
    }
    
    .new-chat-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .message-content {
        max-width: 90%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .message-content pre {
        overflow-x: auto;
        max-width: 100%;
    }

    .message-content code {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: pre-wrap;
    }

    .message-content pre code {
        white-space: pre;
    }

    .suggestions {
        flex-wrap: wrap;
    }

    .options-summary {
        display: none;
        /* Hide summary on mobile to save space */
    }

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .message.assistant .message-content {
        border-width: 2px;
    }

    .question-input {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Tab Navigation - Legacy styles removed */

/* Samples Gallery */
.samples-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: auto;
    padding: 2rem;
}

.samples-header {
    margin-bottom: 2rem;
}

.samples-header h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.samples-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.samples-search {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease, background-color 0.3s ease, color 0.3s ease;
}

.samples-search:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.search-btn:hover {
    color: var(--accent-primary);
}

.clear-search-btn {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.clear-search-btn:hover {
    color: var(--error-color);
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.3s ease, color 0.3s ease;
    min-width: 160px;
}

.sort-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.filters-container {
    position: relative;
}

.filters-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filters-btn:hover {
    background: var(--border-color);
}

.filters-panel {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 250px;
    box-shadow: 0 10px 25px var(--shadow-color);
    z-index: 10;
    margin-top: 0.5rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 500px;
}

.filters-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.filters-panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.filters-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filters-close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.filters-panel-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.filters-panel-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-filter {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.tag-filter:hover {
    background: var(--border-color);
}

.tag-filter.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-secondary);
}

.clear-filters-btn {
    background: var(--accent-primary);
    border: none;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.2s ease;
}

.clear-filters-btn:hover {
    background: var(--accent-secondary);
}

/* Latest News */
.news-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: auto;
    padding: 2rem;
}

.news-header {
    margin-bottom: 2rem;
}

.news-header h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.news-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.news-search {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease, background-color 0.3s ease, color 0.3s ease;
}

.news-search:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.rss-container {
    display: flex;
    align-items: center;
}

.rss-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ff6600;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.rss-link:hover {
    background: #e55a00;
}

.news-feed {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 0.5rem;
}

.news-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    padding: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.news-item:hover {
    border-color: var(--border-color-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.news-item-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.news-item-title {
    flex: 1;
}

.news-item-title h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-item-title a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-item-title a:hover {
    color: #4299e1;
}

.news-item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.news-item-source {
    font-weight: 500;
}

.news-item-summary {
    color: var(--text-primary);
    line-height: 1.6;
    margin-top: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-item-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f7fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-item-read-more {
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.news-item-read-more:hover {
    color: #2b6cb0;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #718096;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Samples Grid */
.samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex: 1;
}

.sample-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    height: 320px;
    display: flex;
    flex-direction: column;
}

.sample-card:hover {
    border-color: var(--border-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.sample-card:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.sample-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sample-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.sample-author {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.sample-description {
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sample-tags {
    display: flex;
    gap: 0.5rem;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.sample-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.sample-tag.msft {
    background: #e6fffa;
    color: #38b2ac;
    border-color: #b2f5ea;
}

/* No Results */
.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.pagination-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color-dark);
}

.pagination-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-secondary);
}

.pagination-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 1rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.modal-btn-secondary,
.modal-btn-primary {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.9rem;
}

.modal-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-btn-secondary:hover {
    background: var(--bg-tertiary);
}

.modal-btn-primary {
    background: var(--accent-primary);
    color: white;
}

.modal-btn-primary:hover {
    background: var(--accent-secondary);
}

.modal-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sample-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sample-detail-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.sample-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.meta-value {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.meta-value a {
    background-color: var(--link-bg);
    color: var(--link-text);
    text-decoration: underline;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.meta-value a:hover {
    background-color: var(--link-hover-bg);
    color: var(--link-hover-text);
}

.clone-instructions {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
    margin-top: 1rem;
    position: relative;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.clone-instructions .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s ease;
}

.clone-instructions .copy-btn:hover {
    background: var(--accent-secondary);
}

/* Responsive Design for Samples */
@media (max-width: 768px) {
    .samples-container {
        padding: 1rem;
        overflow-x: hidden;
    }

    .samples-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        min-width: auto;
        width: 100%;
    }

    .samples-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .sample-card {
        max-width: 100%;
        min-width: 0;
    }

    .filters-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 2rem);
        max-width: 400px;
        max-height: 80vh;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

    .filters-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filters-panel-body {
        max-height: calc(80vh - 140px);
    }

    .modal {
        padding: 0.5rem;
    }

    .modal-content {
        max-height: 95vh;
        width: 100%;
        max-width: calc(100vw - 1rem);
    }

    .sample-detail-meta {
        grid-template-columns: 1fr;
    }

    .clone-instructions {
        word-wrap: break-word;
        overflow-wrap: break-word;
        overflow-x: auto;
        font-size: 0.75rem;
    }

    /* Sidebar overlay on mobile when expanded */
    .sidebar.expanded {
        position: fixed;
        z-index: 999;
        height: 100vh;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }
}

/* Responsive Design for News */
@media (max-width: 768px) {
    .news-container {
        padding: 1rem;
        overflow-x: hidden;
    }

    .news-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .news-item {
        padding: 1rem;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .news-item-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .news-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .news-item-title h3 {
        font-size: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .news-item-summary {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Privacy Notice */
.privacy-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    z-index: 1000;
    padding: 1rem;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.privacy-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.privacy-content p {
    flex: 1;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.privacy-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.privacy-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.privacy-btn.primary {
    background: #4299e1;
    color: white;
}

.privacy-btn.primary:hover {
    background: #3182ce;
}

.privacy-content a {
    color: var(--inverted-link-text);
    font-size: 0.9rem;
}

.privacy-content a:hover {
    color: var(--inverted-link-hover-text);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .privacy-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .privacy-actions {
        flex-direction: row;
        gap: 0.5rem;
        width: auto;
        justify-content: center;
    }

    .privacy-btn {
        width: auto;
        min-width: 80px;
    }
}

/* Magic Key Modal */
.magic-key-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.magic-key-modal {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid #e2e8f0;
    color: #2d3748;
    position: relative;
}

.magic-key-modal h2 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
}

.magic-key-modal p {
    margin: 0 0 1.5rem 0;
    color: #4a5568;
    line-height: 1.5;
}

.magic-key-modal input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    color: #2d3748;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.magic-key-modal input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.magic-key-modal input.error {
    border-color: #e74c3c;
}

.magic-key-modal .button-container {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.magic-key-modal button {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.magic-key-modal .cancel-btn {
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #4a5568;
}

.magic-key-modal .cancel-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.magic-key-modal .submit-btn {
    border: none;
    background: #4299e1;
    color: white;
}

.magic-key-modal .submit-btn:hover {
    background: #3182ce;
}

/* Home Section Styles */
.home-container {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.home-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.home-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.home-hero h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.home-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.home-quick-start {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.home-quick-start h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.home-input-form {
    max-width: 700px;
    margin: 0 auto;
}

.home-input-container {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    transition: border-color 0.2s ease;
}

.home-input-container:focus-within {
    border-color: var(--accent-primary);
}

.home-question-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    resize: none;
    outline: none;
    min-height: 40px;
    max-height: 150px;
}

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

.home-send-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-send-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

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

.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow-color);
    border-color: var(--accent-primary);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.feature-btn {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
}

.feature-btn:hover {
    background: var(--accent-primary);
    color: white;
}

/* Footer Styles */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    transition: color 0.2s ease;
    font-size: 0.7rem;
    white-space: nowrap;
}

.footer-link:hover {
    color: var(--accent-primary);
}

.footer-divider {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-attribution {
    display: flex;
    color: var(--text-muted);
    font-size: 0.7rem;
    white-space: nowrap;
}

/* Feedback Link - removed from header */

/* Responsive adjustments */
@media (max-width: 768px) {
    .home-hero h1 {
        font-size: 2rem;
    }

    .home-tagline {
        font-size: 1rem;
    }

    .home-features {
        grid-template-columns: 1fr;
    }

    .home-container {
        padding: 1rem;
    }

    .home-quick-start {
        padding: 1.5rem;
    }

    .footer-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .footer-links {
        flex-wrap: wrap;
    }

    .footer-link,
    .footer-divider,
    .footer-attribution {
        font-size: 0.75rem;
    }
}