/* ===== AI Home Page Wrapper ===== */
#ai_home_app {
    padding: 24px;
}

@media (max-width: 991.98px) {
    #ai_home_app {
        padding: 16px;
    }
}

/* ===== Member Banner ===== */
.ai-home-banner {
    background: linear-gradient(135deg, #1e1e1e 0%, #333333 50%, #1e1e1e 100%);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 24px;
    transition: box-shadow 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.ai-home-banner:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.ai-home-banner-inner {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.ai-home-banner-image {
    flex-shrink: 0;
    width: 280px;
    background-image: url('/images/ai/member_banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ai-home-banner-content {
    flex: 1 1 auto;
    min-width: 280px;
    width: 100%;
    max-width: 100%;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-sizing: border-box;
}

.ai-home-banner-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    font-size: 1.2rem;
}

.ai-home-banner-body {
    flex: 1 1 auto;
    min-width: calc(100% - 36px);
    overflow-wrap: normal;
    word-break: normal;
}

.ai-home-banner-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.ai-home-banner-sub {
    color: #5cb85c;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.ai-home-banner-desc {
    color: #cccccc;
    font-size: 0.8rem;
    margin-bottom: 8px;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
}

.ai-home-banner-desc ul {
    padding-left: 18px;
    margin-bottom: 0;
}

.ai-home-banner-desc li {
    color: #cccccc;
}

.ai-home-banner-price {
    color: #5cb85c;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.ai-home-banner-valid {
    color: #5cb85c;
    font-size: 0.8rem;
    margin-bottom: 0;
}

.ai-home-banner-action {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.ai-home-banner-remain {
    color: #fbbf24;
    font-size: 0.75rem;
}

.ai-home-banner-btn {
    background: #5cb85c;
    color: #ffffff;
    border: none;
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.ai-home-banner-btn:hover {
    background: #4cae4c;
    color: #ffffff;
}

.ai-home-banner-btn.disabled {
    opacity: 0.5;
    background: #555;
}

/* ===== Gallery Section ===== */
.ai-home-gallery {
    margin-bottom: 24px;
}

.ai-home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ai-home-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-home-section-title i {
    color: #555;
}

.ai-home-section-link {
    font-size: 0.85rem;
    color: #5cb85c;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-home-section-link:hover {
    color: #4cae4c;
    text-decoration: none;
}

/* CSS 多列布局，响应式列数（与 Bootstrap 断点一致；不用 .card-columns 以免被 Bootstrap 的 column-count:3 覆盖） */
.ai-home-gallery .ai-home-gallery-columns {
    column-count: 1;
    column-gap: 1rem;
}

.ai-home-gallery-columns .ai-home-gallery-card {
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    border: none;
    background: #e5e7eb;
    cursor: pointer;
    display: inline-block;
    width: 100%;
}

@media (min-width: 576px) {
    .ai-home-gallery .ai-home-gallery-columns {
        column-count: 2;
    }
}

@media (min-width: 768px) {
    .ai-home-gallery .ai-home-gallery-columns {
        column-count: 3;
    }
}

@media (min-width: 992px) {
    .ai-home-gallery .ai-home-gallery-columns {
        column-count: 4;
    }
}

@media (min-width: 1200px) {
    .ai-home-gallery .ai-home-gallery-columns {
        column-count: 5;
    }
}

.ai-home-gallery-img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s, opacity 0.3s;
    background-color: #d1d5db;
    min-height: 80px;
}

.ai-home-gallery-card:hover .ai-home-gallery-img {
    transform: scale(1.04);
}

/* 覆盖 Bootstrap .card-img-overlay 的 top:0，使 overlay 仅贴底部，收藏和模型名在图片底部 */
.ai-home-gallery-overlay {
    position: absolute;
    top: auto !important;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.25s;
}

.ai-home-gallery-card:hover .ai-home-gallery-overlay {
    opacity: 1;
}

.ai-home-gallery-fav {
    color: #ffffff;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-home-gallery-model {
    color: #ffffff;
    font-size: 0.65rem;
    background: rgba(50, 50, 50, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
}

.ai-home-gallery-empty {
    text-align: center;
    padding: 48px 24px;
    color: #9ca3af;
}

.ai-home-gallery-empty i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

/* ===== Quick Start ===== */
.ai-home-quick {
    margin-bottom: 24px;
}

.ai-home-quick-inner {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.ai-home-quick-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-home-quick-title i {
    color: #555;
}

.ai-home-quick-tip {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 16px;
}

.ai-home-quick-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.ai-home-quick-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.875rem;
    resize: none;
    transition: border-color 0.15s;
    background: #f9fafb;
}

.ai-home-quick-input:focus {
    outline: none;
    border-color: #5cb85c;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.15);
    background: #ffffff;
}

.ai-home-quick-btn {
    background: #343a40;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: stretch;
}

.ai-home-quick-btn:hover {
    background: #23272b;
    color: #ffffff;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .ai-home-banner-inner {
        flex-direction: column;
    }

    .ai-home-banner-image {
        width: 100%;
        height: 180px;
    }

    .ai-home-banner-content {
        padding: 16px;
        width: 100%;
        min-width: 0;
    }

    .ai-home-banner-action {
        align-items: flex-start;
        width: 100%;
    }

    .ai-home-banner-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .ai-home-gallery .ai-home-gallery-columns {
        column-count: 2;
    }

    .ai-home-banner-image {
        height: 140px;
    }

    .ai-home-banner-content {
        padding: 14px;
        gap: 10px;
    }

    .ai-home-banner-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .ai-home-quick-form {
        flex-direction: column;
    }

    .ai-home-quick-btn {
        width: 100%;
        justify-content: center;
    }

    .ai-home-quick-inner {
        padding: 16px;
    }
}
