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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Top Header */
.top-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    gap: 8px;
}

.logo i {
    font-size: 20px;
    color: #ffd700;
}

.header-right {
    display: flex;
    gap: 8px;
}

.header-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.header-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* Main Container */
.main-container {
    display: flex;
    height: calc(100vh - 140px); /* Adjust for header, menu, toolbar, and status bar */
    position: relative;
}

/* Quick Toolbar */
.quick-toolbar {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.toolbar-section {
    display: flex;
    gap: 4px;
}

.toolbar-btn {
    background: none;
    border: 1px solid #dee2e6;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: #495057;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.toolbar-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.toolbar-btn:active {
    background: #dee2e6;
    transform: translateY(1px);
}

.toolbar-btn i {
    font-size: 14px;
}

/* Status Bar */
.status-bar {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 6px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.status-left, .status-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ai-status-btn, .menu-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.ai-status-btn:hover, .menu-btn:hover {
    background: #e9ecef;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-btn span {
        display: none;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    .status-left, .status-right {
        gap: 8px;
    }
    
    .status-left span:not(:first-child) {
        display: none;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Focus States */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .top-header {
        background: #000;
        border-bottom: 2px solid #fff;
    }
    
    .toolbar-btn {
        border-color: #000;
    }
    
    .status-bar {
        border-top-color: #000;
    }
}
