@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    background-color: #0c1427;
    color: white;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}
.card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem; /* rounded-xl */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: white;
    transform: translateZ(0); /* Force hardware acceleration */
    min-height: 200px; /* 添加最小高度 */
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 75%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
    transition: left 0.7s ease-in-out;
}
.card:not(.card-disabled):hover {
    transform: translateY(-8px) scale(1.02) translateZ(0);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}
.card:not(.card-disabled):hover::before {
    left: 125%;
}
.card-disabled {
     cursor: not-allowed;
}

/* 智能体模块样式 */
#agent-modules-overlay {
    backdrop-filter: blur(8px);
}

#agent-modules-overlay.show {
    opacity: 1;
}

#agent-modules-container {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#agent-modules-container.show {
    transform: scale(1);
    opacity: 1;
}

/* 自定义滚动条 */
#agent-modules-container::-webkit-scrollbar {
    width: 8px;
}

#agent-modules-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#agent-modules-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#agent-modules-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.agent-module {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.agent-module::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.agent-module:hover::before {
    left: 100%;
}

.agent-module:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 搜索框样式 */
#agent-search {
    transition: all 0.3s ease;
}

#agent-search:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

/* 搜索结果高亮 */
.search-highlight {
    background-color: rgba(59, 130, 246, 0.3);
    border-radius: 2px;
    padding: 1px 2px;
}

/* 隐藏的模块动画 */
.agent-module.hidden {
    display: none;
}

.agent-module.fade-out {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.agent-module.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #agent-modules-overlay {
        padding: 1rem;
    }

    #agent-modules-container {
        max-height: 85vh;
        border-radius: 1rem;
    }

    .agent-module {
        padding: 1rem;
    }

    /* 移动端网格调整 */
    #agent-modules-container .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    #agent-modules-container .grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}