/* ============================================
   Search Page — SSA Premium Style v4.0
   Design: Linear / Vercel / Supabase inspired
   Ambient gradient orbs, glassmorphism, micro-animations
   ============================================ */

/* ===== PAGE BACKGROUND ===== */
.search-page {
    background: var(--color-bg);
    min-height: 100vh;
}

/* ===== HERO — Premium SSA ===== */
.search-hero {
    position: relative;
    padding: 20px 0 10px;
    overflow: hidden;
    background: transparent;
}

.search-hero .hero-orb {
    display: none;
}

/* Ambient gradient orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0;
    animation: orbFadeIn 1s ease forwards;
}

.hero-orb--1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.18) 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0.1s;
}

.hero-orb--2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.14) 0%, transparent 70%);
    top: -100px;
    right: -80px;
    animation-delay: 0.25s;
}

.hero-orb--3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 70%);
    bottom: -100px;
    left: 20%;
    animation-delay: 0.4s;
}

.hero-orb--4 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    bottom: -80px;
    right: 10%;
    animation-delay: 0.55s;
}

@keyframes orbFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: none;
    margin: 0 auto;
    padding: 24px;
    text-align: left;
    background: #ffffff;
    border: 1px solid #d5deea;
    border-radius: 15px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

/* Eyebrow tag */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 15px;
    font-size: 12px;
    font-weight: var(--font-semibold);
    color: var(--color-primary);
    letter-spacing: 0.03em;
    margin-bottom: 12px;
    animation: slideDown 0.6s ease both;
}

.eyebrow-dot {
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero title */
.search-hero__title {
    max-width: 1100px;
    margin: 0 0 8px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.18;
    color: var(--color-text);
    animation: searchHeroSlideUp 0.7s ease both;
    animation-delay: 0.15s;
}

.title-accent {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-query {
    color: var(--color-primary);
    font-style: italic;
}

.search-hero__subtitle {
    max-width: 920px;
    margin: 0 0 18px;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    animation: searchHeroSlideUp 0.7s ease both;
    animation-delay: 0.25s;
}

.search-hero__subtitle strong {
    color: var(--color-text);
    font-weight: 700;
}

@keyframes searchHeroSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SEARCH BENTO CARD ===== */
.search-bento-card {
    width: 100%;
    max-width: none;
    margin: 0 0 14px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 15px;
    box-shadow: none;
    animation: searchHeroSlideUp 0.7s ease both;
    animation-delay: 0.35s;
}

.search-form {
    display: flex;
    align-items: stretch;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 6px 7px 6px 16px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 15px;
    transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
    background: #ffffff;
    border-color: color-mix(in srgb, var(--color-primary) 45%, #cbd5e1);
}

.search-icon-left {
    flex-shrink: 0;
    color: var(--color-text-muted);
    width: 22px;
    height: 22px;
    transition: color 0.2s ease;
}

.search-input-wrapper:focus-within .search-icon-left {
    color: var(--color-primary);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    font-family: var(--font-body);
    color: var(--color-text);
    padding: 0;
    outline: none;
}

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

.search-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 15px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-body);
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.search-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.search-btn:active {
    transform: translateY(0);
}

/* ===== STAT CHIPS ===== */
.search-stats {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    animation: searchHeroSlideUp 0.7s ease both;
    animation-delay: 0.45s;
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.stat-chip:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(79, 70, 229, 0.15);
    color: var(--color-primary);
}

.stat-chip--ai {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.15);
    color: #7c3aed;
}

.stat-chip--ai:hover {
    background: rgba(139, 92, 246, 0.14);
    color: #6d28d9;
}

.stat-chip__icon {
    display: flex;
    align-items: center;
}

.stat-chip__icon svg {
    width: 16px;
    height: 16px;
}

.stat-chip strong {
    color: var(--color-text);
    font-weight: 700;
}

/* ===== SEARCH BODY ===== */
.search-body {
    padding: 0 0 80px;
}

/* ===== BENTO SECTION ===== */
.bento-section {
    margin-bottom: 48px;
}

.bento-section__header {
    margin-bottom: 20px;
}

.bento-section__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.label-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0.6;
}

.label-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #7c3aed;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

/* Category cards grid */
.bento-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.cat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    text-decoration: none;
    color: var(--color-text);
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cat-card:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(79, 70, 229, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
    color: var(--color-text);
}

.cat-card:hover::before { opacity: 1; }

.cat-card--active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
}

.cat-card--active::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
    opacity: 1;
}

.cat-card__icon-wrap {
    flex-shrink: 0;
}

.cat-card__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 10px;
    transition: all 0.25s ease;
}

.cat-card--active .cat-card__icon {
    background: rgba(255, 255, 255, 0.2);
}

.cat-card:hover .cat-card__icon {
    background: rgba(79, 70, 229, 0.12);
    transform: scale(1.05);
}

.cat-card__icon svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
    transition: color 0.25s ease;
}

.cat-card--active .cat-card__icon svg {
    color: #fff;
}

.cat-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cat-card__name {
    font-size: 13px;
    font-weight: var(--font-semibold);
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-card__count {
    font-size: 11px;
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    transition: color 0.25s ease;
}

.cat-card--active .cat-card__count {
    color: rgba(255, 255, 255, 0.7);
}

.cat-card__active-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

/* ===== RESULTS SECTION ===== */
.results-section {
    margin-bottom: 48px;
}

.results-panel {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.results-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.results-panel__title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.results-panel__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 10px;
    flex-shrink: 0;
}

.results-panel__icon svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.results-panel__titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.results-panel__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    letter-spacing: -0.02em;
}

.results-panel__meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 0;
}

.results-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.12);
    border-radius: 8px;
    color: #dc2626;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.results-clear-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    transform: rotate(90deg);
}

/* ===== TOOLS GRID BENTO ===== */
.tools-grid-bento {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.tools-grid-bento--featured {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Tool Card */
.tool-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    text-decoration: none;
    color: var(--color-text);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), #7c3aed, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(79, 70, 229, 0.2);
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(79, 70, 229, 0.08);
    color: var(--color-text);
}

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

.tool-card--featured {
    padding: 24px;
    background: rgba(255, 255, 255, 0.8);
}

.tool-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tool-card__icon-wrap {
    flex-shrink: 0;
}

.tool-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-card__icon {
    transform: scale(1.08);
    background: rgba(79, 70, 229, 0.14);
}

.tool-card__icon--ai {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(236, 72, 153, 0.08));
}

.tool-card__icon svg {
    width: 22px;
    height: 22px;
    color: var(--color-primary);
}

.tool-card__icon--ai svg {
    color: #7c3aed;
}

.tool-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: var(--font-semibold);
    letter-spacing: 0.04em;
    font-family: var(--font-mono);
}

.tool-badge--ai {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(167, 139, 250, 0.12));
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.tool-badge--hot {
    background: rgba(236, 72, 153, 0.08);
    color: #db2777;
    border: 1px solid rgba(236, 72, 153, 0.15);
}

.tool-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-card__name {
    font-size: 15px;
    font-weight: var(--font-semibold);
    color: var(--color-text);
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

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

.tool-card__desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tool-card__cat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.tool-card__cat svg {
    width: 12px;
    height: 12px;
}

.tool-card__arrow {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.08);
    color: var(--color-primary);
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.25s ease;
}

.tool-card:hover .tool-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ===== TOOLS SECTION ===== */
.tools-section {
    margin-bottom: 48px;
}

.section-panel {
    margin-bottom: 16px;
}

.section-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-panel__label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-panel__count {
    font-size: 12px;
    font-weight: var(--font-semibold);
    font-family: var(--font-mono);
    color: var(--color-text-muted);
    background: rgba(0, 0, 0, 0.04);
    padding: 3px 10px;
    border-radius: 100px;
}

/* ===== TOOLS HUB SEO CONTENT ===== */
.tools-hub-seo,
.tools-hub-guide,
.tools-hub-faq {
    margin: 56px 0 48px;
}

.tools-hub-faq.faq-section {
    padding: 0;
}

.tools-hub-faq .faq-section__layout {
    border-radius: 16px;
}

.tools-hub-seo {
    padding: 30px 32px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: color-mix(in srgb, var(--color-bg) 96%, transparent);
    box-shadow: 0 20px 40px -14px rgba(15, 23, 42, 0.1);
}

.tools-hub-seo > .tools-hub-seo__header {
    max-width: none;
    margin-bottom: 24px;
}

.tools-hub-seo > .tools-hub-seo__header p {
    max-width: none;
}

.tools-hub-guide {
    padding: 30px 32px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: color-mix(in srgb, var(--color-bg) 96%, transparent);
    box-shadow: 0 20px 40px -14px rgba(15, 23, 42, 0.1);
}

.tools-hub-guide .tools-hub-seo__header {
    max-width: none;
    margin-bottom: 24px;
}

.tools-hub-guide .tools-hub-seo__header p {
    max-width: none;
}

.tools-hub-seo__header {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    row-gap: 10px;
    max-width: 760px;
    margin-bottom: 22px;
}

.tools-hub-seo__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    margin-bottom: 0;
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 15px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: var(--font-semibold);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    animation: slideDown 0.6s ease both;
}

.tools-hub-seo__header h2 {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
}

.tools-hub-seo__header p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.98rem;
    line-height: 1.7;
}

.tools-hub-seo__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.tools-hub-seo__card,
.tools-hub-guide__item,
.tools-hub-faq__item {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.tools-hub-seo__card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas:
        "icon count"
        "icon title"
        ". desc"
        ". link";
    column-gap: 12px;
    row-gap: 6px;
    align-content: start;
    min-height: 0;
    padding: 16px;
    color: inherit;
    background: color-mix(in srgb, var(--color-bg) 92%, #fff 8%);
    box-shadow: none;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tools-hub-seo__card:hover,
.tools-hub-seo__card:focus-visible {
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: 0 18px 36px rgba(79, 70, 229, 0.12);
    outline: none;
    transform: translateY(-2px);
}

.tools-hub-seo__icon {
    grid-area: icon;
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--color-primary);
    background: rgba(79, 70, 229, 0.1);
}

.tools-hub-seo__icon svg {
    width: 18px;
    height: 18px;
}

.tools-hub-seo__count {
    grid-area: count;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: var(--font-semibold);
    line-height: 1.2;
    text-transform: uppercase;
}

.tools-hub-seo__card h3,
.tools-hub-guide__item h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: var(--font-semibold);
    line-height: 1.35;
}

.tools-hub-seo__card h3 {
    grid-area: title;
}

.tools-hub-seo__card p,
.tools-hub-guide__item p,
.tools-hub-faq__item p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
}

.tools-hub-seo__card p {
    grid-area: desc;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.tools-hub-seo__link {
    grid-area: link;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-size: 0.86rem;
    font-weight: 700;
}

.tools-hub-seo__link svg {
    width: 14px;
    height: 14px;
}

.tools-hub-guide__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tools-hub-guide__item {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 0;
    padding: 17px 18px;
    background: color-mix(in srgb, var(--color-bg) 92%, #fff 8%);
    box-shadow: none;
}

.tools-hub-guide__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tools-hub-guide__links a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(79, 70, 229, 0.16);
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(79, 70, 229, 0.07);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.tools-hub-guide__links a:hover,
.tools-hub-guide__links a:focus-visible {
    border-color: rgba(79, 70, 229, 0.35);
    color: #fff;
    background: var(--color-primary);
    outline: none;
}

.tools-hub-faq__list {
    display: grid;
    gap: 10px;
}

.tools-hub-faq__item {
    padding: 0 18px;
}

.tools-hub-faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    color: var(--color-text);
    cursor: pointer;
    font-weight: 750;
    line-height: 1.4;
    list-style: none;
}

.tools-hub-faq__item summary::-webkit-details-marker {
    display: none;
}

.tools-hub-faq__item summary::after {
    content: "+";
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(79, 70, 229, 0.1);
    font-size: 18px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.tools-hub-faq__item[open] summary::after {
    transform: rotate(45deg);
}

.tools-hub-faq__item p {
    padding: 0 0 18px;
}

/* ===== A-Z TOOL INDEX ===== */
.tool-alpha-nav {
    position: sticky;
    z-index: 8;
    top: calc(var(--header-h, 72px) + 8px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 0 0 24px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.tool-alpha-nav__link {
    display: inline-flex;
    width: 29px;
    height: 29px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.tool-alpha-nav__link:not(.is-disabled):hover,
.tool-alpha-nav__link:not(.is-disabled):focus-visible,
.tool-alpha-nav__link[aria-current="location"] {
    color: #fff;
    background: var(--color-primary);
    outline: none;
    transform: translateY(-1px);
}

.tool-alpha-nav__link.is-disabled {
    cursor: default;
    opacity: 0.32;
}

.tools-alpha-groups {
    display: grid;
    gap: 36px;
}

.tools-alpha-group {
    scroll-margin-top: calc(var(--header-h, 72px) + 68px);
}

.tools-alpha-group__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.tools-alpha-group__letter {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--color-primary);
    background: rgba(79, 70, 229, 0.1);
    font-size: 0.94rem;
    font-weight: 800;
}

.tools-alpha-group__header h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 700;
}

.tools-alpha-group__header > span:last-child {
    margin-left: auto;
    padding: 3px 9px;
    border-radius: 999px;
    color: var(--color-text-muted);
    background: rgba(148, 163, 184, 0.1);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
}

/* ===== EMPTY STATE ===== */
.search-empty {
    text-align: center;
    padding: 64px 24px;
    grid-column: 1 / -1;
}

.search-empty__visual {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-empty__ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(79, 70, 229, 0.12);
    animation: ringExpand 3s ease-in-out infinite;
}

.search-empty__ring--1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.search-empty__ring--2 {
    width: 70%;
    height: 70%;
    animation-delay: 0.5s;
    border-color: rgba(139, 92, 246, 0.15);
}

@keyframes ringExpand {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.2; }
}

.search-empty__icon {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 16px;
}

.search-empty__icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
    opacity: 0.7;
}

.search-empty__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.search-empty__desc {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.search-empty__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .bento-categories {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    .search-hero {
        padding: 14px 0 8px;
    }

    .hero-content { padding: 18px; }

    .search-hero__title {
        font-size: 1.75rem;
    }

    .search-bento-card {
        border-radius: 15px;
        padding: 0;
    }

    .search-input-wrapper {
        padding: 10px 12px;
    }

    .search-btn {
        padding: 10px 18px;
        font-size: 13px;
    }

    .search-btn svg { display: none; }

    .bento-categories {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }

    .cat-card {
        padding: 12px;
    }

    .tools-grid-bento,
    .tools-grid-bento--featured {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 10px;
    }

    .tools-hub-seo,
    .tools-hub-guide,
    .tools-hub-faq {
        margin: 44px 0 40px;
    }

    .tools-hub-seo {
        padding: 24px;
    }

    .tools-hub-guide {
        padding: 24px;
    }

    .tools-hub-guide__grid {
        grid-template-columns: 1fr;
    }

    .results-panel__header {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .results-panel__title-row {
        flex: 1;
        min-width: 0;
    }

    .results-panel__titles {
        min-width: 0;
    }

    .results-panel__title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .results-clear-btn {
        margin-left: auto;
    }

    .tool-alpha-nav {
        top: calc(var(--header-h, 64px) + 6px);
        justify-content: flex-start;
        margin-bottom: 20px;
        padding: 7px;
    }

    .tools-alpha-groups {
        gap: 28px;
    }
}

@media (max-width: 480px) {
    .search-hero {
        padding: 12px 0 6px;
    }

    .search-hero__title {
        font-size: 1.5rem;
    }

    .search-hero__subtitle {
        font-size: 0.9375rem;
    }

    .bento-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .tools-grid-bento,
    .tools-grid-bento--featured {
        grid-template-columns: 1fr;
    }

    .search-stats {
        gap: 8px;
    }

    .stat-chip {
        font-size: 12px;
        padding: 5px 12px;
    }

    .tool-alpha-nav__link {
        width: 27px;
        height: 27px;
        font-size: 0.72rem;
    }

    .tools-alpha-group__header {
        margin-bottom: 11px;
    }

    .tools-alpha-group__letter {
        width: 31px;
        height: 31px;
    }

    .tools-hub-seo__grid {
        grid-template-columns: 1fr;
    }

    .tools-hub-seo {
        padding: 18px;
        border-radius: 14px;
    }

    .tools-hub-seo__card,
    .tools-hub-guide__item {
        padding: 16px;
    }

    .tools-hub-guide {
        padding: 18px;
        border-radius: 14px;
    }

    .tools-hub-faq__item {
        padding: 0 14px;
    }

    .tools-hub-faq__item summary {
        min-height: 54px;
        font-size: 0.94rem;
    }
}

[data-theme="dark"] .tool-alpha-nav {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .tool-alpha-nav__link {
    color: #cbd5e1;
}

[data-theme="dark"] .tool-alpha-nav__link:not(.is-disabled):hover,
[data-theme="dark"] .tool-alpha-nav__link:not(.is-disabled):focus-visible,
[data-theme="dark"] .tool-alpha-nav__link[aria-current="location"] {
    color: #fff;
    background: #6366f1;
}

[data-theme="dark"] .tools-alpha-group__letter {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .tools-alpha-group__header h3 {
    color: #f1f5f9;
}

[data-theme="dark"] .tools-hub-seo__header h2,
[data-theme="dark"] .tools-hub-seo__card h3,
[data-theme="dark"] .tools-hub-guide__item h3,
[data-theme="dark"] .tools-hub-faq__item summary {
    color: #f1f5f9;
}

[data-theme="dark"] .tools-hub-seo__header p,
[data-theme="dark"] .tools-hub-seo__card p,
[data-theme="dark"] .tools-hub-guide__item p,
[data-theme="dark"] .tools-hub-faq__item p {
    color: #94a3b8;
}

[data-theme="dark"] .tools-hub-seo__card,
[data-theme="dark"] .tools-hub-guide__item,
[data-theme="dark"] .tools-hub-faq__item {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(30, 41, 59, 0.62);
}

[data-theme="dark"] .tools-hub-seo {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .tools-hub-guide {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.28);
}

/* ===== DARK MODE ===== */
@media (prefers-color-scheme: dark) {
    .search-page {
        background: var(--color-bg);
    }

    .search-bento-card {
        background: rgba(30, 41, 59, 0.7);
        border-color: rgba(255, 255, 255, 0.06);
        box-shadow:
            0 0 0 1px rgba(0, 0, 0, 0.2),
            0 4px 24px rgba(0, 0, 0, 0.2),
            0 8px 48px rgba(79, 70, 229, 0.06);
    }

    .search-input-wrapper:focus-within {
        background: rgba(79, 70, 229, 0.08);
    }

    .search-input {
        color: #f1f5f9;
    }

    .search-input::placeholder {
        color: #64748b;
    }

    .search-icon-left {
        color: #64748b;
    }

    .search-icon-left {
        color: #94a3b8;
    }

    .search-input-wrapper:focus-within .search-icon-left {
        color: #a5b4fc;
    }

    .stat-chip {
        background: rgba(30, 41, 59, 0.6);
        border-color: rgba(255, 255, 255, 0.06);
        color: #94a3b8;
    }

    .stat-chip:hover {
        background: rgba(30, 41, 59, 0.85);
        color: #a5b4fc;
    }

    .stat-chip strong {
        color: #f1f5f9;
    }

    .cat-card {
        background: rgba(30, 41, 59, 0.6);
        border-color: rgba(255, 255, 255, 0.05);
        color: #f1f5f9;
    }

    .cat-card:hover {
        background: rgba(30, 41, 59, 0.85);
        border-color: rgba(79, 70, 229, 0.3);
        color: #f1f5f9;
    }

    .cat-card__icon {
        background: rgba(79, 70, 229, 0.12);
    }

    .cat-card__icon svg {
        color: #a5b4fc;
    }

    .cat-card:hover .cat-card__icon {
        background: rgba(79, 70, 229, 0.2);
    }

    .cat-card__count {
        color: #64748b;
    }

    .cat-card--active {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: #fff;
    }

    .cat-card--active .cat-card__icon svg {
        color: #fff;
    }

    .results-panel {
        background: rgba(30, 41, 59, 0.6);
        border-color: rgba(255, 255, 255, 0.05);
    }

    .results-panel__title {
        color: #f1f5f9;
    }

    .results-panel__icon {
        background: rgba(79, 70, 229, 0.15);
    }

    .results-panel__icon svg {
        color: #a5b4fc;
    }

    .results-panel__meta {
        color: #64748b;
    }

    .results-clear-btn {
        background: rgba(220, 38, 38, 0.08);
        border-color: rgba(220, 38, 38, 0.15);
    }

    .results-clear-btn:hover {
        background: #dc2626;
        color: #fff;
    }

    .tool-card {
        background: rgba(30, 41, 59, 0.6);
        border-color: rgba(255, 255, 255, 0.05);
        color: #f1f5f9;
    }

    .tool-card:hover {
        background: rgba(30, 41, 59, 0.88);
        border-color: rgba(79, 70, 229, 0.3);
        color: #f1f5f9;
    }

    .tool-card__name {
        color: #f1f5f9;
    }

    .tool-card:hover .tool-card__name {
        color: #a5b4fc;
    }

    .tool-card__desc {
        color: #94a3b8;
    }

    .tool-card__cat {
        color: #64748b;
    }

    .tool-card__bottom {
        border-top-color: rgba(255, 255, 255, 0.05);
    }

    .tool-card__arrow {
        background: rgba(79, 70, 229, 0.12);
        color: #a5b4fc;
    }

    .tool-card__icon {
        background: rgba(79, 70, 229, 0.12);
    }

    .tool-card:hover .tool-card__icon {
        background: rgba(79, 70, 229, 0.2);
    }

    .tool-card__icon svg {
        color: #a5b4fc;
    }

    .section-panel__count {
        background: rgba(255, 255, 255, 0.05);
        color: #64748b;
    }

    .section-panel__label {
        color: #94a3b8;
    }

    .bento-section__label {
        color: #94a3b8;
    }

    .tools-hub-seo__header h2,
    .tools-hub-seo__card h3,
    .tools-hub-guide__item h3,
    .tools-hub-faq__item summary {
        color: #f1f5f9;
    }

    .tools-hub-seo__header p,
    .tools-hub-seo__card p,
    .tools-hub-guide__item p,
    .tools-hub-faq__item p {
        color: #94a3b8;
    }

    .tools-hub-seo__card,
    .tools-hub-guide__item,
    .tools-hub-faq__item {
        border-color: rgba(255, 255, 255, 0.06);
        background: rgba(30, 41, 59, 0.62);
    }

    .tools-hub-seo {
        border-color: rgba(148, 163, 184, 0.16);
        background: rgba(15, 23, 42, 0.72);
        box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.28);
    }

    .tools-hub-guide {
        border-color: rgba(148, 163, 184, 0.16);
        background: rgba(15, 23, 42, 0.72);
        box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.28);
    }

    .search-empty__title {
        color: #f1f5f9;
    }

    .search-empty__desc {
        color: #64748b;
    }

    .search-empty__icon {
        background: rgba(79, 70, 229, 0.12);
    }

    .search-empty__icon svg {
        color: #a5b4fc;
    }
}
