 @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css");

 /* ── Hero ────────────────────────────────────────── */
 .hero-section-ai-tool {
     background: linear-gradient(135deg, #FEF5EF 0%, #FDF8F3 50%, #FCF5ED 100%);
     padding: 1rem 0 1rem;
     margin-top: -32px;
     position: relative;
     overflow: hidden;
 }

 .hero-section-ai-tool::before {
     content: '';
     position: absolute;
     top: -50%;
     left: -10%;
     width: 40%;
     height: 200%;
     background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
     pointer-events: none;
 }

 .hero-section-ai-tool::after {
     content: '';
     position: absolute;
     top: -20%;
     right: -5%;
     width: 35%;
     height: 150%;
     background: radial-gradient(ellipse, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
     pointer-events: none;
 }

 .hero-title {
     font-size: clamp(2.2rem, 5vw, 3.5rem);
     font-weight: 800;
     line-height: 1.15;
     margin-bottom: 1.25rem;
 }

 .hero-title .gradient-text {
     background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
     background-attachment: fixed;
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
 }

 .hero-subtitle {
     font-size: 1.15rem;
     color: var(--text-muted);
     max-width: 600px;
     margin: 0 auto 2.5rem;
     line-height: 1.7;
 }

 /* ── Search Bar ─────────────────────────────────── */
 .search-wrapper {
     max-width: 680px;
     margin: 0 auto;
     position: relative;
 }

 .search-input-group {
     background: rgba(255, 255, 255, 0.05);
     border: 1.5px solid rgba(99, 102, 241, 0.3);
     border-radius: 50px;
     padding: 6px 6px 6px 20px;
     display: flex;
     align-items: center;
     transition: border-color 0.3s, box-shadow 0.3s;
 }

 .search-input-group:focus-within {
     border-color: var(--primary);
     box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
 }

 .search-input-group .search-icon {
     color: var(--text-muted);
     font-size: 1.1rem;
     margin-right: 10px;
     flex-shrink: 0;
 }

 .search-input-group input {
     background: none;
     border: none;
     outline: none;
     color: var(--text-primary);
     font-size: 1rem;
     flex: 1;
     padding: 6px 0;
 }

 .search-input-group input::placeholder {
     color: var(--text-muted);
 }

 .search-input-group .btn-search {
     background: linear-gradient(135deg, #6366f1, #58287F);
     border: none;
     border-radius: 50px;
     padding: 10px 28px;
     color: white;
     font-weight: 600;
     white-space: nowrap;
     transition: transform 0.2s, box-shadow 0.2s;
 }

 .search-input-group .btn-search:hover {
     transform: scale(1.03);
     box-shadow: 0 4px 20px #58287F;
 }

 .search-hint {
     display: flex;
     gap: 1rem;
     flex-wrap: wrap;
     justify-content: center;
     margin-top: 1rem;
 }

 .search-hint .hint-tag {
     background: rgba(255, 255, 255, 0.60);
     border: 1px solid var(--border);
     border-radius: 20px;
     padding: 4px 14px;
     font-size: 0.8rem;
     color: var(--text-muted);
     cursor: pointer;
     transition: all 0.2s;
 }

 .search-hint .hint-tag:hover {
     background: rgba(99, 102, 241, 0.2);
     color: var(--primary);
     border-color: rgba(99, 102, 241, 0.3);
 }

 /* ── Stats Bar ───────────────────────────────────── */
 .stats-bar {
     background: rgba(255, 255, 255, 0.60);
     border: 1px solid var(--border);
     border-radius: 16px;
     padding: 1.5rem 2rem;
     display: flex;
     gap: 2rem;
     flex-wrap: wrap;
     justify-content: center;
     margin-top: 3rem;
 }

 .stat-item {
     text-align: center;
 }

 .stat-num {
     font-size: 1.8rem;
     font-weight: 800;
     background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
 }

 .stat-label {
     font-size: 0.8rem;
     color: var(--text-muted);
     margin-top: 2px;
 }

 /* ── Filter Bar ──────────────────────────────────── */
 .filter-section {
     background: rgba(255, 255, 255, 0.60);
     border-bottom: 1px solid var(--border);
     padding: 1.25rem 0;
     position: unset;
     top: 69px;
     z-index: 900;
     backdrop-filter: blur(10px);
 }

 .filter-bar {
     display: flex;
     gap: 0.5rem;
     align-items: center;
     flex-wrap: wrap;
 }

 .filter-label {
     font-size: 0.8rem;
     font-weight: 600;
     color: var(--text-muted);
     text-transform: uppercase;
     letter-spacing: 0.05em;
     white-space: nowrap;
     margin-right: 0.25rem;
 }

 .filter-chips {
     display: flex;
     gap: 0.5rem;
     flex-wrap: wrap;
     flex: 1;
 }

 .filter-chip {
     background: rgba(230, 198, 198, 0.05);
     border: 1px solid var(--border);
     border-radius: 20px;
     padding: 5px 14px;
     font-size: 0.82rem;
     color: var(--text-muted);
     cursor: pointer;
     transition: all 0.2s;
     white-space: nowrap;
     text-decoration: none;
     display: inline-flex;
     align-items: center;
     gap: 5px;
 }

 .filter-chip:hover {
     background: rgba(99, 102, 241, 0.15);
     border-color: rgba(99, 102, 241, 0.4);
     color: var(--primary);
 }

 .filter-chip.active {
     background: linear-gradient(135deg, #FEF5EF 0%, #FDF8F3 50%, #FCF5ED 100%);
     border-color: transparent;
     color: black;
 }

 .filter-divider {
     width: 1px;
     height: 24px;
     background: var(--border);
     flex-shrink: 0;
 }

 /* ── Sort Dropdown ───────────────────────────────── */
 .sort-dropdown .dropdown-toggle {
     background: rgba(255, 255, 255, 0.05);
     border: 1px solid var(--border);
     border-radius: 20px;
     color: var(--text-muted);
     font-size: 0.82rem;
     padding: 5px 14px;
 }

 .sort-dropdown .dropdown-menu {
     background: #1e1e35;
     border: 1px solid var(--border);
     border-radius: 12px;
     min-width: 160px;
 }

 .sort-dropdown .dropdown-item {
     color: var(--text-muted);
     font-size: 0.85rem;
     padding: 8px 16px;
     transition: all 0.2s;
 }

 .sort-dropdown .dropdown-item:hover,
 .sort-dropdown .dropdown-item.active {
     background: rgba(99, 102, 241, 0.15);
     color: var(--primary);
 }

 /* ── Tool Cards ──────────────────────────────────── */
 #tools-grid {
     transition: opacity 0.3s;
 }

 .tool-card {
     background: linear-gradient(135deg, #FEF5EF 0%, #FDF8F3 50%, #FCF5ED 100%);
     border: 1px solid var(--border);
     border-radius: 20px;
     overflow: hidden;
     transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
     cursor: pointer;
     position: relative;
 }

 .tool-card:hover {
     transform: translateY(-8px) scale(1.01);
     box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), var(--shadow-glow);
     border-color: rgba(99, 102, 241, 0.3);
 }

 .featured-ribbon {
     position: absolute;
     top: 14px;
     right: -28px;
     background: linear-gradient(135deg, #f59e0b, #d97706);
     color: white;
     font-size: 0.68rem;
     font-weight: 700;
     padding: 4px 36px;
     transform: rotate(45deg);
     z-index: 10;
     text-transform: uppercase;
     letter-spacing: 0.05em;
 }

 .tool-card-img-wrap {
     position: relative;
     height: 160px;
     background: linear-gradient(135deg, #1e1e35, #2d2d4e);
     overflow: hidden;
 }

 .tool-card-img {
     width: 100%;
     height: 100%;
     object-fit: contain;
     padding: 20px;
     transition: transform 0.4s;
 }

 .tool-card:hover .tool-card-img {
     transform: scale(1.07);
 }

 .tool-badge {
     position: absolute;
     top: 10px;
     left: 10px;
     font-size: 0.7rem;
     font-weight: 700;
     padding: 4px 10px;
     border-radius: 20px;
     text-transform: uppercase;
     letter-spacing: 0.07em;
 }

 .badge-free {
     background: rgba(16, 185, 129, 0.2);
     color: #10b981;
     border: 1px solid rgba(16, 185, 129, 0.3);
 }

 .badge-paid {
     background: rgba(239, 68, 68, 0.2);
     color: #ef4444;
     border: 1px solid rgba(239, 68, 68, 0.3);
 }

 .badge-freemium {
     background: rgba(245, 158, 11, 0.2);
     color: #f59e0b;
     border: 1px solid rgba(245, 158, 11, 0.3);
 }

 .tool-card-body {
     padding: 1.25rem;
 }

 .tool-category-tag {
     font-size: 0.72rem;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: 0.07em;
     margin-bottom: 0.5rem;
 }

 .tool-card-title {
     font-size: 1.05rem;
     font-weight: 700;
     margin-bottom: 0.5rem;
     line-height: 1.3;
 }

 .tool-card-title a {
     color: var(--text-primary);
     text-decoration: none;
     transition: color 0.2s;
 }

 .tool-card-title a:hover {
     color: var(--primary);
 }

 .tool-card-desc {
     font-size: 0.83rem;
     color: var(--text-muted);
     line-height: 1.6;
     margin-bottom: 1rem;
     min-height: 60px;
 }

 .tool-card-stats {
     display: flex;
     align-items: center;
     justify-content: space-between;
     margin-bottom: 1rem;
     padding-bottom: 1rem;
     border-bottom: 1px solid var(--border);
 }

 /* Mobile (≤480px) */
 @media (max-width: 480px) {
     .tool-card-stats {
         flex-direction: column;
         align-items: flex-start;
         gap: 0.5rem;
         margin-bottom: 0.75rem;
         padding-bottom: 0.75rem;
     }
 }

 /* Tablet (481px–768px) */
 @media (min-width: 481px) and (max-width: 768px) {
     .tool-card-stats {
         flex-wrap: wrap;
         gap: 0.5rem;
         margin-bottom: 0.875rem;
         padding-bottom: 0.875rem;
     }
 }

 /* Tablet Landscape / Small Desktop (769px–1024px) */
 @media (min-width: 769px) and (max-width: 1024px) {
     .tool-card-stats {
         margin-bottom: 1rem;
         padding-bottom: 1rem;
     }
 }

 /* Large Desktop (≥1025px) */
 @media (min-width: 1025px) {
     .tool-card-stats {
         margin-bottom: 1rem;
         padding-bottom: 1rem;
     }
 }

 .tool-rating {
     display: flex;
     align-items: center;
     gap: 6px;
 }

 .stars {
     display: flex;
     gap: 2px;
     color: #f59e0b !important;
 }

 .stars i {
     font-size: 0.7rem;
     color: #f59e0b !important;
 }

 .rating-value {
     font-size: 0.82rem;
     font-weight: 600;
     color: #f59e0b !important;
 }

 .tool-views {
     font-size: 0.78rem;
     color: var(--text-muted);
     display: flex;
     align-items: center;
     gap: 5px;
 }

 .tool-views i {
     font-size: 0.7rem;
 }

 .tool-card-actions {
     display: flex;
     gap: 8px;
     align-items: center;
 }

 /* Mobile (≤480px) */
 @media (max-width: 480px) {
     .tool-card-actions {
         flex-direction: column;
         align-items: flex-start;
         gap: 6px;
         width: 100%;
     }
 }

 /* Tablet (481px–768px) */
 @media (min-width: 481px) and (max-width: 768px) {
     .tool-card-actions {
         flex-wrap: wrap;
         gap: 7px;
     }
 }

 /* Tablet Landscape / Small Desktop (769px–1024px) */
 @media (min-width: 769px) and (max-width: 1024px) {
     .tool-card-actions {
         gap: 8px;
     }
 }

 /* Large Desktop (≥1025px) */
 @media (min-width: 1025px) {
     .tool-card-actions {
         gap: 8px;
     }
 }

 .btn-visit {
     background: linear-gradient(135deg, var(--primary), var(--primary-dark));
     border: none;
     border-radius: 10px;
     color: rgb(27, 0, 0);
     font-size: 0.82rem;
     font-weight: 600;
     padding: 8px 16px;
     flex: 1;
     text-align: center;
     transition: all 0.2s;
     text-decoration: none;
 }

 .btn-visit:hover {
     transform: translateY(-2px);
     background: linear-gradient(135deg, #4338ca, #58287F);
     box-shadow: 0 6px 20px #58287F;
     color: white;
 }

 .btn-like {
     background: rgba(255, 255, 255, 0.05);
     border: 1px solid var(--border);
     border-radius: 10px;
     color: var(--text-muted);
     font-size: 0.82rem;
     padding: 8px 12px;
     display: flex;
     align-items: center;
     gap: 5px;
     transition: all 0.2s;
     cursor: pointer;
     flex-shrink: 0;
 }

 .btn-like:hover,
 .btn-like.liked {
     background: rgba(236, 72, 153, 0.15);
     border-color: rgba(236, 72, 153, 0.4);
     color: #ec4899;
 }

 .btn-like.liked i {
     color: #ec4899;
 }

 .btn-like.liking {
     transform: scale(1.2);
 }

 /* Mobile (≤480px) */
 @media (max-width: 480px) {

     .btn-like,
     .btn-visit {
         width: 100%;
         justify-content: center;
         padding: 10px 12px;
         font-size: 0.82rem;
         border-radius: 10px;
         box-sizing: border-box;
     }

     .btn-like {
         flex-shrink: unset;
     }

     .btn-visit {
         flex: unset;
     }
 }

 /* Tablet (481px–768px) */
 @media (min-width: 481px) and (max-width: 768px) {

     .btn-like,
     .btn-visit {
         padding: 8px 12px;
         font-size: 0.82rem;
         border-radius: 10px;
     }
 }

 /* Tablet Landscape / Small Desktop (769px–1024px) */
 @media (min-width: 769px) and (max-width: 1024px) {

     .btn-like,
     .btn-visit {
         padding: 8px 12px;
         font-size: 0.82rem;
     }
 }

 /* Large Desktop (≥1025px) */
 @media (min-width: 1025px) {

     .btn-like,
     .btn-visit {
         padding: 8px 12px;
         font-size: 0.82rem;
     }
 }

 /* ── Results Header ───────────────────────────────── */
 .results-header {
     display: flex;
     align-items: center;
     justify-content: space-between;
     margin-bottom: 1.5rem;
     flex-wrap: wrap;
     gap: 1rem;
 }

 .results-count {
     font-size: 0.9rem;
     color: var(--text-muted);
 }

 .results-count strong {
     color: var(--text-primary);
 }

 /* ── Featured Section ─────────────────────────────── */
 .section-title {
     font-size: 1.5rem;
     font-weight: 700;
     margin-bottom: 0.25rem;
 }

 .section-subtitle {
     color: var(--text-muted);
     font-size: 0.9rem;
     margin-bottom: 2rem;
 }

 /* ── Empty State ──────────────────────────────────── */
 .empty-state {
     text-align: center;
     padding: 5rem 2rem;
 }

 .empty-icon {
     font-size: 4rem;
     color: var(--text-muted);
     margin-bottom: 1rem;
     opacity: 0.4;
 }

 .empty-state h4 {
     font-weight: 600;
     margin-bottom: 0.5rem;
 }

 .empty-state p {
     color: var(--text-muted);
     margin-bottom: 1.5rem;
 }

 /* ── Loading ─────────────────────────────────────── */
 .loading-overlay {
     position: absolute;
     inset: 0;
     background: rgba(15, 15, 26, 0.7);
     display: flex;
     align-items: center;
     justify-content: center;
     z-index: 10;
     border-radius: 16px;
     backdrop-filter: blur(4px);
 }

 .spinner-ring {
     width: 48px;
     height: 48px;
     border: 3px solid var(--border);
     border-top-color: var(--primary);
     border-radius: 50%;
     animation: spin 0.8s linear infinite;
 }

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

 /* ── Pagination ──────────────────────────────────── */
 .pagination .page-item .page-link {
     background: rgba(255, 255, 255, 0.05);
     border-color: var(--border);
     color: var(--text-muted);
     border-radius: 8px !important;
     margin: 0 3px;
 }

 .pagination .page-item.active .page-link {
     background: var(--primary);
     border-color: var(--primary);
     color: white;
 }

 .pagination .page-item .page-link:hover {
     background: rgba(99, 102, 241, 0.2);
     color: var(--primary);
 }

 /* ── Category Pills ────────────────────────────── */
 .category-pills {
     display: flex;
     gap: 0.75rem;
     flex-wrap: wrap;
     margin-bottom: 2rem;
 }

 .category-pill {
     display: flex;
     align-items: center;
     gap: 8px;
     background: rgba(255, 255, 255, 0.04);
     border: 1px solid var(--border);
     border-radius: 12px;
     padding: 10px 16px;
     text-decoration: none;
     color: var(--text-muted);
     font-size: 0.85rem;
     font-weight: 500;
     transition: all 0.2s;
 }

 .category-pill:hover {
     background: rgba(99, 102, 241, 0.12);
     border-color: rgba(99, 102, 241, 0.3);
     color: var(--primary);
 }

 .category-pill.active {
     background: rgba(99, 102, 241, 0.15);
     border-color: rgba(99, 102, 241, 0.4);
     color: var(--primary);
 }

 .category-pill .count {
     background: rgba(255, 255, 255, 0.08);
     border-radius: 10px;
     padding: 1px 8px;
     font-size: 0.72rem;
 }

 .tool-detail-card {
     background: var(--bg-card);
     border: 1px solid var(--border);
     border-radius: 20px;
     padding: 2rem;
 }

 .tool-detail-header {
     display: flex;
     gap: 1.5rem;
     margin-bottom: 1.5rem;
     flex-wrap: wrap;
 }

 .tool-detail-img-wrap {
     width: 100px;
     height: 100px;
     flex-shrink: 0;
     background: rgba(255, 255, 255, 0.05);
     border-radius: 16px;
     overflow: hidden;
     border: 1px solid var(--border);
 }

 .tool-detail-img {
     width: 100%;
     height: 100%;
     object-fit: contain;
     padding: 12px;
 }

 .tool-detail-title {
     font-size: 1.8rem;
     font-weight: 800;
     margin-bottom: 0.5rem;
 }

 .tool-detail-short-desc {
     color: var(--text-muted);
     margin-bottom: 1rem;
     font-size: 0.95rem;
 }

 .tool-detail-actions {
     display: flex;
     gap: 0.75rem;
     align-items: center;
     margin-bottom: 2rem;
     flex-wrap: wrap;
 }

 .btn-visit-large {
     background: linear-gradient(135deg, #FEF5EF 0%, #FDF8F3 50%, #FCF5ED 100%);
     border: none;
     border-radius: 12px;
     color: black;
     font-weight: 600;
     padding: 12px 24px;
     text-decoration: none;
     transition: all 0.2s;
     display: inline-flex;
     align-items: center;
 }

 .btn-visit-large:hover {
     transform: translateY(-2px);
     box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
     color: black;
 }

 .btn-like-large {
     background: rgba(255, 255, 255, 0.05);
     border: 1px solid var(--border);
     border-radius: 12px;
     color: var(--text-muted);
     padding: 12px 20px;
     display: flex;
     align-items: center;
     gap: 6px;
     cursor: pointer;
     transition: all 0.2s;
     font-weight: 600;
 }

 .btn-like-large:hover,
 .btn-like-large.liked {
     background: rgba(236, 72, 153, 0.15);
     border-color: rgba(236, 72, 153, 0.4);
     color: #ec4899;
 }

 .btn-share {
     background: rgba(255, 255, 255, 0.05);
     border: 1px solid var(--border);
     border-radius: 12px;
     color: var(--text-muted);
     padding: 12px 16px;
     cursor: pointer;
     transition: all 0.2s;
 }

 .btn-share:hover {
     background: rgba(99, 102, 241, 0.15);
     border-color: rgba(99, 102, 241, 0.3);
     color: var(--primary);
 }

 .section-sm-title {
     font-size: 1rem;
     font-weight: 700;
     margin-bottom: 1rem;
     padding-bottom: 0.5rem;
     border-bottom: 1px solid var(--border);
 }

 .tool-description,
 .tool-tags {
     margin-bottom: 1.5rem;
 }

 .tool-description p {
     color: var(--text-muted);
     line-height: 1.8;
 }

 .tag-chip {
     background: rgba(99, 102, 241, 0.1);
     border: 1px solid rgba(99, 102, 241, 0.2);
     border-radius: 20px;
     padding: 4px 12px;
     font-size: 0.8rem;
     color: var(--primary);
     text-decoration: none;
     transition: all 0.2s;
 }

 .tag-chip:hover {
     background: rgba(99, 102, 241, 0.2);
     color: var(--primary);
 }

 /* Sidebar */
 .sidebar-card {
     background: var(--bg-card);
     border: 1px solid var(--border);
     border-radius: 16px;
     padding: 1.5rem;
 }

 .sidebar-title {
     font-size: 0.95rem;
     font-weight: 700;
     margin-bottom: 1rem;
     padding-bottom: 0.75rem;
     border-bottom: 1px solid var(--border);
 }

 .info-list {
     display: flex;
     flex-direction: column;
     gap: 0.75rem;
 }

 .info-item {
     display: flex;
     justify-content: space-between;
     align-items: center;
     font-size: 0.85rem;
 }

 .info-label {
     color: var(--text-muted);
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .info-value {
     font-weight: 600;
 }

 .category-list-item {
     display: flex;
     align-items: center;
     gap: 10px;
     padding: 8px 0;
     border-bottom: 1px solid rgba(255, 255, 255, 0.04);
     text-decoration: none;
     color: var(--text-muted);
     font-size: 0.85rem;
     transition: all 0.2s;
 }

 .category-list-item:hover {
     color: var(--text-primary);
 }

 .category-list-item .count {
     background: rgba(255, 255, 255, 0.06);
     border-radius: 8px;
     padding: 1px 7px;
     font-size: 0.72rem;
 }

 /* ── Responsive ──────────────────────────────────── */
 @media (max-width: 768px) {
     .hero-section-ai-tool {
         padding: 3rem 0 2.5rem;
     }

     .filter-section {
         top: 60px;
     }

     .stats-bar {
         gap: 1rem;
         padding: 1rem;
     }

     .stat-num {
         font-size: 1.4rem;
     }

     .results-header {
         flex-direction: column;
     }
 }

 @media (max-width: 555px) {
     .tool-card-col {
         flex: 0 0 50% !important;
         max-width: 50% !important;
     }
 }

 .tool-card-col {
     transition: opacity 0.3s, transform 0.3s;
 }