/* Bento Grid Layout - 参考 API 页面风格 */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, minmax(280px, auto));
    gap: 1.5rem;
}

.bento-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.bento-card:hover::before {
    transform: scaleX(1);
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15), 0 0 0 1px rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
}

/* Grid Areas */
.bento-card.large { grid-column: span 1; grid-row: span 2; }
.bento-card.medium { grid-column: span 1; grid-row: span 1; }
.bento-card.wide { grid-column: span 2; grid-row: span 1; }

.bento-content {
    padding: 2rem;
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bento-content h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--text-main);
}

.bento-content p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Icon Box */
.bento-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.bento-card:hover .bento-icon-box {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.bento-icon-box.primary { background: var(--gradient-primary); }
.bento-icon-box.purple { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.bento-icon-box.blue { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.bento-icon-box.orange { background: linear-gradient(135deg, #f97316, #fbbf24); }
.bento-icon-box.green { background: var(--gradient-primary); }

/* Feature List inside Large Card */
.bento-feature-tags {
    list-style: none;
    padding: 0;
    margin-top: auto;
}

.bento-feature-tags li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.bento-feature-tags i { 
    color: var(--primary-600);
    font-size: 0.85rem;
}

/* Background Deco Icon */
.bento-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 10rem;
    color: rgba(0,0,0,0.02);
    z-index: 1;
    transition: transform 0.4s ease;
}

.bento-card:hover .bento-bg-icon { 
    transform: scale(1.1) rotate(-10deg); 
}

/* Visual Elements for Medium Cards */
.bento-visual {
    margin-top: auto;
    height: 80px;
    background: #f1f5f9;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #cbd5e1;
    overflow: hidden;
}

.bento-visual.art-visual {
    background: linear-gradient(to right, #dcfce7, #bbf7d0);
}
.bento-visual.art-visual i { 
    color: var(--primary-600); 
    opacity: 0.5; 
}

.bento-visual.code-visual { 
    background: #1e293b; 
}
.bento-visual.code-visual i { 
    color: #06b6d4; 
    opacity: 0.6; 
}

/* Wide Card Content Row */
.bento-content-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
    height: 100%;
}

.bento-text {
    flex: 1;
}

.bento-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.bento-action-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.3s ease;
}

.bento-action-tag:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.25);
    transform: translateY(-2px);
}

.bento-action-tag i {
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    
    .bento-card.large,
    .bento-card.medium,
    .bento-card.wide {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-content-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bento-actions {
        width: 100%;
    }
}

