/* ============================================
   AI Tools Pro - Modern UI/UX
   ============================================ */

   :root {
    --tool-card-bg: rgba(25, 35, 48, 0.98);
    --tool-card-border: rgba(255, 255, 255, 0.08);
    --tool-hover-bg: rgba(71, 218, 242, 0.08);
    --tool-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* ===== Hero Section ===== */
.ai-tools-hero {
    padding: 80px 0 60px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.ai-tools-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 13, 18, 0.85);
}

.ai-tools-hero-content {
    position: relative;
    z-index: 2;
}

.ai-tools-subtitle {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.ai-tools-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--heading-color);
}

.ai-tools-desc {
    font-size: 16px;
    color: var(--paragraph-color);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* ===== Search Bar ===== */
.ai-tools-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.ai-tools-search-form {
    position: relative;
}

.search-input-group {
    position: relative;
}

.search-input-group .search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--paragraph-color);
    font-size: 18px;
}

.search-input-group input {
    width: 100%;
    height: 60px;
    padding: 0 60px 0 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tool-card-border);
    border-radius: 30px;
    color: var(--heading-color);
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input-group input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--main-color-one);
    box-shadow: 0 0 0 3px rgba(71, 218, 242, 0.1);
}

.search-loader {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--main-color-one);
}

/* ===== Filters Bar ===== */
.ai-tools-filters-bar {
    background: var(--tool-card-bg);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--tool-card-border);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--paragraph-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-label i {
    color: var(--main-color-one);
}

.ai-tools-filter-select {
    height: 45px;
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tool-card-border);
    border-radius: 10px;
    color: var(--heading-color);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-tools-filter-select:focus {
    border-color: var(--main-color-one);
    outline: none;
}

.ai-tools-results-count {
    text-align: center;
    padding: 15px;
    background: rgba(71, 218, 242, 0.1);
    border-radius: 10px;
}

.count-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--main-color-one);
}

.count-text {
    font-size: 13px;
    color: var(--paragraph-color);
}

/* ===== Quick Tags ===== */
.ai-tools-quick-tags {
    overflow-x: auto;
    padding-bottom: 10px;
}

.tags-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-item {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tool-card-border);
    border-radius: 20px;
    color: var(--paragraph-color);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tag-item:hover,
.tag-item.active {
    background: var(--main-color-one);
    border-color: var(--main-color-one);
    color: var(--color-back);
}

/* ===== Tools Grid ===== */
.ai-tools-grid {
    gap: 0;
}

.ai-tool-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Tool Card ===== */
.ai-tool-card {
    background: var(--tool-card-bg);
    border: 1px solid var(--tool-card-border);
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.ai-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--main-color-one), var(--main-color-two));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ai-tool-card:hover {
    transform: translateY(-8px);
    border-color: rgba(71, 218, 242, 0.3);
    box-shadow: var(--tool-shadow);
    background: var(--tool-hover-bg);
}

.ai-tool-card:hover::before {
    opacity: 1;
}

/* Logo */
.ai-tool-logo {
    position: relative;
    margin-bottom: 15px;
}

.ai-tool-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    transition: transform 0.3s ease;
}

.ai-tool-card:hover .ai-tool-logo img {
    transform: scale(1.1);
}

.featured-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f5af19, #f12711);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    box-shadow: 0 4px 10px rgba(245, 175, 25, 0.4);
}

/* Title */
.ai-tool-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.ai-tool-title a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.ai-tool-title a:hover {
    color: var(--main-color-one);
}

/* Description */
.ai-tool-desc {
    font-size: 12px;
    color: var(--paragraph-color);
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1;
}

/* Category */
.ai-tool-category {
    margin-bottom: 12px;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(71, 218, 242, 0.1);
    border: 1px solid rgba(71, 218, 242, 0.3);
    border-radius: 12px;
    color: var(--main-color-one);
    font-size: 11px;
    font-weight: 600;
}

/* Price Badge */
.ai-tool-price {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.price-free { background: rgba(40, 167, 69, 0.2); color: #28a745; border: 1px solid #28a745; }
.price-freemium { background: rgba(0, 123, 255, 0.2); color: #007bff; border: 1px solid #007bff; }
.price-trial { background: rgba(255, 193, 7, 0.2); color: #ffc107; border: 1px solid #ffc107; }
.price-premium { background: rgba(220, 53, 69, 0.2); color: #dc3545; border: 1px solid #dc3545; }
.price-opensource { background: rgba(108, 117, 125, 0.2); color: #6c757d; border: 1px solid #6c757d; }
.price-onetime { background: rgba(23, 162, 184, 0.2); color: #17a2b8; border: 1px solid #17a2b8; }
.price-default { background: rgba(255, 255, 255, 0.1); color: var(--paragraph-color); border: 1px solid var(--tool-card-border); }

/* Actions */
.ai-tool-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--tool-card-border);
}

.ai-tool-actions button,
.ai-tool-actions a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tool-card-border);
    border-radius: 10px;
    color: var(--paragraph-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.ai-tool-actions button:hover,
.ai-tool-actions a:hover {
    background: var(--main-color-one);
    border-color: var(--main-color-one);
    color: var(--color-back);
}

.btn-save.saved {
    background: rgba(245, 175, 25, 0.2);
    border-color: #f5af19;
    color: #f5af19;
}

/* Stats */
.ai-tool-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--tool-card-border);
}

.stat-item {
    font-size: 11px;
    color: var(--paragraph-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-item i {
    color: var(--main-color-one);
}

/* ===== Loader ===== */
.ai-tools-loader {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(71, 218, 242, 0.2);
    border-top-color: var(--main-color-one);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Pagination ===== */
.ai-tools-pagination {
    margin-top: 40px;
}

.ai-tools-pagination ul {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-tools-pagination li a,
.ai-tools-pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tool-card-border);
    border-radius: 10px;
    color: var(--heading-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.ai-tools-pagination li a:hover,
.ai-tools-pagination li .current {
    background: var(--main-color-one);
    border-color: var(--main-color-one);
    color: var(--color-back);
}

/* ===== No Results ===== */
.ai-tools-no-results {
    padding: 60px 20px;
    background: var(--tool-card-bg);
    border-radius: 16px;
    border: 1px solid var(--tool-card-border);
}

.ai-tools-no-results i {
    font-size: 60px;
    color: var(--paragraph-color);
    opacity: 0.5;
    margin-bottom: 20px;
}

.ai-tools-no-results h4 {
    color: var(--heading-color);
    margin-bottom: 10px;
}

.ai-tools-no-results p {
    color: var(--paragraph-color);
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .ai-tools-title {
        font-size: 32px;
    }
    
    .ai-tools-filters-bar {
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .ai-tools-hero {
        padding: 60px 0 40px;
    }
    
    .ai-tools-title {
        font-size: 26px;
    }
    
    .search-input-group input {
        height: 50px;
        font-size: 14px;
    }
    
    .ai-tool-card {
        padding: 20px 15px;
    }
    
    .ai-tool-logo img {
        width: 60px;
        height: 60px;
    }
}