/**
 * Agent 列表页面样式
 */

/* 导航栏样式已统一由 navbar.js + main.css 管理，不再需要覆盖 */

.user-center-btn {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px 10px !important;
    background: rgba(102, 126, 234, 0.1) !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
}

.user-center-btn:hover {
    background: rgba(102, 126, 234, 0.2) !important;
}

.user-center-btn .user-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
}

.user-center-btn #userName {
    font-size: 13px !important;
    font-weight: 500 !important;
    max-width: 60px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.user-bean-badge {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 2px 6px !important;
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
}

.user-center-btn > span:last-child {
    font-size: 9px !important;
    color: #999 !important;
    flex-shrink: 0 !important;
}

/* 导航显示优化 */
/* 导航项容器默认样式（不显示，由 JS 控制） */
#guestNav:not(.hidden),
#userNav:not(.hidden) {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

/* ==================== 页面头部 ==================== */

.page-header-content {
    text-align: center;
    padding: 40px 20px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 12px;
    margin-bottom: 30px;
}

.page-header-content h1 {
    font-size: 32px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.page-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 30px 0;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 14px;
    opacity: 0.8;
}

/* ==================== 过滤器 ==================== */

#agents-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

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

/* ==================== Agent 网格 ==================== */

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ==================== Agent 卡片 ==================== */

.agent-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.agent-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

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

.agent-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 12px;
    flex-shrink: 0;
}

.card-info {
    flex: 1;
}

.agent-name {
    font-size: 20px;
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
}

.agent-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.agent-type-badge.consulting {
    background: #e3f2fd;
    color: #1976d2;
}

.agent-type-badge.assessment {
    background: #f3e5f5;
    color: #7b1fa2;
}

.agent-type-badge.planning {
    background: #e8f5e9;
    color: #388e3c;
}

.agent-type-badge.reporting {
    background: #fff3e0;
    color: #f57c00;
}

/* Agent ID 标签 */
.agent-id-label {
    display: inline-block;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 11px;
    color: #999;
    font-family: monospace;
}

/* 目标人群标签 */
.target-group-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e8eaf6;
    border-radius: 4px;
    font-size: 12px;
    color: #5c6bc0;
    font-weight: 500;
}

.target-group-section {
    margin: 8px 0;
}

/* 版本标签 */
.version-tag {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #e0e0e0;
}

.card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}

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

.status-badge.status-active {
    background: #e8f5e9;
    color: #388e3c;
}

.status-badge.status-inactive {
    background: #f5f5f5;
    color: #999;
}

.agent-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 16px 0;
    min-height: 44px;
}

.agent-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tag {
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.pricing-info {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.price {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

.btn-start-agent {
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-start-agent:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

/* ==================== 空状态和错误状态 ==================== */

.empty-state,
.error-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon,
.error-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    color: #999;
}

.error-message {
    font-size: 16px;
    color: #d32f2f;
    margin-bottom: 20px;
}

.btn-retry {
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.btn-retry:hover {
    background: #5568d3;
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
    .page-header-content h1 {
        font-size: 24px;
    }
    
    .stats-bar {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .agents-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        flex-wrap: wrap;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .btn-start-agent {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-header-content {
        padding: 24px 16px;
    }
    
    .page-header-content h1 {
        font-size: 20px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .agent-card {
        padding: 16px;
    }
    
    .agent-icon {
        font-size: 32px;
        width: 48px;
        height: 48px;
    }
    
    .agent-name {
        font-size: 18px;
    }
}
