/* ===== AI Directories — Cinematic Premium UI v4 ===== */
/* Deep obsidian / cosmic indigo / muted violet / amber flare */

/* === LENIS SMOOTH SCROLL === */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* === 3D TILT CARD BASE === */
.tool-card[data-tilt] { transform-style: preserve-3d; will-change: transform; }

/* === GSAP ANIMATION INITIAL STATES === */
.gsap-reveal { opacity: 0; }

/* === RESET & BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Deep Obsidian & Cosmic Palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #101016;
    --bg-card: rgba(255, 255, 255, 0.055);
    --bg-card-hover: rgba(255, 255, 255, 0.09);
    --border-color: rgba(255, 255, 255, 0.10);
    --border-hover: rgba(255, 255, 255, 0.18);
    --text-primary: #fafafa;
    --text-secondary: #b8b8c6;
    --text-muted: #8e8e9c;
    --text-tertiary: #9a9aac;
    --border: rgba(255, 255, 255, 0.10);
    --accent-1: #818cf8;          /* Indigo-400 */
    --accent-1-rgb: 129, 140, 248;
    --accent-2: #6366f1;          /* Indigo-500 */
    --accent-3: #a78bfa;          /* Violet-400 */
    --accent-4: #f59e0b;          /* Amber-500 */
    --accent-4-rgb: 245, 158, 11;
    --gradient-1: linear-gradient(135deg, #818cf8, #c084fc); /* fallback: linear-gradient(135deg, #818cf8, #c084fc) */
    --gradient-2: linear-gradient(135deg, #6366f1, #818cf8); /* fallback: linear-gradient(135deg, #6366f1, #818cf8) */
    --gradient-3: linear-gradient(135deg, #a78bfa, #c084fc); /* fallback: linear-gradient(135deg, #a78bfa, #c084fc) */
    --gradient-amber: linear-gradient(135deg, #f59e0b, #fbbf24); /* fallback: linear-gradient(135deg, #f59e0b, #fbbf24) */
    /* Metallic silver text */
    --text-metallic: linear-gradient(to right, #ffffff, #d4d4d8, #71717a);
    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --header-bg: rgba(10, 10, 15, 0.62);
    --header-bg-solid: rgba(12, 12, 18, 0.88);
    --input-bg: rgba(255, 255, 255, 0.06);
    --output-bg: rgba(0, 0, 0, 0.4);
    --scrollbar-track: #0a0a0f;
    /* Spring physics */
    --spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --spring-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --spring-liquid: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme */
html.light {
    --bg-primary: #fafafa;
    --bg-secondary: #f4f4f5;
    --bg-card: rgba(0, 0, 0, 0.015);
    --bg-card-hover: rgba(0, 0, 0, 0.03);
    --border-color: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);
    --text-primary: #09090b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    --text-tertiary: #71717a;
    --border: rgba(0, 0, 0, 0.10);
    --accent-1: #6366f1;
    --accent-1-rgb: 99, 102, 241;
    --accent-2: #4f46e5;
    --accent-3: #7c3aed;
    --accent-4: #d97706;
    --accent-4-rgb: 217, 119, 6;
    --gradient-1: linear-gradient(135deg, #6366f1, #a78bfa);
    --gradient-2: linear-gradient(135deg, #4f46e5, #6366f1);
    --gradient-3: linear-gradient(135deg, #7c3aed, #a78bfa);
    --gradient-amber: linear-gradient(135deg, #d97706, #f59e0b);
    --text-metallic: linear-gradient(to right, #09090b, #3f3f46, #71717a);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --header-bg: rgba(250, 250, 250, 0.72);
    --header-bg-solid: rgba(250, 250, 250, 0.92);
    --input-bg: rgba(0, 0, 0, 0.025);
    --output-bg: rgba(0, 0, 0, 0.03);
    --scrollbar-track: #fafafa;
}

html { overflow-x: hidden; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.6s var(--spring-liquid), color 0.4s;
    -webkit-font-smoothing: antialiased;
}

/* === CANVAS PARTICLE FIELD === */
#particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -10;
    pointer-events: none;
}

/* === 3D WEBGL BACKGROUND === */
#scene3d {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -8;
    pointer-events: none;
}
#shader-bg {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -9;
    pointer-events: none;
}

/* === ACCESSIBILITY === */
.skip-link {
    position: absolute; top: -100%; left: 0;
    background: var(--accent-1); color: #fff;
    padding: 0.75rem 1.5rem; z-index: 9999;
    border-radius: 0 0 8px 0; font-weight: 600;
    text-decoration: none; transition: top 0.3s;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 2px; }

/* === CINEMATIC MESH GRADIENT BACKDROP === */
.bg-animation {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -7; overflow: hidden; pointer-events: none;
    background: transparent;
}
.bg-animation::before {
    content: ''; position: absolute;
    top: -60%; left: -60%; width: 220%; height: 220%;
    background:
        radial-gradient(ellipse 900px 900px at 15% 10%, rgba(129, 140, 248, 0.09) 0%, transparent 55%),
        radial-gradient(ellipse 700px 700px at 80% 20%, rgba(167, 139, 250, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 600px 600px at 50% 70%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 500px 500px at 20% 80%, rgba(245, 158, 11, 0.035) 0%, transparent 45%),
        radial-gradient(ellipse 800px 800px at 65% 45%, rgba(129, 140, 248, 0.04) 0%, transparent 55%);
    animation: ambientDrift 30s ease-in-out infinite;
}
.bg-animation::after {
    content: ''; position: absolute;
    top: -40%; left: -40%; width: 180%; height: 180%;
    background:
        radial-gradient(ellipse 500px 500px at 70% 15%, rgba(192, 132, 252, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 400px 400px at 30% 60%, rgba(245, 158, 11, 0.03) 0%, transparent 45%),
        radial-gradient(ellipse 350px 350px at 85% 75%, rgba(129, 140, 248, 0.035) 0%, transparent 40%);
    animation: ambientDrift2 22s ease-in-out infinite reverse;
}
html.light .bg-animation::before {
    background:
        radial-gradient(ellipse 900px 900px at 15% 10%, rgba(99, 102, 241, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse 700px 700px at 80% 20%, rgba(124, 58, 237, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse 600px 600px at 50% 70%, rgba(99, 102, 241, 0.025) 0%, transparent 50%),
        radial-gradient(ellipse 500px 500px at 20% 80%, rgba(217, 119, 6, 0.015) 0%, transparent 45%);
}
html.light .bg-animation::after {
    background:
        radial-gradient(ellipse 500px 500px at 70% 15%, rgba(167, 139, 250, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse 400px 400px at 30% 60%, rgba(245, 158, 11, 0.01) 0%, transparent 45%);
}
@keyframes ambientDrift {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(3%, 2%) scale(1.02) rotate(1deg); }
    50% { transform: translate(-2%, 3%) scale(0.98) rotate(-0.5deg); }
    75% { transform: translate(1.5%, -1.5%) scale(1.01) rotate(0.5deg); }
}
@keyframes ambientDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-2%, -1.5%) scale(1.03); }
    66% { transform: translate(2.5%, 1%) scale(0.97); }
}

/* === DEV GRID OVERLAY === */
.cosmic-grid {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -8; pointer-events: none;
    background-image:
        linear-gradient(rgba(129, 140, 248, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(129, 140, 248, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridPulse 8s ease-in-out infinite;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}
html.light .cosmic-grid {
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.015) 1px, transparent 1px);
}
@keyframes gridPulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

/* === SCANLINE CRT OVERLAY === */
.scanlines {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; pointer-events: none;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        rgba(0, 0, 0, 0.02) 2px, rgba(0, 0, 0, 0.02) 4px
    );
    animation: scanlineShift 10s linear infinite;
}
.scanlines::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(transparent 50%, rgba(129, 140, 248, 0.006) 50%);
    background-size: 100% 4px;
    animation: scanlineFlicker 8s ease-in-out infinite;
}
html.light .scanlines { background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.008) 2px, rgba(0, 0, 0, 0.008) 4px); }
html.light .scanlines::after { background: linear-gradient(transparent 50%, rgba(99, 102, 241, 0.004) 50%); }
@keyframes scanlineShift { 0% { transform: translateY(0); } 100% { transform: translateY(4px); } }
@keyframes scanlineFlicker { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.7; } }

/* === AURORA === */
.aurora {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -5; pointer-events: none; overflow: hidden; opacity: 0.7;
}
.aurora::before, .aurora::after {
    content: ''; position: absolute;
    width: 160%; height: 160%; top: -30%; left: -30%;
}
.aurora::before {
    background: conic-gradient(from 120deg at 40% 20%,
        transparent 0deg, rgba(129, 140, 248, 0.08) 40deg,
        transparent 90deg, rgba(167, 139, 250, 0.06) 140deg,
        transparent 200deg, rgba(245, 158, 11, 0.03) 260deg,
        transparent 310deg, rgba(192, 132, 252, 0.04) 360deg);
    animation: auroraSpin 35s linear infinite; filter: blur(50px);
}
.aurora::after {
    background: conic-gradient(from 300deg at 65% 70%,
        transparent 0deg, rgba(192, 132, 252, 0.06) 60deg,
        transparent 130deg, rgba(129, 140, 248, 0.05) 200deg,
        transparent 270deg, rgba(245, 158, 11, 0.025) 340deg,
        transparent 360deg);
    animation: auroraSpin 45s linear infinite reverse; filter: blur(70px);
}
html.light .aurora { opacity: 0.4; }
html.light .aurora::before {
    background: conic-gradient(from 120deg at 40% 20%,
        transparent 0deg, rgba(99, 102, 241, 0.035) 40deg,
        transparent 90deg, rgba(124, 58, 237, 0.025) 140deg,
        transparent 200deg, rgba(217, 119, 6, 0.012) 260deg,
        transparent 310deg, rgba(167, 139, 250, 0.015) 360deg);
}
html.light .aurora::after {
    background: conic-gradient(from 300deg at 65% 70%,
        transparent 0deg, rgba(167, 139, 250, 0.025) 60deg,
        transparent 130deg, rgba(99, 102, 241, 0.02) 200deg,
        transparent 270deg, rgba(217, 119, 6, 0.01) 340deg,
        transparent 360deg);
}
@keyframes auroraSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* === NEBULA === */
.nebula {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -6; pointer-events: none; overflow: hidden;
}
.nebula::before {
    content: ''; position: absolute; top: 10%; left: 15%;
    width: 500px; height: 500px; border-radius: 50%;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.06) 0%, transparent 60%);
    filter: blur(100px);
    animation: nebulaFloat1 20s ease-in-out infinite;
}
.nebula::after {
    content: ''; position: absolute; bottom: 15%; right: 10%;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.03) 0%, transparent 55%);
    filter: blur(120px);
    animation: nebulaFloat2 25s ease-in-out infinite;
}
html.light .nebula::before { background: radial-gradient(circle, rgba(99, 102, 241, 0.025) 0%, transparent 60%); }
html.light .nebula::after { background: radial-gradient(circle, rgba(217, 119, 6, 0.012) 0%, transparent 55%); }
@keyframes nebulaFloat1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -30px) scale(1.1); } }
@keyframes nebulaFloat2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-50px, 20px) scale(1.15); } }

/* === CURSOR SPOTLIGHT — Cinematic === */
.cursor-spotlight {
    position: fixed; width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.08) 0%, rgba(167, 139, 250, 0.03) 40%, transparent 70%);
    pointer-events: none; z-index: -3;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s, width 0.6s var(--spring-liquid), height 0.6s var(--spring-liquid);
    opacity: 0; will-change: transform; filter: blur(1px);
}
.cursor-spotlight.active { opacity: 1; }
.cursor-spotlight-ring {
    position: fixed; width: 700px; height: 700px; border-radius: 50%;
    border: 1px solid rgba(129, 140, 248, 0.04);
    background: transparent;
    pointer-events: none; z-index: -3;
    transform: translate(-50%, -50%);
    transition: opacity 0.6s; opacity: 0; will-change: transform;
    box-shadow: inset 0 0 80px rgba(129, 140, 248, 0.02), 0 0 40px rgba(129, 140, 248, 0.015);
}
.cursor-spotlight-ring.active { opacity: 1; }
html.light .cursor-spotlight { background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, rgba(124, 58, 237, 0.015) 40%, transparent 70%); }
html.light .cursor-spotlight-ring { border-color: rgba(99, 102, 241, 0.025); box-shadow: inset 0 0 60px rgba(99, 102, 241, 0.01); }

/* === CLICK BURST === */
.click-bursts {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 2; overflow: hidden;
}
.burst-particle {
    position: absolute; border-radius: 50%; pointer-events: none; will-change: transform, opacity;
}

/* === FLOATING SHAPES (Bigger) === */
.floating-shapes {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -3; overflow: hidden;
}
.shape {
    position: absolute; opacity: 0;
    animation: shapeFloat linear infinite;
    will-change: transform, opacity;
}
.shape-triangle {
    width: 0; height: 0;
    border-left: 14px solid transparent; border-right: 14px solid transparent;
    border-bottom: 24px solid rgba(129, 140, 248, 0.15);
}
.shape-diamond { width: 18px; height: 18px; background: rgba(167, 139, 250, 0.12); transform: rotate(45deg); }
.shape-ring { width: 24px; height: 24px; border: 2px solid rgba(129, 140, 248, 0.14); border-radius: 50%; }
.shape-cross { width: 20px; height: 20px; position: relative; }
.shape-cross::before, .shape-cross::after { content: ''; position: absolute; background: rgba(167, 139, 250, 0.12); }
.shape-cross::before { width: 100%; height: 2.5px; top: 50%; transform: translateY(-50%); }
.shape-cross::after { width: 2.5px; height: 100%; left: 50%; transform: translateX(-50%); }
.shape-dots {
    width: 28px; height: 28px;
    background:
        radial-gradient(circle, rgba(129, 140, 248, 0.18) 2.5px, transparent 2.5px),
        radial-gradient(circle, rgba(129, 140, 248, 0.18) 2.5px, transparent 2.5px),
        radial-gradient(circle, rgba(167, 139, 250, 0.12) 2px, transparent 2px);
    background-size: 14px 14px; background-position: 0 0, 7px 7px, 3px 10px;
}
.shape-plus { width: 18px; height: 18px; position: relative; }
.shape-plus::before, .shape-plus::after { content: ''; position: absolute; background: rgba(129, 140, 248, 0.13); border-radius: 1px; }
.shape-plus::before { width: 100%; height: 2.5px; top: 50%; transform: translateY(-50%); }
.shape-plus::after { width: 2.5px; height: 100%; left: 50%; transform: translateX(-50%); }
.shape-hex {
    width: 22px; height: 12px; background: rgba(129, 140, 248, 0.1); position: relative;
}
.shape-hex::before, .shape-hex::after { content: ''; position: absolute; width: 0; left: 0; border-left: 11px solid transparent; border-right: 11px solid transparent; }
.shape-hex::before { bottom: 100%; border-bottom: 6px solid rgba(129, 140, 248, 0.1); }
.shape-hex::after { top: 100%; border-top: 6px solid rgba(129, 140, 248, 0.1); }
@keyframes shapeFloat {
    0% { opacity: 0; transform: translateY(100vh) rotate(0deg) scale(0.5); }
    10% { opacity: 0.8; } 90% { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-10vh) rotate(360deg) scale(1); }
}
html.light .shape-triangle { border-bottom-color: rgba(99, 102, 241, 0.08); }
html.light .shape-diamond { background: rgba(124, 58, 237, 0.06); }
html.light .shape-ring { border-color: rgba(99, 102, 241, 0.08); }
html.light .shape-cross::before, html.light .shape-cross::after { background: rgba(124, 58, 237, 0.06); }
html.light .shape-plus::before, html.light .shape-plus::after { background: rgba(99, 102, 241, 0.06); }

/* === FLOATING PARTICLES (Twinkle) === */
.particles {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -4;
}
.particle {
    position: absolute; border-radius: 50%;
    background: rgba(129, 140, 248, 0.35);
    animation: starTwinkle 4s ease-in-out infinite;
}
.particle:nth-child(odd) { background: rgba(167, 139, 250, 0.3); }
.particle:nth-child(3n) { background: rgba(245, 158, 11, 0.2); }
.particle:nth-child(5n) { background: rgba(255, 255, 255, 0.12); }
html.light .particle { background: rgba(99, 102, 241, 0.12); }
@keyframes starTwinkle { 0%, 100% { opacity: 0.15; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.3); } }

/* === FLOATING CODE SYMBOLS === */
.code-symbols {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -3; overflow: hidden;
}
.code-symbol {
    position: absolute; font-family: 'Courier New', monospace;
    color: rgba(129, 140, 248, 0.06); font-size: 14px;
    animation: codeSymbolFloat linear infinite;
    will-change: transform, opacity; user-select: none; pointer-events: none;
}
html.light .code-symbol { color: rgba(99, 102, 241, 0.03); }
@keyframes codeSymbolFloat {
    0% { opacity: 0; transform: translateY(20px) rotate(0deg); }
    8% { opacity: 0.7; } 85% { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-120vh) rotate(25deg); }
}

/* === AMBIENT BLOBS (Parallax) === */
.ambient-blobs {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -4; pointer-events: none; overflow: hidden;
}
.ambient-blob {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
    animation: blobMorph 20s ease-in-out infinite; will-change: transform, opacity;
}
.ambient-blob:nth-child(1) {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.12), transparent 70%);
    top: -10%; left: -5%; animation-duration: 22s;
}
.ambient-blob:nth-child(2) {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.1), transparent 70%);
    top: 50%; right: -8%; animation-duration: 18s; animation-delay: -5s;
}
.ambient-blob:nth-child(3) {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06), transparent 70%);
    bottom: -5%; left: 30%; animation-duration: 25s; animation-delay: -10s;
}
.ambient-blob:nth-child(4) {
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%);
    top: 30%; left: 50%; animation-duration: 20s; animation-delay: -7s;
}
html.light .ambient-blob:nth-child(1) { background: radial-gradient(circle, rgba(99, 102, 241, 0.05), transparent 70%); }
html.light .ambient-blob:nth-child(2) { background: radial-gradient(circle, rgba(124, 58, 237, 0.04), transparent 70%); }
html.light .ambient-blob:nth-child(3) { background: radial-gradient(circle, rgba(217, 119, 6, 0.02), transparent 70%); }
html.light .ambient-blob:nth-child(4) { background: radial-gradient(circle, rgba(99, 102, 241, 0.03), transparent 70%); }
@keyframes blobMorph {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); border-radius: 50% 40% 60% 50%; }
    25% { transform: translate(30px, -20px) scale(1.1) rotate(5deg); border-radius: 40% 60% 50% 40%; }
    50% { transform: translate(-20px, 30px) scale(0.95) rotate(-3deg); border-radius: 60% 50% 40% 60%; }
    75% { transform: translate(15px, 15px) scale(1.05) rotate(2deg); border-radius: 50% 45% 55% 50%; }
}

/* === HERO GRADIENT MESH === */
.hero-mesh {
    position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
    width: 120%; height: 200%;
    background:
        radial-gradient(ellipse 500px 400px at 30% 30%, rgba(129, 140, 248, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 400px 350px at 70% 50%, rgba(167, 139, 250, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 350px 300px at 50% 80%, rgba(245, 158, 11, 0.04) 0%, transparent 50%);
    filter: blur(40px); pointer-events: none;
    animation: heroMeshDrift 15s ease-in-out infinite;
}
html.light .hero-mesh {
    background:
        radial-gradient(ellipse 500px 400px at 30% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 400px 350px at 70% 50%, rgba(124, 58, 237, 0.03) 0%, transparent 55%),
        radial-gradient(ellipse 350px 300px at 50% 80%, rgba(217, 119, 6, 0.015) 0%, transparent 50%);
}
@keyframes heroMeshDrift {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-52%) scale(1.05); }
}

/* === HEADER — Frosted Glass === */
header {
    margin: 1rem auto 0; max-width: 1440px;
    padding: 0.65rem 1.75rem;
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    background: var(--header-bg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    position: sticky; top: 0.75rem; z-index: 100;
    width: calc(100% - 2.5rem);
    transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
header.scrolled {
    background: var(--header-bg-solid);
    border-color: var(--border-hover);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
}
.header-content {
    max-width: 1400px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
}
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-icon {
    width: 40px; height: 40px;
    background: var(--gradient-1); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: white;
    transition: transform 0.4s var(--spring-bounce);
}
.logo:hover .logo-icon { transform: scale(1.08) rotate(-3deg); }
.logo-text {
    font-size: 1.3rem; font-weight: 800;
    background: var(--text-metallic);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    letter-spacing: -0.02em;
}
.logo-badge {
    font-size: 0.6rem; background: var(--gradient-2);
    color: white; padding: 0.15rem 0.4rem; border-radius: 20px;
    font-weight: 700; margin-left: -0.3rem; margin-top: -0.8rem;
}
nav { display: flex; gap: 0.25rem; align-items: center; }
nav a {
    color: var(--text-secondary); text-decoration: none;
    padding: 0.5rem 1rem; border-radius: 10px;
    transition: all 0.3s var(--spring-liquid); font-size: 0.9rem;
    border: 1px solid transparent; font-weight: 500;
}
nav a:hover {
    color: var(--text-primary);
    background: rgba(var(--accent-1-rgb), 0.06);
}
nav a.active {
    color: var(--text-primary);
    background: rgba(var(--accent-1-rgb), 0.1);
    border: 1px solid rgba(var(--accent-1-rgb), 0.2);
    box-shadow: 0 0 16px rgba(var(--accent-1-rgb), 0.08);
}
.theme-toggle {
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--glass-border); background: var(--bg-card);
    color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
    transition: all 0.4s var(--spring-bounce); margin-left: 0.5rem; flex-shrink: 0;
}
.theme-toggle:hover {
    border-color: var(--accent-1); color: var(--accent-1);
    background: rgba(var(--accent-1-rgb), 0.08);
    transform: rotate(30deg) scale(1.05);
}

/* === HERO — Metallic Silver Text === */
.hero { padding: 3.5rem 2rem 3rem; text-align: center; position: relative; z-index: 1; background: transparent; }
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800;
    margin-bottom: 1.25rem; line-height: 1.15; letter-spacing: -0.03em;
}
.hero h1:not(.typewriter-text) { animation: heroReveal 0.8s var(--spring-smooth) both; }
.typewriter-text { visibility: hidden; }
.hero h1 span {
    background: var(--gradient-1);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
@keyframes heroReveal {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.hero p {
    color: var(--text-secondary); font-size: 1.15rem;
    max-width: 560px; margin: 0 auto 1.75rem; line-height: 1.6;
    animation: heroReveal 0.8s 0.1s var(--spring-smooth) both;
}
.hero-stats {
    display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap;
    animation: heroReveal 0.8s 0.2s var(--spring-smooth) both;
}
.hero-ctas {
    display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 2.5rem;
    animation: heroReveal 0.8s 0.15s var(--spring-smooth) both;
}

/* === AI quick search (hero) === */
.ai-quick-search { margin: 2.1rem auto 1.9rem !important; }
.hero-btn {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.9rem 1.75rem; border-radius: 14px;
    font-weight: 600; font-size: 1rem; text-decoration: none;
    transition: transform 0.25s var(--spring-bounce), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.hero-btn.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white;
    box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.hero-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99,102,241,0.5);
}
.hero-btn.ghost {
    background: rgba(255,255,255,0.04); color: var(--text-primary);
    border: 1px solid rgba(129,140,248,0.3);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero-btn.ghost:hover {
    transform: translateY(-2px);
    border-color: rgba(129,140,248,0.6);
    background: rgba(99,102,241,0.1);
}
.hero-btn:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 3px; }
.hero-btn-arrow { font-size: 0.8em; transition: transform 0.25s ease; }
.hero-btn.ghost:hover .hero-btn-arrow { transform: translateX(3px); }

.popular-section { padding-top: 1rem; }
.popular-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem; max-width: 1000px; margin: 0 auto;
}
.pop-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 14px; text-decoration: none; color: inherit;
    transition: transform 0.25s var(--spring-bounce), border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    position: relative; overflow: hidden;
}
.pop-card::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(99,102,241,0.08), transparent 60%);
    opacity: 0; transition: opacity 0.25s ease;
}
.pop-card:hover, .pop-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(129,140,248,0.4);
    box-shadow: 0 8px 28px rgba(99,102,241,0.15);
}
.pop-card:hover::after { opacity: 1; }
.pop-card:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 2px; }
.pop-icon {
    width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: white;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    transition: transform 0.3s var(--spring-bounce);
}
.pop-card:hover .pop-icon { transform: scale(1.1) rotate(-4deg); }
.pop-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; position: relative; z-index: 1; }
.pop-name { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-hint {
    font-size: 0.75rem; color: var(--accent-1); opacity: 0;
    transform: translateX(-4px); transition: opacity 0.25s ease, transform 0.25s ease;
    display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 500;
}
.pop-hint i { font-size: 0.65rem; transition: transform 0.25s ease; }
.pop-card:hover .pop-hint { opacity: 1; transform: translateX(0); }
.pop-card:hover .pop-hint i { transform: translateX(2px); }
@media (max-width: 640px) {
    .hero-ctas { flex-direction: column; align-items: center; }
    .hero-btn { width: 100%; max-width: 320px; justify-content: center; }
    .popular-grid { grid-template-columns: 1fr; }
}
.stat { text-align: center; }
.stat-number {
    font-size: 2rem; font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    letter-spacing: -0.02em;
}
.stat-label { color: var(--text-muted); font-size: 0.85rem; font-weight: 500; margin-top: 0.2rem; }

/* === TYPEWRITER CHARS === */
.typewriter-text .typewriter-char {
    display: inline-block; opacity: 0; transform: translateY(8px);
    animation: charReveal 0.4s var(--spring-smooth) forwards;
}
.typewriter-cursor {
    display: inline-block; width: 3px; height: 1em;
    background: var(--accent-1); margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.8s step-end infinite;
}
@keyframes charReveal { to { opacity: 1; transform: translateY(0); } }
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* === SEARCH — Liquid Mercury Morph === */
.search-container {
    max-width: 640px; margin: 0 auto 2.5rem; position: relative;
    animation: searchBarReveal 0.7s 0.3s var(--spring-smooth) both;
}
@keyframes searchBarReveal {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.search-container i.search-icon {
    position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 0.95rem; pointer-events: none;
    transition: color 0.3s, transform 0.4s var(--spring-bounce); z-index: 2;
}
.search-container.expanded i.search-icon {
    color: var(--accent-1); transform: translateY(-50%) scale(1.1);
}
.search-input {
    width: 100%; padding: 0.9rem 3rem 0.9rem 3rem;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 16px; color: var(--text-primary);
    font-family: 'Inter', sans-serif; font-size: 1rem;
    transition: all 0.5s var(--spring-liquid);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.search-input::placeholder { color: var(--text-muted); transition: color 0.3s; }
.search-input:focus {
    outline: none; border-color: rgba(var(--accent-1-rgb), 0.35);
    box-shadow: 0 0 0 3px rgba(var(--accent-1-rgb), 0.06), 0 4px 24px rgba(0, 0, 0, 0.15), 0 0 60px rgba(var(--accent-1-rgb), 0.04);
    padding: 1.1rem 3rem 1.1rem 3rem; border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
}
.search-input:focus::placeholder { color: var(--text-secondary); }
.search-container::after {
    content: ''; position: absolute; inset: -2px; border-radius: 22px;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(var(--accent-1-rgb), 0.25) 90deg, transparent 180deg, rgba(var(--accent-1-rgb), 0.1) 270deg, transparent 360deg);
    opacity: 0; z-index: -1; transition: opacity 0.5s var(--spring-smooth);
    animation: glowRotate 4s linear infinite; filter: blur(4px);
}
.search-container.focused::after { opacity: 1; }
@keyframes glowRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.search-clear {
    position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
    font-size: 0.9rem; padding: 0.3rem; display: none; border-radius: 50%;
    width: 28px; height: 28px; align-items: center; justify-content: center;
    transition: all 0.3s var(--spring-bounce);
}
.search-clear:hover { background: rgba(var(--accent-1-rgb), 0.12); color: var(--text-primary); transform: translateY(-50%) scale(1.1); }
.search-clear.visible { display: flex; }
.search-count { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: 1rem; font-weight: 500; animation: fadeInUp 0.3s var(--spring-smooth); }
.search-count strong { color: var(--accent-1); }

/* === FILTER TABS === */
.filter-tabs { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; animation: heroReveal 0.7s 0.35s var(--spring-smooth) both; }
.filter-tab {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1.1rem; border: 1px solid var(--glass-border); border-radius: 20px;
    background: var(--glass-bg); color: var(--text-secondary);
    font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 500; cursor: pointer;
    transition: all 0.4s var(--spring-liquid);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.filter-tab i { font-size: 0.75rem; opacity: 0.75; transition: opacity 0.3s, transform 0.4s var(--spring-liquid); }
.filter-tab:hover { border-color: rgba(var(--accent-1-rgb), 0.25); color: var(--text-primary); transform: translateY(-1px); }
.filter-tab:hover i { opacity: 1; transform: scale(1.08); }
.filter-tab:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 3px; }
.filter-tab.active {
    background: linear-gradient(135deg, #818cf8, #c084fc); color: white; border-color: transparent;
    box-shadow: 0 4px 16px rgba(129, 140, 248, 0.25), 0 0 0 3px rgba(129, 140, 248, 0.12);
    transform: translateY(-1px);
}
.filter-tab.active i { opacity: 1; transform: scale(1.1); }
.filter-tab.active .tab-count { background: rgba(255, 255, 255, 0.28); color: white; }
.filter-tab .tab-count { background: rgba(255, 255, 255, 0.18); padding: 0.1rem 0.4rem; border-radius: 10px; font-size: 0.7rem; margin-left: 0.15rem; font-weight: 600; }
.no-results { text-align: center; padding: 4rem 2rem; color: var(--text-secondary); display: none; animation: fadeInUp 0.4s var(--spring-smooth); max-width: 560px; margin: 0 auto; }
.no-results.show { display: block; }
.no-results i { display: block; opacity: 0.2; }
.no-results h3 { font-size: 1.2rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.no-results-icon { position: relative; width: 96px; height: 96px; margin: 0 auto 1.25rem; }
.no-results-icon > i {
    font-size: 2.6rem; line-height: 96px; opacity: 0.18; color: var(--text-primary);
    animation: emptyFloat 3s ease-in-out infinite;
}
.no-results-q {
    position: absolute; top: -4px; right: -6px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: linear-gradient(135deg, #818cf8, #c084fc); color: white;
    font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 12px;
    box-shadow: 0 4px 14px rgba(129, 140, 248, 0.35);
    animation: emptyFloat 3s 0.4s ease-in-out infinite;
}
.no-results-q:empty { display: none; }
.no-results p { margin-bottom: 1.25rem; }
.no-results-suggestions { display: none; margin-bottom: 1.5rem; }
.no-results-suggestions.show { display: block; }
.suggestion-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.6rem; }
.suggestion-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.suggestion-chip {
    padding: 0.35rem 0.9rem; border: 1px solid var(--glass-border); border-radius: 16px;
    background: var(--glass-bg); color: var(--text-secondary); font-size: 0.8rem; cursor: pointer;
    font-family: 'Inter', sans-serif; transition: all 0.3s var(--spring-liquid);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.suggestion-chip:hover { border-color: rgba(var(--accent-1-rgb), 0.5); color: var(--text-primary); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(129, 140, 248, 0.18); }
.no-results-reset {
    display: inline-flex; align-items: center; gap: 0.5rem;
    border: none; color: white; font-size: 0.85rem; font-weight: 600; cursor: pointer;
    padding: 0.65rem 1.4rem; border-radius: 12px; font-family: 'Inter', sans-serif;
    transition: all 0.3s var(--spring-liquid);
}
.no-results-reset:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(129, 140, 248, 0.35); }
.no-results-reset:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 3px; }
@keyframes emptyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* === RECENT SEARCHES === */
.recent-searches {
    display: none; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.6rem;
    margin-top: 0.9rem; animation: fadeInUp 0.35s var(--spring-smooth);
}
.recent-searches.show { display: flex; }
.recent-label { font-size: 0.75rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.35rem; }
.recent-chips { display: inline-flex; flex-wrap: wrap; gap: 0.45rem; }
.recent-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0.8rem; border: 1px solid var(--glass-border); border-radius: 14px;
    background: var(--glass-bg); color: var(--text-secondary); font-size: 0.78rem; cursor: pointer;
    font-family: 'Inter', sans-serif; transition: all 0.3s var(--spring-liquid);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.recent-chip i { font-size: 0.65rem; opacity: 0.6; }
.recent-chip:hover { border-color: rgba(var(--accent-1-rgb), 0.5); color: var(--text-primary); transform: translateY(-1px); }
.recent-clear {
    background: none; border: none; color: var(--text-muted); font-size: 0.72rem; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px; padding: 0.2rem 0.3rem; font-family: 'Inter', sans-serif;
    transition: color 0.3s;
}
.recent-clear:hover { color: var(--text-secondary); }

/* === SEARCH MATCH HIGHLIGHT === */
.tool-card .hl {
    background: linear-gradient(180deg, rgba(129, 140, 248, 0.35), rgba(192, 132, 252, 0.35));
    color: inherit; border-radius: 4px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
html.light .tool-card .hl { background: linear-gradient(180deg, rgba(99, 102, 241, 0.22), rgba(168, 85, 247, 0.22)); }
@media (prefers-reduced-motion: reduce) {
    .no-results-icon > i, .no-results-q { animation: none; }
    .tool-card .hl { transition: none; }
}

/* === SECTION === */
.section { padding: 2rem; max-width: 1400px; margin: 0 auto; position: relative; z-index: 1; background: var(--bg-secondary); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 20px; }
.section-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
.section-header h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.section-header .badge { background: var(--gradient-2); color: white; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }

/* === TOOLS GRID — Frosted Glass Cards === */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.tool-card {
    background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px;
    padding: 1.5rem; text-decoration: none; color: inherit;
    position: relative; overflow: hidden; display: block;
    opacity: 0;
    transition: opacity 0.6s var(--spring-smooth),
        border-color 0.4s, box-shadow 0.4s, background 0.4s;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    transform-style: preserve-3d;
}
.tool-card.reveal { opacity: 1; }
.tool-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--gradient-1); transform: scaleX(0); transform-origin: left;
    transition: transform 0.5s var(--spring-liquid);
}
.tool-card:nth-child(2n)::before { background: var(--gradient-2); }
.tool-card:nth-child(3n)::before { background: var(--gradient-3); }
.tool-card:hover {
    border-color: rgba(var(--accent-1-rgb), 0.15);
    background: var(--bg-card-hover);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 0 40px rgba(var(--accent-1-rgb), 0.03);
}
html.light .tool-card:hover { box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06), 0 0 40px rgba(var(--accent-1-rgb), 0.02); }
.tool-card:hover::before { transform: scaleX(1); }
.tool-card.hidden { display: none; }
.tool-card:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 3px; border-radius: 16px; }
.tool-card:focus-visible::before { transform: scaleX(1); }
.tool-icon {
    width: 50px; height: 50px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
    margin-bottom: 1rem; background: var(--gradient-1); color: white;
    transition: transform 0.5s var(--spring-bounce), box-shadow 0.4s;
}
.tool-card:nth-child(2n) .tool-icon { background: var(--gradient-2); }
.tool-card:nth-child(3n) .tool-icon { background: var(--gradient-3); }
.tool-card:hover .tool-icon { transform: scale(1.1) rotate(-3deg); box-shadow: 0 4px 16px rgba(var(--accent-1-rgb), 0.25); }
.tool-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.4rem; letter-spacing: -0.01em; }
.tool-card p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; margin-bottom: 0.4rem; }
.tool-tag { display: inline-block; background: rgba(var(--accent-1-rgb), 0.08); color: var(--accent-1); padding: 0.25rem 0.6rem; border-radius: 6px; font-size: 0.7rem; font-weight: 500; margin-top: 0.75rem; }
.tool-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.9rem; }
.tool-card-footer .tool-tag { margin-top: 0; }
.open-tool-hint {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.75rem; font-weight: 600; color: var(--accent-1);
    opacity: 0; transform: translateX(-6px);
    transition: opacity 0.35s var(--spring-liquid), transform 0.35s var(--spring-liquid);
}
.tool-card:hover .open-tool-hint, .tool-card:focus-visible .open-tool-hint { opacity: 1; transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .open-tool-hint { opacity: 1; transform: none; } }
.tool-new-badge {
    position: absolute; top: 12px; right: 12px;
    background: var(--gradient-amber); color: #000; font-size: 0.6rem; font-weight: 800;
    padding: 0.2rem 0.5rem; border-radius: 6px; letter-spacing: 0.5px;
    text-transform: uppercase; z-index: 2; animation: newPulse 3s ease-in-out infinite;
}
@keyframes newPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.02); } }

/* === TOOL PAGE === */
.tool-page { max-width: 800px; margin: 0 auto; padding: 2rem; }
.tool-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.tool-page .tool-description { color: var(--text-secondary); margin-bottom: 2rem; font-size: 1.05rem; }
.tool-input-group { margin-bottom: 1.5rem; }
.tool-input-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.5rem; color: var(--text-secondary); }
.tool-input, .tool-textarea {
    width: 100%; padding: 0.75rem 1rem; background: var(--input-bg);
    border: 1px solid var(--border-color); border-radius: 12px;
    color: var(--text-primary); font-family: inherit; font-size: 0.95rem;
    transition: all 0.4s var(--spring-liquid);
}
.tool-input:focus, .tool-textarea:focus {
    outline: none; border-color: rgba(var(--accent-1-rgb), 0.35);
    box-shadow: 0 0 0 3px rgba(var(--accent-1-rgb), 0.06), 0 4px 16px rgba(0, 0, 0, 0.1);
}
.tool-textarea { min-height: 150px; resize: vertical; font-family: 'Courier New', monospace; }
.tool-btn {
    padding: 0.75rem 1.5rem; border: none; border-radius: 12px;
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    transition: all 0.4s var(--spring-bounce);
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary { background: var(--gradient-1); color: white; }
.btn-secondary { background: var(--gradient-2); color: white; }
.btn-danger { background: var(--gradient-3); color: #fff; }
.tool-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 24px rgba(var(--accent-1-rgb), 0.25); }
.tool-btn:active { transform: translateY(0) scale(0.98); transition-duration: 0.1s; }
.btn-group { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.tool-output {
    background: var(--output-bg); border: 1px solid var(--border-color); border-radius: 12px;
    padding: 1rem; font-family: 'Courier New', monospace; font-size: 0.9rem;
    white-space: pre-wrap; word-break: break-all; max-height: 400px; overflow-y: auto;
}
.tool-output:empty::before { content: 'Output will appear here...'; color: var(--text-muted); font-style: italic; }
.stats-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat-box {
    background: rgba(var(--accent-1-rgb), 0.06); border: 1px solid rgba(var(--accent-1-rgb), 0.12);
    border-radius: 12px; padding: 1rem; flex: 1; min-width: 100px; text-align: center;
    transition: all 0.3s var(--spring-liquid);
}
.stat-box:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(var(--accent-1-rgb), 0.12); }
.stat-box .value { font-size: 1.5rem; font-weight: 700; color: var(--accent-1); }
.stat-box .label { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.25rem; }
.toggle-group { display: flex; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 0.25rem; gap: 0.25rem; }
.toggle-btn { flex: 1; padding: 0.5rem 1rem; border: none; background: transparent; color: var(--text-secondary); border-radius: 10px; cursor: pointer; transition: all 0.3s var(--spring-bounce); font-weight: 500; font-family: 'Inter', sans-serif; }
.toggle-btn.active { background: var(--gradient-1); color: white; }
.range-group { display: flex; align-items: center; gap: 1rem; }
.range-group input[type="range"] { flex: 1; -webkit-appearance: none; height: 6px; background: rgba(255, 255, 255, 0.06); border-radius: 3px; outline: none; }
html.light .range-group input[type="range"] { background: rgba(0, 0, 0, 0.06); }
.range-group input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: var(--gradient-1); border-radius: 50%; cursor: pointer; box-shadow: 0 2px 8px rgba(var(--accent-1-rgb), 0.25); transition: transform 0.3s var(--spring-bounce); }
.range-group input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range-value { min-width: 50px; text-align: center; font-weight: 600; color: var(--accent-1); }
.color-preview { width: 100%; height: 100px; border-radius: 12px; margin-bottom: 1rem; transition: all 0.3s var(--spring-smooth); border: 1px solid var(--border-color); }
.color-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }
.color-value { background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 10px; padding: 0.5rem; text-align: center; cursor: pointer; transition: all 0.3s var(--spring-bounce); }
.color-value:hover { border-color: rgba(var(--accent-1-rgb), 0.25); transform: translateY(-2px); }
.color-value .label { font-size: 0.7rem; color: var(--text-secondary); }
.color-value .value { font-family: 'Courier New', monospace; font-size: 0.85rem; margin-top: 0.25rem; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 0.5rem 0.75rem; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 10px; transition: all 0.3s var(--spring-smooth); }
.checkbox-label:has(input:checked) { border-color: rgba(var(--accent-1-rgb), 0.25); background: rgba(var(--accent-1-rgb), 0.06); }
.checkbox-label input { display: none; }
.checkbox-label .check { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--border-color); display: flex; align-items: center; justify-content: center; transition: all 0.3s var(--spring-bounce); flex-shrink: 0; }
.checkbox-label:has(input:checked) .check { background: var(--gradient-1); border-color: var(--accent-1); transform: scale(1.05); }
.checkbox-label:has(input:checked) .check::after { content: '✓'; color: white; font-size: 0.7rem; font-weight: 700; }

/* === COPY TOAST === */
.copy-toast {
    position: fixed; bottom: 2rem; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gradient-1); color: white;
    padding: 0.75rem 1.5rem; border-radius: 12px; font-weight: 600; font-size: 0.9rem;
    z-index: 2000; transition: transform 0.5s var(--spring-bounce);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); backdrop-filter: blur(12px);
}
.copy-toast.show { transform: translateX(-50%) translateY(0); }

/* === BACK TO TOP === */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px;
    border-radius: 14px; background: var(--gradient-1); color: white; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; z-index: 99; opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.5s var(--spring-bounce);
    box-shadow: 0 4px 16px rgba(var(--accent-1-rgb), 0.3);
}
.back-to-top.visible { opacity: 1; transform: translateY(0) scale(1); }
.back-to-top:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 24px rgba(var(--accent-1-rgb), 0.4); }

/* === FAQ === */
.faq-item {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 14px; margin-bottom: 0.75rem; overflow: hidden;
    transition: border-color 0.3s var(--spring-smooth), box-shadow 0.3s var(--spring-smooth), background 0.3s;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.faq-item:hover { border-color: rgba(var(--accent-1-rgb), 0.18); }
.faq-item.open { border-color: rgba(var(--accent-1-rgb), 0.3); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18), 0 0 24px rgba(var(--accent-1-rgb), 0.05); background: var(--bg-card-hover); }
.faq-item button {
    width: 100%; padding: 1.25rem; background: transparent; border: none;
    color: var(--text-primary); font-size: 1rem; font-weight: 600; text-align: left;
    cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    font-family: 'Inter', sans-serif; transition: color 0.3s;
}
.faq-item button:hover { color: var(--accent-1); }
.faq-item button:focus-visible { outline: 2px solid var(--accent-1); outline-offset: -2px; border-radius: 14px; }
.faq-item button i { transition: transform 0.4s var(--spring-bounce); color: var(--text-muted); flex-shrink: 0; }
.faq-item.open button i { transform: rotate(180deg); color: var(--accent-1); }
.faq-answer {
    padding: 0 1.25rem 1.25rem; color: var(--text-secondary); line-height: 1.7;
    display: none; animation: faqOpen 0.4s var(--spring-smooth);
}
@keyframes faqOpen { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .faq-answer { animation: none; } .faq-item button i { transition: none; } }

/* === CONTENT PAGES === */
.content-page { max-width: 800px; margin: 0 auto; padding: 2rem; line-height: 1.8; color: var(--text-secondary); }
.content-page h1 { font-size: 2rem; font-weight: 800; color: var(--text-primary); margin-bottom: 1rem; letter-spacing: -0.02em; }
.content-page h3 { font-size: 1.25rem; color: var(--text-primary); margin-top: 2rem; margin-bottom: 1rem; }
.content-page p { margin-bottom: 1rem; }
.content-page ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.content-page li { margin-bottom: 0.5rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--accent-1); text-decoration: none; font-weight: 500; margin-bottom: 2rem; transition: gap 0.3s var(--spring-bounce); }
.back-link:hover { gap: 0.75rem; }

/* === FOOTER === */
footer {
    padding: 3rem 2rem; border-top: 1px solid var(--glass-border);
    background: var(--bg-secondary); margin-top: 3rem; transition: background 0.4s;
}
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 960px) { .footer-content { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
@media (max-width: 600px) { .footer-content { grid-template-columns: repeat(2, 1fr); } }
.footer-content h4 { margin-bottom: 1rem; color: var(--text-primary); font-size: 0.9rem; font-weight: 600; }
.footer-content ul { list-style: none; padding: 0; }
.footer-content li { margin-bottom: 0.5rem; }
.footer-content a { color: var(--text-secondary); text-decoration: none; transition: color 0.3s, transform 0.3s; font-size: 0.9rem; }
.footer-content a:hover { color: var(--accent-1); transform: translateX(2px); }
.footer-bottom { max-width: 1200px; margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--glass-border); text-align: center; }
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }
.social-links { display: flex; gap: 0.75rem; }
.social-links a {
    width: 36px; height: 36px; border-radius: 10px;
    border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); transition: all 0.4s var(--spring-bounce);
    backdrop-filter: blur(8px);
}
.social-links a:hover {
    background: rgba(var(--accent-1-rgb), 0.08); border-color: rgba(var(--accent-1-rgb), 0.2);
    color: var(--accent-1); transform: translateY(-2px) scale(1.05);
}

.perf-badge {
    position: fixed; bottom: 2rem; left: 5.5rem;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 10px; padding: 0.5rem 0.75rem; font-size: 0.7rem;
    color: var(--text-muted); z-index: 99;
    display: flex; align-items: center; gap: 0.4rem;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.perf-badge .dot-green { width: 6px; height: 6px; background: #00b894; border-radius: 50%; transition: background 0.3s; }

/* === PWA BANNER === */
.pwa-banner {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--glass-bg); border-top: 1px solid var(--glass-border);
    padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; z-index: 150; transform: translateY(100%);
    transition: transform 0.6s var(--spring-bounce);
    backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2);
}
.pwa-banner.visible { transform: translateY(0); }
.pwa-banner-text { display: flex; align-items: center; gap: 0.75rem; }
.pwa-banner-text i { font-size: 1.5rem; color: var(--accent-1); }
.pwa-banner-text span { color: var(--text-secondary); font-size: 0.9rem; }
.pwa-banner-text strong { color: var(--text-primary); }
.pwa-install-btn {
    padding: 0.6rem 1.5rem; background: var(--gradient-1); color: white;
    border: none; border-radius: 10px; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; white-space: nowrap; font-family: 'Inter', sans-serif;
    transition: all 0.4s var(--spring-bounce);
}
.pwa-install-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 24px rgba(var(--accent-1-rgb), 0.25); }
.pwa-dismiss { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1rem; padding: 0.5rem; transition: color 0.3s; }
.pwa-dismiss:hover { color: var(--text-primary); }

/* === FEEDBACK WIDGET === */
.feedback-fab {
    position: fixed; bottom: 5.5rem; right: 2rem;
    width: 48px; height: 48px; border-radius: 16px;
    background: var(--gradient-1); color: white; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; z-index: 99;
    box-shadow: 0 4px 16px rgba(var(--accent-1-rgb), 0.25);
    transition: all 0.4s var(--spring-bounce);
}
.feedback-fab:hover { transform: translateY(-3px) scale(1.08); box-shadow: 0 8px 24px rgba(var(--accent-1-rgb), 0.35); }
.feedback-panel {
    position: fixed; bottom: 7.5rem; right: 2rem; width: 320px;
    background: var(--bg-secondary); border: 1px solid var(--glass-border);
    border-radius: 18px; padding: 1.5rem; z-index: 150;
    opacity: 0; transform: translateY(12px) scale(0.95); pointer-events: none;
    transition: all 0.4s var(--spring-bounce);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.feedback-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.feedback-panel h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; }
.feedback-emojis { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.feedback-emoji {
    width: 42px; height: 42px; border-radius: 12px;
    border: 1px solid var(--glass-border); background: var(--glass-bg);
    font-size: 1.3rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s var(--spring-bounce);
}
.feedback-emoji:hover, .feedback-emoji.selected {
    border-color: rgba(var(--accent-1-rgb), 0.25); background: rgba(var(--accent-1-rgb), 0.08);
    transform: scale(1.12);
}
.feedback-textarea {
    width: 100%; min-height: 80px; background: var(--input-bg);
    border: 1px solid var(--border-color); border-radius: 12px;
    padding: 0.75rem; color: var(--text-primary);
    font-family: 'Inter', sans-serif; font-size: 0.85rem;
    resize: vertical; margin-bottom: 0.75rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.feedback-textarea:focus { outline: none; border-color: rgba(var(--accent-1-rgb), 0.35); box-shadow: 0 0 0 3px rgba(var(--accent-1-rgb), 0.06); }
.feedback-submit {
    width: 100%; padding: 0.65rem; background: var(--gradient-1); color: white;
    border: none; border-radius: 10px; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.3s var(--spring-bounce);
}
.feedback-submit:hover { transform: translateY(-1px) scale(1.01); box-shadow: 0 4px 16px rgba(var(--accent-1-rgb), 0.2); }
.feedback-thanks { text-align: center; padding: 1rem 0; display: none; }
.feedback-thanks i { font-size: 2rem; color: var(--accent-1); margin-bottom: 0.5rem; animation: thanksPop 0.5s var(--spring-bounce); }
@keyframes thanksPop { from { transform: scale(0); } to { transform: scale(1); } }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: rgba(var(--accent-1-rgb), 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-1-rgb), 0.3); }

/* === UTILITY ANIMATIONS === */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
.shimmer { background: linear-gradient(90deg, var(--bg-card) 25%, rgba(var(--accent-1-rgb), 0.03) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: shimmer 2s infinite; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    header { padding: 0.75rem 1rem; }
    .header-content { flex-direction: column; gap: 0.75rem; }
    nav { flex-wrap: wrap; justify-content: center; }
    .hero { padding: 3rem 1rem 2rem; }
    .hero h1 { font-size: 1.75rem; }
    .hero-stats { gap: 1.5rem; }
    .tools-grid { grid-template-columns: 1fr; }
    .tool-page, .content-page { padding: 1.5rem; }
    .filter-tabs { gap: 0.35rem; }
    .filter-tab { padding: 0.4rem 0.8rem; font-size: 0.75rem; }
    .back-to-top { bottom: 1rem; right: 1rem; }
    .perf-badge { display: none; }
    .feedback-fab { bottom: 5rem; right: 1rem; width: 42px; height: 42px; }
    .feedback-panel { right: 1rem; left: 1rem; width: auto; bottom: 6.5rem; }
    .pwa-banner { padding: 0.75rem 1rem; flex-wrap: wrap; justify-content: center; }
    .ambient-blob { filter: blur(60px); opacity: 0.25; }
    .ambient-blob:nth-child(1) { width: 250px; height: 250px; }
    .ambient-blob:nth-child(2) { width: 200px; height: 200px; }
    .ambient-blob:nth-child(3) { width: 180px; height: 180px; }
    .ambient-blob:nth-child(4) { width: 150px; height: 150px; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 1.5rem; }
    .hero p { font-size: 1rem; }
    .stat-number { font-size: 1.5rem; }
    .tool-card { padding: 1.25rem; }
    .search-input { font-size: 0.95rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .tool-card { opacity: 1; transform: none; }
}

/* === COOKIE CONSENT BANNER === */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--bg-secondary); border-top: 1px solid var(--glass-border);
    padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; z-index: 160; transform: translateY(100%);
    transition: transform 0.6s var(--spring-bounce);
    backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2);
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-content { display: flex; align-items: center; gap: 1rem; flex: 1; }
.cookie-icon { font-size: 1.5rem; flex-shrink: 0; }
.cookie-text strong { display: block; margin-bottom: 0.15rem; font-size: 0.9rem; }
.cookie-text p { color: var(--text-secondary); font-size: 0.8rem; margin: 0; line-height: 1.4; }
.cookie-text a { color: var(--accent-1); text-decoration: none; font-weight: 500; }
.cookie-text a:hover { text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.cookie-btn {
    padding: 0.5rem 1.2rem; border-radius: 10px; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.3s var(--spring-bounce); border: none;
}
.cookie-accept { background: var(--gradient-1); color: white; }
.cookie-accept:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 20px rgba(var(--accent-1-rgb), 0.25); }
.cookie-dismiss { background: var(--input-bg); color: var(--text-secondary); border: 1px solid var(--border-color); }
.cookie-dismiss:hover { border-color: rgba(var(--accent-1-rgb), 0.2); color: var(--text-primary); }

/* === MOBILE MENU === */
.mobile-menu-toggle {
    display: none; background: none; border: none; cursor: pointer;
    padding: 0.5rem; z-index: 1001; flex-direction: column; gap: 5px;
}
.hamburger-line {
    width: 22px; height: 2px; background: var(--text-primary);
    border-radius: 2px; transition: all 0.3s var(--spring-bounce); transform-origin: center;
}
.mobile-menu-toggle.active .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.active .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-toggle.active .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === KEYBOARD SHORTCUTS MODAL === */
.shortcuts-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 3000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.shortcuts-overlay.visible { opacity: 1; pointer-events: all; }
.shortcuts-modal {
    background: var(--bg-secondary); border: 1px solid var(--glass-border);
    border-radius: 18px; padding: 1.5rem; width: 90%; max-width: 420px;
    transform: translateY(20px) scale(0.95); transition: transform 0.4s var(--spring-bounce);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.shortcuts-overlay.visible .shortcuts-modal { transform: translateY(0) scale(1); }
.shortcuts-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.shortcuts-header h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.shortcuts-close {
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
    font-size: 1rem; padding: 0.25rem; transition: color 0.2s;
}
.shortcuts-close:hover { color: var(--text-primary); }
.shortcuts-list { display: flex; flex-direction: column; gap: 0.6rem; }
.shortcut-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 0.75rem; border-radius: 10px; background: var(--input-bg);
    border: 1px solid var(--border-color); transition: border-color 0.2s;
}
.shortcut-item:hover { border-color: rgba(var(--accent-1-rgb), 0.15); }
.shortcut-desc { font-size: 0.85rem; color: var(--text-secondary); }
.shortcut-keys { display: flex; gap: 0.3rem; }
kbd {
    display: inline-block; padding: 0.2rem 0.5rem; border-radius: 6px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    font-size: 0.75rem; font-family: 'Inter', monospace; color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); min-width: 24px; text-align: center;
}

/* === SKELETON LOADER === */
.tool-card.skeleton {
    pointer-events: none;
}
.tool-card.skeleton .tool-icon,
.tool-card.skeleton h3,
.tool-card.skeleton p,
.tool-card.skeleton .tool-tag {
    background: linear-gradient(90deg, var(--bg-card) 25%, rgba(var(--accent-1-rgb), 0.04) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
    color: transparent !important;
    user-select: none;
}
.tool-card.skeleton .tool-icon { width: 48px; height: 48px; border-radius: 12px; }
.tool-card.skeleton h3 { width: 60%; height: 1.1em; margin-bottom: 0.5rem; }
.tool-card.skeleton p { width: 90%; height: 0.9em; margin-bottom: 0.3rem; }
.tool-card.skeleton .tool-tag { width: 70px; height: 0.75em; margin-top: 0.5rem; }

/* === PASSWORD STRENGTH METER === */
.strength-meter {
    margin-top: 0.75rem;
}
.strength-bar-bg {
    height: 6px; border-radius: 3px; background: var(--input-bg);
    overflow: hidden; margin-bottom: 0.4rem;
}
.strength-bar {
    height: 100%; border-radius: 3px; transition: width 0.4s var(--spring-smooth), background 0.4s;
    width: 0%;
}
.strength-label {
    font-size: 0.8rem; font-weight: 600; display: flex; justify-content: space-between;
}

/* === PASSWORD VISIBILITY TOGGLE === */
.pwd-output-wrap {
    position: relative; display: flex; gap: 0.5rem; align-items: stretch;
}
.pwd-output-wrap .tool-output { flex: 1; font-size: 1.1rem; font-family: 'Courier New', monospace; }
.pwd-visibility-toggle {
    background: var(--input-bg); border: 1px solid var(--border-color);
    border-radius: 10px; color: var(--text-secondary); cursor: pointer;
    padding: 0 0.75rem; transition: all 0.3s var(--spring-bounce); font-size: 1rem;
}
.pwd-visibility-toggle:hover { border-color: rgba(var(--accent-1-rgb), 0.2); color: var(--accent-1); }

/* === RESPONSIVE ADDITIONS === */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
    header .header-content { flex-direction: row; justify-content: space-between; }
    header nav {
        position: fixed; top: 0; right: 0; width: 280px; height: 100vh;
        background: var(--bg-secondary); border-left: 1px solid var(--glass-border);
        flex-direction: column; padding: 5rem 2rem 2rem; gap: 0.5rem;
        transform: translateX(100%); transition: transform 0.4s var(--spring-bounce);
        z-index: 1000; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    }
    header nav.open { transform: translateX(0); }
    header nav a { padding: 0.75rem 1rem; border-radius: 10px; font-size: 1rem; width: 100%; }
    header nav a:hover, header nav a.active { background: rgba(var(--accent-1-rgb), 0.08); }
    .cookie-banner { flex-direction: column; gap: 0.75rem; padding: 1rem; }
    .cookie-actions { width: 100%; }
    .cookie-btn { flex: 1; }
}

/* Mobile nav overlay */
.nav-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 999;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.nav-overlay.visible { opacity: 1; pointer-events: all; }

/* === PREMIUM VISUAL EFFECTS (Always Visible) === */

/* 1. Gradient shimmer on hero heading */
.hero h1 span {
    background: linear-gradient(90deg, #818cf8, #c084fc, #f59e0b, #818cf8);
    background-size: 300% 100%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShimmer 4s ease-in-out infinite;
}
@keyframes gradientShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 2. Glowing aurora border on tool cards */
.tool-card {
    position: relative;
    border: 1px solid rgba(var(--accent-1-rgb), 0.08);
    transition: opacity 0.6s var(--spring-smooth), transform 0.6s var(--spring-liquid),
        border-color 0.4s, box-shadow 0.4s, background 0.4s;
}
.tool-card:hover {
    border-color: rgba(var(--accent-1-rgb), 0.25);
    box-shadow: 0 0 20px rgba(var(--accent-1-rgb), 0.12), 0 0 60px rgba(167, 139, 250, 0.06),
        0 16px 48px rgba(0, 0, 0, 0.25);
    animation: cardGlow 2s ease-in-out infinite;
}
@keyframes cardGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(var(--accent-1-rgb), 0.12), 0 0 60px rgba(167, 139, 250, 0.06), 0 16px 48px rgba(0, 0, 0, 0.25); }
    50% { box-shadow: 0 0 30px rgba(var(--accent-1-rgb), 0.2), 0 0 80px rgba(167, 139, 250, 0.1), 0 16px 48px rgba(0, 0, 0, 0.25); }
}
/* Subtle always-visible glow pulse on every card */
.tool-card.reveal {
    animation: subtleCardPulse 5s ease-in-out infinite;
}
@keyframes subtleCardPulse {
    0%, 100% { border-color: rgba(var(--accent-1-rgb), 0.08); }
    50% { border-color: rgba(var(--accent-1-rgb), 0.15); }
}

/* 11. Animated gradient border on hero section */
.hero {
    border-bottom: 1px solid transparent;
    background-image: linear-gradient(var(--bg-primary), var(--bg-primary)),
        linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.15), rgba(192, 132, 252, 0.1), transparent);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    animation: heroBorder 8s ease-in-out infinite;
}
@keyframes heroBorder {
    0%, 100% { background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.15), rgba(192, 132, 252, 0.1), transparent); }
    50% { background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), linear-gradient(90deg, rgba(245, 158, 11, 0.08), rgba(129, 140, 248, 0.15), rgba(167, 139, 250, 0.12), rgba(245, 158, 11, 0.08)); }
}

/* 3. Pulsing glow on stats */
.stat-number {
    animation: statPulse 3s ease-in-out infinite;
}
@keyframes statPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

/* 4. Floating shimmer on badge */
.badge, .tool-new-badge {
    animation: badgeShimmer 2s ease-in-out infinite;
}
@keyframes badgeShimmer {
    0%, 100% { box-shadow: 0 2px 8px rgba(var(--accent-1-rgb), 0.2); }
    50% { box-shadow: 0 4px 20px rgba(var(--accent-1-rgb), 0.4); }
}

/* 5. Logo icon glow pulse */
.logo-icon {
    animation: logoGlow 4s ease-in-out infinite;
}
@keyframes logoGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(var(--accent-1-rgb), 0); }
    50% { box-shadow: 0 0 24px rgba(var(--accent-1-rgb), 0.3); }
}

/* 6. Search bar glow ring on focus */
.search-container.focused::after {
    opacity: 1;
    animation: searchGlow 2s linear infinite;
}
@keyframes searchGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 7. Hero mesh drift animation */
.hero-mesh {
    animation: heroMeshDrift 15s ease-in-out infinite;
}

/* 8. Ambient blob color shift */
.ambient-blob {
    animation: blobMorph 20s ease-in-out infinite, blobColor 12s ease-in-out infinite;
}
@keyframes blobColor {
    0%, 100% { filter: blur(80px) hue-rotate(0deg); }
    33% { filter: blur(80px) hue-rotate(15deg); }
    66% { filter: blur(80px) hue-rotate(-15deg); }
}

/* 9. Section header gradient text */
.section-header h2 {
    background: linear-gradient(135deg, var(--text-primary), var(--accent-1));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* 10. FAQ chevron bounce on hover */
.faq-item button:hover i {
    animation: chevronBounce 0.5s ease;
}
@keyframes chevronBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* === PRELOADER === */
.preloader {
    position: fixed; inset: 0; z-index: 99999;
    background: #030303;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { text-align: center; }
.preloader-cube {
    width: 60px; height: 60px; margin: 0 auto 1.5rem;
    transform-style: preserve-3d;
    animation: cubeRotate 2s ease-in-out infinite;
}
.cube-face {
    position: absolute; width: 60px; height: 60px;
    border: 2px solid rgba(129, 140, 248, 0.4);
    background: rgba(129, 140, 248, 0.05);
    border-radius: 8px;
    backdrop-filter: blur(4px);
}
.cube-face.front  { transform: translateZ(30px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(30px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(30px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(30px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(30px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(30px); }
@keyframes cubeRotate {
    0% { transform: rotateX(0) rotateY(0); }
    25% { transform: rotateX(90deg) rotateY(90deg); }
    50% { transform: rotateX(180deg) rotateY(180deg); }
    75% { transform: rotateX(270deg) rotateY(270deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}
.preloader-text {
    font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em;
    background: var(--text-metallic);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.preloader-text span { background: var(--gradient-2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.preloader-bar {
    width: 120px; height: 3px; background: rgba(255,255,255,0.06);
    border-radius: 3px; margin: 1rem auto 0; overflow: hidden;
}
.preloader-bar-fill {
    width: 0%; height: 100%; background: var(--gradient-1);
    border-radius: 3px; animation: preloaderFill 1.5s ease-in-out forwards;
}
@keyframes preloaderFill { to { width: 100%; } }

/* === SCROLL PROGRESS BAR === */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, #818cf8, #c084fc, #f59e0b);
    z-index: 10000; transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.5);
}

/* === CARD ENTRANCE STAGGER === */
.tool-card.reveal {
    animation: cardEntrance 0.6s var(--spring-smooth) forwards;
    animation-delay: var(--entrance-delay, 0s);
}
@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === MAGNETIC BUTTON EFFECT === */
.tool-btn {
    position: relative;
    transition: transform 0.3s var(--spring-bounce);
}
.tool-btn:hover {
    transform: translateY(-2px) scale(1.04);
}

/* === TEXT SCRAMBLE EFFECT (applied via JS) === */
.scramble-char {
    display: inline-block;
    animation: charDecode 0.05s steps(1) forwards;
    opacity: 0;
}
@keyframes charDecode { to { opacity: 1; } }

/* === PAGE TRANSITION OVERLAY === */
.page-transition {
    position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 10001;
    background: linear-gradient(90deg, #818cf8, #c084fc, #f59e0b, #818cf8);
    background-size: 300% 100%;
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.4s ease-in;
    box-shadow: 0 0 20px rgba(129, 140, 248, 0.4);
}
.page-transition.active { transform: scaleX(1); animation: transitionShimmer 0.4s linear; }
@keyframes transitionShimmer { from { background-position: 100% 0; } to { background-position: 0% 0; } }

/* === CURSOR GLOW (desktop only) === */
.cursor-glow {
    position: fixed; width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.06) 0%, transparent 70%);
    pointer-events: none; z-index: -2;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s;
    will-change: transform; opacity: 0;
}
.cursor-glow.active { opacity: 1; }

/* === TRIG-JS SCROLL REVEAL === */
/* Trig-JS sets --trig-y (0 to 1) as element enters viewport */
.social-links a {
    opacity: calc(var(--trig-y, 0) * 1);
    transform: translateY(calc((1 - var(--trig-y, 0)) * 30px));
    transition: opacity 0.3s, transform 0.3s;
}
[data-trig].cookie-banner {
    opacity: calc(var(--trig-y, 0) * 1);
    transform: translateY(calc((1 - var(--trig-y, 0)) * 40px));
    transition: opacity 0.4s, transform 0.4s;
}
.cookie-banner.visible { opacity: 1 !important; transform: translateY(0) !important; }

/* === DYNAMIC PERSONAL SECTIONS (Favorites / Recent) === */
.dyn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.dyn-card { opacity: 1; }
.dyn-fav-ind { color: #fbbf24; font-size: 1rem; }
.dyn-empty-hint { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: 0.75rem; }

/* === FAVORITE STAR ON TOOL CARDS === */
.fav-star {
    position: absolute; top: 0.75rem; right: 0.75rem; z-index: 3;
    width: 34px; height: 34px; border-radius: 10px; border: none; cursor: pointer;
    background: transparent; color: var(--text-muted); font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s var(--spring-bounce);
}
.fav-star:hover { color: #fbbf24; background: rgba(251, 191, 36, 0.12); transform: scale(1.12); }
.fav-star.active { color: #fbbf24; }
.fav-star:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 2px; }

/* === COMMAND PALETTE === */
.cmdk-backdrop {
    position: fixed; inset: 0; z-index: 10002; background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: none; align-items: flex-start; justify-content: center; padding: 12vh 1rem 1rem;
}
.cmdk-backdrop.open { display: flex; animation: cmdkFade 0.18s ease-out; }
.cmdk {
    width: 100%; max-width: 580px; max-height: 65vh; display: flex; flex-direction: column;
    background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(var(--accent-1-rgb), 0.08);
    overflow: hidden; animation: cmdkPop 0.22s var(--spring-smooth);
}
.cmdk-input-row { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--glass-border); }
.cmdk-input-row i { color: var(--text-muted); }
.cmdk-input { flex: 1; background: transparent; border: none; outline: none; color: var(--text-primary); font-size: 1rem; font-family: 'Inter', sans-serif; }
.cmdk-input::placeholder { color: var(--text-muted); }
.cmdk-esc { font-size: 0.68rem; color: var(--text-muted); border: 1px solid var(--glass-border); border-radius: 6px; padding: 0.15rem 0.45rem; }
.cmdk-list { overflow-y: auto; padding: 0.5rem; flex: 1; }
.cmdk-group-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); padding: 0.6rem 0.75rem 0.3rem; }
.cmdk-item {
    display: flex; align-items: center; gap: 0.8rem; padding: 0.65rem 0.75rem;
    border-radius: 10px; cursor: pointer; color: var(--text-secondary);
}
.cmdk-item i.cmdk-icon { width: 20px; text-align: center; color: var(--accent-1); }
.cmdk-item .cmdk-name { font-weight: 600; color: var(--text-primary); font-size: 0.9rem; }
.cmdk-item .cmdk-desc { font-size: 0.78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item .cmdk-cat { margin-left: auto; font-size: 0.68rem; color: var(--text-muted); border: 1px solid var(--glass-border); border-radius: 8px; padding: 0.1rem 0.45rem; flex-shrink: 0; }
.cmdk-item.selected { background: rgba(var(--accent-1-rgb), 0.12); }
.cmdk-item.selected .cmdk-name { color: var(--accent-1); }
.cmdk-empty { text-align: center; padding: 2rem 1rem; color: var(--text-muted); font-size: 0.9rem; }
.cmdk-footer { display: flex; gap: 1rem; padding: 0.6rem 1rem; border-top: 1px solid var(--glass-border); font-size: 0.7rem; color: var(--text-muted); }
.cmdk-footer b { font-weight: 600; color: var(--text-secondary); }
@keyframes cmdkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmdkPop { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 640px) {
    .cmdk-backdrop { padding-top: 6vh; }
    .cmdk { max-height: 75vh; }
    .cmdk-item .cmdk-desc { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .cmdk-backdrop, .cmdk { animation: none; }
    .fav-star { transition: none; }
}

/* === TOOL PAGE UI SYSTEM (mobile-first polish) === */
@media (max-width: 768px) {
    .tool-page { padding: 1.25rem 1rem; }
    .tool-page h1 { font-size: 1.5rem; }
    .tool-textarea, .tool-input, .tool-output, .tool-select {
        font-size: 16px; /* prevents iOS zoom-on-focus */
        min-height: 44px;
    }
    .tool-textarea { min-height: 160px; }
    .btn-group { flex-wrap: wrap; }
    .btn-group .tool-btn { flex: 1 1 44%; min-height: 46px; justify-content: center; }
    .tool-btn { min-height: 44px; }
    .copy-toast { left: 1rem; right: 1rem; transform: none; text-align: center; }
}
.tool-btn { touch-action: manipulation; }
.tool-textarea { touch-action: manipulation; }
/* Visible focus for all tool-page interactive elements */
.tool-btn:focus-visible, .tool-input:focus-visible, .tool-textarea:focus-visible,
.tool-select:focus-visible, input[type="range"]:focus-visible {
    outline: 2px solid var(--accent-1); outline-offset: 2px;
}
/* Success / error message primitives (used by tools, styled consistently) */
.tb-msg {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem 0.9rem; border-radius: 10px; font-size: 0.82rem; font-weight: 500;
    margin-top: 0.75rem; animation: fadeInUp 0.3s var(--spring-smooth);
}
.tb-msg.error { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.tb-msg.success { background: rgba(34, 197, 94, 0.12); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
html.light .tb-msg.error { color: #b91c1c; }
html.light .tb-msg.success { color: #15803d; }

/* Native tool inputs (color picker, bare textareas) — mobile + focus parity */
input[type="color"] {
    min-height: 44px; cursor: pointer;
    background: transparent; border: none; border-radius: 10px;
}
input[type="color"]:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 2px; }
textarea[id], input[id] { touch-action: manipulation; }
@media (max-width: 768px) {
    textarea[id] { font-size: 16px; }
    input[type="color"] { height: 50px !important; }
}

/* === SEO CONTENT SECTIONS (tool pages) === */
.seo-content { margin-top: 2.5rem; max-width: 780px; }
.seo-intro { color: var(--text-secondary); line-height: 1.75; font-size: 0.95rem; margin-bottom: 1.75rem; }
.seo-block { margin-bottom: 2rem; }
.seo-block h2 {
    font-size: 1.15rem; font-weight: 700; color: var(--text-primary);
    margin-bottom: 0.85rem; letter-spacing: -0.01em;
}
.seo-steps { padding-left: 1.4rem; color: var(--text-secondary); line-height: 1.8; font-size: 0.92rem; }
.seo-steps li { margin-bottom: 0.4rem; }
.seo-block p { color: var(--text-secondary); line-height: 1.75; font-size: 0.92rem; margin-bottom: 0.85rem; }
.seo-code {
    background: var(--bg-card, rgba(0,0,0,0.3)); border: 1px solid var(--glass-border);
    border-radius: 10px; padding: 1rem 1.15rem; overflow-x: auto;
    font-family: 'Courier New', monospace; font-size: 0.85rem; line-height: 1.6;
    color: var(--text-primary); margin: 0.85rem 0; white-space: pre-wrap; word-break: break-word;
}
.seo-faq { display: flex; flex-direction: column; gap: 0.5rem; }
.seo-faq-item {
    border: 1px solid var(--glass-border); border-radius: 12px;
    background: var(--glass-bg); overflow: hidden;
    transition: border-color 0.3s;
}
.seo-faq-item:hover { border-color: rgba(var(--accent-1-rgb), 0.25); }
.seo-faq-item summary {
    padding: 0.9rem 1.1rem; cursor: pointer; font-weight: 600; font-size: 0.9rem;
    color: var(--text-primary); list-style: none; position: relative; padding-right: 2.5rem;
}
.seo-faq-item summary::-webkit-details-marker { display: none; }
.seo-faq-item summary::after {
    content: '+'; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
    color: var(--accent-1); font-size: 1.2rem; font-weight: 400; transition: transform 0.3s;
}
.seo-faq-item[open] summary::after { content: '\2212'; }
.seo-faq-item[open] summary { color: var(--accent-1); }
.seo-faq-item p { padding: 0 1.1rem 1rem; margin: 0; font-size: 0.88rem; }

/* === ENDGAME: breadcrumbs + guide callout === */
.breadcrumb { display:flex; align-items:center; gap:0.5rem; font-size:0.82rem; color:var(--text-secondary); margin-bottom:1rem; }
.breadcrumb a { color:var(--text-secondary); text-decoration:none; }
.breadcrumb a:hover { color:var(--accent-1); text-decoration:underline; }
.breadcrumb [aria-current="page"] { color:var(--text-primary); font-weight:500; }
.crumb-sep { opacity:0.5; }
.guide-callout { display:flex; align-items:flex-start; gap:0.6rem; background:rgba(108,92,231,0.08); border:1px solid rgba(108,92,231,0.25); border-radius:10px; padding:0.85rem 1.1rem; margin:0 0 1.5rem; font-size:0.9rem; }
.guide-callout i { color:var(--accent-1); margin-top:0.15rem; }
.guide-callout a { color:var(--accent-1); font-weight:500; }

/* ===== AI Directories: homepage AI sections + detail/category pages ===== */
.ai-cats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
.ai-cat-card{display:flex;align-items:center;gap:14px;padding:16px 18px;border-radius:14px;background:var(--bg-card,rgba(255,255,255,.03));border:1px solid var(--border-color,rgba(255,255,255,.08));transition:transform .2s,border-color .2s;text-decoration:none;color:inherit}
.ai-cat-card:hover{transform:translateY(-2px);border-color:var(--accent-1,#818cf8)}
.ai-cat-icon{width:42px;height:42px;border-radius:11px;background:rgba(129,140,248,.12);color:#818cf8;display:flex;align-items:center;justify-content:center;font-size:1.05rem;flex-shrink:0}
.ai-cat-info{display:flex;flex-direction:column;min-width:0}
.ai-cat-name{font-weight:600;font-size:.95rem}
.ai-cat-count{font-size:.78rem;color:var(--text-secondary,#94a3b8)}
.ai-cat-arrow{margin-left:auto;color:var(--text-secondary,#94a3b8);font-size:.8rem}
.ai-feat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.ai-feat-card{display:flex;align-items:flex-start;gap:13px;padding:16px;border-radius:14px;background:var(--bg-card,rgba(255,255,255,.03));border:1px solid var(--border-color,rgba(255,255,255,.08));transition:transform .2s,border-color .2s;text-decoration:none;color:inherit}
.ai-feat-card:hover{transform:translateY(-2px);border-color:var(--accent-1,#818cf8)}
.ai-feat-icon{width:44px;height:44px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:1.15rem;flex-shrink:0}
.ai-feat-body{display:flex;flex-direction:column;gap:3px;min-width:0}
.ai-feat-name{font-weight:600;font-size:.98rem}
.ai-feat-desc{font-size:.8rem;color:var(--text-secondary,#94a3b8);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ai-feat-cat{font-size:.72rem;color:#818cf8;font-weight:600;letter-spacing:.02em}
.ai-feat-verified{display:inline-flex;align-items:center;gap:5px;font-size:.7rem;color:var(--text-muted,#8e8e9c)}
.ai-feat-verified i{font-size:.62rem;opacity:.85}
html.light .ai-feat-verified{color:#71717a}
.ai-feat-arrow{margin-left:auto;color:var(--text-secondary,#94a3b8);font-size:.8rem;flex-shrink:0;margin-top:4px}
.ai-detail-hero{display:flex;align-items:center;gap:20px;padding:32px;border-radius:18px;background:var(--bg-card,rgba(255,255,255,.03));border:1px solid var(--border-color,rgba(255,255,255,.08));margin:24px 0}
.ai-detail-icon{width:72px;height:72px;border-radius:18px;display:flex;align-items:center;justify-content:center;font-size:1.9rem;flex-shrink:0}
.ai-detail-info h1{font-size:1.7rem;margin:0 0 4px}
.ai-detail-company{color:var(--text-secondary,#94a3b8);font-size:.95rem;margin-bottom:10px}
.ai-verified{display:flex;align-items:center;gap:6px;color:var(--text-muted,#8e8e9c);font-size:.8rem;margin-top:8px}
.ai-verified i{font-size:.72rem;opacity:.85}
html.light .ai-verified{color:#71717a}
.ai-detail-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:6px}
.ai-visit-btn{display:inline-flex;align-items:center;gap:8px;padding:10px 20px;border-radius:10px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-weight:600;text-decoration:none;transition:opacity .2s}
.ai-visit-btn:hover{opacity:.9}
.ai-fav-btn{display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:10px;border:1px solid var(--border-color,rgba(255,255,255,.15));background:transparent;color:inherit;cursor:pointer;font-size:.9rem}
.ai-fav-btn.active{border-color:#f59e0b;color:#f59e0b}
@media(max-width:640px){.ai-detail-hero{flex-direction:column;text-align:center;align-items:center}.ai-detail-actions{justify-content:center}}

/* ===== UX Polish: homepage AI quick search, card fav/CTA, empty states ===== */
.ai-quick-search{position:relative;max-width:640px;margin:22px auto 0;display:flex;align-items:center;}
.ai-quick-search .ai-qs-icon{position:absolute;left:18px;color:var(--text-tertiary,#8b93a7);pointer-events:none;font-size:.95rem;}
.ai-quick-search input{width:100%;padding:15px 96px 15px 48px;border-radius:14px;border:1px solid var(--border,#2a3040);background:var(--bg-card,rgba(255,255,255,.04));color:var(--text-primary,#fff);font-size:1rem;outline:none;transition:border-color .2s,box-shadow .2s;}
.ai-quick-search input:focus{border-color:var(--accent-1,#6c5ce7);box-shadow:0 0 0 3px rgba(108,92,231,.18);}
.ai-quick-search input::placeholder{color:var(--text-tertiary,#8b93a7);}
.ai-qs-kbd{position:absolute;right:12px;border:1px solid var(--border,#2a3040);background:transparent;color:var(--text-tertiary,#8b93a7);border-radius:8px;padding:5px 10px;font-size:.78rem;font-weight:600;cursor:pointer;transition:color .2s,border-color .2s;}
.ai-qs-kbd:hover{color:var(--text-primary,#fff);border-color:var(--text-tertiary,#8b93a7);}
.ai-qs-results{max-width:760px;margin:18px auto 0;display:grid;gap:8px;}
.ai-qs-count{font-size:.85rem;color:var(--text-tertiary,#8b93a7);padding:0 4px 4px;}
.ai-qs-count a{color:var(--accent-1,#6c5ce7);text-decoration:none;font-weight:600;}
.ai-qs-card{display:flex;align-items:center;gap:14px;padding:12px 16px;border-radius:12px;border:1px solid var(--border,#2a3040);background:var(--bg-card,rgba(255,255,255,.03));text-decoration:none;color:inherit;transition:border-color .15s,transform .15s,background .15s;}
.ai-qs-card:hover{border-color:var(--accent-1,#6c5ce7);transform:translateY(-1px);background:var(--bg-card-hover,rgba(255,255,255,.05));}
.ai-qs-ic{flex:0 0 38px;height:38px;display:flex;align-items:center;justify-content:center;border-radius:10px;font-size:1rem;}
.ai-qs-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;}
.ai-qs-name{font-weight:600;font-size:.95rem;}
.ai-qs-desc{font-size:.8rem;color:var(--text-tertiary,#8b93a7);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ai-qs-meta{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex-shrink:0;}
.ai-qs-price{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--accent-2,#00d2ff);}
.ai-qs-cat{font-size:.7rem;color:var(--text-tertiary,#8b93a7);}
.ai-qs-zero{max-width:560px;margin:26px auto;text-align:center;padding:36px 24px;border:1px dashed var(--border,#2a3040);border-radius:16px;}
.ai-qs-zero-icon{font-size:2rem;color:var(--text-tertiary,#8b93a7);margin-bottom:12px;}
.ai-qs-zero h3{margin:0 0 6px;font-size:1.1rem;}
.ai-qs-zero p{color:var(--text-tertiary,#8b93a7);margin:0 0 18px;font-size:.92rem;}
/* AI card favorite star + Open Tool CTA */
.tool-card-directory{position:relative;}
.ai-card-fav{position:absolute;top:10px;right:10px;z-index:2;width:34px;height:34px;border-radius:9px;border:1px solid var(--border,#2a3040);background:var(--bg-card,rgba(255,255,255,.05));color:var(--text-tertiary,#8b93a7);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:.85rem;transition:color .15s,border-color .15s,transform .15s,background .15s;}
.ai-card-fav:hover{color:#fbbf24;border-color:#fbbf24;transform:scale(1.08);}
.ai-card-fav[aria-pressed="true"]{color:#fbbf24;border-color:rgba(251,191,36,.5);background:rgba(251,191,36,.08);}
.ai-card-fav .fas{display:none;}
.ai-card-fav[aria-pressed="true"] .fas{display:inline;}
.ai-card-fav[aria-pressed="true"] .far{display:none;}
.tool-open-cta{font-size:.78rem;font-weight:600;color:var(--accent-1,#6c5ce7);display:inline-flex;align-items:center;gap:6px;transition:gap .15s;}
.tool-card-directory:hover .tool-open-cta{gap:10px;}
/* Favorites / recents tasteful empty state */
.dyn-empty{display:flex;align-items:center;justify-content:center;gap:10px;padding:18px;color:var(--text-tertiary,#8b93a7);font-size:.9rem;border:1px dashed var(--border,#2a3040);border-radius:12px;grid-column:1/-1;}
@media (max-width:640px){
  .ai-quick-search input{padding-right:48px;}
  .ai-qs-kbd{display:none;}
  .ai-qs-meta{display:none;}
}
@media (prefers-reduced-motion:reduce){.ai-qs-card,.ai-card-fav,.tool-open-cta{transition:none;}}
@media (hover: none) and (pointer: coarse) {
  .ai-card-fav { width: 42px; height: 42px; top: 8px; right: 8px; font-size: 1rem; }
  .category-pill, .filter-tab { min-height: 44px; }
}

/* ===== Trust indicator ===== */
.trust-line{text-align:center;color:var(--text-muted,#8b93a7);font-size:.85rem;margin:8px auto 0;display:flex;align-items:center;justify-content:center;gap:8px;}
.trust-line i{color:#10b981;}
