/* Variables - Mega Big Tech Copilot Theme */
:root {
    --primary-color: #0B5CFF;
    --secondary-color: #22C55E;
    --accent-color: #7C3AED;
    --text-color: #0F0F11;
    --light-text: #6B7280;
    --background-color: #F1F5F9;
    --white: #ffffff;
    --dark-bg: #1E293B;
    --message-bg: #F8FAFC;
    --ai-message-bg: #EEF2FF;
    --border-color: #E2E8F0;
    --shadow: 0 4px 20px rgba(11, 92, 255, 0.08);
    --shadow-hover: 0 8px 30px rgba(11, 92, 255, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    padding-top: 80px; /* Account for nav only */
}

/* Navigation */
.top-nav {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(11, 92, 255, 0.05);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(11, 92, 255, 0.05);
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding: 40px 20px 0;
    max-width: 1600px;
    margin: 0 auto;
}

.copilot-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: auto 1fr;
    gap: 30px;
    min-height: calc(100vh - 180px);
    grid-template-areas: 
        "header sidebar"
        "chat sidebar";
}

/* Header Section */
.copilot-header {
    grid-area: header;
    background: linear-gradient(135deg, var(--primary-color) 30%, var(--accent-color) 70%);
    border-radius: var(--border-radius);
    padding: 40px;
    color: var(--white);
    text-align: center;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
}

.ai-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.header-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary-color);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.status-dot.online {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 10px rgba(34, 197, 94, 0.5); }
    50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.8); }
    100% { box-shadow: 0 0 10px rgba(34, 197, 94, 0.5); }
}

/* Chat Container */
.chat-container {
    grid-area: chat;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 300px;
    max-height: 60vh;
}

/* Message Styles */
.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.ai-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ai-message .message-avatar {
    background: var(--ai-message-bg);
    color: var(--primary-color);
}

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

.message-content {
    background: var(--message-bg);
    border-radius: 12px;
    padding: 15px;
    position: relative;
}

.ai-message .message-content {
    background: var(--ai-message-bg);
    border: 1px solid rgba(11, 92, 255, 0.1);
}

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

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sender {
    font-weight: 600;
    font-size: 0.9rem;
}

.timestamp {
    font-size: 0.8rem;
    opacity: 0.7;
}

.message-text {
    line-height: 1.6;
}

.message-text ul {
    margin: 10px 0;
    padding-left: 20px;
}

.message-text li {
    margin-bottom: 5px;
}

/* Quick Actions */
.quick-actions {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(11, 92, 255, 0.02);
}

.quick-actions h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.action-btn {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    text-align: left;
}

.action-btn:hover {
    border-color: var(--primary-color);
    background: rgba(11, 92, 255, 0.02);
    transform: translateY(-1px);
}

.action-btn i {
    color: var(--primary-color);
    width: 16px;
}

/* Input Section */
.chat-input-container {
    border-top: 1px solid var(--border-color);
    padding: 20px;
    background: var(--white);
}

.input-features {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.feature-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--light-text);
}

.feature-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.chat-input {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#messageInput {
    flex: 1;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    max-height: 120px;
    transition: var(--transition);
}

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

.send-button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-button:hover:not(:disabled) {
    background: #0952E6;
    transform: translateY(-1px);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-help {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--light-text);
    text-align: center;
}

.input-help kbd {
    background: var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Sidebar */
.copilot-sidebar {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.sidebar-section h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-section h3 i {
    color: var(--primary-color);
}

/* Conversation List */
.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.conversation-item {
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.conversation-item:hover {
    background: rgba(11, 92, 255, 0.02);
    border-color: var(--primary-color);
}

.conversation-title {
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.conversation-time {
    font-size: 0.8rem;
    color: var(--light-text);
}

/* Tool Links */
.tool-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.tool-link:hover {
    background: rgba(11, 92, 255, 0.05);
    color: var(--primary-color);
}

.tool-link i {
    width: 16px;
    color: var(--primary-color);
}

/* Model Info */
.model-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.label {
    color: var(--light-text);
    font-weight: 500;
}

.value {
    color: var(--text-color);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .copilot-container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "chat"
            "sidebar";
        min-height: auto;
        gap: 20px;
    }
    
    .chat-messages {
        max-height: 50vh;
    }
    
    .copilot-sidebar {
        flex-direction: row;
        overflow-x: auto;
        gap: 15px;
    }
    
    .sidebar-section {
        min-width: 250px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 140px; /* Extra space for mobile nav */
    }
    
    .nav-links {
        display: none;
    }
    
    .main-content {
        padding: 20px 10px 0;
    }
    
    .copilot-container {
        gap: 15px;
        min-height: calc(100vh - 180px);
    }
    
    .copilot-header {
        padding: 30px 20px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .chat-messages {
        max-height: 40vh;
        min-height: 250px;
    }
    
    .copilot-sidebar {
        flex-direction: column;
        gap: 15px;
    }
    
    .sidebar-section {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .ai-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .message {
        max-width: 95%;
    }
    
    .input-features {
        flex-wrap: wrap;
    }
}