:root {
  --bg: #f7f8fc;
  --surface: rgba(255,255,255,.88);
  --surface-solid: #ffffff;
  --text: #17172a;
  --muted: #6f7187;
  --border: rgba(32, 32, 64, .09);
  --primary: #6d5dfc;
  --primary-dark: #5140e7;
  --secondary: #8f6cff;
  --shadow: 0 18px 50px rgba(49, 41, 112, .12);
  --radius: 22px;
}

body.dark {
  --bg: #0d0e19;
  --surface: rgba(24,25,42,.88);
  --surface-solid: #18192a;
  --text: #f4f5ff;
  --muted: #a7a9bb;
  --border: rgba(255,255,255,.09);
  --shadow: 0 18px 50px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background .25s ease, color .25s ease;
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.page-glow { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .2; pointer-events: none; z-index: -1; }
.page-glow-one { width: 420px; height: 420px; background: #735cff; top: -120px; right: -100px; }
.page-glow-two { width: 360px; height: 360px; background: #3adbd8; left: -180px; top: 520px; opacity: .12; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { height: 74px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--primary), #9a6cff); box-shadow: 0 10px 25px rgba(109,93,252,.3); }
.brand-text { font-size: 20px; letter-spacing: -.4px; }
.desktop-nav { display: flex; gap: 34px; color: var(--muted); font-size: 14px; font-weight: 600; }
.desktop-nav a:hover { color: var(--primary); }
.header-actions { display: flex; gap: 12px; align-items: center; }
.icon-button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.primary-small, .primary-button { color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 13px; font-weight: 700; box-shadow: 0 12px 25px rgba(109,93,252,.25); }
.primary-small { padding: 11px 18px; font-size: 14px; }
.primary-button { padding: 15px 24px; }

.hero-section { padding: 96px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 48px; }
.eyebrow, .section-kicker { color: var(--primary); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; background: rgba(109,93,252,.09); border-radius: 999px; }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px rgba(109,93,252,.12); }
.hero-copy h1 { margin: 24px 0 22px; font-size: clamp(48px, 6vw, 78px); line-height: 1.02; letter-spacing: -4px; }
.hero-copy h1 span { background: linear-gradient(100deg, var(--primary), #9a5cff, #33b8d8); -webkit-background-clip: text; color: transparent; }
.hero-copy > p { color: var(--muted); font-size: 18px; line-height: 1.8; max-width: 620px; }
.search-shell { margin-top: 30px; padding: 8px; display: flex; gap: 8px; align-items: center; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.search-icon { padding-left: 12px; color: var(--muted); font-size: 24px; }
.search-shell input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); padding: 12px 4px; }
.search-shell button { border: 0; color: #fff; cursor: pointer; padding: 13px 19px; border-radius: 12px; font-weight: 700; background: var(--primary); }
.popular-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 17px; color: var(--muted); font-size: 13px; }
.popular-keys button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.popular-keys button:hover { color: var(--primary); }
.hero-stats { display: flex; gap: 46px; margin-top: 40px; }
.hero-stats div { display: flex; flex-direction: column; gap: 4px; }
.hero-stats strong { font-size: 25px; }
.hero-stats span { color: var(--muted); font-size: 13px; }

.hero-visual { min-height: 520px; position: relative; display: grid; place-items: center; }
.ai-core { width: 220px; height: 220px; position: relative; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9f8cff, #6552f6 58%, #3c2fb6); box-shadow: 0 35px 90px rgba(89,67,226,.38), inset 0 0 55px rgba(255,255,255,.22); }
.core-ring { position: absolute; inset: -20px; border-radius: 50%; border: 1px solid rgba(109,93,252,.28); box-shadow: 0 0 0 28px rgba(109,93,252,.05); }
.core-label { color: #fff; font-size: 72px; font-weight: 800; letter-spacing: -6px; }
.orbit { position: absolute; border: 1px dashed rgba(109,93,252,.22); border-radius: 50%; }
.orbit-one { width: 390px; height: 390px; }
.orbit-two { width: 510px; height: 510px; }
.floating-card { position: absolute; display: flex; align-items: center; gap: 12px; min-width: 175px; padding: 14px 16px; border-radius: 17px; background: var(--surface); backdrop-filter: blur(14px); border: 1px solid var(--border); box-shadow: var(--shadow); animation: float 4.4s ease-in-out infinite; }
.floating-card strong, .floating-card small { display: block; }
.floating-card strong { font-size: 14px; }
.floating-card small { color: var(--muted); margin-top: 4px; font-size: 11px; }
.float-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #fff; font-weight: 800; }
.purple { background: #765ffc; }.pink { background: #e766b6; }.cyan { background: #35b9d0; }.orange { background: #ff9260; }
.card-one { top: 42px; left: 12px; }.card-two { top: 110px; right: -2px; animation-delay: .7s; }.card-three { bottom: 86px; left: -4px; animation-delay: 1.4s; }.card-four { bottom: 36px; right: 30px; animation-delay: 2.1s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.logo-strip { padding: 24px 0; border-block: 1px solid var(--border); background: var(--surface); }
.logo-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); font-weight: 800; opacity: .74; }
.section { padding: 100px 0; }
.section-heading.center { text-align: center; max-width: 700px; margin: 0 auto 46px; }
.section-heading h2 { margin: 12px 0 14px; font-size: clamp(34px, 4vw, 48px); letter-spacing: -1.7px; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.8; }
.section-heading.split { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.category-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.category-card { padding: 24px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 35px rgba(47,41,93,.06); cursor: pointer; transition: .22s ease; }
.category-card:hover { transform: translateY(-5px); border-color: rgba(109,93,252,.32); box-shadow: var(--shadow); }
.category-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; margin-bottom: 18px; font-size: 22px; background: rgba(109,93,252,.1); }
.category-card h3 { margin: 0 0 8px; font-size: 17px; }
.category-card p { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.6; }
.category-card .count { margin-top: 18px; color: var(--primary); font-weight: 700; font-size: 12px; }

.tools-section { background: color-mix(in srgb, var(--surface-solid) 52%, transparent); }
.tool-controls { display: flex; gap: 10px; }
.mini-search { display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-solid); }
.mini-search input { border: 0; outline: 0; background: transparent; color: var(--text); width: 210px; }
.tool-controls select { color: var(--text); background: var(--surface-solid); border: 1px solid var(--border); border-radius: 13px; padding: 12px 15px; outline: 0; }
.active-filter { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.tools-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.tool-card { position: relative; display: flex; flex-direction: column; min-height: 250px; padding: 22px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 34px rgba(40,33,89,.06); transition: .22s ease; }
.tool-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.tool-head { display: flex; gap: 14px; align-items: center; }
.tool-logo { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; color: #fff; font-weight: 800; font-size: 18px; }
.tool-title h3 { margin: 0; font-size: 17px; }
.tool-title span { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.favorite { margin-left: auto; width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; }
.favorite.active { color: #ff5f75; background: rgba(255,95,117,.08); }
.tool-card p { color: var(--muted); line-height: 1.7; font-size: 13px; margin: 20px 0; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.tool-tags span { padding: 6px 9px; border-radius: 8px; color: var(--primary); background: rgba(109,93,252,.08); font-size: 11px; font-weight: 700; }
.tool-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.price { color: var(--muted); font-size: 12px; }
.visit { color: var(--primary); font-weight: 800; font-size: 13px; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state div { color: var(--text); font-size: 22px; font-weight: 800; }
.empty-state button { border: 0; background: var(--primary); color: #fff; padding: 12px 18px; border-radius: 12px; cursor: pointer; }

.featured-wrap { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr .85fr; align-items: center; gap: 60px; padding: 64px; border-radius: 32px; color: #fff; background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.18), transparent 30%), linear-gradient(135deg,#6551ef,#4631bf 70%,#2a227c); box-shadow: 0 28px 70px rgba(70,49,190,.3); }
.section-kicker.light { color: #dcd6ff; }
.featured-copy h2 { font-size: clamp(36px,5vw,54px); margin: 15px 0; letter-spacing: -2px; }
.featured-copy p { color: rgba(255,255,255,.76); line-height: 1.8; max-width: 560px; }
.white-button { display: inline-block; margin-top: 18px; padding: 14px 20px; color: #4b39ce; background: #fff; border-radius: 13px; font-weight: 800; }
.workflow-card { padding: 26px; border: 1px solid rgba(255,255,255,.19); border-radius: 24px; background: rgba(255,255,255,.11); backdrop-filter: blur(16px); }
.workflow-top { display: flex; justify-content: space-between; margin-bottom: 24px; font-weight: 800; }
.live-dot { color: #8ff0c7; font-size: 12px; }
.workflow-step { display: flex; gap: 15px; align-items: center; }
.workflow-step b { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: rgba(255,255,255,.13); }
.workflow-step small { display: block; color: rgba(255,255,255,.65); margin-top: 5px; }
.workflow-line { height: 24px; border-left: 1px dashed rgba(255,255,255,.28); margin-left: 20px; }
.submit-card { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 44px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); }
.submit-card h2 { margin: 12px 0; font-size: 34px; }
.submit-card p { color: var(--muted); margin: 0; }
footer { padding: 56px 0 24px; border-top: 1px solid var(--border); }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; }
.footer-brand { margin-bottom: 15px; }
.footer-grid p, .copyright { color: var(--muted); font-size: 13px; }
.footer-links { display: flex; gap: 26px; color: var(--muted); font-size: 13px; font-weight: 700; }
.copyright { margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--border); }

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy > p { margin-inline: auto; }
  .popular-keys, .hero-stats { justify-content: center; }
  .hero-visual { min-height: 500px; }
  .category-grid { grid-template-columns: repeat(2,1fr); }
  .tools-grid { grid-template-columns: repeat(2,1fr); }
  .section-heading.split { align-items: flex-start; flex-direction: column; }
  .featured-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1180px); }
  .site-header .primary-small { display: none; }
  .hero-section { padding-top: 62px; }
  .hero-copy h1 { font-size: 48px; letter-spacing: -2.5px; }
  .hero-copy > p { font-size: 16px; }
  .search-shell { flex-wrap: wrap; }
  .search-shell button { width: 100%; }
  .hero-stats { gap: 26px; }
  .hero-visual { min-height: 440px; transform: scale(.86); margin: -35px 0; }
  .category-grid, .tools-grid { grid-template-columns: 1fr; }
  .tool-controls { width: 100%; flex-direction: column; }
  .mini-search input { width: 100%; }
  .mini-search { height: 48px; }
  .tool-controls select { width: 100%; }
  .featured-wrap { padding: 38px 24px; }
  .submit-card { align-items: flex-start; flex-direction: column; padding: 30px 24px; }
  .submit-card h2 { font-size: 28px; }
  .footer-grid { flex-direction: column; }
  .footer-links { flex-wrap: wrap; }
  .logo-row { justify-content: center; }
}

/* Enhanced English directory components */
.compact-section { padding-top: 76px; }
.text-link { color: var(--primary); font-weight: 800; font-size: 14px; }
.featured-grid .tool-card { border-color: rgba(109,93,252,.2); }
.favorites-button { border: 1px solid var(--border); background: var(--surface); color: var(--text); min-width: 58px; height: 40px; border-radius: 12px; cursor: pointer; font-weight: 800; }
.favorites-button.active { background: rgba(109,93,252,.12); color: var(--primary); border-color: rgba(109,93,252,.35); }
.filter-bar { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 22px; gap: 16px; }
.clear-button { border: 0; background: transparent; color: var(--primary); font-weight: 800; cursor: pointer; }
.tool-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.tool-meta > span { padding: 5px 8px; background: color-mix(in srgb, var(--surface-solid) 72%, var(--primary) 6%); border: 1px solid var(--border); border-radius: 999px; }
.tool-meta .new-badge { background: rgba(109,93,252,.13); color: var(--primary); border-color: rgba(109,93,252,.22); }
.launch-list { display: grid; gap: 14px; }
.launch-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 17px; border-radius: 18px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); color: #fff; transition: transform .2s ease, background .2s ease; }
.launch-item:hover { transform: translateY(-2px); background: rgba(255,255,255,.18); }
.launch-item strong, .launch-item small { display: block; }
.launch-item small { opacity: .72; margin-top: 4px; }
.tool-logo.small { width: 42px; height: 42px; border-radius: 13px; }
.load-error { grid-column: 1 / -1; padding: 34px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); text-align: center; color: var(--muted); }
@media (max-width: 760px) { .favorites-button { min-width: 48px; } .filter-bar { align-items: flex-start; } }
