:root {
  --bg-main: #FAFAFA;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #F3F4F6;
  
  --bg-sidebar: #0F172A;
  --bg-sidebar-hover: #1E293B;
  --sidebar-border: #1E293B;
  
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-tertiary: #9CA3AF;
  
  --text-sidebar: #94A3B8;
  --text-sidebar-bright: #F8FAFC;

  --accent-color: #E35D28;
  --accent-hover: #C54B1C;
  --accent-light: #FFEDD5;

  --border-color: #E5E7EB;
  --danger-color: #EF4444;
  --danger-bg: #FEF2F2;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
  --shadow-float: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
  --shadow-omnibox: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-up: 0 -15px 30px -5px rgba(0,0,0,0.05);

  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px; --radius-pill: 9999px;
  
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-reading: 'Lora', Georgia, serif;

  --sidebar-width: 260px;
  
  /* Strict Z-Index Management */
  --z-base: 1;
  --z-mobile-header: 50;
  --z-sidebar-overlay: 900;
  --z-sidebar: 901;
  --z-modal: 1000;
  --z-toast: 1100;
  --z-loader: 9999;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-ui); background-color: var(--bg-main); color: var(--text-primary); height: 100vh; overflow: hidden; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
button { background: none; border: none; cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; border: none; outline: none; background: transparent; }
.hidden { display: none !important; }

/* Constrain Images Safely */
.app-logo { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

/* Subtle Background */
.mandala-bg { position: fixed; inset: 0; z-index: 0; opacity: 0.03; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='%23000' stroke-width='0.5'/%3E%3Cpath d='M50 10 A40 40 0 0 1 90 50 A40 40 0 0 1 50 90 A40 40 0 0 1 10 50 A40 40 0 0 1 50 10' fill='none' stroke='%23000' stroke-width='0.5' stroke-dasharray='2 2'/%3E%3Cpath d='M50 20 L60 50 L50 80 L40 50 Z' fill='none' stroke='%23000' stroke-width='0.5'/%3E%3C/svg%3E"); background-repeat: repeat; background-position: bottom right; }

/* Loader */
.page-loader { position: fixed; inset: 0; background: var(--bg-main); z-index: var(--z-loader); display: flex; align-items: center; justify-content: center; transition: opacity 0.5s ease; }
.loader-content { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.loader-logo-container { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; animation: pulseLogo 2s infinite alternate; }
@keyframes pulseLogo { 0% { transform: scale(0.95); opacity: 0.8; } 100% { transform: scale(1.05); opacity: 1; } }
.loader-spinner { width: 32px; height: 32px; border: 3px solid var(--border-color); border-top-color: var(--accent-color); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* App Layout */
.app-layout { display: flex; height: 100vh; width: 100vw; position: relative; z-index: var(--z-base); }

/* Mobile Header */
.mobile-header { display: none; align-items: center; justify-content: space-between; height: 60px; padding: 0 16px; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); position: absolute; top: 0; left: 0; right: 0; z-index: var(--z-mobile-header); }
.icon-button { padding: 8px; color: var(--text-primary); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.icon-button:hover { background: var(--bg-surface-hover); }
.mobile-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; }
.mobile-logo-wrap { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }

/* Sidebar Layout */
.sidebar { width: var(--sidebar-width); background: var(--bg-sidebar); border-right: 1px solid var(--sidebar-border); display: flex; flex-direction: column; flex-shrink: 0; z-index: var(--z-sidebar); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; }
.sidebar-inner { display: flex; flex-direction: column; height: 100%; padding: 24px 16px 16px; overflow: hidden; }
.mobile-close-btn { display: none; position: absolute; top: 16px; right: 16px; color: var(--text-sidebar); padding: 8px; border-radius: 50%; z-index: 10; }

.sidebar-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; padding: 0 8px; }
.sidebar-logo-wrap { width: 32px; height: 32px; background: white; border-radius: 8px; padding: 4px; display: flex; align-items: center; justify-content: center; }
.brand-name { color: var(--text-sidebar-bright); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }

.btn-new-thread { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 16px; background: var(--bg-sidebar-hover); color: var(--text-sidebar-bright); border-radius: var(--radius-pill); font-weight: 500; font-size: 0.95rem; border: 1px solid var(--sidebar-border); margin-bottom: 32px; transition: background 0.2s; flex-shrink: 0; }
.btn-new-thread:hover { background: #334155; }
.plus-icon { display: flex; align-items: center; color: var(--text-sidebar); }

.nav-menu { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; flex-shrink: 0; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-md); font-weight: 500; font-size: 0.95rem; color: var(--text-sidebar); transition: all 0.2s; }
.nav-link:hover, .nav-link.active { background: var(--bg-sidebar-hover); color: var(--text-sidebar-bright); }

.history-section { flex: 1; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 16px; }
.history-heading { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-sidebar); font-weight: 600; padding: 0 14px; margin-bottom: 12px; flex-shrink: 0; }
.history-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: none; }
.history-list::-webkit-scrollbar { display: none; }
.history-item { padding: 10px 14px; color: var(--text-sidebar); font-size: 0.9rem; border-radius: var(--radius-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: background 0.2s, color 0.2s; text-align: left; }
.history-item:hover { background: var(--bg-sidebar-hover); color: var(--text-sidebar-bright); }

.sidebar-footer { flex-shrink: 0; padding-top: 16px; border-top: 1px solid var(--sidebar-border); }
.auth-zone { width: 100%; }
.btn-auth-sidebar { width: 100%; padding: 12px; background: var(--accent-color); color: white; border-radius: var(--radius-pill); font-weight: 600; text-align: center; transition: background 0.2s; }
.btn-auth-sidebar:hover { background: var(--accent-hover); }

.user-widget { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: var(--radius-md); transition: background 0.2s; text-align: left; cursor: pointer; }
.user-widget:hover { background: var(--bg-sidebar-hover); }
.widget-avatar { width: 36px; height: 36px; background: linear-gradient(135deg, var(--accent-color), var(--accent-hover)); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.widget-info { display: flex; flex-direction: column; overflow: hidden; }
.widget-name { color: var(--text-sidebar-bright); font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget-sub { color: var(--text-sidebar); font-size: 0.75rem; }

/* Main Content */
.main-content { flex: 1; position: relative; display: flex; flex-direction: column; min-width: 0; }

.view-home { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.home-container { width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; }

.home-branding { text-align: center; margin-bottom: 40px; }
.hero-logo-wrap { width: 72px; height: 72px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; }
.hero-title { font-family: var(--font-reading); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 500; color: var(--text-primary); letter-spacing: -0.02em; margin-bottom: 8px; }
.hero-shloka { font-family: var(--font-reading); font-style: italic; color: var(--accent-color); font-size: 1.1rem; opacity: 0.9; }

/* Omnibox */
.omnibox-wrapper { width: 100%; margin-bottom: 32px; }
.omnibox { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-xl); box-shadow: var(--shadow-omnibox); padding: 16px 20px; display: flex; flex-direction: column; transition: border-color 0.2s, box-shadow 0.2s; position: relative; z-index: 10; }
.omnibox:focus-within { border-color: var(--accent-color); box-shadow: 0 0 0 4px var(--accent-light), var(--shadow-omnibox); }

.attachment-preview { display: flex; margin-bottom: 12px; }
.attachment-image-wrap { position: relative; display: inline-block; }
.attachment-img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-color); }
.btn-remove-attach { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; background: var(--text-primary); color: white; border-radius: 50%; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.btn-remove-attach:hover { transform: scale(1.1); }

.omnibox-input { width: 100%; min-height: 44px; max-height: 200px; resize: none; font-size: 1.1rem; line-height: 1.5; color: var(--text-primary); margin-bottom: 12px; }
.omnibox-input::placeholder { color: var(--text-tertiary); }

.omnibox-footer { display: flex; align-items: center; justify-content: space-between; }
.omnibox-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); background: var(--bg-surface-hover); transition: all 0.2s; border: 1px solid transparent; }
.tool-btn:hover { background: var(--border-color); color: var(--text-primary); }
.toggle-btn.active { background: var(--accent-light); color: var(--accent-hover); border-color: rgba(227, 93, 40, 0.2); }

.btn-submit { width: 40px; height: 40px; border-radius: 50%; background: var(--text-primary); color: white; display: flex; align-items: center; justify-content: center; transition: transform 0.2s, opacity 0.2s; flex-shrink: 0; }
.btn-submit:hover:not(:disabled) { transform: scale(1.05); }
.btn-submit:disabled { opacity: 0.3; cursor: not-allowed; }

/* Chips */
.quick-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip { background: var(--bg-surface); border: 1px solid var(--border-color); padding: 10px 16px; border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); transition: all 0.2s; box-shadow: var(--shadow-sm); }
.chip:hover { background: var(--bg-main); border-color: var(--accent-color); color: var(--accent-hover); transform: translateY(-1px); }

/* Results */
.view-results { flex: 1; display: flex; flex-direction: column; height: 100%; position: relative; }
.results-scroll-container { flex: 1; overflow-y: auto; padding: 40px 24px 160px; scroll-behavior: smooth; }
.results-layout { width: 100%; max-width: 800px; margin: 0 auto; }

.thread-header { margin-bottom: 40px; }
.thread-query { font-size: 1.8rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.result-attachment img { width: 100px; height: 100px; object-fit: cover; border-radius: var(--radius-md); margin-top: 16px; border: 1px solid var(--border-color); }

.block-section { margin-bottom: 40px; animation: fadeUp 0.4s ease forwards; }
.block-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 600; color: var(--text-primary); margin-bottom: 20px; }

/* Sources Carousel (Desktop & Mobile) */
.sources-carousel { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sources-carousel::-webkit-scrollbar { display: none; }
.source-card { scroll-snap-align: start; flex: 0 0 200px; min-width: 200px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: all 0.2s; text-decoration: none; box-shadow: var(--shadow-sm); }
.source-card:hover { border-color: var(--text-tertiary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.source-meta { display: flex; align-items: center; gap: 8px; }
.source-favicon { width: 18px; height: 18px; border-radius: 4px; }
.source-domain { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-title { font-size: 0.9rem; font-weight: 500; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.source-index { align-self: flex-start; background: var(--bg-surface-hover); color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-sm); margin-top: auto; }

/* Answer */
.answer-content { font-family: var(--font-reading); font-size: 1.15rem; line-height: 1.8; color: var(--text-primary); }
.answer-content p { margin-bottom: 1.2em; }
.answer-content h3 { font-family: var(--font-ui); font-size: 1.25rem; font-weight: 600; margin: 1.5em 0 0.8em; }
.answer-content ul, .answer-content ol { padding-left: 24px; margin-bottom: 1.2em; }
.answer-content li { margin-bottom: 0.5em; }
.answer-content strong { font-weight: 600; color: #000; }
.cite-badge { display: inline-flex; align-items: center; justify-content: center; background: var(--bg-surface-hover); color: var(--accent-hover); font-family: var(--font-ui); font-size: 0.75rem; font-weight: 700; min-width: 20px; height: 20px; padding: 0 4px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); margin: 0 2px; vertical-align: super; text-decoration: none; transition: all 0.2s; }
.cite-badge:hover { background: var(--accent-color); color: white; border-color: var(--accent-color); }

.answer-toolbar { display: flex; gap: 12px; margin-top: 24px; }
.action-btn { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); border: 1px solid var(--border-color); background: var(--bg-surface); transition: all 0.2s; box-shadow: var(--shadow-sm); }
.action-btn:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.error-message-box { background: var(--danger-bg); border: 1px solid #FCA5A5; color: var(--danger-color); padding: 16px 20px; border-radius: var(--radius-md); font-family: var(--font-ui); font-size: 0.95rem; display: flex; align-items: flex-start; gap: 12px; }

/* Lists */
.insights-list { display: flex; flex-direction: column; gap: 12px; list-style: none; }
.insights-list li { position: relative; padding-left: 20px; font-size: 1rem; line-height: 1.6; color: var(--text-primary); }
.insights-list li::before { content: ''; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; background: var(--accent-color); border-radius: 50%; }

.followup-list { display: flex; flex-direction: column; gap: 10px; }
.followup-item { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); font-size: 1rem; font-weight: 500; color: var(--text-primary); transition: all 0.2s; box-shadow: var(--shadow-sm); text-align: left; }
.followup-item:hover { border-color: var(--accent-color); color: var(--accent-hover); box-shadow: var(--shadow-md); transform: translateX(4px); }

/* Sticky Follow-up Bar */
.sticky-omnibox-container { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px; background: rgba(250, 250, 250, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(229, 231, 235, 0.5); display: flex; justify-content: center; z-index: 20; }
.slim-omnibox { width: 100%; max-width: 800px; flex-direction: row; align-items: center; padding: 8px 8px 8px 20px; box-shadow: var(--shadow-md); border-radius: var(--radius-pill); }
.slim-input { margin-bottom: 0; min-height: 24px; padding: 8px 0; font-size: 1.05rem; }

/* Modals */
.modal-wrapper { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.2s ease; }
.modal-card { background: var(--bg-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-float); position: relative; overflow: hidden; animation: slideUp 0.3s ease; width: 100%; }
.btn-close { position: absolute; top: 20px; right: 20px; color: var(--text-tertiary); padding: 8px; border-radius: 50%; background: var(--bg-surface-hover); z-index: 10; transition: all 0.2s; }
.btn-close:hover { color: var(--text-primary); background: var(--border-color); }

/* Auth Layout */
.auth-modal-card { max-width: 850px; display: flex; }
.auth-visual { flex: 1; background: var(--bg-sidebar); color: white; padding: 48px; display: flex; flex-direction: column; justify-content: center; position: relative; }
.auth-logo-wrap { width: 64px; height: 64px; margin-bottom: 24px; background: white; border-radius: 12px; padding: 8px; display: flex; align-items: center; justify-content: center; }
.auth-visual-title { font-family: var(--font-reading); font-size: 2.2rem; font-weight: 500; margin-bottom: 16px; line-height: 1.2; }
.auth-visual-sub { font-size: 1.05rem; color: var(--text-sidebar); line-height: 1.6; margin-bottom: 24px; }
.auth-visual-pill { display: inline-block; padding: 6px 12px; background: rgba(255,255,255,0.1); border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; align-self: flex-start; }

.auth-content { flex: 1.1; padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-heading { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; }
.auth-tabs { display: flex; background: var(--bg-surface-hover); border-radius: var(--radius-md); padding: 4px; margin-bottom: 24px; }
.auth-tab { flex: 1; padding: 10px; font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); border-radius: var(--radius-sm); transition: all 0.2s; }
.auth-tab.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-sm); }

.social-auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.btn-social { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 1px solid var(--border-color); border-radius: var(--radius-md); font-weight: 600; font-size: 0.95rem; transition: background 0.2s; }
.btn-social:hover { background: var(--bg-surface-hover); }

.auth-divider { display: flex; align-items: center; margin-bottom: 24px; color: var(--text-tertiary); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border-color); }
.auth-divider span { padding: 0 12px; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.input-field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.input-field input { width: 100%; padding: 12px 16px; border: 1px solid var(--border-color); border-radius: var(--radius-md); font-size: 1rem; transition: all 0.2s; }
.input-field input:focus { border-color: var(--accent-color); box-shadow: 0 0 0 3px var(--accent-light); }
.form-error { color: var(--danger-color); background: var(--danger-bg); padding: 10px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; }
.btn-primary { background: var(--text-primary); color: white; padding: 14px; border-radius: var(--radius-md); font-size: 1rem; font-weight: 600; transition: transform 0.2s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.w-full { width: 100%; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 24px; }

/* Settings Modal */
.settings-modal-card { max-width: 480px; }
.modal-header { padding: 24px; border-bottom: 1px solid var(--border-color); }
.modal-header h2 { font-size: 1.25rem; font-weight: 700; }
.modal-body { padding: 24px; }
.user-profile-plate { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-color), var(--accent-hover)); color: white; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; }
.profile-details h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.profile-details p { color: var(--text-secondary); font-size: 0.95rem; }
.quota-widget { background: var(--bg-surface-hover); padding: 20px; border-radius: var(--radius-lg); margin-bottom: 24px; }
.quota-labels { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 12px; }
.progress-bar { height: 8px; background: var(--border-color); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.progress-fill { height: 100%; background: var(--accent-color); border-radius: 4px; transition: width 0.5s ease; }
.quota-info { font-size: 0.8rem; color: var(--text-tertiary); }
.btn-danger { background: var(--danger-bg); color: var(--danger-color); padding: 14px; border-radius: var(--radius-md); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.2s; }
.btn-danger:hover { background: #FECACA; }

/* Toast */
.global-toast { position: fixed; bottom: 32px; right: 32px; background: var(--text-primary); color: white; padding: 14px 24px; border-radius: var(--radius-pill); display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 0.95rem; box-shadow: var(--shadow-lg); z-index: var(--z-toast); animation: slideUp 0.3s ease; }

/* Skeletons */
.skeleton-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.source-card-sk { scroll-snap-align: start; flex: 0 0 200px; min-width: 200px; height: 110px; background: var(--bg-surface-hover); border-radius: var(--radius-md); }
.answer-skeleton { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.sk-line { height: 18px; background: var(--bg-surface-hover); border-radius: 6px; }
.sk-line.full { width: 100%; } .sk-line.long { width: 85%; } .sk-line.medium { width: 45%; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ── RESPONSIVE (MOBILE FIXES) ── */
@media (max-width: 900px) {
  .auth-modal-card { flex-direction: column; max-width: 480px; }
  .auth-visual { display: none; }
  .auth-content { padding: 32px 24px; }
}

@media (max-width: 768px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); z-index: var(--z-sidebar); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-overlay { display: block; z-index: var(--z-sidebar-overlay); }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(2px); }
  
  .mobile-close-btn { display: block; }
  
  .mobile-header { display: flex; }
  .main-content { padding-top: 60px; } /* Prevent header overlap */
  
  .hero-title { font-size: 2.2rem; }
  .omnibox { padding: 12px; border-radius: var(--radius-lg); }
  .results-scroll-container { padding: 24px 16px 120px; }
  .sticky-omnibox-container { padding: 16px; }
  
  .global-toast { left: 16px; right: 16px; bottom: 16px; justify-content: center; }
}
