/* ========================================
   TOOLS PAGE CSS
   Styles specific to tools.php (listing page)
   ======================================== */

.container {
    max-width: 1400px;
}

@media (max-width: 768px) {
    .container {
        padding-left: var(--spacing-xs);
        padding-right: var(--spacing-xs);
    }
}


/* Hero Section - Dynamic Design */
.tools-hero {
    position: relative;
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg,
            color-mix(in srgb, var(--primary) 8%, var(--bg-card)) 0%,
            color-mix(in srgb, var(--primary) 3%, var(--bg-secondary)) 50%,
            var(--bg-card) 100%);
    border-radius: 24px;
    margin-bottom: 32px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.tools-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.hero-shape-1 {
    width: 200px;
    height: 200px;
    background: var(--primary);
    top: -50px;
    left: -50px;
    animation-delay: 0s;
}

.hero-shape-2 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #8a50ee, #4f46e5);
    bottom: -40px;
    right: 10%;
    animation-delay: -2s;
}

.hero-shape-3 {
    width: 100px;
    height: 100px;
    background: #06b6d4;
    top: 30%;
    right: -20px;
    animation-delay: -4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

.tools-hero-content {
    position: relative;
    z-index: 1;
}

.tools-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: color-mix(in srgb, var(--primary) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
}

.tools-hero-badge svg {
    width: 16px;
    height: 16px;
}

.tools-hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 16px;
    line-height: 1.2;
}

.tools-hero-title .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tools-hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 0 0 28px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.tools-hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    padding: 16px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hero-stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.hero-stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border-color);
}

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 24px;
}

.section-title svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Compact Featured Tools Slider */
.tools-featured-section {
    margin-bottom: 40px;
}

.featured-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.featured-header .section-title {
    margin: 0;
}

.featured-nav-arrows {
    display: flex;
    gap: 8px;
}

.featured-nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.featured-nav-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.05);
}

.featured-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.featured-nav-btn svg {
    width: 18px;
    height: 18px;
}

.featured-slider-container {
    position: relative;
    overflow: hidden;
}

.featured-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.featured-slider::-webkit-scrollbar {
    display: none;
}

.featured-slide-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    max-width: 320px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.featured-slide-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 1px;
    background: linear-gradient(135deg, var(--tool-color), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.featured-slide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(138, 80, 238, 0.15);
    border-color: color-mix(in srgb, var(--tool-color) 50%, var(--border-color));
}

.featured-slide-card:hover::before {
    opacity: 1;
}

.featured-slide-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--tool-color) 15%, transparent);
    border-radius: 12px;
    color: var(--tool-color);
    flex-shrink: 0;
}

.featured-slide-icon svg {
    width: 24px;
    height: 24px;
}

.featured-slide-content {
    flex: 1;
    min-width: 0;
}

.featured-slide-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-slide-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-slide-arrow {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: all 0.3s;
    flex-shrink: 0;
}

.featured-slide-card:hover .featured-slide-arrow {
    color: var(--tool-color);
    transform: translateX(4px);
}

/* Legacy featured cards grid - kept for backwards compatibility */
.featured-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.featured-mini-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* .featured-mini-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--tool-color);
    opacity: 0;
    transition: opacity 0.25s;
} */

.featured-mini-card:hover {
    border-color: var(--tool-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(138, 80, 238, 0.12);
}

.featured-mini-card:hover::before {
    opacity: 1;
}

.featured-mini-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--tool-color) 15%, transparent);
    border-radius: 10px;
    color: var(--tool-color);
    flex-shrink: 0;
}

.featured-mini-icon svg {
    width: 20px;
    height: 20px;
}

.featured-mini-content {
    flex: 1;
    min-width: 0;
}

.featured-mini-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-mini-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-mini-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-mini-rating .stars {
    display: flex;
    gap: 2px;
}

.featured-mini-rating .star {
    width: 12px;
    height: 12px;
}

.featured-mini-rating .star.filled {
    color: #f59e0b;
}

.featured-mini-rating .star.half {
    color: #f59e0b;
    opacity: 0.6;
}

.featured-mini-rating .star.empty {
    color: var(--text-muted);
    opacity: 0.3;
}

.featured-mini-rating .rating-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.featured-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.featured-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.featured-nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.featured-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.featured-nav-btn svg {
    width: 18px;
    height: 18px;
}

.featured-scroll {
    display: flex;
    gap: 12px;
    overflow-x: hidden;
    padding: 4px 0;
    flex: 1;
    scroll-behavior: smooth;
}

.featured-scroll::-webkit-scrollbar {
    height: 4px;
}

.featured-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.featured-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.featured-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.featured-chip:hover {
    border-color: var(--tool-color);
    background: color-mix(in srgb, var(--tool-color) 10%, var(--bg-card));
    transform: translateY(-2px);
}

.featured-chip-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--tool-color) 15%, transparent);
    border-radius: 50%;
    color: var(--tool-color);
    flex-shrink: 0;
}

.featured-chip-icon svg {
    width: 14px;
    height: 14px;
}

.featured-chip-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.featured-chip:hover .featured-chip-name {
    color: var(--tool-color);
}

/* Tool Card */
.tool-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(138, 80, 238, 0.15);
}

.tool-card.featured {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--tool-color) 15%, transparent);
    border-radius: 12px;
    color: var(--tool-color);
    flex-shrink: 0;
}

.tool-card.featured .tool-card-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
}

.tool-card-icon svg {
    width: 24px;
    height: 24px;
}

.tool-card.featured .tool-card-icon svg {
    width: 28px;
    height: 28px;
}

.tool-card-content {
    flex: 1;
    min-width: 0;
}

.tool-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.tool-card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card-category {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 12px;
    background: color-mix(in srgb, var(--cat-color) 15%, transparent);
    color: var(--cat-color);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tool-card-arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tool-card:hover .tool-card-arrow {
    color: var(--primary);
    transform: translateY(-50%) translateX(4px);
}

.tool-card.hidden {
    display: none !important;
}

/* More Tools Card - the 12th slot button */
.tool-card.tool-card-more {
    background: linear-gradient(135deg, color-mix(in srgb, var(--tool-color) 15%, var(--bg-card)) 0%, var(--bg-card) 100%);
    border: 2px dashed var(--tool-color);
    cursor: pointer;
}

.tool-card.tool-card-more:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--tool-color) 25%, var(--bg-card)) 0%, var(--bg-card) 100%);
    border-style: solid;
    transform: translateY(-4px);
}

.tool-card.tool-card-more .tool-card-icon {
    background: color-mix(in srgb, var(--tool-color) 25%, transparent);
}

.tool-card.tool-card-more .tool-card-title {
    color: var(--tool-color);
}

/* Hidden tools grid - shown when More is clicked */
.tools-grid-hidden {
    margin-top: 0;
}

/* Mobile Category Dropdown */
.tools-category-dropdown {
    display: none;
    position: relative;
    margin-bottom: 20px;
}

.tools-category-dropdown select {
    width: 100%;
    padding: 14px 48px 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.tools-category-dropdown select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(138, 80, 238, 0.15);
}

.tools-category-dropdown svg {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Category Navigation Pills */
.tools-categories-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.category-pill svg {
    width: 16px;
    height: 16px;
    color: inherit;
    opacity: 0.8;
}

.category-pill:hover,
.category-pill.active {
    background: var(--pill-color, var(--primary));
    border-color: var(--pill-color, var(--primary));
    color: white;
}

.pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 6px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.category-pill:hover .pill-count,
.category-pill.active .pill-count {
    background: rgba(0, 0, 0, 0.25);
    color: white;
}

.category-pill:not(:hover):not(.active) .pill-count {
    background: var(--bg-tertiary, rgba(0, 0, 0, 0.1));
    color: var(--text-muted);
}

/* Search Bar */
.tools-search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    max-width: 600px;
    margin: 24px auto 28px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tools-search-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(138, 80, 238, 0.15);
}

.tools-search-wrapper svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.tools-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
}

.tools-search-input::placeholder {
    color: var(--text-muted);
}

.tools-search-clear {
    display: none;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: all 0.2s;
}

.tools-search-clear:hover {
    background: var(--primary);
    color: white;
}

.tools-search-wrapper.has-value .tools-search-clear {
    display: flex;
}

/* Sort Filter Dropdown */
.tools-sort-filter {
    flex-shrink: 0;
    border-left: 1px solid var(--border-color);
    padding-left: 12px;
    margin-left: 8px;
}

.tools-sort-filter select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    padding: 4px 8px;
    padding-right: 24px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 16px;
}

.tools-sort-filter select:hover {
    color: var(--primary);
}

.tools-sort-filter select option {
    background: #1a1a2e;
    color: var(--text-primary);
}

/* No results message */
.tools-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.tools-no-results svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Category Sections */
.tools-category-section {
    margin-bottom: 48px;
}

.tools-category-section.hidden {
    display: none !important;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--cat-color);
}

.category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--cat-color) 15%, transparent);
    border-radius: 12px;
    color: var(--cat-color);
}

.category-icon svg {
    width: 24px;
    height: 24px;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.category-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .tools-hero {
        padding: 35px 20px;
    }

    .tools-hero-title {
        font-size: 1.75rem;
    }

    .tools-hero-desc {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .tools-hero-stats {
        flex-direction: row;
        gap: 16px;
        padding: 14px 20px;
    }

    .hero-stat-number {
        font-size: 1.25rem;
    }

    .hero-stat-label {
        font-size: 0.7rem;
    }

    .hero-stat-divider {
        height: 28px;
    }

    /* Hide sort filter on mobile - keep search clean */
    .tools-sort-filter {
        display: none;
    }

    .tools-search-wrapper {
        max-width: 100%;
        margin: 16px 0 20px;
    }

    .featured-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .featured-nav-arrows {
        align-self: flex-end;
    }

    .featured-slide-card {
        min-width: 280px;
        max-width: 280px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .category-header {
        flex-direction: column;
        text-align: center;
    }

    .tools-category-dropdown {
        display: block;
    }

    .tools-categories-nav {
        display: none;
    }
}

/* ========================================
   FREE/PREMIUM TABS
   ======================================== */

.tools-type-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.tools-type-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tools-type-tab:hover {
    color: var(--text-primary);
    background: rgba(138, 80, 238, 0.08);
}

.tools-type-tab.active:not(.premium) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    box-shadow: none;
}

.tools-type-tab.premium {
    color: #f59e0b;
}

.tools-type-tab.premium:hover {
    background: rgba(245, 158, 11, 0.1);
}

.tools-type-tab.premium.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.tab-count {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 0.75rem;
}

.tools-type-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
}

.premium-badge-small {
    padding: 2px 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tools-type-tab.premium.active .premium-badge-small {
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
}

/* Subscription Active Indicator */
.subscription-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    margin-left: 4px;
    flex-shrink: 0;
}

.subscription-check svg {
    width: 10px;
    height: 10px;
    color: white;
}

/* ========================================
   PREMIUM PROMO MODAL
   ======================================== */

.premium-promo-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
.premium-promo-card {
    position: relative;
    max-width: 420px;
    width: 100%;
    /* background: linear-gradient(145deg, var(--bg-card), rgba(245, 158, 11, 0.03)); */
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    animation: slideUp 0.4s ease;
    box-shadow: var(--shadow-codepen);
    background: var(--gradient-card);
}

/* .premium-promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f59e0b, transparent);
    border-radius: 0 0 3px 3px;
} */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.premium-promo-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.premium-promo-close:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.premium-promo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.premium-promo-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premium-promo-card>p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 24px;
}

.premium-promo-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.premium-promo-features span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 20px;
}

.premium-promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.premium-promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
}

/* Responsive tabs */
@media (max-width: 480px) {
    .tools-type-tabs {
        max-width: 100%;
    }

    .tools-type-tab {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .premium-promo-card {
        padding: 32px 24px;
    }
}