/* AI工具页面样式 - tools.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;
    }

    /* 美化工具卡片 */
    .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, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
        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(255, 107, 107, 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(255, 107, 107, 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 8px 25px rgba(255, 107, 107, 0.5) !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, #ff6b6b, #ee5a24) !important;
        color: white !important;
    }

    .agent-card .badge.bg-secondary {
        background: linear-gradient(135deg, #feca57, #ff9ff3) !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(255, 107, 107, 0.2);
    }

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

    /* 描述区域美化 */
    .agent-description-wrapper {
        position: relative;
        padding: 0.75rem;
        background: rgba(255, 107, 107, 0.05);
        border-radius: 0.75rem;
        border: 1px solid rgba(255, 107, 107, 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(255, 107, 107, 0.3);
        font-family: serif;
    }

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

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

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

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

    /* 隐藏桌面版标题 */
    .text-center.mb-5 {
        display: none !important;
    }

    /* 工具列表区域调整 */
    .row.g-3 {
        margin-top: -1rem !important;
    }
}

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