/* Base styles - Reset, variables, and utilities */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height - accounts for mobile browser chrome */
    display: flex;
    overflow: hidden;
}

/* KaTeX alignment fix */
.katex-display {
   text-align: left !important;
   margin-left: 0px !important;
}

.katex-display > .katex {
    text-align: left !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .main-content {
        width: 100%;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    .message-input {
        font-size: 16px !important; /* Prevents iOS Safari auto-zoom on focus */
    }
    
    .chat-header {
        padding: 15px;
    }
    
    .chat-title {
        font-size: 16px;
    }
    
    .chat-input-area {
        padding: 15px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .sidebar {
        display: none !important;
    }
    
    .chat-header {
        padding: 10px;
    }
    
    .chat-input-area {
        padding: 10px;
    }
    
    .setting-group label {
        font-size: 12px;
    }
    
    .setting-group select,
    .setting-group input[type="range"] {
        font-size: 12px;
    }
}
