#aiMainComponentContainer {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ai-main-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #cbd5e1;
}

.ai-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 1rem;
}

.ai-main-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
}

.ai-main-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid for 4 items */
    gap: 16px;
    padding: 4px;
}

.ai-tool-card {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.ai-tool-card:hover {
    transform: scale(1.05);
}

.ai-tool-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 0.85; /* Changed from 1 to be slightly portrait for better visibility */
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.ai-tool-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Shows the full image without cropping */
    background: #0f172a; /* Dark background for empty areas */
}

.slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 2;
}

.ai-tool-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    line-height: 1.2;
    max-width: 100%;
}

.ai-tool-card:hover .ai-tool-label {
    color: white;
}

.bg-transparent-grid {
    background-image: linear-gradient(45deg, #222 25%, transparent 25%), linear-gradient(-45deg, #222 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #222 75%), linear-gradient(-45deg, transparent 75%, #222 75%);
    background-size: 8px 8px;
}

@media (max-width: 640px) {
    .ai-main-header {
        padding-bottom: 0.4rem;
        margin-bottom: 0.4rem;
    }
    .ai-main-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        padding: 2px !important;
    }
    .ai-tool-card {
        gap: 3px !important;
    }
    .ai-tool-thumb {
        aspect-ratio: 1 !important;
        max-height: 70px !important;
        border-radius: 8px !important;
    }
    .ai-tool-label {
        font-size: 9px !important;
        line-height: 1.1 !important;
    }
}
