/* ===========================
   KineticForge Base Styles
   Shared foundation for all pages
   =========================== */

/* Google Fonts are now loaded in index.html to prevent blocking */

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Clean White/Black/Grey + Red Accent System - Dark Mode (Default) */
    --bg: #0f172a; /* black */
    --surface: #1e293b; /* dark grey */
    --text: #ffffff; /* white */
    --muted: #94a3b8; /* light grey */
    --line: #334155; /* card grey */
    --accent: #ffffff; /* white for primary elements */
    --metal: #cbd5e1; /* light grey dividers */
    --success: #1F9D72;
    --warning: #B08900;
    --danger: #B3261E;
    
    /* Icon Color - Red ONLY for logos */
    --icon-color: #ef4444;
    
    /* Dual-Voice Font System */
    --font-bitcount: "Bitcount Prop Double", system-ui, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --font-ibm: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
    --font-inter: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Spacing & Layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --border-radius: var(--radius-md); /* Legacy alias */
    --shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.08);
    --shadow-hover: 0 2px 8px rgba(0,0,0,.06);

    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    
    /* Gradients removed - using solid colors only */
    
    /* Legacy variables for compatibility */
    --primary-color: var(--accent);
    --primary-hover: #1e293b;
    --text-primary: var(--text);
    --text-secondary: var(--muted);
    --text-muted: var(--muted);
    --bg-main: var(--bg);
    --bg-secondary: var(--surface);
    --bg-tertiary: var(--line);
    --border-color: var(--line);
    --success-color: var(--success);
    --warning-color: var(--warning);
    --spacing-xs: var(--space-1);
    --spacing-sm: var(--space-2);
    --spacing-md: var(--space-4);
    --spacing-lg: var(--space-6);
    --spacing-xl: var(--space-8);
    --spacing-2xl: var(--space-12);
    --spacing-3xl: var(--space-16);
}

[data-theme="light"] {
    /* Light Mode */
    --bg: #ffffff; /* white */
    --surface: #f8fafc; /* light grey */
    --text: #0f172a; /* dark */
    --muted: #64748b; /* medium grey */
    --line: #e2e8f0; /* light border */
    --accent: #0f172a; /* dark for primary elements */
    --metal: #cbd5e1; /* light grey dividers */
    --success: #1F9D72;
    --warning: #B08900;
    --danger: #B3261E;
    
    /* Icon Color - Red ONLY for logos */
    --icon-color: #ef4444;
    
    /* Dual-Voice Font System */
    --font-bitcount: "Bitcount Prop Double", system-ui, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --font-ibm: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
    --font-inter: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Spacing & Layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --border-radius: var(--radius-md); /* Legacy alias */
    --shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.08);
    --shadow-hover: 0 2px 8px rgba(0,0,0,.06);

    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    
    /* Gradients removed - using solid colors only */
    
    /* Legacy variables for compatibility */
    --primary-color: var(--accent);
    --primary-hover: #f1f5f9;
    --text-primary: var(--text);
    --text-secondary: var(--muted);
    --text-muted: var(--muted);
    --bg-main: var(--bg);
    --bg-secondary: var(--surface);
    --bg-tertiary: var(--line);
    --border-color: var(--line);
    --success-color: var(--success);
    --warning-color: var(--warning);
    --spacing-xs: var(--space-1);
    --spacing-sm: var(--space-2);
    --spacing-md: var(--space-4);
    --spacing-lg: var(--space-6);
    --spacing-xl: var(--space-8);
    --spacing-2xl: var(--space-12);
    --spacing-3xl: var(--space-16);
}

/* Base Styles */
html {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-inter);
    font-size: 17px;
    line-height: 1.6;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Push content when sidebar is visible (desktop only) */
@media (min-width: 769px) {
    /* Always show sidebar on desktop */
    .sidebar {
        transform: translateX(0) !important;
    }
    
    /* Push body content (but not header - it's fixed) */
    body.sidebar-expanded {
        padding-left: 240px;
    }
    
    body:not(.sidebar-expanded) {
        padding-left: 0;
    }
    
    /* Enable transitions only after initial load to prevent layout shift */
    body.sidebar-expanded,
    body:not(.sidebar-expanded) {
        transition: padding-left 0.3s ease-in-out;
    }
    
    /* Disable transition on initial render */
    body:not(.sidebar-initialized) {
        transition: none !important;
    }
    
    /* Add padding to body to account for fixed header */
    body {
        padding-top: 60px;
    }
}

/* ===========================
   Typography System
   =========================== */

/* Bitcount Layer - Luxury/Identity */
.bitcount, h1, .logo {
    font-family: var(--font-bitcount);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    font-weight: 400;
    line-height: 1.05;
    color: var(--text);
    font-optical-sizing: auto;
    font-variation-settings: "slnt" 0, "CRSV" 0.5, "ELSH" 0, "ELXP" 0;
}

h1 {
    font-size: clamp(32px, 5vw, 56px);
    margin-bottom: var(--space-3);
}

/* IBM Plex Mono Layer - Technical/Content */
.ibm, h2, h3, .meta {
    font-family: var(--font-ibm);
    font-weight: 200; /* Extralight */
    font-style: normal;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--text);
}

h2 {
    font-size: clamp(24px, 3.5vw, 36px);
    margin-bottom: var(--space-4);
}

h3 {
    font-size: clamp(20px, 3vw, 28px);
    margin-bottom: var(--space-3);
}

/* Inter Layer - Readability/Fallback */
body, p, li, button, small, .button, .nav-link, .footer-link {
    font-family: var(--font-inter);
    font-size: 17px;
    line-height: 1.6;
}

p {
    color: var(--text);
    max-width: 65ch;
}

.small {
    font-size: 14px;
    line-height: 1.5;
}

.overline {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ===========================
   Layout Components
   =========================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ===========================
   Sidebar Component
   =========================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px; /* Start below header */
    height: calc(100vh - 60px); /* Account for header height */
    width: 0;
    background: var(--surface);
    border-right: none;
    z-index: 90;
    transition: width 0.3s ease-in-out, border-right 0.3s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar.expanded {
    width: 240px;
    border-right: 1px solid var(--line);
}

.sidebar-nav {
    flex: 1;
    padding: var(--spacing-lg) 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    overflow-y: visible;
    min-height: 0;
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--muted);
    font-family: var(--font-bitcount);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0;
    transition: opacity 0.3s ease, color 0.2s ease, background 0.2s ease;
    margin-top: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
    position: relative;
    border-radius: var(--radius-sm);
}

.sidebar.expanded .sidebar-section-header {
    opacity: 1;
}

.sidebar-section-header.active {
    color: var(--text);
    background: rgba(239, 68, 68, 0.1);
}

.sidebar-section-header.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--icon-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.sidebar-tools-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    background: rgba(239, 68, 68, 0.05);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) 0;
    margin-bottom: var(--spacing-md);
}

.sidebar-tools-group .sidebar-link {
    margin-left: var(--spacing-md);
    margin-right: var(--spacing-md);
    border-radius: var(--radius-sm);
    justify-content: flex-end;
}

.sidebar-tools-group .sidebar-link .sidebar-text {
    text-align: right;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--muted);
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--font-bitcount);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    line-height: 1.05;
    font-optical-sizing: auto;
    font-variation-settings: "slnt" 0, "CRSV" 0.5, "ELSH" 0, "ELXP" 0;
    min-height: 44px;
    position: relative;
}

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

.sidebar-link.active {
    color: var(--text);
    background: rgba(239, 68, 68, 0.1);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--icon-color);
}

.sidebar-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* When sidebar-icon contains an image, override text properties */
.sidebar-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* Ensure text content still displays properly when no image */
.sidebar-icon:not(:has(img)) {
    font-size: 0.875rem;
    font-weight: 400;
}

.sidebar-text {
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1rem;
}

.sidebar.expanded .sidebar-text {
    opacity: 1;
}

/* Conversations section in sidebar (for Blitz Chat) */
.sidebar-conversations {
    border-top: 1px solid var(--line);
    margin-top: auto;
    display: flex;
    flex-direction: column;
    max-height: 40vh; /* Limit height to allow scrolling */
    min-height: 0;
    overflow: hidden;
}

.sidebar-conversations .sidebar-section-header {
    flex-shrink: 0;
    margin-top: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
}

.sidebar-conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xs) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    min-height: 0;
}

.sidebar-conversation-item {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    font-family: var(--font-inter);
    font-size: 0.875rem;
}

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

.sidebar-conversation-item.active {
    background: rgba(239, 68, 68, 0.1);
    color: var(--text);
}

.sidebar-conversation-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--icon-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.sidebar-conversation-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: var(--spacing-xs);
    color: inherit;
}

.sidebar-conversation-delete {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 var(--spacing-xs);
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-conversation-item:hover .sidebar-conversation-delete {
    opacity: 1;
}

.sidebar-conversation-delete:hover {
    color: var(--accent);
}

.sidebar-conversation-empty {
    padding: var(--spacing-md);
    text-align: center;
    color: var(--muted);
    font-size: 0.875rem;
    font-family: var(--font-inter);
}

.sidebar-footer {
    padding: 0;
    border-top: 1px solid var(--line);
    margin-top: 0; /* No margin since conversations section handles spacing */
    overflow: hidden;
}

.sidebar-account {
    margin-top: 0;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 85;
}

@media (max-width: 768px) {
    body.sidebar-expanded,
    body:not(.sidebar-expanded) {
        padding-left: 0;
        margin-left: 0;
    }
    
    .sidebar {
        top: 60px; /* Start below header on mobile too */
        height: calc(100vh - 60px);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .sidebar.expanded {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        top: 60px; /* Overlay starts below header */
        height: calc(100vh - 60px);
    }
    
    body.sidebar-expanded .sidebar-overlay {
        opacity: 1;
        pointer-events: all;
    }
    
    body.sidebar-expanded {
        overflow: hidden;
    }
    
    /* Header stays full width and leftmost on mobile */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        margin-left: 0 !important;
        padding-left: 0 !important;
        width: 100%;
    }
    
    /* Add padding to body to account for fixed header */
    body {
        padding-top: 60px;
    }
    
    /* Conversations section responsive */
    .sidebar-conversations {
        max-height: 30vh; /* Smaller on mobile */
    }
    
    .sidebar-conversation-item {
        font-size: 0.8rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* ===========================
   Header Component
   =========================== */
.header {
    background: transparent;
    padding: var(--spacing-md) 0;
    border-bottom: 2px solid transparent;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}

.header.scrolled {
    background: var(--surface);
    border-bottom: 2px solid var(--line);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding: 0;
    padding-left: var(--spacing-sm); /* Small spacing before logo */
    position: relative;
    gap: var(--spacing-md); /* Space between sections */
}

/* Header Status Section (for Blitz Chat) */
.header-status-section {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    margin: 0 var(--spacing-md);
}

.header-time-info {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    font-size: 12px;
    font-family: var(--font-inter);
}

.header-time-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.header-time-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
}

.header-time-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
}

/* Header New Chat Button (styled like status items) */
.header-new-chat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: transparent;
    border: 1px dotted var(--text);
    color: var(--text);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-inter);
    min-width: fit-content;
}

.header-new-chat-btn:hover {
    background: var(--surface);
    border-color: var(--accent);
}

.header-new-chat-btn .header-time-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
}

.header-new-chat-btn .header-time-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
}

.header-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    margin-left: auto;
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text);
    padding: var(--space-2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.theme-toggle-btn:active {
    background: var(--line);
}

.theme-toggle-btn .theme-icon {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    color: var(--text);
    transition: color 0.2s ease;
}

.theme-toggle-btn:hover .theme-icon {
    color: var(--accent);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    font-family: var(--font-inter);
    padding: var(--spacing-xs) var(--spacing-sm);
    margin-left: var(--spacing-sm);
    transition: all 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
    white-space: nowrap;
}

.sidebar-toggle-btn:hover {
    color: var(--text);
    opacity: 1;
}

.header-logo {
    font-family: var(--font-bitcount);
    font-size: 1.5rem;
    color: var(--icon-color);
    font-weight: 400;
    line-height: 1;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    font-optical-sizing: auto;
    font-variation-settings: "slnt" 0, "CRSV" 0.5, "ELSH" 0, "ELXP" 0;
}

.brand-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.brand-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.brand-link:hover {
    opacity: 0.8;
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text);
    margin: 0;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Legacy nav styles for backwards compatibility */
.nav {
    position: absolute;
    right: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    font-family: var(--font-bitcount);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    line-height: 1.05;
    font-optical-sizing: auto;
    font-variation-settings: "slnt" 0, "CRSV" 0.5, "ELSH" 0, "ELXP" 0;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    color: var(--text);
}

/* ===========================
   Button System
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    min-height: 44px; /* Touch-friendly minimum */
    justify-content: center;
}

.btn-primary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--text);
}

.btn-primary:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--text);
}

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

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

.btn-small {
    padding: var(--space-2) var(--space-3);
    font-size: 14px;
    min-height: 36px;
}

.btn-icon {
    font-size: 1.1em;
}

/* ===========================
   Footer Component
   =========================== */
#footer-component {
    margin-top: auto;
}

.footer {
    background: var(--bg-secondary);
    padding: var(--spacing-md) 0 var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.footer-tagline {
    flex: 1;
}

.footer-tagline p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.footer-tagline p a {
    color: var(--icon-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-tagline p a:hover {
    opacity: 0.8;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* 40% smaller than header gap (16px * 0.6 ≈ 10px) */
}

.footer-logo {
    font-family: var(--font-bitcount);
    font-size: 1.2rem; /* 40% smaller than header logo (2rem * 0.6) */
    color: var(--icon-color);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.05em;
    font-optical-sizing: auto;
    font-variation-settings: "slnt" 0, "CRSV" 0.5, "ELSH" 0, "ELXP" 0;
}

.footer-logo::before {
    content: "{*}";
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.footer-bottom .brand-text {
    flex: none; /* Don't expand to fill space */
}

.footer-bottom .brand-text h1 {
    font-size: 1.2rem; /* Match the logo size */
}

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

/* ===========================
   Utility Classes
   =========================== */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--text); }
.text-metal { color: var(--metal); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* ===========================
   Mobile-First Responsive Design
   =========================== */

/* Small screens (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 14px;
        min-height: 40px;
    }
    
    .nav {
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        font-size: 14px;
    }
}

/* Tablet and below (768px) */
@media (max-width: 768px) {
    /* Keep header-content as row to maintain toggle button to the right */
    .header-content {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    /* Header status section - smaller on mobile */
    .header-status-section {
        margin: 0 var(--spacing-xs);
    }
    
    .header-time-info {
        gap: var(--spacing-xs);
        font-size: 10px;
    }
    
    .header-time-label {
        font-size: 8px;
    }
    
    .header-time-value {
        font-size: 10px;
    }
    
    .header-new-chat-btn {
        padding: var(--spacing-xs);
    }
    
    .header-new-chat-btn .header-time-label {
        font-size: 8px;
    }
    
    .header-new-chat-btn .header-time-value {
        font-size: 10px;
    }
    
    .nav {
        position: static;
        order: 2;
        gap: var(--spacing-md);
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-md);
    }
}

/* Desktop adjustments (1024px and above) */
@media (min-width: 1024px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
}
