/* 类似Pinecone Manager风格 - 深绿色+米白色系统 */

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

/* CSS 变量 */
:root {
    /* 颜色 */
    --color-primary: #2d5a47;
    --color-primary-dark: #1f4032;
    --color-primary-light: #3d7a5f;
    --color-accent: #8b6914;
    
    --bg-main: #f5f2eb;
    --bg-sidebar: #2d5a47;
    --bg-card: #ffffff;
    --bg-input: #fafaf8;
    --bg-result: #f9f8f5;
    
    --text-primary: #2c2c2c;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-light: #ffffff;
    
    --border-color: #e0ddd5;
    --border-radius: 8px;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* 主布局容器 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 左侧边栏 */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    color: var(--text-light);
    padding: 32px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

/* 品牌区域 */
.brand {
    padding: 0 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-light);
}

.brand p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

/* 导航菜单 */
.nav-section {
    padding: 24px 0;
}

.nav-label {
    padding: 0 24px;
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 15px;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-light);
    border-left-color: var(--color-accent);
    font-weight: 500;
}

.nav-item span {
    margin-right: 12px;
}

/* 主内容区域 */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 40px;
}

/* 页面标题 */
.page-header {
    margin-bottom: 32px;
}

.page-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* 内容卡片 */
.content-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

/* 表单区域 */
.form-section {
    margin-bottom: 28px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* 输入框 */
.input,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(45, 90, 71, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
    font-family: 'JetBrains Mono', monospace;
}

/* 输入框组 */
.input-group {
    display: flex;
    gap: 16px;
}

.input-group .form-field {
    flex: 1;
}

/* 按钮 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--color-primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

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

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

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* 复选框 */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin: 16px 0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-wrapper label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* 结果区域 */
.results-section {
    margin-top: 32px;
}

.result-card {
    background: var(--bg-result);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.result-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

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

.result-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.result-score {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 600;
    background: rgba(45, 90, 71, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

.result-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    background: var(--bg-card);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', monospace;
    overflow-x: auto;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-connected {
    background: rgba(45, 90, 71, 0.1);
    color: var(--color-primary);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
        padding: 32px 24px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 24px 16px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
