/* 智能体列表页面样式 - agents.php */

/* ===========================================
   基础布局样式
   =========================================== */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
}

.agents-section {
    min-height: 300px;
}

/* ===========================================
   性能优化样式
   =========================================== */
.agent-avatar {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    background-color: #f8f9fa;
}

.agent-card {
    contain: layout style paint;
}

/* ===========================================
   动画定义
   =========================================== */
@keyframes float {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes cardGlow {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

/* ===========================================
   页脚样式
   =========================================== */
.simple-footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #ecf0f1;
    margin-top: auto;
    border-top: 3px solid #3498db;
    flex-shrink: 0;
}

.simple-footer p {
    margin: 0;
    font-size: 14px;
}

.simple-footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.simple-footer a:hover {
    color: #3498db !important;
}

/* ===========================================
   分页样式
   =========================================== */
.pagination-section {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    margin: 2rem 0 0 0;
}

/* ===========================================
   分类导航样式
   =========================================== */
.category-tabs {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.category-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 25px;
    background: white;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
}

.category-btn:hover {
    color: #495057;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-btn.active {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white !important;
    border-color: #2c3e50;
}



.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ===========================================
   移动端分类选择器
   =========================================== */
.mobile-category-selectors {
    display: none;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.mobile-category-selectors .form-select {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    background-color: white;
    margin-bottom: 0.75rem;
}

.mobile-category-selectors .form-select:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 0.25rem rgba(44, 62, 80, 0.15);
}

.mobile-category-selectors .form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* ===========================================
   桌面端样式
   =========================================== */
@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }

    .main-content {
        padding-top: 2rem;
        padding-bottom: 2rem;
        min-height: calc(100vh - 200px);
    }

    .main-content .container {
        padding-top: 1rem;
        padding-bottom: 1rem;
        height: 100%;
    }

    .filter-section {
        margin-bottom: 2rem;
    }

    .agents-section {
        margin-bottom: 2rem;
        min-height: 400px;
    }



    .simple-footer {
        margin-top: auto;
    }
}

/* ===========================================
   移动端样式
   =========================================== */
@media (max-width: 768px) {
    /* 基础布局 */
    body {
        padding-bottom: 0px;
        background: linear-gradient(135deg, #f0faf5 0%, #e6f7ef 100%);
        min-height: 100vh;
        height: 100%;
    }

    .main-content {
        min-height: calc(100vh - 160px);
        padding-top: 1rem !important;
    }

    .agents-section {
        min-height: 300px;
    }

    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* 隐藏桌面端元素 */
    .navbar {
        display: none !important;
    }

    .category-tabs {
        display: none !important;
    }

    .page-header {
        display: none !important;
    }

    /* 显示移动端元素 */
    .mobile-category-selectors {
        display: block;
    }

    /* 底部导航 */
    .bottom-nav {
        display: none !important;
    }

    .bottom-nav .nav-item {
        flex: 1;
        text-align: center;
    }

    .bottom-nav .nav-link {
        color: #6c757d;
        padding: 0.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        font-size: 0.75rem;
    }

    .bottom-nav .nav-link.active {
        color: #07C160;
    }

    .bottom-nav .nav-link i {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    /* 搜索区域美化 */
    .filter-section {
        margin-top: -1rem;
    }

    .filter-section .card {
        border: none;
        border-radius: 1.5rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        margin: 0 0 1rem 0;
    }

    .filter-section .card-body {
        padding: 0.75rem;
    }

    /* 搜索表单样式 */
    .search-form .row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem;
    }

    .search-form .col-md-4 {
        width: 100% !important;
        flex: none !important;
    }

    .search-form .form-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        color: #2c3e50 !important;
        font-weight: 600 !important;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .search-form .form-label::before {
        content: '';
        width: 4px;
        height: 16px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        border-radius: 2px;
    }

    .search-form .form-select {
        font-size: 0.85rem !important;
        padding: 0.5rem 0.75rem !important;
        border: 2px solid #e9ecef;
        border-radius: 1rem;
        background: #fff;
        transition: all 0.3s ease;
    }

    .search-form .form-select:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }

    .search-form .d-flex {
        flex-direction: row !important;
        gap: 0.75rem !important;
        margin-top: 0.5rem;
    }

    /* 按钮样式 */
    .search-form .btn,
    .agent-card .btn {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
        border-radius: 1rem !important;
        font-weight: 600 !important;
        transition: all 0.3s ease !important;
        border: none !important;
    }

    .search-form .btn-primary,
    .agent-card .btn-primary {
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    }

    .search-form .btn-primary:hover,
    .agent-card .btn-primary:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    }

    .search-form .btn-outline-primary {
        background: rgba(255, 255, 255, 0.9) !important;
        color: #667eea !important;
        border: 2px solid #667eea !important;
    }

    .search-form .btn-outline-primary:hover {
        background: #667eea !important;
        color: white !important;
        transform: translateY(-2px) !important;
    }

    /* 智能体卡片样式 */
    .agent-card {
        border: none !important;
        border-radius: 1.5rem !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        overflow: hidden !important;
        margin: 0 0 1.5rem 0 !important;
    }

    .agent-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
        background-size: 200% 100%;
        animation: cardGlow 3s ease-in-out infinite;
    }

    .agent-card:hover {
        transform: translateY(-8px) !important;
        box-shadow: 0 16px 48px rgba(102, 126, 234, 0.2) !important;
    }

    .agent-card .card-body {
        padding: 1rem 0.75rem !important;
        position: relative;
    }

    /* 头像样式 */
    .agent-avatar-wrapper {
        position: relative;
        display: inline-block;
        margin-bottom: 0.75rem;
    }

    .agent-avatar {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        border: 2px solid #fff !important;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
        transition: all 0.3s ease !important;
        object-fit: cover !important;
    }

    .agent-card:hover .agent-avatar {
        transform: scale(1.1) !important;
        box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4) !important;
    }

    .agent-avatar-wrapper::after {
        content: '';
        position: absolute;
        bottom: 3px;
        right: 3px;
        width: 16px;
        height: 16px;
        background: #2ed573;
        border: 2px solid #fff;
        border-radius: 50%;
        box-shadow: 0 2px 6px rgba(46, 213, 115, 0.5);
    }

    /* 卡片内容样式 */
    .agent-card h5 {
        color: #2c3e50 !important;
        font-weight: 700 !important;
        margin-bottom: 0.3rem !important;
        font-size: 1rem !important;
    }

    .agent-card .badge {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.75rem !important;
        border-radius: 0.75rem !important;
        font-weight: 600 !important;
        margin: 0.15rem !important;
        border: none !important;
    }

    .agent-card .badge.bg-primary {
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        color: white !important;
    }

    .agent-card .badge.bg-secondary {
        background: linear-gradient(135deg, #f093fb, #f5576c) !important;
        color: white !important;
    }

    .agent-card .text-muted {
        color: #5a6c7d !important;
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }

    .agent-card .btn-success {
        background: linear-gradient(135deg, #2ed573, #1dd1a1) !important;
        box-shadow: 0 4px 15px rgba(46, 213, 115, 0.3) !important;
    }

    .agent-card .btn-warning {
        background: linear-gradient(135deg, #feca57, #ff9ff3) !important;
        color: #2f3542 !important;
        box-shadow: 0 4px 15px rgba(254, 202, 87, 0.3) !important;
    }

    .agent-card .btn:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
    }

    /* 统计信息样式 */
    .agent-stats .stat-item {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.8rem;
        color: #6c757d;
        background: rgba(255, 255, 255, 0.8);
        padding: 0.4rem 0.8rem;
        border-radius: 1rem;
        border: 1px solid rgba(102, 126, 234, 0.2);
    }

    .agent-stats .stat-item i {
        font-size: 0.9rem;
    }

    /* 描述区域美化 */
    .agent-description-wrapper {
        position: relative;
        padding: 0.75rem;
        background: rgba(102, 126, 234, 0.05);
        border-radius: 0.75rem;
        border: 1px solid rgba(102, 126, 234, 0.1);
        margin-bottom: 0.75rem;
    }

    .agent-description-wrapper::before {
        content: '"';
        position: absolute;
        top: 0.5rem;
        left: 0.5rem;
        font-size: 1.5rem;
        color: rgba(102, 126, 234, 0.3);
        font-family: serif;
    }

    .agent-description-wrapper::after {
        content: '"';
        position: absolute;
        bottom: 0.5rem;
        right: 0.5rem;
        font-size: 1.5rem;
        color: rgba(102, 126, 234, 0.3);
        font-family: serif;
    }
}
