@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

/* ==========================================================================
   1. Theme Variables & Base Setup
   ========================================================================== */
:root {
    /* Fonts */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-title: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Theme: Dark (Default) */
    --bg-primary: #0b0b0f;
    --bg-secondary: #13131a;
    --bg-tertiary: #1b1b24;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.4);
    
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --accent-glow: rgba(99, 102, 241, 0.15);
    
    --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 -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-inset: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);

    --code-bg: #1e1e24;
    --chat-user-bg: #1c192d;
    --chat-assistant-bg: transparent;
    --thinking-bg: rgba(255, 255, 255, 0.03);
    
    --sidebar-width: 280px;
    --sidebar-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --scrollbar-track: #0b0b0f;
    --scrollbar-thumb: #2d2d3d;
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f7;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-focus: rgba(99, 102, 241, 0.5);
    
    --accent-glow: rgba(99, 102, 241, 0.08);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(99, 102, 241, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-inset: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

    --code-bg: #1e1e24; /* Keep code dark for readability */
    --chat-user-bg: #eef2ff;
    --chat-assistant-bg: transparent;
    --thinking-bg: rgba(0, 0, 0, 0.02);
    
    --scrollbar-track: #f8f9fc;
    --scrollbar-thumb: #d1d5db;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    height: 100vh;
    display: flex;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-indigo);
}

/* ==========================================================================
   2. Main Layout Structure
   ========================================================================== */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 50;
    transition: var(--sidebar-transition), background-color 0.3s ease, border-color 0.3s ease;
    flex-shrink: 0;
}

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

.new-chat-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px dashed var(--accent-indigo);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.new-chat-btn:hover {
    background: var(--accent-indigo);
    color: white;
    border-style: solid;
    box-shadow: 0 0 12px var(--accent-glow);
    transform: translateY(-1px);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    position: relative;
    group: hover;
}
.history-item:hover, .history-item.active {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}
.history-item.active {
    border-left: 3px solid var(--accent-indigo);
    padding-left: 0.5rem;
}

.history-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    padding-right: 0.5rem;
}

.history-item-delete {
    opacity: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: opacity 0.15s ease, color 0.15s ease;
}
.history-item:hover .history-item-delete {
    opacity: 1;
}
.history-item-delete:hover {
    color: #ef4444;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}
.footer-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease;
}

/* Top Bar Styling */
.top-bar {
    height: 60px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    z-index: 40;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.menu-toggle:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.model-selector-top {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}
.theme-toggle-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--accent-indigo);
    box-shadow: 0 0 8px var(--accent-glow);
}

.theme-toggle-btn .sun-icon {
    display: none;
}
[data-theme="light"] .theme-toggle-btn .sun-icon {
    display: block;
}
[data-theme="light"] .theme-toggle-btn .moon-icon {
    display: none;
}
[data-theme="dark"] .theme-toggle-btn .moon-icon {
    display: block;
}

/* ==========================================================================
   3. Google Landing Layout (Idle State)
   ========================================================================== */
.landing-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo-container {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-text {
    font-family: var(--font-title);
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.logo-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* The Search Input Container */
.search-container {
    width: 100%;
    max-width: 650px;
    position: relative;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
    margin-bottom: 2rem;
}

.search-box-wrapper {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 0.625rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-box-wrapper:focus-within {
    border-color: var(--accent-indigo);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 0 0 4px var(--accent-glow);
}

.search-icon-left {
    color: var(--text-muted);
    margin-top: 10px;
    flex-shrink: 0;
}

.search-textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    padding: 8px 0;
    resize: none;
    outline: none;
    height: 40px;
    max-height: 200px;
}
.search-textarea::placeholder {
    color: var(--text-muted);
}

.search-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 4px;
    flex-shrink: 0;
}

.model-dropdown {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: 14px;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}
.model-dropdown:hover {
    color: var(--text-primary);
    border-color: var(--accent-indigo);
}

.submit-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.submit-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 12px var(--accent-glow);
}
.submit-btn:disabled {
    background: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Suggestion Grid */
.suggestions-container {
    width: 100%;
    max-width: 650px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.suggestion-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}
.suggestion-card:hover {
    border-color: var(--accent-indigo);
    background-color: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0,0,0,0.15), 0 0 0 2px var(--accent-glow);
}

.suggestion-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.suggestion-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ==========================================================================
   4. Chat View Layout (Active State)
   ========================================================================== */
.chat-view {
    flex: 1;
    display: none; /* Controlled by JS */
    flex-direction: column;
    height: calc(100% - 60px); /* Fill screen minus top-bar */
    position: relative;
}

.chat-history-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem 8rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    scroll-behavior: smooth;
}

.chat-bubble-row {
    display: flex;
    gap: 1rem;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.chat-bubble-row.user-row {
    justify-content: flex-end;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.user-row .chat-avatar {
    background: var(--accent-indigo);
    color: white;
    order: 2;
}

.assistant-row .chat-avatar {
    background: var(--bg-tertiary);
    color: var(--accent-purple);
    border: 1px solid var(--border-color);
}

.chat-bubble {
    max-width: 85%;
    padding: 0.75rem 1.25rem;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.user-row .chat-bubble {
    background-color: var(--chat-user-bg);
    color: var(--text-primary);
    border-top-right-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.assistant-row .chat-bubble {
    background-color: var(--chat-assistant-bg);
    color: var(--text-primary);
    border-top-left-radius: 4px;
    flex: 1;
}

/* Collapsible Thinking Process Area */
.thinking-container {
    background-color: var(--thinking-bg);
    border-left: 2px solid var(--accent-purple);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.thinking-header {
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    user-select: none;
    font-weight: 500;
}
.thinking-header:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

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

.thinking-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top-color: var(--accent-purple);
    border-right-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.thinking-content {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    display: block; /* Toggled by JS */
}

/* Chat Markdown Formatting */
.markdown-body {
    word-break: break-word;
}
.markdown-body p {
    margin-bottom: 1rem;
}
.markdown-body p:last-child {
    margin-bottom: 0;
}
.markdown-body ul, .markdown-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.markdown-body li {
    margin-bottom: 0.25rem;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
    font-family: var(--font-title);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}
.markdown-body h1 { font-size: 1.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.3rem; }
.markdown-body h2 { font-size: 1.25rem; }
.markdown-body h3 { font-size: 1.1rem; }
.markdown-body code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background-color: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: var(--accent-purple);
}
.markdown-body pre code {
    color: inherit;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

/* Code Blocks Styles */
.code-block-container {
    background-color: var(--code-bg);
    border-radius: 12px;
    margin: 1.25rem 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.code-block-header {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-family: var(--font-sans);
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-lang {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.copy-code-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.15s ease;
}
.copy-code-btn:hover {
    color: var(--text-primary);
}

.code-block-container pre {
    padding: 1.25rem;
    margin: 0;
    overflow-x: auto;
}

.code-block-container pre code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

/* Bubble Actions Footer */
.bubble-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}
.chat-bubble-row:hover .bubble-actions {
    opacity: 1;
}

.action-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.action-icon-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

/* Active Floating Bottom Bar */
.chat-input-sticky-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--bg-primary) 70%, transparent);
    padding: 1.5rem 1.5rem 2rem 1.5rem;
    z-index: 30;
}

.chat-input-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background-color: var(--bg-tertiary);
    border-radius: 12px;
    width: fit-content;
    margin-top: 0.5rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    animation: typingPulse 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* System Notifications */
.notification-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-indigo);
    border-radius: 8px;
    padding: 0.875rem 1.25rem;
    min-width: 280px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast-content {
    font-size: 0.875rem;
    color: var(--text-primary);
    flex: 1;
}

/* ==========================================================================
   5. Keyframe Animations
   ========================================================================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

@keyframes typingPulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

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

/* ==========================================================================
   6. Responsiveness & Adaptive Screen Widths
   ========================================================================== */
#close-sidebar-btn {
    display: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    #close-sidebar-btn {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
        box-shadow: none;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.35);
    }
    
    .suggestions-container {
        grid-template-columns: 1fr;
        gap: 0.625rem;
        width: 100%;
        padding: 0 0.5rem;
    }
    
    .chat-history-container {
        padding: 1.25rem 0.75rem 8rem 0.75rem;
        gap: 1.5rem;
    }
    
    .chat-bubble-row {
        gap: 0.625rem;
    }
    
    .chat-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        border-radius: 6px;
    }
    
    .chat-bubble {
        max-width: 90%;
        font-size: 0.9rem;
        padding: 0.625rem 1rem;
        border-radius: 14px;
    }
    
    .logo-text {
        font-size: 2.25rem;
        margin-bottom: 0.25rem;
    }

    .logo-subtitle {
        font-size: 0.8rem;
    }
    
    .search-container {
        padding: 0 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .search-box-wrapper {
        padding: 0.5rem 1rem;
        border-radius: 20px;
    }
    
    .search-icon-left {
        margin-top: 8px;
        width: 18px !important;
        height: 18px !important;
    }
    
    .search-textarea {
        font-size: 0.95rem;
        height: 36px;
    }
    
    .model-dropdown {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        border-radius: 10px;
    }
    
    .submit-btn {
        width: 28px;
        height: 28px;
    }

    .chat-input-sticky-container {
        padding: 1rem 0.75rem calc(1rem + env(safe-area-inset-bottom)) 0.75rem;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 2rem;
    }
    
    .suggestion-card {
        padding: 0.75rem 1rem;
        border-radius: 12px;
    }
    
    .top-bar {
        padding: 0 1rem;
    }
    
    .model-selector-top {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .theme-toggle-btn {
        width: 34px;
        height: 34px;
    }
    
    .code-block-container pre {
        padding: 0.875rem;
    }
    
    .code-block-container pre code {
        font-size: 0.8rem;
    }
}

