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

body {
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
}

/* Top Navigation Bar */
.top-nav {
    height: 56px;
    background: linear-gradient(135deg, #0a0a0a 0%, #16213e 100%);
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.nav-agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-avatar .avatar-icon {
    font-size: 16px;
    color: #00d4ff;
}

.nav-agent-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-agent-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.nav-agent-subtitle {
    font-size: 12px;
    color: #b0b0b0;
    margin: 0;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.hamburger-btn span {
    width: 20px;
    height: 2px;
    background: #00d4ff;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 24px;
    color: #00d4ff;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #00d4ff;
    letter-spacing: 1px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}

/* Model Selector */
.model-selector {
    position: relative;
}

.model-dropdown {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    padding: 6px 32px 6px 12px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.model-dropdown:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.model-dropdown:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

.model-dropdown option {
    background: #16213e;
    color: #ffffff;
    padding: 8px;
}

.status-indicators {
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

.indicator.local {
    background: #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

/* Main Container */
.main-container {
    display: flex;
    height: calc(100vh - 56px);
    padding-top: 56px;
    position: relative;
}

/* Chat Pane */
.chat-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0a0a0a 0%, #16213e 100%);
    position: relative;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
}

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

.user-message .message-content {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    color: #ffffff;
    text-align: right;
}

.agent-message {
    align-self: flex-start;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.agent-message .message-content {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    color: #ffffff;
    box-shadow: none;
    flex: 1;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar .avatar-icon {
    font-size: 16px;
    color: #00d4ff;
}

/* Input Bar */
.input-bar {
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.1);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px 16px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.input-container:focus-within {
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    border-color: #00d4ff;
}

.attachment-btn {
    background: none;
    border: none;
    color: #b0b0b0;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.attachment-btn:hover {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.message-input {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 16px;
    padding: 8px 0;
    outline: none;
}

.message-input::placeholder {
    color: #b0b0b0;
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: linear-gradient(135deg, #0a0a0a 0%, #16213e 100%);
    border-left: 1px solid rgba(0, 212, 255, 0.3);
    position: fixed;
    top: 56px;
    right: -320px;
    height: calc(100vh - 56px);
    transition: transform 0.3s ease-in-out;
    z-index: 1001;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(-320px);
}

.sidebar-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

/* Agent Selector Section */
.agent-selector-section {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.avatar-large .avatar-icon {
    font-size: 32px;
    color: #00d4ff;
}

.agent-dropdown {
    width: 100%;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 32px 10px 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    margin-bottom: 12px;
    text-align: center;
}

.agent-dropdown:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.agent-dropdown:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

.agent-dropdown option {
    background: #16213e;
    color: #ffffff;
    padding: 8px;
}

.agent-bio {
    font-size: 13px;
    color: #b0b0b0;
    font-style: italic;
}

/* Menu Options */
.menu-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 0;
    flex: 1;
}

.menu-item {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff;
    font-size: 16px;
    text-align: left;
    text-decoration: none;
}

.menu-item:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00d4ff;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.menu-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.menu-label {
    flex: 1;
    font-weight: 500;
}

.menu-arrow {
    font-size: 20px;
    color: #00d4ff;
    flex-shrink: 0;
}

/* Menu Footer */
.menu-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
}

.status-text {
    font-size: 11px;
    color: #b0b0b0;
    margin-bottom: 6px;
    text-align: center;
}

.memory-status {
    font-size: 11px;
    color: #b0b0b0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.checkmark {
    color: #00d4ff;
    font-weight: bold;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .chat-pane {
        width: 100%;
        height: calc(100vh - 56px);
    }
    
    .sidebar {
        width: 100%;
        position: fixed;
        top: 56px;
        right: -100%;
        height: calc(100vh - 56px);
        transition: transform 0.3s ease-in-out;
    }
    
    .sidebar.open {
        transform: translateX(-100%);
    }
    
    .chat-header {
        padding: 16px;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .input-bar {
        padding: 16px;
    }
    
    .top-nav {
        padding: 0 16px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .persona-details h1 {
        font-size: 16px;
    }
    
    .persona-details p {
        font-size: 12px;
    }
    
    /* Tab Navigation Mobile */
    .tab-navigation {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .tab-button {
        padding: 12px 16px;
        font-size: 14px;
        text-align: left;
    }
    
    .tab-panel-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .tab-panel-title {
        font-size: 20px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tool-card {
        padding: 16px;
    }
    
    .mcp-servers-list {
        gap: 16px;
    }
    
    .mcp-server-item {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .mcp-server-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .input-container {
        padding: 6px 12px;
    }
    
    .message-input {
        font-size: 14px;
    }
    
    .send-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .top-nav {
        height: 48px;
        padding: 0 12px;
    }
    
    .main-container {
        padding-top: 48px;
    }
    
    .chat-pane {
        height: calc(100vh - 48px);
    }
    
    .sidebar {
        top: 48px;
        height: calc(100vh - 48px);
    }
    
    .chat-header {
        padding: 12px;
    }
    
    .chat-messages {
        padding: 12px;
        gap: 12px;
    }
    
    .input-bar {
        padding: 12px;
    }
    
    .message {
        max-width: 95%;
    }
    
    .message-content {
        padding: 12px;
        font-size: 14px;
    }
    
    .sidebar-content {
        padding: 16px;
        gap: 16px;
    }
    
    .persona-name-large {
        font-size: 18px;
    }
    
    .persona-bio {
        font-size: 12px;
    }
    
    .section-title {
        font-size: 12px;
    }
    
    .nav-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .skill-item {
        font-size: 12px;
    }
    
    .status-text, .memory-status {
        font-size: 10px;
    }
}

/* Settings Page Styles */
.settings-page {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: linear-gradient(135deg, #0a0a0a 0%, #16213e 100%);
}

.page-header {
    margin-bottom: 40px;
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb-link {
    color: #00d4ff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-link:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.breadcrumb-separator {
    color: #666;
    font-size: 16px;
}

.breadcrumb-current {
    color: #ffffff;
    font-weight: 500;
}

.settings-sections {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.settings-section {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 24px;
}

.settings-section .section-title {
    font-size: 20px;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 20px;
    text-transform: none;
    letter-spacing: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-label {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

.setting-input, .setting-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.setting-input:focus, .setting-select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.setting-input::placeholder {
    color: #666;
}

.setting-description {
    font-size: 12px;
    color: #b0b0b0;
    margin: 0;
}

.setting-slider {
    width: 100%;
    height: 6px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #00d4ff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.slider-value {
    font-size: 14px;
    color: #00d4ff;
    font-weight: 500;
    margin-left: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.connected {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.status-badge.disconnected {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.providers-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.provider-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
}

.provider-info h3 {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.provider-info p {
    font-size: 12px;
    color: #b0b0b0;
    margin: 0;
}

.provider-actions {
    display: flex;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .toggle-label {
    background: #00d4ff;
}

input:checked + .toggle-label:before {
    transform: translateX(26px);
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

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

.btn-danger {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

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

.settings-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

.menu-item.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

/* Skills Page Styles */
.skills-page {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: linear-gradient(135deg, #0a0a0a 0%, #16213e 100%);
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 32px;
    gap: 4px;
    position: relative;
    z-index: 10;
}

.tab-button {
    flex: 1;
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #b0b0b0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    z-index: 11;
}

.tab-button:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #ffffff;
}

.tab-button.active {
    background: rgba(0, 212, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
    display: block;
}

.tab-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.tab-panel-title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

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

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.tool-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.tool-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.1);
}

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

.tool-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.tool-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tool-status.active {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.tool-status.inactive {
    background: rgba(255, 255, 0, 0.1);
    color: #ffff00;
    border: 1px solid rgba(255, 255, 0, 0.3);
}

.tool-description {
    font-size: 14px;
    color: #b0b0b0;
    margin-bottom: 12px;
}

.tool-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.tool-type, .tool-usage {
    font-size: 12px;
    color: #666;
}

.tool-actions {
    display: flex;
    gap: 8px;
}

.mcp-servers-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}

.mcp-server-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mcp-server-item:hover {
    border-color: rgba(0, 212, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.1);
}

/* Memory Variables Styles */
.variables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.variable-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.variable-item:hover {
    border-color: rgba(0, 212, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.1);
}

.variable-label {
    font-size: 14px;
    font-weight: 500;
    color: #00d4ff;
    margin-bottom: 4px;
}

.variable-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.variable-input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.variable-input::placeholder {
    color: #666;
}

.add-variable-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.section-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.add-variable-form {
    display: flex;
    gap: 12px;
    align-items: end;
}

.add-variable-form .variable-input {
    flex: 1;
}

.add-variable-form .btn-primary {
    white-space: nowrap;
}

/* Tools Section Styles */
.tools-section {
    margin-bottom: 40px;
}

.tools-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.tool-card.attached {
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.05);
}

.tool-card.unattached {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.tool-status.attached {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.4);
}

.tool-status.unattached {
    background: rgba(255, 255, 255, 0.1);
    color: #b0b0b0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mcp-server-name {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.mcp-server-url {
    font-size: 12px;
    color: #b0b0b0;
    margin: 0 0 8px 0;
}

.mcp-server-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.tools-count {
    font-size: 12px;
    color: #b0b0b0;
}

.agent-tools-management {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.management-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.tool-select, .block-select {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
}

.usage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.mcp-config {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-label {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

.config-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
}

.config-select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.config-description {
    font-size: 12px;
    color: #b0b0b0;
    margin: 0;
}

/* Core Memory Page Styles */
.core-memory-page {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: linear-gradient(135deg, #0a0a0a 0%, #16213e 100%);
}

.core-memory-sections {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.memory-blocks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.memory-block-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.memory-block-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.1);
}

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

.block-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.block-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.block-status.attached {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.block-status.detached {
    background: rgba(255, 255, 0, 0.1);
    color: #ffff00;
    border: 1px solid rgba(255, 255, 0, 0.3);
}

.block-content {
    margin-bottom: 12px;
}

.block-preview {
    font-size: 14px;
    color: #b0b0b0;
    line-height: 1.5;
    margin: 0;
}

.block-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.block-size, .block-updated {
    font-size: 12px;
    color: #666;
}

.block-actions {
    display: flex;
    gap: 8px;
}

.block-management {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.identity-management {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.identity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
}

.identity-name {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.identity-key {
    font-size: 12px;
    color: #b0b0b0;
    margin: 0 0 8px 0;
}

.identity-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.blocks-count {
    font-size: 12px;
    color: #b0b0b0;
}

.identity-actions {
    display: flex;
    gap: 8px;
}

.variables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.variable-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.variable-label {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

.variable-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
}

.add-variable {
    display: flex;
    gap: 12px;
    align-items: end;
}

/* Archival Memory Page Styles */
.archival-memory-page {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: linear-gradient(135deg, #0a0a0a 0%, #16213e 100%);
}

.archival-sections {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.search-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-bar {
    display: flex;
    flex: 1;
    min-width: 300px;
}

.search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px 0 0 8px;
    color: #ffffff;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
}

.search-btn {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: #00d4ff;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 16px;
}

.filter-controls {
    display: flex;
    gap: 12px;
}

.filter-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
}

.passages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.passage-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.passage-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.1);
}

.passage-header {
    margin-bottom: 12px;
}

.passage-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.passage-meta {
    display: flex;
    gap: 16px;
    align-items: center;
}

.passage-date {
    font-size: 12px;
    color: #666;
}

.passage-tags {
    display: flex;
    gap: 6px;
}

.tag {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.passage-content {
    margin-bottom: 16px;
}

.passage-content p {
    font-size: 14px;
    color: #b0b0b0;
    line-height: 1.5;
    margin: 0;
}

.passage-actions {
    display: flex;
    gap: 8px;
}

.semantic-search {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-input-group {
    display: flex;
    gap: 12px;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-result-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
}

.result-title {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.result-snippet {
    font-size: 14px;
    color: #b0b0b0;
    margin: 0 0 8px 0;
}

.result-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #666;
}

.result-score {
    color: #00d4ff;
}

.archives-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.archive-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
}

.archive-name {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.archive-description {
    font-size: 12px;
    color: #b0b0b0;
    margin: 0 0 8px 0;
}

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

.stat {
    font-size: 12px;
    color: #666;
}

.archive-actions {
    display: flex;
    gap: 8px;
}

.memory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 212, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}
