/* ============================================
   AI TOOLS HUB — MASTER STYLESHEET
   ============================================ */

/* ---------- VARIABLES & RESET ---------- */
:root {
    --bg-primary: #05060f;
    --bg-secondary: #0a0b1a;
    --bg-card: rgba(15, 17, 40, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #e8e9f3;
    --text-secondary: #8b8fa3;
    --text-muted: #5a5e73;
    --accent-blue: #4f7df9;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --glow-blue: rgba(79, 125, 249, 0.3);
    --glow-purple: rgba(139, 92, 246, 0.3);
    --gradient-main: linear-gradient(135deg, #4f7df9 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-card: linear-gradient(135deg, rgba(79, 125, 249, 0.1), rgba(139, 92, 246, 0.05));
    --font-primary: 'Inter', -apple-system, sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 0 40px rgba(79, 125, 249, 0.15);
    --navbar-height: 70px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-purple) var(--bg-primary);
}

html::-webkit-scrollbar {
    width: 6px;
}

html::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

html::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 3px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

[id] {
    scroll-margin-top: 90px;
}

::selection {
    background: rgba(139, 92, 246, 0.3);
    color: #fff;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

/* ---------- STAR CANVAS & SPACE ---------- */
#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.space-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(79, 125, 249, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.04) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.nebula-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    animation: nebulaPulse 8s ease-in-out infinite alternate;
}

.nebula-1 {
    top: 10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: rgba(79, 125, 249, 0.1);
}

.nebula-2 {
    top: 50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(139, 92, 246, 0.08);
    animation-delay: -3s;
}

.nebula-3 {
    bottom: 10%;
    left: 30%;
    width: 400px;
    height: 400px;
    background: rgba(236, 72, 153, 0.06);
    animation-delay: -5s;
}

@keyframes nebulaPulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

/* ---------- SCROLL PROGRESS ---------- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-main);
    z-index: 10000;
    box-shadow: 0 0 10px var(--glow-blue), 0 0 20px var(--glow-purple);
    transition: width 0.1s linear;
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 0 2rem;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(5, 6, 15, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(5, 6, 15, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-main);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    -webkit-text-fill-color: white;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 8px 20px !important;
    background: var(--gradient-main);
    color: #fff !important;
    border-radius: var(--radius-sm);
    font-weight: 600 !important;
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---------- CONTENT WRAPPER ---------- */
.content-wrapper {
    position: relative;
    z-index: 1;
}

/* ---------- HERO ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 2rem 80px;
    position: relative;
    overflow: hidden;
}

.hero-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: orbFloat 10s ease-in-out infinite alternate;
}

.hero-bg-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(79, 125, 249, 0.15);
    top: 20%;
    left: 10%;
}

.hero-bg-orb-2 {
    width: 350px;
    height: 350px;
    background: rgba(139, 92, 246, 0.12);
    top: 30%;
    right: 10%;
    animation-delay: -3s;
}

.hero-bg-orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(236, 72, 153, 0.1);
    bottom: 20%;
    left: 40%;
    animation-delay: -6s;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -20px) scale(1.1);
    }
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin-bottom: 2rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.03) 50%);
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

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

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

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

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.hero-stat-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---------- BUTTONS ---------- */
.btn-primary {
    padding: 14px 32px;
    background: var(--gradient-main);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(79, 125, 249, 0.3);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    padding: 14px 32px;
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    border-color: var(--accent-purple);
}

/* ---------- SECTIONS ---------- */
.section {
    padding: 100px 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent-purple);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ---------- PAGE HERO (Category & Tool Pages) ---------- */
.page-hero {
    padding: 140px 2rem 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.page-hero p {
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2rem;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--text-muted);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--accent-blue);
}

.breadcrumb span {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--accent-purple);
}

/* ---------- CATEGORY GRID ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-main);
    opacity: 0;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px var(--glow-purple);
    background: linear-gradient(135deg, rgba(79, 125, 249, 0.08), rgba(139, 92, 246, 0.05), rgba(236, 72, 153, 0.03));
}

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

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.category-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.category-count {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(79, 125, 249, 0.1);
    color: var(--accent-blue);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 1rem;
}

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

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(79, 125, 249, 0.06), transparent 40%);
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: rgba(79, 125, 249, 0.2);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

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

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

.tool-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.tool-card-badge {
    padding: 3px 10px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.tool-card-badge.premium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
}

.tool-card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tool-card-pros {
    list-style: none;
    margin-bottom: 1rem;
}

.tool-card-pros li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-card-pros li::before {
    content: '✓';
    color: var(--accent-green);
    font-weight: 700;
    font-size: 0.75rem;
}

.tool-card-use {
    font-size: 0.78rem;
    color: var(--text-muted);
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-glass);
}

.tool-card-use strong {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* "Use Tool" button inside tool cards */
.tool-card-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
}

.btn-use-tool {
    flex: 1;
    padding: 10px 16px;
    background: var(--gradient-main);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-use-tool:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 125, 249, 0.3);
}

.btn-tool-info {
    padding: 10px 16px;
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn-tool-info:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

/* ---------- TOOL EMBED PAGE ---------- */
.tool-page-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.tool-topbar {
    height: 54px;
    background: rgba(5, 6, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    flex-shrink: 0;
    z-index: 100;
}

.tool-topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tool-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
}

.tool-back-btn:hover {
    color: var(--accent-blue);
}

.tool-topbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-glass);
}

.tool-topbar-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-topbar-icon {
    width: 28px;
    height: 28px;
    background: var(--gradient-main);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.tool-topbar-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.tool-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.tool-topbar-badge {
    padding: 3px 10px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
}

.tool-topbar-logo {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.tool-iframe-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
}

.tool-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.tool-iframe-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: 10;
    transition: opacity 0.5s ease;
}

.tool-iframe-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-glass);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.tool-iframe-loading p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Fallback when iframe blocked */
.tool-fallback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    text-align: center;
    padding: 2rem;
    z-index: 5;
}

.tool-fallback.active {
    display: flex;
}

.tool-fallback-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.tool-fallback h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

.tool-fallback p {
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.tool-fallback .btn-primary {
    font-size: 1.1rem;
    padding: 16px 40px;
}

/* Tool review section below embed */
.tool-review {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-glass);
    overflow-y: auto;
}

.tool-review-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 2rem;
}

.tool-review h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tool-review p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.tool-review h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 2rem 0 0.8rem;
}

.tool-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.tool-feature-item {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.2rem;
}

.tool-feature-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.tool-feature-item p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* ---------- SLIDER ---------- */
.slider-container {
    overflow: hidden;
    margin: 3rem -2rem;
    padding: 2rem;
}

.slider-track {
    display: flex;
    gap: 1.5rem;
    animation: slide 30s linear infinite;
    width: max-content;
}

.slider-track:hover {
    animation-play-state: paused;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.slider-card {
    min-width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.slider-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(79, 125, 249, 0.1), 0 8px 32px rgba(0, 0, 0, 0.2);
}

.slider-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.slider-card-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-main);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.slider-card h4 {
    font-family: var(--font-heading);
    font-weight: 600;
}

.slider-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

.slider-card-tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.8rem;
}

/* ---------- TOC ---------- */
.toc {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin: 0 auto 4rem;
    max-width: 800px;
    backdrop-filter: blur(10px);
}

.toc h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.toc-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc-list a:hover {
    background: rgba(79, 125, 249, 0.08);
    color: var(--accent-blue);
}

.toc-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-purple);
    font-weight: 600;
    min-width: 28px;
}

/* ---------- ACCORDION / FAQ ---------- */
.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    margin-bottom: 0.8rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.accordion-btn {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-primary);
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.accordion-btn:hover {
    background: rgba(255, 255, 255, 0.02);
}

.accordion-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: var(--accent-purple);
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-item.active {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.03);
}

.accordion-item.active .accordion-btn {
    color: var(--accent-purple);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content-inner {
    padding: 0 1.5rem 1.2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---------- NEWSLETTER ---------- */
.newsletter {
    text-align: center;
    padding: 80px 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.newsletter h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 0.8rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    outline: none;
    transition: var(--transition);
}

.newsletter-form input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.newsletter-form button {
    padding: 14px 28px;
    background: var(--gradient-main);
    border: none;
    color: #fff;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ---------- RELATED BLOCK ---------- */
.related-block {
    background: var(--gradient-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
    transition: var(--transition);
}

.related-block:hover {
    border-color: rgba(79, 125, 249, 0.2);
    transform: translateY(-2px);
}

.related-block h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    color: var(--accent-cyan);
}

.related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-tag {
    padding: 5px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.related-tag:hover {
    background: rgba(79, 125, 249, 0.1);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* ---------- FOOTER ---------- */
.footer {
    border-top: 1px solid var(--border-glass);
    padding: 60px 2rem 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
    line-height: 1.7;
}

.footer h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---------- FLOATING CTA ---------- */
.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(79, 125, 249, 0.3);
    animation: floatPulse 3s ease-in-out infinite;
}

.float-btn:hover {
    transform: translateY(-3px) scale(1.1);
}

@keyframes floatPulse {

    0%,
    100% {
        box-shadow: 0 5px 20px rgba(79, 125, 249, 0.3);
    }

    50% {
        box-shadow: 0 5px 30px rgba(79, 125, 249, 0.5);
    }
}

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* ---------- FILTER BAR ---------- */
.filter-bar {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 1rem;
    background: rgba(5, 6, 15, 0.9);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
}

.filter-btn {
    padding: 8px 18px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-main);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* ---------- KEYBOARD NAV ---------- */
.keyboard-nav *:focus {
    outline: 2px solid var(--accent-cyan) !important;
    outline-offset: 3px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tool-features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: rgba(5, 6, 15, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-glass);
    }

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

    .mobile-toggle {
        display: flex;
    }

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

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

    .category-grid {
        grid-template-columns: 1fr 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section {
        padding: 60px 1rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .tool-topbar {
        padding: 0 1rem;
    }

    .tool-topbar-badge {
        display: none;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 100px 1rem 60px;
    }

    .filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        scrollbar-width: none;
    }

    .filter-bar::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .hero-ctas .btn-primary,
    .hero-ctas .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 1800px) {
    .section {
        max-width: 1400px;
    }

    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .slider-track {
        animation: none !important;
    }

    .reveal,
    .reveal-left,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }
}

@media print {

    .navbar,
    .floating-cta,
    #star-canvas,
    .space-gradient,
    .nebula-glow,
    #scroll-progress {
        display: none !important;
    }

    body {
        background: #fff;
        color: #111;
    }
}