:root {
    --blue-950: #071a33;
    --blue-900: #0b2447;
    --blue-800: #103765;
    --blue-700: #1557a6;
    --blue-600: #1976d2;
    --blue-500: #2d8cff;
    --blue-100: #e9f3ff;
    --blue-50: #f3f8ff;
    --background: #f5f7fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text-main: #172033;
    --text-secondary: #667085;
    --text-light: #98a2b3;
    --border: #e5e9f0;
    --success: #16a34a;
    --shadow: 0 8px 30px rgba(15, 35, 65, 0.06);
    --radius-large: 20px;
    --radius-medium: 14px;
    --radius-small: 10px;
}

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

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--background);
    color: var(--text-main);
}

button,
textarea,
input {
    font: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible {
    outline: 3px solid var(--blue-500);
    outline-offset: 3px;
}

.app-shell {
    display: flex;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.hidden {
    display: none !important;
}


/* 
    LEFT NAVIGATION
*/

.navigation-panel {
    width: 270px;
    flex: 0 0 270px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 24px 16px;
    background: linear-gradient(
        180deg,
        var(--blue-950) 0%,
        var(--blue-900) 100%
    );
    color: #ffffff;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 28px;
    flex-shrink: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffffff;
    color: var(--blue-900);
    font-weight: 800;
    letter-spacing: -1px;
}

.brand-text h1 {
    font-size: 17px;
    font-weight: 700;
}

.brand-text span {
    display: block;
    margin-top: 2px;
    color: #9fb5d3;
    font-size: 11px;
}

.new-research-button {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding: 12px 14px;
    border-radius: 11px;
    background: var(--blue-600);
    color: #ffffff;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.new-research-button:hover {
    background: var(--blue-500);
    transform: translateY(-1px);
}

.button-icon {
    font-size: 20px;
    line-height: 1;
}

.navigation-panel > [data-tool] {
    flex-shrink: 0;
}

.navigation-label {
    margin-bottom: 8px;
    padding: 0 10px;
    color: #7890ae;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.navigation-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3px;
    padding: 11px 10px;
    border-radius: 9px;
    color: #b8c7da;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
}

.navigation-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.navigation-item.active {
    background: rgba(45, 140, 255, 0.16);
    color: #ffffff;
}

.navigation-icon {
    width: 20px;
    flex-shrink: 0;
    color: #78b7ff;
    font-size: 16px;
    text-align: center;
}

/* Recent Research gets the remaining sidebar height. */

.recent-section {
    display: flex;
    flex: 1 1 0%;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    margin-top: 30px;
}

.recent-section > .navigation-label {
    flex-shrink: 0;
}

.recentResearch {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    gap: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px 4px 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #58718f transparent;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.recentResearch::-webkit-scrollbar {
    width: 7px;
}

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

.recentResearch::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #58718f;
}

.recentResearch::-webkit-scrollbar-thumb:hover {
    background: #91aac7;
}

/* Each recent item has a title and a separate delete button. */

.recent-item-row {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    width: 100%;
    min-width: 0;
    border-radius: 8px;
}

.recent-item-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.recent-item-row.active {
    background: rgba(45, 140, 255, 0.16);
}

.recent-item-row .recent-item {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    overflow: hidden;
    padding: 9px 8px 9px 10px;
    border-radius: 8px;
    color: #a8bad0;
    font-size: 12px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-item-row .recent-item:hover,
.recent-item-row.active .recent-item {
    color: #ffffff;
}

.recent-delete-button {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 3px;
    border-radius: 7px;
    color: #a8bad0;
    font-size: 20px;
    line-height: 1;
    opacity: 0.8;
}

.recent-delete-button:hover {
    background: #fee2e2;
    color: #b91c1c;
    opacity: 1;
}

.recent-empty {
    padding: 8px 10px;
    color: #a8bad0;
    font-size: 12px;
    line-height: 1.6;
}

.navigation-footer {
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-action {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 9px;
    color: #a9b9cc;
    text-align: left;
}

.footer-action:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.profile-circle {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--blue-600);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
}


/* 
    MAIN AREA AND TOP BAR
*/

.main-area {
    min-width: 0;
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    height: 70px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 28px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
}

.top-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.workspace-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.workspace-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.workspace-status {
    display: block;
    color: var(--success);
    font-size: 11px;
}

.workspace-status::before {
    content: "●";
    margin-right: 5px;
    font-size: 8px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-action {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #ffffff;
    color: var(--text-secondary);
}

.top-action:hover {
    border-color: #b8d7fb;
    background: var(--blue-50);
    color: var(--blue-700);
}

.mobile-menu-button {
    display: none;
}


/* 
   WELCOME WORKSPACE
*/

.workspace {
    min-width: 0;
    min-height: 0;
    position: relative;
    flex: 1;
    overflow: hidden;
}

.welcome-view {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    overflow-y: auto;
}

.welcome-content {
    width: min(920px, 92%);
    padding: 72px 0 60px;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid #d8e7f8;
    border-radius: 30px;
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: 11px;
    font-weight: 700;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #27ae60;
}

.welcome-content > h2 {
    max-width: 720px;
    margin-top: 24px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -3px;
}

.welcome-content > h2 span {
    color: var(--blue-600);
}

.welcome-description {
    max-width: 650px;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

.quick-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 42px;
}

.tool-card {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: left;
    transition: transform 0.2s ease, border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: #b9d7f8;
    box-shadow: 0 14px 35px rgba(15, 35, 65, 0.09);
}

.tool-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 20px;
    font-weight: 700;
}

.tool-icon.blue {
    background: #e8f3ff;
    color: #1976d2;
}

.tool-icon.navy {
    background: #e8edf5;
    color: #12375f;
}

.tool-icon.sky {
    background: #e9f8ff;
    color: #1582bd;
}

.tool-icon.steel {
    background: #eef2f6;
    color: #52657a;
}

.tool-card h3 {
    margin-bottom: 5px;
    font-size: 14px;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

.research-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 30px;
    padding: 14px 16px;
    border: 1px solid #d9eaff;
    border-radius: 12px;
    background: #eef6ff;
    color: #53677e;
}

.note-mark {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffffff;
    color: var(--blue-600);
    font-size: 12px;
    font-weight: 700;
}

.research-note p {
    font-size: 11px;
    line-height: 1.6;
}


/* 
    CHAT VIEW AND CONVERSATION HEADER
*/

.chat-view {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.conversation-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 34px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.conversation-type {
    color: var(--blue-600);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.conversation-header h2 {
    margin-top: 4px;
    font-size: 18px;
    overflow-wrap: anywhere;
}

.conversation-menu {
    flex-shrink: 0;
    padding: 8px;
    border-radius: 8px;
    color: var(--text-secondary);
}

.conversation-menu:hover {
    background: var(--surface-soft);
    color: var(--blue-700);
}


/* 
    MESSAGES AND AI ANSWER FORMATTING
*/

.messages-area {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px 8%;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.message {
    min-width: 0;
    max-width: 760px;
    margin-bottom: 25px;
    overflow-wrap: anywhere;
}

.message.user {
    margin-left: auto;
}

.message-label {
    min-width: 0;
    margin-bottom: 6px;
    color: var(--text-light);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.message-content {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
    font-size: 14px;
    line-height: 1.75;
}

.message.user .message-content {
    display: inline-block;
    max-width: 100%;
    padding: 12px 16px;
    border-radius: 15px 15px 4px 15px;
    background: var(--blue-700);
    color: #ffffff;
    white-space: pre-wrap;
}

.message.assistant .message-content {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 4px 15px 15px 15px;
    background: var(--surface);
    color: var(--text-main);
    text-align: left;
}

.message.assistant .message-content.markdown-content {
    white-space: normal;
}

.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4 {
    margin: 22px 0 10px;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: normal;
}

.message-content h1 {
    font-size: 22px;
}

.message-content h2 {
    font-size: 19px;
}

.message-content h3 {
    font-size: 16px;
}

.message-content h4 {
    font-size: 14px;
}

.message-content > :first-child {
    margin-top: 0;
}

.message-content p {
    margin: 0 0 13px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul,
.message-content ol {
    margin: 10px 0 17px;
    padding-left: 26px;
}

.message-content ul {
    list-style-type: disc;
}

.message-content ol {
    list-style-type: decimal;
}

.message-content li {
    margin: 0 0 8px;
    padding-left: 3px;
}

.message-content li:last-child {
    margin-bottom: 0;
}

.message-content li > ul,
.message-content li > ol {
    margin-top: 8px;
    margin-bottom: 8px;
}

.message-content strong {
    font-weight: 700;
}

.message-content em {
    font-style: italic;
}

.message-content a {
    color: var(--blue-600);
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.message-content a:hover {
    color: var(--blue-800);
}

.message-content blockquote {
    margin: 14px 0;
    padding: 12px 16px;
    border-left: 3px solid var(--blue-500);
    border-radius: 0 8px 8px 0;
    background: var(--blue-50);
    color: var(--text-secondary);
}

.message-content blockquote p {
    margin-bottom: 6px;
}

.message-content code {
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--surface-soft);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

.message-content pre {
    max-width: 100%;
    margin: 14px 0;
    padding: 14px;
    overflow-x: auto;
    border-radius: 10px;
    background: #0b2447;
    color: #f5f8ff;
    white-space: pre;
}

.message-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    overflow-wrap: normal;
}

.message-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 14px 0 18px;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 13px;
}

.message-content th,
.message-content td {
    min-width: 100px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.message-content th {
    background: var(--blue-50);
    color: var(--text-main);
    font-weight: 700;
}

.message-content tr:nth-child(even) td {
    background: var(--surface-soft);
}

.message-content hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.message.error .message-content {
    border-color: #fecaca;
    background: #fff7f7;
    color: #991b1b;
}


/* 
    MESSAGE COMPOSER
*/

.composer-area {
    flex-shrink: 0;
    padding: 18px 8% 20px;
    background: linear-gradient(
        to top,
        var(--background) 70%,
        rgba(245, 247, 250, 0)
    );
}

.composer {
    min-height: 62px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 9px;
    border: 1px solid #ccd5e1;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 8px 25px rgba(16, 35, 60, 0.08);
}

.composer:focus-within {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.10);
}

.composer textarea {
    min-width: 0;
    max-height: 160px;
    flex: 1;
    resize: none;
    padding: 10px 12px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
    line-height: 1.5;
}

.composer textarea::placeholder {
    color: #9ba7b6;
}

.composer-button,
.send-button {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.composer-button {
    color: var(--text-secondary);
    font-size: 22px;
}

.composer-button:hover {
    background: var(--blue-50);
    color: var(--blue-600);
}

.send-button {
    background: var(--blue-700);
    color: #ffffff;
    font-size: 20px;
}

.send-button:hover {
    background: var(--blue-600);
}

.composer-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    color: var(--text-light);
    font-size: 9px;
}

.attachment-preview {
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 12px;
}


/* 
    SETTINGS AND HELP DIALOGS
*/

.settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(7, 26, 51, 0.55);
    backdrop-filter: blur(4px);
}

.settings-dialog {
    width: min(440px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text-main);
    box-shadow: 0 24px 70px rgba(7, 26, 51, 0.2);
}

.settings-dialog h2 {
    margin-bottom: 10px;
    font-size: 21px;
}

.settings-dialog > p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.settings-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--blue-600);
    cursor: pointer;
}

.settings-dialog .settings-note {
    margin: 16px 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

.settings-close {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--blue-700);
    color: #ffffff;
    font-weight: 600;
}

.settings-close:hover {
    background: var(--blue-600);
}


/* 
   DARK APPEARANCE
*/

body.dark-preview {
    --background: #0b1220;
    --surface: #111c2e;
    --surface-soft: #18253a;
    --text-main: #e7edf7;
    --text-secondary: #a8b6ca;
    --text-light: #91a0b6;
    --border: #2a3a52;
    --blue-50: #142b47;
    --blue-100: #1c3859;
    background: var(--background);
    color: var(--text-main);
}

body.dark-preview .main-area {
    background: var(--background);
}

body.dark-preview .top-bar,
body.dark-preview .conversation-header,
body.dark-preview .message.assistant .message-content,
body.dark-preview .tool-card,
body.dark-preview .composer,
body.dark-preview .settings-dialog {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text-main);
}

body.dark-preview .welcome-description,
body.dark-preview .tool-card p,
body.dark-preview .message-label {
    color: var(--text-secondary);
}

body.dark-preview .tool-card:hover {
    border-color: var(--blue-500);
}

body.dark-preview .research-note {
    border-color: var(--border);
    background: var(--surface-soft);
    color: var(--text-secondary);
}

body.dark-preview .research-note .note-mark {
    background: var(--surface);
}

body.dark-preview .composer-area {
    background: linear-gradient(
        to top,
        var(--background) 70%,
        transparent
    );
}

body.dark-preview .composer {
    border-color: var(--border);
}

body.dark-preview .composer textarea {
    color: var(--text-main);
}

body.dark-preview .composer textarea::placeholder {
    color: var(--text-light);
}

body.dark-preview .top-action,
body.dark-preview .mobile-menu-button {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text-secondary);
}

body.dark-preview .conversation-menu:hover {
    background: var(--surface-soft);
}

body.dark-preview .message-content h1,
body.dark-preview .message-content h2,
body.dark-preview .message-content h3,
body.dark-preview .message-content h4 {
    color: var(--text-main);
}

body.dark-preview .message-content th {
    background: #182b44;
    color: var(--text-main);
}

body.dark-preview .message-content tr:nth-child(even) td {
    background: var(--surface-soft);
}

body.dark-preview .message-content code {
    background: var(--surface-soft);
    color: var(--text-main);
}

body.dark-preview .message-content blockquote {
    background: var(--surface-soft);
    color: var(--text-secondary);
}

body.dark-preview .message-content a {
    color: #78b7ff;
}

body.dark-preview .message.error .message-content {
    border-color: #71303d;
    background: #351b25;
    color: #fecaca;
}

body.dark-preview .settings-option,
body.dark-preview .attachment-preview {
    border-color: var(--border);
}

body.dark-preview .attachment-preview {
    background: var(--surface);
    color: var(--text-secondary);
}


/* 
   MEDIA QUERIES
*/

@media (max-width: 850px) {
    .navigation-panel {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -280px;
        z-index: 1000;
        width: 270px;
        max-width: calc(100vw - 45px);
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        transition: left 0.25s ease;
    }

    .navigation-panel.open {
        left: 0;
    }

    .mobile-menu-button {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--border);
        border-radius: 9px;
        background: var(--surface);
        color: var(--text-secondary);
    }

    .top-bar {
        padding: 0 16px;
    }

    .welcome-content {
        padding-top: 45px;
    }

    .quick-tools {
        grid-template-columns: minmax(0, 1fr);
    }

    .messages-area {
        padding: 25px 16px;
    }

    .composer-area {
        padding-right: 16px;
        padding-left: 16px;
    }
}

@media (max-width: 600px) {
    .message {
        max-width: 100%;
    }

    .message.assistant .message-content {
        padding: 13px;
    }

    .message-content h1 {
        font-size: 20px;
    }

    .message-content h2 {
        font-size: 17px;
    }

    .message-content h3 {
        font-size: 15px;
    }

    .message-content th,
    .message-content td {
        min-width: 90px;
        padding: 8px;
    }

    .settings-dialog {
        padding: 20px;
    }

    .conversation-header {
        padding: 18px;
    }

    .welcome-content > h2 {
        letter-spacing: -1.8px;
    }

    .welcome-description {
        font-size: 14px;
    }

    .composer-footer {
        flex-wrap: wrap;
        line-height: 1.5;
    }
}

@media (max-width: 380px) {
    .top-bar {
        padding: 0 10px;
    }

    .top-left {
        gap: 8px;
    }

    .top-actions {
        gap: 5px;
    }

    .top-action,
    .mobile-menu-button {
        width: 32px;
        height: 32px;
    }

    .welcome-content {
        width: 90%;
    }

    .tool-card {
        gap: 12px;
        padding: 15px;
    }

    .composer-area {
        padding-right: 10px;
        padding-left: 10px;
    }

    .composer-button,
    .send-button {
        width: 36px;
        height: 38px;
    }
}


@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
