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

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

:root {
    --primary: #10a37f;
    --primary-dark: #0d8c6d;
    --primary-light: #19c593;
    --secondary: #6e6e80;
    --accent: #8e8ea0;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f8;
    --bg-tertiary: #ececf1;
    --bg-elevated: #ffffff;
    
    --text-primary: #2e2e3a;
    --text-secondary: #565869;
    --text-tertiary: #8e8ea0;
    
    --border: #d9d9e3;
    --border-light: #ececf1;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    --sidebar-width: 280px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Support for notched devices */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.app-container { 
    display: flex; 
    height: 100vh; 
    position: relative;
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    background: transparent;
    border: none;
    padding: 0;
    padding-top: env(safe-area-inset-top, 0);
    width: 44px;
    height: calc(56px + env(safe-area-inset-top, 0px));
    cursor: pointer;
    transition: background 0.2s ease;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle:hover {
    background: var(--bg-secondary);
}

.menu-toggle:active {
    background: var(--bg-tertiary);
}

.menu-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
    display: block;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 900;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    padding-right: 56px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.logo svg {
    color: var(--primary);
    flex-shrink: 0;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.projects-section {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.projects-section h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding: 0 8px;
}

.project-item {
    padding: 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    position: relative;
}

.project-item:hover {
    background: var(--bg-tertiary);
}

.project-item.active {
    background: var(--bg-elevated);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.project-item h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    padding-right: 24px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-item p {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.delete-project-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    background: #ef4444;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0;
    transition: all 0.15s ease;
}

.project-item:hover .delete-project-btn { 
    opacity: 1; 
}

.delete-project-btn:hover { 
    background: #dc2626; 
    transform: scale(1.1);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    min-width: 0;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
}

.welcome-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.welcome-content { 
    max-width: 500px; 
    padding: 40px 20px;
    width: 100%;
}

.welcome-icon { 
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.welcome-icon svg { 
    color: var(--primary); 
    opacity: 0.9;
}

.welcome-content h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.welcome-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.5;
}

.project-view { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

.project-header {
    padding: 16px 20px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.project-info h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.stat svg { 
    color: var(--primary); 
    opacity: 0.8;
    flex-shrink: 0;
}

.chat-wrapper { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    min-height: 0; 
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background: var(--bg-primary);
}

.messages {
    padding: 16px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.message {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease-out;
}

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

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.message.user .message-avatar {
    background: var(--primary);
    border-color: var(--primary);
    order: 2;
}

.message.user .message-avatar svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.message.assistant .message-avatar {
    background: var(--bg-elevated);
}

.message.assistant .message-avatar svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
}

.message-content {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: 14px;
}

.message.user .message-content {
    background: var(--primary);
    color: white;
}

.message.assistant .message-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.message-content h1, 
.message-content h2, 
.message-content h3 {
    margin: 12px 0 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.message-content strong { 
    font-weight: 600; 
}

.message.user .message-content strong {
    color: white;
}

.message.assistant .message-content strong {
    color: var(--primary);
}

.message-content em { font-style: italic; }

.message-content ul, 
.message-content ol { 
    margin: 8px 0; 
    padding-left: 20px; 
}

.message-content li { 
    margin: 6px 0; 
}

.message-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}

.message-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-content pre code {
    background: none;
    padding: 0;
}

.input-container {
    flex-shrink: 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

.input-area {
    max-width: 800px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#messageInput {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    max-height: 150px;
    min-height: 42px;
    transition: all 0.15s ease;
}

#messageInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.1);
}

#messageInput::placeholder { 
    color: var(--text-tertiary); 
}

.btn-send {
    background: var(--primary);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.btn-send:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.btn-send:active:not(:disabled) {
    transform: scale(0.95);
}

.btn-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-send svg {
    width: 18px;
    height: 18px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.btn svg {
    flex-shrink: 0;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.show { 
    display: flex; 
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-elevated);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.2s ease-out;
    border: 1px solid var(--border);
}

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

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body { 
    padding: 16px 20px; 
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.15s ease;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.1);
}

.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 32px 16px;
    text-align: center;
    transition: all 0.15s ease;
    margin-bottom: 16px;
    background: var(--bg-secondary);
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--bg-tertiary);
}

.file-input { 
    display: none; 
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-secondary);
}

.file-label:hover {
    color: var(--primary);
}

.file-label svg { 
    color: var(--primary);
    flex-shrink: 0;
}

#uploadStatus {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    display: none;
}

#uploadStatus.show {
    display: block;
}

#uploadStatus.success {
    background: rgba(16, 163, 127, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
}

#uploadStatus.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
}

#uploadStatus.loading {
    background: rgba(142, 142, 160, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

::-webkit-scrollbar { 
    width: 8px; 
    height: 8px; 
}

::-webkit-scrollbar-track { 
    background: var(--bg-primary); 
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover { 
    background: var(--text-tertiary); 
}

/* ============================================
   COLLAPSIBLE SIDEBAR FOR DESKTOP (ChatGPT-style)
   ============================================ */

/* Sidebar Toggle Button (inside sidebar header) */
.sidebar-toggle-btn {
    position: fixed;
    top: 20px;
    left: 232px;
    width: 32px;
    height: 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    color: var(--text-secondary);
    z-index: 950;
    box-shadow: var(--shadow);
}

.sidebar-toggle-btn:hover {
    background: var(--bg-tertiary);
}

.sidebar-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* Sidebar Open Button (appears when collapsed) */
.sidebar-open-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    z-index: 950;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.sidebar-open-btn.visible {
    opacity: 1;
    transform: scale(1);
}

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

.sidebar-open-btn svg {
    width: 20px;
    height: 20px;
}

/* Collapsed state */
.app-container.sidebar-collapsed .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
}

.app-container.sidebar-collapsed .main-content {
    margin-left: 0;
}

.app-container.sidebar-collapsed .project-header {
    padding-left: 76px;
}

.app-container.sidebar-collapsed .sidebar-toggle-btn {
    opacity: 0;
    pointer-events: none;
}

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

/* Mobile Devices (up to 767px) */
@media (max-width: 767px) {
    .menu-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 85vw;
        max-width: 300px;
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 998;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Fade out project title when sidebar opens */
    .sidebar.active ~ .main-content .project-info {
        opacity: 0.3;
        pointer-events: none;
    }

    .sidebar-header {
        padding: 16px;
        padding-top: 60px;
        padding-right: 16px;
    }

    .logo {
        margin-bottom: 12px;
    }

    .logo-text {
        font-size: 18px;
    }

    .btn-text {
        display: none;
    }

    .btn {
        padding: 8px 12px;
    }

    .btn svg {
        margin: 0;
    }

    .project-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 0 12px;
        padding-left: 44px;
        padding-top: env(safe-area-inset-top, 0);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 56px;
        background: var(--bg-elevated);
        z-index: 900;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
        /* Ensure visibility above all browser UI */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }

    .project-info {
        flex: 1;
        min-width: 0;
        margin-right: 8px;
        display: flex;
        align-items: center;
        height: 56px;
    }

    .project-info h2 {
        font-size: 16px;
        font-weight: 600;
        margin: 0;
        padding: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--text-primary);
        line-height: 56px;
        /* Prevent text rendering issues */
        -webkit-font-smoothing: antialiased;
    }

    .project-stats {
        display: none;
    }

    .project-header .btn {
        font-size: 12px;
        padding: 6px 10px;
        flex-shrink: 0;
        border-radius: 6px;
    }

    .project-header .btn svg {
        width: 14px;
        height: 14px;
    }

    .project-header .btn-text {
        display: none;
    }

    .stat {
        font-size: 12px;
    }

    .chat-wrapper {
        padding-top: calc(56px + env(safe-area-inset-top, 0px));
    }

    .project-header {
        height: calc(56px + env(safe-area-inset-top, 0px));
    }

    .messages {
        padding: 12px;
    }
    
    .message {
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .message-avatar {
        width: 28px;
        height: 28px;
    }
    
    .message-avatar svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .message-content {
        max-width: 90%;
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .input-area {
        padding: 10px 12px;
        gap: 8px;
    }
    
    #messageInput {
        font-size: 16px;
        padding: 10px 12px;
        min-height: 40px;
    }

    #messageInput::placeholder {
        font-size: 14px;
    }
    
    .btn-send {
        width: 40px;
        height: 40px;
    }
    
    .btn-send svg {
        width: 16px;
        height: 16px;
    }
    
    .welcome-content {
        padding: 20px;
    }
    
    .welcome-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .welcome-content h1 {
        font-size: 24px;
    }
    
    .welcome-content p {
        font-size: 14px;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    .file-upload-area {
        padding: 24px 12px;
    }
    
    .file-label svg {
        width: 40px;
        height: 40px;
    }
    
    .sidebar-toggle-btn {
        display: none !important;
    }
}

/* Small Mobile (up to 380px) */
@media (max-width: 380px) {
    .sidebar {
        width: 90vw;
    }

    .logo-text {
        font-size: 16px;
    }

    .project-info h2 {
        font-size: 16px;
    }

    .project-header .btn {
        padding: 8px;
    }

    .project-header .btn svg {
        width: 16px;
        height: 16px;
    }

    .welcome-content h1 {
        font-size: 20px;
    }

    .message-content {
        max-width: 95%;
        font-size: 13px;
    }

    .project-item h4 {
        font-size: 13px;
    }
}

/* Tablet Devices (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .menu-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }
    
    .project-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 16px 24px;
    }
    
    .messages {
        padding: 20px;
    }
    
    .input-area {
        padding: 16px 24px;
    }
    
    .message-content {
        max-width: 75%;
    }
    
    .sidebar-toggle-btn {
        display: none !important;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .menu-toggle {
        display: none !important;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transition: transform 0.3s ease;
        z-index: 900;
    }

    .sidebar-toggle-btn {
        display: flex !important;
    }

    .sidebar-open-btn {
        display: flex !important;
    }

    .main-content {
        margin-left: var(--sidebar-width);
        transition: margin-left 0.3s ease;
    }

    .app-container.sidebar-collapsed .main-content {
        margin-left: 0;
    }
    
    .project-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 20px 32px;
    }
    
    .messages {
        padding: 24px;
    }
    
    .input-area {
        padding: 16px 24px;
    }
    
    .message-content {
        max-width: 70%;
    }
    
    .message-avatar {
        width: 36px;
        height: 36px;
    }
    
    .message-avatar svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .message-content {
        font-size: 15px;
    }
    
    #messageInput {
        max-height: 200px;
        min-height: 44px;
        font-size: 14px;
    }
    
    .btn-send {
        width: 44px;
        height: 44px;
    }
    
    .btn-send svg {
        width: 20px;
        height: 20px;
    }
}

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
    :root {
        --sidebar-width: 320px;
    }
    
    .messages {
        max-width: 900px;
    }
    
    .input-area {
        max-width: 900px;
    }
    
    .sidebar-toggle-btn {
        left: calc(320px - 15px);
    }
}

/* Landscape Mode Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .sidebar-header {
        padding: 12px 16px;
    }
    
    .logo {
        margin-bottom: 8px;
    }
    
    .project-header {
        padding: 12px 20px;
    }
    
    .welcome-content {
        padding: 20px;
    }
    
    .welcome-icon svg {
        width: 50px;
        height: 50px;
    }
    
    .welcome-content h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .welcome-content p {
        margin-bottom: 16px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .input-container {
        padding: 8px 16px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .input-container,
    .project-header,
    .menu-toggle,
    .modal,
    .sidebar-toggle-btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .messages {
        max-width: 100%;
    }
    
    .message {
        page-break-inside: avoid;
    }
}