/**
 * The Spin The Wheel — Page Module: tools.css
 * Directory & Ecosystem Hub for all 16+ Specialized Random Wheels
 * Performance Budget: < 6KB, Pure CSS Tokens, Zero UI Bloat
 */

.tools-hub-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem 1.25rem;
}

/* 1. Breadcrumbs */
.tools-breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tools-breadcrumb-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.tools-breadcrumb-nav a:hover {
    color: var(--accent-cyan);
}

.tools-breadcrumb-sep {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.tools-breadcrumb-current {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* 2. Hero Header */
.tools-hero-header {
    margin-bottom: 2.25rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 2rem;
}

.tools-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: #818cf8;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tools-hero-title {
    font-size: 2.35rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin: 0 0 0.85rem 0;
}

.tools-hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.65;
    max-width: 860px;
    margin: 0;
}

/* 3. Search & Filter Bar */
.tools-filter-strip {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.tools-search-box {
    position: relative;
    margin-bottom: 1rem;
}

.tools-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.tools-search-input {
    width: 100%;
    padding: 0.85rem 2.85rem 0.85rem 2.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.975rem;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.tools-search-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.tools-search-clear {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.35rem;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
}

.tools-search-clear:hover {
    color: var(--text-primary);
}

.tools-pills-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.tools-category-pills {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.tool-filter-pill {
    padding: 0.4rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tool-filter-pill:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
}

.tool-filter-pill.active {
    background: var(--accent-cyan);
    color: #041019;
    border-color: var(--accent-cyan);
    font-weight: 700;
}

.tool-filter-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

/* 4. Category Sections & Tool Cards */
.tool-category-section {
    margin-bottom: 3rem;
}

.tool-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tool-category-title-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.tool-category-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.tool-category-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.tool-category-count {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-weight: 600;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
}

.tool-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.tool-card-top {
    margin-bottom: 0;
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tool-card-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.tool-card-intent-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.badge-daily {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-edtech {
    background: rgba(6, 182, 212, 0.12);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-numbers {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-streamer {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-audit {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.tool-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.45rem 0;
    line-height: 1.3;
}

.tool-card-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.tool-card-name a:hover {
    color: var(--accent-cyan);
}

.tool-card-name a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.tool-card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0 0 0.85rem 0;
}

.tool-feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0;
    margin-top: auto;
}

.tool-feature-tag {
    font-size: 0.725rem;
    padding: 0.2rem 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.tool-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
}

.tool-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-decoration: none;
    transition: gap 0.15s ease;
}

.tool-card-link:hover {
    text-decoration: underline;
    gap: 0.6rem;
}

.tool-card-metric {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 5. Decision Matrix Table */
.tools-matrix-section {
    margin-top: 4rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.tools-matrix-header {
    margin-bottom: 1.5rem;
}

.tools-matrix-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.tools-matrix-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.tools-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-top: 1.25rem;
}

.tools-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    min-width: 680px;
    text-align: left;
}

.tools-matrix-table th {
    background: var(--bg-card);
    padding: 0.85rem 1rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.tools-matrix-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: top;
    line-height: 1.5;
}

.tools-matrix-table tr:last-child td {
    border-bottom: none;
}

.tools-matrix-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.matrix-tool-link {
    color: var(--accent-cyan);
    font-weight: 600;
    text-decoration: none;
}

.matrix-tool-link:hover {
    text-decoration: underline;
}

/* 6. FAQ Section */
.tools-faq-section {
    margin-top: 4rem;
}

.tools-faq-header {
    margin-bottom: 1.75rem;
}

.tools-faq-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.tools-faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.tools-faq-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.tools-faq-q {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.65rem 0;
    line-height: 1.35;
}

.tools-faq-a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* 7. Empty State */
.tools-empty-state {
    display: none;
    text-align: center;
    padding: 3.5rem 1rem;
    background: var(--bg-surface);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

.tools-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.tools-empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.tools-empty-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.25rem 0;
}

/* 8. Responsive Adjustments */
@media (max-width: 768px) {
    .tools-hero-title {
        font-size: 1.85rem;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .tools-filter-strip {
        padding: 1rem;
    }
    .tools-matrix-section {
        padding: 1.25rem;
    }
}
