/**
 * ChatAI — UI Improvements & Modern Enhancements
 * Additive fixes and refinements on top of existing CSS
 * Hostinger-compatible: No build step required
 * v2.1 — Refined for shared hosting deployment
 */

/* ========================================
   SKELETON LOADING STATES
   ======================================== */

.skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
}

.skeleton-line {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg,
        var(--surface, rgba(15,23,42,0.45)) 25%,
        var(--surface-hover, rgba(30,41,59,0.6)) 50%,
        var(--surface, rgba(15,23,42,0.45)) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-line:nth-child(1) { width: 85%; }
.skeleton-line:nth-child(2) { width: 92%; }
.skeleton-line:nth-child(3) { width: 65%; }
.skeleton-line:nth-child(4) { width: 78%; }

.skeleton-message {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    opacity: 0.5;
}

.skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(90deg,
        var(--surface, rgba(15,23,42,0.45)) 25%,
        var(--surface-hover, rgba(30,41,59,0.6)) 50%,
        var(--surface, rgba(15,23,42,0.45)) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   RESPONSIVE SCROLLBAR (Firefox fix)
   ======================================== */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong, rgba(248,250,252,0.2)) transparent;
}

/* ========================================
   MESSAGE SPACING & TYPOGRAPHY
   ======================================== */

.message-row {
    margin-bottom: 4px;
    scroll-margin-top: 24px;
}

.message-text h1, .message-text h2, .message-text h3 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

.message-text p {
    margin-bottom: 0.6em;
    line-height: 1.7;
}

.message-text p:empty { display: none; }

.message-text code:not(pre code) {
    background: var(--surface, rgba(15,23,42,0.45));
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    border: 1px solid var(--border, rgba(248,250,252,0.1));
}

/* ========================================
   STREAMING CURSOR ANIMATION
   ======================================== */

.message-text.streaming::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--primary, #818cf8);
    margin-left: 4px;
    animation: cursor-blink 0.8s step-end infinite;
    vertical-align: text-bottom;
    border-radius: 2px;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ========================================
   PROVIDER INFO LINE
   ======================================== */

.provider-info-line {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    padding: 4px 0;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
}

.provider-info-line::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary, #818cf8);
    animation: provider-pulse 1.5s ease-in-out infinite;
}

@keyframes provider-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* ========================================
   WELCOME SCREEN STAGGERED ENTRANCE
   ======================================== */

.welcome-title {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
}

.welcome-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    max-width: 600px;
    margin-bottom: 32px;
}

.welcome-card {
    opacity: 0;
    animation: welcome-card-in 0.5s ease forwards;
}

.welcome-card:nth-child(1) { animation-delay: 0.05s; }
.welcome-card:nth-child(2) { animation-delay: 0.1s; }
.welcome-card:nth-child(3) { animation-delay: 0.15s; }
.welcome-card:nth-child(4) { animation-delay: 0.2s; }
.welcome-card:nth-child(5) { animation-delay: 0.25s; }
.welcome-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes welcome-card-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .welcome-card { opacity: 1; animation: none; }
}

/* ========================================
    THEME & DARK MODE CONSISTENCY
    ======================================== */

html[data-theme="dark"],
html[data-theme="midnight"],
html[data-theme="sunset"],
html[data-theme="cyberpunk"] {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

/* ========================================
   SCROLL-TO-BOTTOM BUTTON
   ======================================== */

#scrollBottomBtn {
    position: absolute;
    bottom: 20px;
    right: 24px;
    z-index: 50;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    background: var(--surface-elevated, rgba(30,41,59,0.85));
    border: 1px solid var(--border, rgba(248,250,252,0.1));
    color: var(--text-secondary, #94a3b8);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

#scrollBottomBtn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scrollBottomBtn:hover {
    background: var(--primary, #818cf8);
    color: white;
    border-color: var(--primary, #818cf8);
}

/* ========================================
   INPUT FOCUS ENHANCEMENTS
   ======================================== */

.input-container:focus-within {
    border-color: var(--primary-light, #cbd5e1);
    box-shadow: 0 0 0 3px var(--primary-glow, rgba(248,250,252,0.2)),
                0 4px 24px var(--glow, rgba(248,250,252,0.15));
    transform: translateY(-1px);
}

/* ========================================
   FILE CHIPS / ATTACHMENTS
   ======================================== */

.file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--surface, rgba(15,23,42,0.45));
    border: 1px solid var(--border, rgba(248,250,252,0.1));
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--text-secondary, #94a3b8);
    transition: all 0.2s ease;
}

.file-chip:hover {
    background: var(--surface-hover, rgba(30,41,59,0.6));
    border-color: var(--border-strong, rgba(248,250,252,0.2));
}

.file-chip.is-image {
    padding: 4px;
    border-radius: 12px;
}

.file-chip-thumb {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.file-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
}

.file-chip-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

@media (max-width: 768px) {
    .topbar { height: 56px; padding: 0 12px; }
    .topbar-actions { gap: 4px; }
    .icon-btn { width: 36px; height: 36px; }
    .chat-scroll { padding: 12px; }
    .input-area { padding: 8px 12px 12px; }
    .welcome-title { font-size: 1.6rem; }
    .welcome-capabilities { gap: 6px; }
    .capability-badge { font-size: 0.7rem; padding: 4px 10px; }
    .message { max-width: calc(100% - 44px); padding: 10px 14px; }
    #userInput { font-size: 16px !important; }
    .input-buttons button { min-width: 40px; min-height: 40px; }
}

@media (max-width: 480px) {
    .topbar { padding: 0 8px; height: 48px; }
    .message-avatar { width: 28px; height: 28px; font-size: 0.75rem; }
    .message { max-width: calc(100% - 36px); padding: 8px 12px; }
    .icon-btn { width: 32px; height: 32px; }
    .input-container { padding: 8px 10px; }
}

/* ========================================
   RESPONSE TIME BADGE
   ======================================== */

.response-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    background: var(--surface, rgba(15,23,42,0.45));
    border: 1px solid var(--border, rgba(248,250,252,0.1));
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    margin-left: 8px;
    cursor: default;
}

.response-time-badge::before {
    content: '\u26a1';
    font-size: 0.65rem;
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .skeleton-line, .skeleton-avatar { animation: none !important; opacity: 0.3; }
    .welcome-card { opacity: 1; animation: none; }
    .message-text.streaming::after { display: none; }
}

/* ========================================
   MISSING UI CLASSES (Additive Fixes)
   ======================================== */

/* Logo glow */
.glow-primary {
    filter: drop-shadow(0 0 8px var(--primary-glow, rgba(248,250,252,0.2)));
}

/* Status indicator breathing animation */
.status-indicator.breathe {
    animation: breathe-pulse 2s ease-in-out infinite;
}

@keyframes breathe-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Underline hover for footer links */
.underline-hover {
    text-decoration: none;
    color: var(--text-muted, #64748b);
    transition: color var(--trans-fast, 0.15s ease);
}

.underline-hover:hover {
    color: var(--text, #f8fafc);
    text-decoration: underline;
}

/* Toggle group layout */
.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface, rgba(15,23,42,0.45));
    border: 1px solid var(--border, rgba(248,250,252,0.1));
    transition: background var(--trans-fast, 0.15s ease);
}

.toggle-item:hover {
    background: var(--surface-hover, rgba(30,41,59,0.6));
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text, #f8fafc);
}

.toggle-desc {
    font-size: 0.72rem;
    color: var(--text-muted, #64748b);
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border-strong, rgba(248,250,252,0.2));
    transition: var(--trans-fast, 0.15s ease);
    border-radius: 22px;
}

.slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: var(--trans-fast, 0.15s ease);
    border-radius: 50%;
}

.switch input:checked + .slider {
    background: var(--primary, #818cf8);
}

.switch input:checked + .slider::before {
    transform: translateX(18px);
}

.slider.round {
    border-radius: 22px;
}

.slider.round::before {
    border-radius: 50%;
}

/* Sidebar close button */
.sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* New chat button */
.new-chat-btn {
    width: 100%;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-weight: 600;
}

/* Topbar styles */
.topbar-menu {
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #94a3b8);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--trans-fast, 0.15s ease);
}

.topbar-btn:hover {
    background: var(--surface, rgba(15,23,42,0.45));
    color: var(--text, #f8fafc);
}

/* Input wrap */
.input-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px;
    background: var(--surface-elevated, rgba(30,41,59,0.85));
    border: 1px solid var(--border, rgba(248,250,252,0.1));
    border-radius: 16px;
    box-shadow: var(--shadow-lg, 0 24px 80px rgba(0,0,0,0.8));
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border, rgba(248,250,252,0.1));
    border-top-color: var(--primary, #818cf8);
    border-radius: 50%;
    animation: loading-spin 0.8s linear infinite;
}

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

.loading-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text, #f8fafc);
}

.loading-dots {
    display: flex;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary, #818cf8);
    animation: loading-dot-bounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loading-dot-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ========================================
   COLLAPSIBLE SIDEBAR
   ======================================== */

/* Collapsed sidebar */
.sidebar.collapsed {
    width: 58px !important;
    min-width: 58px !important;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sidebar.collapsed .sidebar-content,
.sidebar.collapsed .sidebar-stats-section,
.sidebar.collapsed .sidebar-model-select,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .sidebar-close,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-toggle-group {
    display: none !important;
}

.sidebar.collapsed .sidebar-header {
    padding: 16px 12px;
    justify-content: center;
    border-bottom: none;
}

.sidebar.collapsed .sidebar-logo {
    margin: 0;
}

.sidebar.collapsed .sidebar-header .collapse-toggle {
    display: flex;
}

.sidebar.collapsed .sidebar-header .collapse-toggle svg {
    transform: rotate(180deg);
}

/* Collapse toggle button */
.collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted, #64748b);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--trans-fast, 0.15s ease);
    flex-shrink: 0;
}

.collapse-toggle:hover {
    background: var(--surface-hover, rgba(30,41,59,0.6));
    color: var(--text, #f8fafc);
}

.collapse-toggle svg {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide resizer when collapsed */
.sidebar.collapsed + .sidebar-resizer {
    cursor: default;
    pointer-events: none;
    opacity: 0.3;
}

/* Responsive: disable collapse on mobile */
@media (max-width: 768px) {
    .sidebar.collapsed {
        width: 280px !important;
        min-width: 280px !important;
    }
    .sidebar.collapsed .sidebar-content,
    .sidebar.collapsed .sidebar-stats-section,
    .sidebar.collapsed .sidebar-model-select,
    .sidebar.collapsed .sidebar-footer,
    .sidebar.collapsed .logo-text,
    .sidebar.collapsed .sidebar-close,
    .sidebar.collapsed .sidebar-section-label,
    .sidebar.collapsed .sidebar-toggle-group {
        display: flex !important;
    }
    .sidebar.collapsed .sidebar-header {
        padding: 20px 24px;
        justify-content: space-between;
        border-bottom: var(--glass-border, 1px solid rgba(248,250,252,0.12));
    }
    .sidebar.collapsed .sidebar-header .collapse-toggle {
        display: none;
    }
}

/* ========================================
   SIDEBAR TOGGLE GROUP
   ======================================== */

.sidebar-toggle-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 20px 12px;
}

/* ========================================
   CONVERSATION HISTORY EMPTY STATE
   ======================================== */

.history-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
    gap: 4px;
}

.history-empty-state span {
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

.history-empty-hint {
    font-size: 0.72rem !important;
    color: var(--border-strong, rgba(248,250,252,0.2)) !important;
    font-weight: 400 !important;
}

/* Hide empty state when history items exist */
#sidebarHistory:has(.conv-item) .history-empty-state {
    display: none;
}

/* ========================================
   SIDEBAR FOOTER POLISH
   ======================================== */

.sidebar-footer {
    padding: 16px 20px;
    border-top: var(--glass-border, 1px solid rgba(248,250,252,0.12));
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.sidebar-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.72rem;
}

.sidebar-links span[aria-hidden] {
    color: var(--border-strong, rgba(248,250,252,0.2));
    font-size: 0.6rem;
}

.sidebar-copy {
    font-size: 0.68rem;
    color: var(--text-muted, #64748b);
    text-align: center;
    opacity: 0.6;
    line-height: 1.4;
}

/* Model Badge in footer */
.model-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
    flex-shrink: 0;
}

/* ========================================
   INPUT TOGGLES SCROLLBAR HIDE
   ======================================== */

.input-toggles::-webkit-scrollbar {
    display: none;
}

/* ========================================
   WELCOME CARD OPACITY SAFETY NET
   ======================================== */

@media (prefers-reduced-motion: no-preference) {
    .welcome-card {
        opacity: 0;
        animation: welcome-card-in 0.5s ease forwards;
    }
}

/* When reduced-motion is preferred or JS fails, ensure visibility */
.welcome-card {
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .welcome-card {
        opacity: 0;
    }
}

/* ========================================
   SEO TITLE & WELCOME SCREEN FIX
   The SEO-optimized H1 is longer than the
   old "ChatAI" text — scale it properly
   so subtitle + badges stay above the fold.
   ======================================== */

.welcome {
    min-height: 40vh;
    gap: 16px;
    padding: 24px 20px 16px;
}

.welcome-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.15;
    max-width: 700px;
}

.welcome-subtitle {
    font-size: clamp(0.85rem, 1.8vw, 1.05rem);
    color: var(--text-secondary, #94a3b8);
    max-width: 580px;
    line-height: 1.65;
    margin-bottom: 8px;
    opacity: 0.9;
}

/* Ensure capability badges are always visible */
.welcome-capabilities {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 20px;
    max-width: 680px;
}

.capability-badge {
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    white-space: nowrap;
}

/* Give chat-scroll proper bottom spacing so input area doesn't overlap content */
.chat-scroll {
    padding-bottom: 8px;
}

/* ========================================
   WELCOME CARDS GRID REFINEMENT
   ======================================== */

.welcome-cards {
    max-width: 680px;
    gap: 12px;
}

.welcome-card {
    padding: 16px;
    border-radius: 12px;
}

.welcome-card-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.welcome-card h3 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.welcome-card p {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-secondary, #94a3b8);
}

/* ========================================
   TOPBAR RIGHT ICONS — PREVENT OVERFLOW
   ======================================== */

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.topbar-actions::-webkit-scrollbar {
    display: none;
}

/* ========================================
   INPUT AREA COMPACTNESS
   Reduce vertical footprint so more of the
   welcome screen is visible on first load.
   ======================================== */

.input-toggles {
    gap: 8px;
    padding: 4px 0;
}

.tool-toggle .toggle-label {
    font-size: 0.72rem;
}

/* ========================================
   MOBILE REFINEMENTS
   ======================================== */

@media (max-width: 768px) {
    .welcome {
        min-height: 30vh;
        gap: 12px;
        padding: 16px 16px 8px;
    }

    .welcome-title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
        line-height: 1.2;
    }

    .welcome-subtitle {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .welcome-capabilities {
        gap: 6px;
        margin: 4px 0 12px;
    }

    .capability-badge {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    .welcome-cards {
        gap: 8px;
    }

    .welcome-card {
        padding: 12px;
    }

    .welcome-card-icon {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }

    .welcome-card h3 {
        font-size: 0.82rem;
    }

    .welcome-card p {
        font-size: 0.72rem;
    }

    /* Topbar: prevent icon overflow on mobile */
    .topbar-actions .icon-btn:nth-child(n+5) {
        display: none;
    }

    .topbar-actions .export-wrapper .topbar-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .welcome {
        min-height: 20vh;
        padding: 12px 12px 4px;
        gap: 8px;
    }

    .welcome-title {
        font-size: 1.25rem;
    }

    .welcome-subtitle {
        font-size: 0.8rem;
    }

    .welcome-capabilities {
        gap: 4px;
        margin: 2px 0 8px;
    }

    .capability-badge {
        font-size: 0.6rem;
        padding: 3px 7px;
    }

    .welcome-cards {
        gap: 6px;
    }

    /* Hide less important topbar icons */
    .topbar-actions .icon-btn:nth-child(n+4) {
        display: none;
    }
}

/* ========================================
   LARGE SCREEN: WELCOME LOOKS PREMIUM
   ======================================== */

@media (min-width: 1200px) {
    .welcome {
        min-height: 45vh;
        gap: 20px;
        padding: 32px 24px 20px;
    }

    .welcome-title {
        font-size: 2.5rem;
    }

    .welcome-subtitle {
        font-size: 1.05rem;
    }
}

/* ========================================
   AUTO-SCROLL BADGE — POSITION FIX
   ======================================== */

.auto-scroll-badge {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 50;
}

/* ========================================
   ROCKET BUTTON / FLOATING ELEMENTS
   Keep them from overlapping the input area
   ======================================== */

.floating-action-btn {
    z-index: 45;
}