.ai-page {
    direction: ltr;
}

.ai-card,
.ai-tool-card,
.ai-info-card,
.ai-example-card,
.ai-analysis-card,
.ai-sidebar-widget {
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #e9edf3);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.ai-page-title {
    color: var(--bs-heading-color, #17202f);
    font-size: 1.55rem;
    font-weight: 700;
}

.ai-page-description {
    line-height: 1.9;
}

.ai-title-icon,
.ai-tool-icon,
.ai-feature-icon,
.ai-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-title-icon {
    width: 48px;
    height: 48px;
    color: var(--bs-success);
    background: rgba(var(--bs-success-rgb), 0.1);
    border-radius: 14px;
}

/* Tools slider */
.ai-tools-slider {
    position: relative;
    width: 100%;
}
.ai-tools-swiper {
    width: 100%;
    overflow: hidden;
}
.ai-tools-swiper .swiper-wrapper {
    align-items: stretch;
}
.ai-tools-swiper .swiper-slide {
    display: flex;
    height: auto;
}
.ai-tools-swiper .ai-tool-card {
    width: 100%;
    min-width: 0;
    height: 100%;
}
.ai-tools-pagination {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    margin-top: 16px;
}
.ai-tools-pagination .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    margin: 0 4px !important;
    background: var(--bs-secondary-color);
    opacity: .25;
    transition: width .2s ease, opacity .2s ease, background-color .2s ease;
}
.ai-tools-pagination .swiper-pagination-bullet-active {
    width: 20px;
    border-radius: 10px;
    background: var(--bs-success);
    opacity: 1;
}

/* Tool card */

.ai-tool-card {
    display: block;
    padding: 14px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ai-tool-card:hover {
    color: inherit;
    border-color: rgba(var(--bs-success-rgb), 0.35);
    box-shadow: 0 7px 22px rgba(15, 23, 42, 0.08);
}

.ai-tool-card.active {
    border-color: rgba(var(--bs-success-rgb), 0.55);
    background: rgba(var(--bs-success-rgb), 0.04);
}

.ai-tool-card.disabled {
    opacity: 0.72;
    cursor: default;
}

.ai-tool-icon {
    width: 42px;
    height: 42px;
    color: var(--bs-success);
    background: rgba(var(--bs-success-rgb), 0.1);
    border-radius: 12px;
}

/* Form */

.ai-description-input {
    min-height: 135px;
    resize: vertical;
    line-height: 1.9;
}

.ai-form-control {
    min-height: 45px;
    border-radius: 11px;
    box-shadow: none !important;
}

.ai-form-control:focus {
    border-color: rgba(var(--bs-success-rgb), 0.7);
}

.ai-login-box {
    background: var(--bs-light-bg-subtle, #f8f9fa);
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
}

/* Features */

.ai-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.ai-feature-item:last-child {
    border-bottom: 0;
}

.ai-feature-icon {
    width: 38px;
    height: 38px;
    color: var(--bs-success);
    background: rgba(var(--bs-success-rgb), 0.1);
    border-radius: 11px;
}

/* Examples */

.ai-example-card {
    height: 100%;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-example-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(15, 23, 42, 0.08);
}

.ai-example-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--bs-light-bg-subtle);
}

/* Analyses */

.ai-analysis-card {
    display: block;
    padding: 14px;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.ai-analysis-card:hover {
    color: inherit;
    background: var(--bs-light-bg-subtle, #f8f9fa);
}

.ai-analysis-thumb {
    width: 90px;
    height: 68px;
    flex: 0 0 90px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--bs-light-bg-subtle);
}

/* Sidebar */

.ai-sidebar-widget {
    padding: 16px;
}
.ai-empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto;
    color: var(--bs-secondary-color);
    background: var(--bs-light-bg-subtle, #f8f9fa);
    border-radius: 50%;
}
.ai-warning-box {
    background: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.25);
    border-radius: 12px;
}
.min-w-0 {
    min-width: 0;
}
@media (max-width: 767.98px) {
    .ai-page-title {
        font-size: 1.25rem;
    }
    .ai-card,
    .ai-tool-card,
    .ai-info-card,
    .ai-example-card,
    .ai-analysis-card,
    .ai-sidebar-widget {
        border-radius: 12px;
    }
}
@media (max-width: 575.98px) {
    .ai-page .container-xxl {
        padding-right: 0;
        padding-left: 0;
    }
    .ai-page-mobile-padding {
        padding-right: 12px;
        padding-left: 12px;
    }
    .ai-main-card {
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }
    .ai-tools-slider {
        padding-right: 12px;
        padding-left: 12px;
    }
    .ai-tools-pagination {
        margin-top: 14px;
    }
    .ai-analysis-thumb {
        width: 76px;
        height: 60px;
        flex-basis: 76px;
    }
}


/* Ai Analysis Result */
.ai-analysis-result-wrapper {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    padding: 20px;
}
.ai-analysis-result {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    line-height: 2 !important;
}
.ai-result-status-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    color: var(--bs-success);
    background: rgba(var(--bs-success-rgb), 0.1);
    border-radius: 12px;
}
.ai-analysis-result.is-error {
    color: var(--bs-danger);
}
.ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 20px;
}
.ai-typing-indicator span {
    width: 7px;
    height: 7px;
    background: var(--bs-success);
    border-radius: 50%;
    animation: aiTypingDot 1.2s infinite ease-in-out;
}
.ai-typing-indicator span:nth-child(2) {
    animation-delay: 0.15s;
}
.ai-typing-indicator span:nth-child(3) {
    animation-delay: 0.3s;
}
@keyframes aiTypingDot {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-5px);
    }
}
@media (max-width: 767.98px) {
    .ai-analysis-result-wrapper {
        padding: 16px;
        border-radius: 14px;
    }
}