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

/* 图片加载优化 */
.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); }
}

/* 移动端底部导航样式 */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px; /* 为底部导航留空间 */
        background: linear-gradient(135deg, #f0faf5 0%, #e6f7ef 100%);
        min-height: 100vh;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e9ecef;
        padding: 0.5rem 0;
        z-index: 1000;
        box-shadow: 0 -3px 10px rgba(0,0,0,0.05);
    }

    .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 {
        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 {
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    }

    .search-form .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;
    }

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

    .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 {
        border-radius: 0.75rem !important;
        font-weight: 600 !important;
        padding: 0.5rem 1rem !important;
        transition: all 0.3s ease !important;
        border: none !important;
        font-size: 0.8rem !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-primary {
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 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;
    }

    /* 主内容区域调整 */
    .main-content {
        padding-top: 1rem !important;
    }

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

    /* 隐藏桌面版导航 */
    .navbar {
        display: none !important;
    }
}

/* 桌面端隐藏移动端导航 */
@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }

    /* PC端区块间距调整 */
    .main-content {
        padding-top: 2rem;
        padding-bottom: 3rem;
    }

    .main-content .container {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }

    /* 筛选器区域间距 */
    .filter-section {
        margin-bottom: 3rem;
    }

    /* 智能体列表区域间距 */
    .agents-section {
        margin-bottom: 3rem;
    }

    /* 分页区域间距 */
    .pagination-section {
        margin-top: 3rem;
        margin-bottom: 2rem;
    }
}
