:root {
    --bg: #020617;
    --bg-soft: #071026;
    --surface: rgba(10, 18, 43, .76);
    --surface-solid: #0b1430;
    --surface-2: rgba(16, 27, 58, .72);
    --text: #f8fbff;
    --muted: #9aa8c7;
    --muted-2: #6e7d9d;
    --border: rgba(148, 163, 184, .14);
    --border-strong: rgba(99, 102, 241, .32);
    --cyan: #22d3ee;
    --blue: #2563eb;
    --indigo: #4f46e5;
    --purple: #8b5cf6;
    --pink: #e879f9;
    --green: #22c55e;
    --red: #ef4444;
    --amber: #f59e0b;
    --shadow: 0 22px 70px rgba(0, 0, 0, .34);
    --radius: 24px;
    --container: 1220px;
}

html[data-theme="light"] {
    --bg: #f7f9ff;
    --bg-soft: #eef3ff;
    --surface: rgba(255, 255, 255, .82);
    --surface-solid: #ffffff;
    --surface-2: rgba(242, 246, 255, .92);
    --text: #111827;
    --muted: #52617c;
    --muted-2: #7b879d;
    --border: rgba(15, 23, 42, .10);
    --border-strong: rgba(79, 70, 229, .23);
    --shadow: 0 20px 55px rgba(71, 85, 105, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 10% -10%, rgba(37, 99, 235, .18), transparent 34%),
        radial-gradient(circle at 92% 8%, rgba(217, 70, 239, .12), transparent 26%),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(34, 211, 238, .45); outline-offset: 3px; }
[hidden] { display: none !important; }

.container { width: min(calc(100% - 32px), var(--container)); margin: 0 auto; }
.narrow-container { width: min(calc(100% - 32px), 860px); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 999; transform: translateY(-150%); padding: 10px 14px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 800; }
.skip-link:focus { transform: translateY(0); }

.site-header {
    position: sticky; top: 0; z-index: 80;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(18px);
}
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand-logo { width: clamp(154px, 16vw, 210px); height: auto; border-radius: 12px; }
.desktop-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.desktop-nav a { padding: 10px 13px; border-radius: 12px; color: var(--muted); font-weight: 750; font-size: 14px; transition: .2s ease; }
.desktop-nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button {
    width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 13px;
    background: var(--surface); color: var(--text); display: inline-grid; place-items: center;
    cursor: pointer; font-size: 20px; transition: .2s ease;
}
.icon-button:hover { transform: translateY(-1px); border-color: var(--border-strong); background: var(--surface-2); }
.mobile-menu-button { display: none; }
.mobile-nav { border-top: 1px solid var(--border); padding: 8px 16px 14px; background: var(--bg); }
.mobile-nav a { display: block; max-width: var(--container); margin: 0 auto; padding: 12px 10px; color: var(--muted); font-weight: 750; }

.hero { position: relative; overflow: hidden; padding: clamp(68px, 8vw, 116px) 0 54px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 54px; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow, .section-kicker { color: #8be9ff; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
html[data-theme="light"] .eyebrow, html[data-theme="light"] .section-kicker { color: #0369a1; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid rgba(34, 211, 238, .18); border-radius: 999px; background: rgba(34, 211, 238, .06); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(34,197,94,.10); }
.hero h1 { font-size: clamp(42px, 6vw, 78px); line-height: .99; letter-spacing: -.055em; margin: 22px 0 22px; max-width: 900px; }
.hero h1::after { content: ""; display: inline-block; width: .22em; height: .22em; margin-left: .12em; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--pink)); vertical-align: .1em; box-shadow: 0 0 30px rgba(168,85,247,.45); }
.hero p { color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.75; max-width: 760px; margin: 0 0 28px; }
.hero-search, .toolbar-search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-strong); background: var(--surface); box-shadow: var(--shadow); }
.hero-search { max-width: 720px; border-radius: 18px; padding: 8px 10px 8px 18px; }
.hero-search input, .toolbar-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); min-width: 0; }
.hero-search input { height: 48px; font-size: 16px; }
.hero-search input::placeholder, .toolbar-search input::placeholder { color: var(--muted-2); }
.hero-search kbd { color: var(--muted-2); border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 5px 8px; font-size: 12px; }
.search-icon { color: var(--cyan); font-size: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 380px; }
.logo-orbit { width: min(34vw, 390px); aspect-ratio: 1; border-radius: 32%; position: relative; display: grid; place-items: center; }
.logo-orbit::before { content: ""; position: absolute; inset: -10%; border-radius: 34%; background: conic-gradient(from 180deg, rgba(34,211,238,.0), rgba(34,211,238,.35), rgba(124,58,237,.38), rgba(236,72,153,.35), rgba(34,211,238,.0)); filter: blur(22px); animation: spin 14s linear infinite; }
.logo-orbit img { position: relative; z-index: 2; border-radius: 27%; filter: drop-shadow(0 28px 60px rgba(59,130,246,.28)); }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; opacity: .38; }
.hero-glow-one { width: 420px; height: 420px; background: #0ea5e9; right: 14%; top: 3%; }
.hero-glow-two { width: 340px; height: 340px; background: #c026d3; right: -4%; top: 24%; opacity: .22; }
@keyframes spin { to { transform: rotate(360deg); } }

.stats-section { padding: 0 0 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { border: 1px solid var(--border); background: var(--surface); border-radius: 18px; padding: 18px 20px; box-shadow: 0 14px 40px rgba(0,0,0,.10); }
.stat-label { display: block; color: var(--muted-2); text-transform: uppercase; letter-spacing: .11em; font-size: 11px; font-weight: 850; }
.stat-card strong { display: block; font-size: 32px; margin: 5px 0 2px; letter-spacing: -.04em; }
.stat-card small { color: var(--muted); }

.section { padding: 70px 0; }
.section-heading { margin-bottom: 28px; }
.section-heading h2, .info-card h2 { margin: 8px 0 10px; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.035em; }
.section-heading p, .info-card p { margin: 0; color: var(--muted); line-height: 1.7; max-width: 740px; }
.split-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.top-badge { align-self: center; border: 1px solid rgba(232,121,249,.25); color: #f0abfc; background: rgba(192,38,211,.09); padding: 9px 13px; border-radius: 999px; font-weight: 850; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.centered { text-align: center; }
.centered p { margin-left: auto; margin-right: auto; }

.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.directory-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.site-card {
    position: relative; min-width: 0; display: flex; flex-direction: column; gap: 18px;
    border: 1px solid var(--border); border-radius: 22px; padding: 20px;
    background: linear-gradient(145deg, var(--surface), var(--surface-2));
    box-shadow: 0 16px 44px rgba(0,0,0,.12); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
    overflow: hidden;
}
.site-card::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, rgba(34,211,238,.45), rgba(232,121,249,.38), transparent); opacity: .45; }
.site-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.featured-card { min-height: 314px; border-color: rgba(99,102,241,.28); background: linear-gradient(145deg, rgba(20,35,78,.86), rgba(31,14,61,.68)); }
html[data-theme="light"] .featured-card { background: linear-gradient(145deg, rgba(238,246,255,.96), rgba(250,238,255,.94)); }
.featured-card:nth-child(1) { grid-column: span 2; }
.featured-card:nth-child(1) h3 { font-size: 30px; }
.rank-pill { position: absolute; top: 16px; left: 16px; z-index: 3; min-width: 42px; height: 32px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; color: #fff; background: linear-gradient(135deg, var(--blue), var(--purple)); box-shadow: 0 8px 24px rgba(79,70,229,.35); }
.featured-ribbon { position: absolute; top: 16px; right: 62px; color: #d8b4fe; background: rgba(147,51,234,.12); border: 1px solid rgba(216,180,254,.18); border-radius: 999px; padding: 6px 9px; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.featured-card .card-head { padding-top: 36px; }
.favicon-shell { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; position: relative; overflow: hidden; flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface-solid); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.directory-grid .favicon-shell { width: 54px; height: 54px; }
.favicon-shell img { position: relative; z-index: 2; width: 42px; height: 42px; object-fit: contain; }
.directory-grid .favicon-shell img { width: 38px; height: 38px; }
.favicon-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; color: #7dd3fc; background: linear-gradient(145deg, rgba(37,99,235,.15), rgba(168,85,247,.12)); }
.bookmark-button { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-solid); color: var(--muted); cursor: pointer; font-size: 22px; transition: .2s ease; }
.bookmark-button:hover, .bookmark-button.is-bookmarked { color: #fbbf24; border-color: rgba(251,191,36,.28); transform: scale(1.04); }
.card-copy { min-width: 0; flex: 1; }
.card-copy h3 { margin: 0; font-size: 21px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.domain-text { margin: 5px 0 0; color: #7dd3fc; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-theme="light"] .domain-text { color: #0369a1; }
.badge-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.status-badge, .trust-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 800; border: 1px solid var(--border); background: var(--surface-solid); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(245,158,11,.10); }
.status-online { color: #86efac; border-color: rgba(34,197,94,.22); }
.status-online .status-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(34,197,94,.10); }
.status-offline { color: #fca5a5; border-color: rgba(239,68,68,.22); }
.status-offline .status-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(239,68,68,.10); }
.status-unknown, .status-checking { color: #fcd34d; border-color: rgba(245,158,11,.22); }
.is-trusted { color: #86efac; border-color: rgba(34,197,94,.22); }
.is-unverified { color: #fcd34d; border-color: rgba(245,158,11,.18); }
html[data-theme="light"] .status-online, html[data-theme="light"] .is-trusted { color: #15803d; }
html[data-theme="light"] .status-offline { color: #b91c1c; }
html[data-theme="light"] .status-unknown, html[data-theme="light"] .status-checking, html[data-theme="light"] .is-unverified { color: #a16207; }
.card-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: auto; }
.button { min-height: 42px; border-radius: 12px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; font-weight: 850; font-size: 13px; cursor: pointer; transition: .2s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(135deg, #0ea5e9, #4f46e5 52%, #c026d3); box-shadow: 0 11px 26px rgba(79,70,229,.22); }
.button-primary:hover { filter: brightness(1.08); box-shadow: 0 13px 30px rgba(79,70,229,.32); }
.button-secondary, .button-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.button-secondary:hover, .button-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }

.directory-section { padding-top: 38px; }
.directory-toolbar { position: sticky; top: 88px; z-index: 30; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 12px; margin-bottom: 22px; border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px); border-radius: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.12); }
.toolbar-search { border-radius: 12px; box-shadow: none; padding: 0 12px; }
.toolbar-search input { height: 42px; }
.filter-scroll { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-button { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 11px; min-height: 42px; padding: 0 12px; font-weight: 800; font-size: 12px; cursor: pointer; white-space: nowrap; }
.filter-button:hover, .filter-button.is-active { color: #fff; border-color: transparent; background: linear-gradient(135deg, rgba(14,165,233,.92), rgba(79,70,229,.92)); }
html[data-theme="light"] .filter-button.is-active { color: #fff; }
.sort-control select { height: 42px; min-width: 145px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text); padding: 0 34px 0 11px; outline: none; }
.recheck-button { width: 42px; height: 42px; }
.empty-state { text-align: center; padding: 54px 20px; border: 1px dashed var(--border-strong); border-radius: 20px; background: var(--surface); }
.empty-state .empty-icon { font-size: 34px; color: var(--muted-2); }
.empty-state h3 { margin: 10px 0 6px; }
.empty-state p { margin: 0; color: var(--muted); }

.info-section { padding-top: 34px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.info-card { border: 1px solid var(--border); background: var(--surface); border-radius: 24px; padding: 34px; box-shadow: 0 16px 48px rgba(0,0,0,.10); }
.disclaimer-card { background: linear-gradient(145deg, rgba(17,24,39,.76), rgba(61,22,74,.44)); }
html[data-theme="light"] .disclaimer-card { background: linear-gradient(145deg, #fff, #fbf1ff); }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 0 18px; }
.faq-list summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 850; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 0; top: 16px; font-size: 22px; color: var(--cyan); }
.faq-list details[open] summary::after { content: "–"; }
.faq-list p { margin: 0; padding: 0 0 18px; color: var(--muted); line-height: 1.7; }

.site-footer { margin-top: 30px; border-top: 1px solid var(--border); background: rgba(2,6,23,.44); padding: 52px 0 24px; }
html[data-theme="light"] .site-footer { background: rgba(238,243,255,.74); }
.footer-grid { display: grid; grid-template-columns: 1.5fr .7fr .7fr; gap: 40px; }
.footer-logo { width: 210px; height: auto; border-radius: 12px; }
.footer-brand p { color: var(--muted); line-height: 1.7; max-width: 520px; }
.footer-grid h2 { font-size: 14px; margin: 0 0 12px; }
.footer-grid > div:not(.footer-brand) { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-grid a, .footer-button { color: var(--muted); font-size: 14px; border: 0; background: none; padding: 0; cursor: pointer; }
.footer-grid a:hover, .footer-button:hover { color: var(--text); }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; color: var(--muted-2); font-size: 12px; }
.footer-bottom p { margin: 0; }

.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 120; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; min-width: min(360px, calc(100vw - 32px)); max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 14px; background: #0f172a; border: 1px solid rgba(125,211,252,.22); color: #fff; font-weight: 800; font-size: 13px; text-align: center; box-shadow: 0 18px 60px rgba(0,0,0,.35); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1120px) {
    .directory-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .directory-toolbar { grid-template-columns: 1fr auto auto; }
    .filter-scroll { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 900px) {
    .desktop-nav { display: none; }
    .mobile-menu-button { display: inline-grid; }
    .hero-grid { grid-template-columns: 1fr; gap: 22px; }
    .hero-visual { min-height: auto; padding-top: 18px; }
    .logo-orbit { width: min(62vw, 340px); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .featured-card:nth-child(1) { grid-column: span 2; }
    .directory-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .info-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .container, .narrow-container { width: min(calc(100% - 24px), var(--container)); }
    .header-inner { min-height: 66px; }
    .brand-logo { width: 150px; }
    .hero { padding-top: 54px; }
    .hero h1 { font-size: clamp(40px, 13vw, 58px); }
    .hero-search kbd { display: none; }
    .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .stats-grid { gap: 9px; }
    .stat-card { padding: 15px; }
    .stat-card strong { font-size: 27px; }
    .section { padding: 52px 0; }
    .split-heading { align-items: flex-start; flex-direction: column; }
    .featured-grid, .directory-grid { grid-template-columns: 1fr; }
    .featured-card:nth-child(1) { grid-column: span 1; }
    .featured-card:nth-child(1) h3 { font-size: 24px; }
    .directory-toolbar { top: 76px; grid-template-columns: 1fr auto; padding: 9px; }
    .toolbar-search { grid-column: 1 / -1; }
    .filter-scroll { grid-column: 1 / -1; grid-row: auto; }
    .sort-control select { width: 100%; min-width: 0; }
    .site-card { padding: 17px; }
    .info-card { padding: 24px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
    .footer-bottom { flex-direction: column; }
}
@media (max-width: 390px) {
    .hero-actions { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card small { font-size: 10px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
