/* Header Section */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--border-accent);
    color: var(--accent-primary);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    text-wrap: balance;
}

.header h1 span {
    color: var(--accent-primary);
}

.header p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
    text-wrap: balance;
}

/* Control Bar: Search & Category Tabs */
.control-bar {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 46px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.search-box input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box input::placeholder {
    color: var(--text-dim);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1.1rem;
    pointer-events: none;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.tab-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-main);
}

.tab-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #042f2e;
    font-weight: 600;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.tool-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tool-card h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
    flex: 1;
    margin-bottom: 16px;
}

.tool-badge {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.empty-search {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-card);
    color: var(--text-muted);
}
