/* ============================================
   Creator Economy Tools – Modern Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Reset & Base ───────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #09090b;
    --bg-card: #111113;
    --bg-card-hover: #18181b;
    --surface: #1c1c1f;
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.14);
    --nav-bg: rgba(9, 9, 11, 0.8);
    --nav-bg-scrolled: rgba(9, 9, 11, 0.95);

    --search-bg: rgba(255, 255, 255, 0.04);
    --search-border: rgba(255, 255, 255, 0.1);
    --search-focus-bg: rgba(168, 85, 247, 0.04);

    --purple: #a855f7;
    --purple-dark: #7c3aed;
    --pink: #ec4899;
    --purple-glow: rgba(168, 85, 247, 0.18);
    --purple-glow-soft: rgba(168, 85, 247, 0.08);

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --nav-h: 64px;
    --sidebar-w: 240px;
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);

    --grid-line: rgba(255, 255, 255, 0.025);
    --card-hover-glow: rgba(168, 85, 247, 0.04);

    --grave-bg-1: rgba(30, 20, 50, 0.8);
    --grave-bg-2: rgba(20, 15, 35, 0.6);
    --grave-text: #e2d9f3;
}

[data-theme="light"] {
    --bg: #ffffff;
    --bg-card: #f4f4f5;
    --bg-card-hover: #e4e4e7;
    --surface: #ffffff;
    --border: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.2);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.95);

    --search-bg: rgba(0, 0, 0, 0.03);
    --search-border: rgba(0, 0, 0, 0.15);
    --search-focus-bg: rgba(168, 85, 247, 0.08);

    --purple: #a855f7;
    --purple-dark: #7c3aed;
    --pink: #ec4899;
    --purple-glow: rgba(168, 85, 247, 0.18);
    --purple-glow-soft: rgba(168, 85, 247, 0.08);

    --text-primary: #09090b;
    --text-secondary: #52525b;
    --text-muted: #71717a;

    --grid-line: rgba(0, 0, 0, 0.04);
    --card-hover-glow: rgba(168, 85, 247, 0.08);

    --grave-bg-1: rgba(243, 232, 255, 0.8);
    --grave-bg-2: rgba(233, 213, 255, 0.6);
    --grave-text: #581c87;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ── Buttons ─────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--transition);
    font-family: inherit;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
    color: #fff;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: color var(--transition);
}

.btn-clear:hover {
    color: var(--purple);
}

/* ── Navbar ──────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-h);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: background var(--transition);
}

.navbar.scrolled {
    background: var(--nav-bg-scrolled);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.logo-text {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--surface);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--surface);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

[data-theme="light"] .theme-toggle-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle-sun {
    display: none;
}

[data-theme=""] .theme-toggle-sun {
    display: none;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px 24px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.nav-mobile .nav-link {
    display: block;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
        z-index: 101;
    }

    .nav-mobile {
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        z-index: 100;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }

    .nav-mobile.open {
        display: flex;
    }
}

/* ── Hero ────────────────────────────────────── */
.hero {
    position: relative;
    overflow: hidden;
    padding: calc(var(--nav-h) + 80px) 24px 80px;
    text-align: center;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.5), transparent 70%);
    top: -150px;
    left: 50%;
    transform: translateX(-60%);
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.4), transparent 70%);
    top: 50px;
    right: -50px;
    animation-delay: 3s;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 70%);
    bottom: 0;
    left: -50px;
    animation-delay: 6s;
}

.hero-ph-badge {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.hero-ph-badge img {
    border-radius: 8px;
    opacity: 0.92;
    transition: opacity 0.2s;
}

.hero-ph-badge img:hover {
    opacity: 1;
}

/* ── Floating ProductHunt badge ──────────────── */
.ph-float-badge {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: ph-float-in 0.5s ease 1s both;
}

.ph-float-badge:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.ph-float-badge img {
    display: block;
    border-radius: 10px;
}

@keyframes ph-float-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile-only PH badge (above eyebrow) */
.mobile-ph-badge {
    display: none;
    margin-bottom: 18px;
    justify-content: center;
}

.mobile-ph-badge img {
    border-radius: 8px;
}

@media (max-width: 768px) {
    .ph-float-badge {
        display: none;
    }

    .mobile-ph-badge {
        display: flex;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) translateX(-60%);
    }

    50% {
        transform: translateY(-20px) translateX(-60%);
    }
}

.hero-orb-2 {
    animation-name: float2;
}

@keyframes float2 {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.hero-orb-3 {
    animation-name: float2;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 80% at center, black 0%, transparent 80%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.25);
    font-size: 13px;
    font-weight: 500;
    color: var(--purple);
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 8px var(--purple);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 8px var(--purple);
        opacity: 1;
    }

    50% {
        box-shadow: 0 0 16px var(--purple);
        opacity: 0.7;
    }
}

.hero-title {
    font-size: clamp(28px, 4.5vw, 52px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-subtitle strong {
    color: var(--text-primary);
}

.hero-search-wrap {
    margin-bottom: 36px;
}

.search-container {
    position: relative;
    max-width: 540px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    z-index: 1;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    padding: 16px 56px 16px 50px;
    background: var(--search-bg);
    border: 1px solid var(--search-border);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all var(--transition);
    backdrop-filter: blur(12px);
}

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

.search-input:focus {
    border-color: rgba(168, 85, 247, 0.5);
    background: var(--search-focus-bg);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12), 0 4px 24px rgba(0, 0, 0, 0.3);
}

.search-kbd {
    position: absolute;
    right: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.stat {
    padding: 0 28px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* ── Main Layout ─────────────────────────────── */
.main {
    padding: 0 0 80px;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* ── Sidebar ─────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--nav-h) + 20px);
    max-height: calc(100vh - var(--nav-h) - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--surface) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 4px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 12px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 1;
}

.sidebar-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 20px;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: left;
    transition: all var(--transition);
}

.category-btn:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.category-btn.active {
    background: rgba(168, 85, 247, 0.12);
    color: var(--purple);
}

.category-btn.active::after {
    content: '✓';
    font-size: 10px;
    font-weight: 700;
    color: var(--purple);
    margin-left: auto;
    flex-shrink: 0;
}

.category-btn.active .cat-count {
    background: rgba(168, 85, 247, 0.2);
    color: var(--purple);
}

.cat-icon {
    font-size: 14px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.cat-name {
    flex: 1;
}

.cat-count {
    font-size: 11px;
    font-weight: 600;
    background: var(--surface);
    color: var(--text-muted);
    padding: 2px 7px;
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

/* ── Tools Section ───────────────────────────── */
.tools-section {
    flex: 1;
    min-width: 0;
    padding-top: 20px;
}

.tools-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.results-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.results-count span {
    color: var(--text-primary);
    font-weight: 700;
}

.tools-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all var(--transition);
}

.sort-select:hover,
.sort-select:focus {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.view-toggle {
    display: flex;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.view-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 7px 10px;
    color: var(--text-muted);
    transition: all var(--transition);
}

.view-btn.active {
    background: rgba(168, 85, 247, 0.15);
    color: var(--purple);
}

.view-btn:hover:not(.active) {
    color: var(--text-primary);
}

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

.tools-grid.list-view {
    grid-template-columns: 1fr;
}

/* ── Tool Card ───────────────────────────────── */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--card-hover-glow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
}

.tool-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(168, 85, 247, 0.1);
}

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

/* List view card */
.tools-grid.list-view .tool-card {
    flex-direction: row;
    align-items: flex-start;
    padding: 14px 18px;
}

.tools-grid.list-view .tool-logo-wrap {
    flex-shrink: 0;
}

.tools-grid.list-view .tool-body {
    flex: 1;
    min-width: 0;
}

.tools-grid.list-view .tool-desc {
    display: block;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-logo-wrap {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.tool-logo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: var(--purple);
    background: rgba(168, 85, 247, 0.1);
}

.tool-meta {
    flex: 1;
    min-width: 0;
}

.tool-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.tool-categories {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.category-tag {
    font-size: 10px;
    font-weight: 600;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.tool-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.55;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tools-grid.list-view .tool-desc {
    line-clamp: 2;
    -webkit-line-clamp: 2;
}

.tool-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 4px;
}

.tool-visit {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--purple);
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition);
}

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

.tool-pricing {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.tool-pricing.paid {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.2);
}

/* ── Loading Skeleton ────────────────────────── */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.skeleton-card {
    height: 160px;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--surface) 50%, var(--bg-card) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ── Empty State ─────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    margin-bottom: 24px;
}

.hidden {
    display: none !important;
}

/* ── Load More ───────────────────────────────── */
.load-more-wrap {
    text-align: center;
    margin-top: 36px;
}

.btn-load-more {
    font-size: 14px;
    padding: 12px 28px;
    color: var(--text-secondary);
}

.btn-load-more:hover {
    color: var(--text-primary);
}

/* ── Modal ───────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.modal-overlay:not([hidden]) {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 520px;
    width: 100%;
    position: relative;
    transform: translateY(20px);
    transition: transform var(--transition);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay:not([hidden]) .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 6px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    transition: all var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.modal-logo-wrap {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.modal-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}

.modal-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.modal-cat-tag {
    font-size: 11px;
    font-weight: 600;
    background: rgba(168, 85, 247, 0.12);
    color: var(--purple);
    border: 1px solid rgba(168, 85, 247, 0.2);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-visit-btn {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: #fff;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.modal-visit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

/* ── Footer ──────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    background: var(--bg);
    padding: 48px 24px 24px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 32px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.social-link {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition);
}

.social-link:hover {
    color: var(--purple);
    border-color: rgba(168, 85, 247, 0.3);
}

.footer-links {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.footer-col a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-col a:hover {
    color: var(--purple);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--purple);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.footer-note {
    font-size: 11px;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
    .sidebar {
        display: none;
    }

    .main-container {
        padding: 0 16px;
    }
}

@media (max-width: 640px) {
    .hero-stats {
        gap: 0;
    }

    .stat {
        padding: 0 16px;
    }

    .hero {
        padding: calc(var(--nav-h) + 48px) 16px 48px;
    }

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

    .footer-container {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links {
        gap: 24px;
    }
}

/* Mobile filter bar */
.mobile-filters {
    display: none;
    padding: 12px 16px;
    overflow-x: auto;
    gap: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-filters::-webkit-scrollbar {
    display: none;
}

.mobile-filter-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.mobile-filter-btn:hover,
.mobile-filter-btn.active {
    background: rgba(168, 85, 247, 0.12);
    color: var(--purple);
    border-color: rgba(168, 85, 247, 0.25);
}

@media (max-width: 900px) {
    .mobile-filters {
        display: flex;
    }
}

/* ── Graveyard ───────────────────────────────── */
.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

/* ── Multi-select toggle ─────────────────────── */
.multiselect-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 2px 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}

.multiselect-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: transform var(--transition), background var(--transition);
}

.toggle-switch.active {
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
}

.toggle-switch.active::after {
    transform: translateX(16px);
    background: var(--purple);
    box-shadow: 0 0 6px rgba(168, 85, 247, 0.5);
}

.graveyard-btn .cat-name {
    color: var(--text-muted);
}

.graveyard-btn:hover .cat-name {
    color: #a78bfa;
}

.graveyard-btn.active {
    background: rgba(167, 139, 250, 0.1);
}

.graveyard-btn.active .cat-name {
    color: #a78bfa;
}

.graveyard-count {
    background: rgba(167, 139, 250, 0.12) !important;
    color: #a78bfa !important;
}

.graveyard-header {
    margin-bottom: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--grave-bg-1), var(--grave-bg-2));
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: var(--radius-lg);
}

.graveyard-header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
}

.graveyard-emoji {
    font-size: 40px;
    flex-shrink: 0;
}

.graveyard-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--grave-text);
    margin-bottom: 6px;
}

.graveyard-header p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Dead card — fully greyed out, non-interactive feel */
.dead-card {
    opacity: 0.4;
    filter: grayscale(100%) brightness(0.85);
    cursor: not-allowed;
}

.dead-card:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
    background: var(--bg-card);
    opacity: 0.5;
    filter: grayscale(90%) brightness(0.9);
}

.dead-card:hover::before {
    opacity: 0;
}

.dead-card .tool-logo-wrap {
    background: #d0d0d0 !important;
}

.dead-badge {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    background: rgba(120, 120, 120, 0.12);
    border: 1px solid rgba(120, 120, 120, 0.2);
    padding: 2px 9px;
    border-radius: var(--radius-full);
}

.modal-dead-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 18px;
    background: rgba(100, 100, 100, 0.08);
    border: 1px solid rgba(100, 100, 100, 0.18);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Deal cards ──────────────────────────────── */
.deal-card {
    border-color: rgba(251, 191, 36, 0.45) !important;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, var(--bg-card) 60%) !important;
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2), 0 4px 24px rgba(251, 191, 36, 0.08) !important;
    position: relative;
}

.deal-card:hover {
    border-color: rgba(251, 191, 36, 0.7) !important;
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.4), 0 8px 32px rgba(251, 191, 36, 0.15) !important;
    transform: translateY(-2px);
}

.deal-banner {
    font-size: 11px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-full);
    padding: 3px 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.deal-visit {
    color: #f59e0b !important;
    opacity: 1 !important;
    font-weight: 700 !important;
}

.modal-deal-box {
    width: 100%;
    padding: 16px;
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-deal-label {
    font-size: 15px;
    font-weight: 800;
    color: #f59e0b;
}

.deal-btn {
    background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
    color: #fff !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}