:root {
    --bg: #09070f;
    --panel: #121019;
    --panel-2: #181522;
    --line: rgb(255 255 255 / 9%);
    --text: #f4f2ff;
    --muted: #a09bb8;
    --accent: #b48bff;
    --accent-2: #6d4cf0;
    --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code { background: rgb(255 255 255 / 8%); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }

.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

/* ---------- top bar ---------- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgb(9 7 15 / 74%); border-bottom: 1px solid var(--line); }
.nav-inner { width: min(1120px, calc(100% - 32px)); margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.brand small { font-weight: 500; color: var(--muted); font-size: 0.8rem; margin-left: 2px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a { color: #cfcbe3; font-size: 0.92rem; padding: 8px 12px; border-radius: 10px; }
.nav-links a:hover { color: #fff; background: rgb(255 255 255 / 6%); text-decoration: none; }
.nav-links a.current { color: #fff; background: rgb(255 255 255 / 8%); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border-radius: 12px; font: inherit; font-size: 0.93rem; font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-light { background: #fff; color: #0a0a0a; }
.btn-light:hover { box-shadow: 0 0 26px rgb(180 139 255 / 45%); }
.btn-ghost { background: rgb(255 255 255 / 5%); color: #fff; border-color: rgb(255 255 255 / 16%); }
.btn-ghost:hover { background: rgb(255 255 255 / 10%); }
.btn-lg { padding: 13px 24px; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: 7px 14px; font-size: 0.83rem; border-radius: 10px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 34px; text-align: center; }
.glow { position: absolute; border-radius: 50%; filter: blur(110px); pointer-events: none; }
.glow-a { width: 520px; height: 520px; left: calc(50% - 600px); top: -140px; background: #5a35e8; opacity: 0.3; }
.glow-b { width: 460px; height: 460px; left: calc(50% + 140px); top: -80px; background: #9b45d8; opacity: 0.22; }
.hero-inner { position: relative; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 18px; }
.grad { background: linear-gradient(90deg, #fff, #c9a8ff 60%, #8f6bff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lead { max-width: 640px; margin: 0 auto 26px; color: #cbc6e2; font-size: clamp(1rem, 2vw, 1.15rem); }
.hero-search { display: flex; gap: 10px; max-width: 620px; margin: 0 auto; }
.hero-search input { flex: 1; min-width: 0; }
.stats { margin-top: 20px; color: var(--muted); font-size: 0.9rem; }
.stats strong { color: #e6defa; }

/* ---------- inputs and filters ---------- */
input[type="search"], select {
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    font: inherit;
    outline: none;
}
input[type="search"]:focus, select:focus { border-color: rgb(180 139 255 / 60%); box-shadow: 0 0 0 3px rgb(150 100 255 / 18%); }
select { cursor: pointer; }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin-top: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { font: inherit; font-size: 0.88rem; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: #cfcbe3; cursor: pointer; transition: background .15s, border-color .15s; }
.filter b { font-weight: 600; color: var(--muted); margin-left: 4px; }
.filter:hover { border-color: rgb(180 139 255 / 40%); }
.filter.active { background: rgb(109 76 240 / 28%); border-color: rgb(180 139 255 / 55%); color: #fff; }
.filter.active b { color: #dccbff; }
.tag-row { margin-top: 12px; }
.tag-row .filter { font-size: 0.8rem; padding: 6px 12px; text-transform: capitalize; }
.muted { color: var(--muted); }
#count { margin: 18px 0 0; font-size: 0.9rem; }

/* ---------- gallery ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 14px; }
.theme { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.theme:hover { transform: translateY(-3px); border-color: rgb(180 139 255 / 40%); box-shadow: 0 14px 36px rgb(80 50 190 / 25%); }
.pic { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1a1233, #0c0a1a); overflow: hidden; }
.pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.theme:hover .pic img { transform: scale(1.04); }
.pic.empty::after { content: "No preview"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 0.85rem; }
.kind { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: rgb(10 8 22 / 80%); color: #dccbff; border: 1px solid rgb(180 139 255 / 35%); }
.body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.body h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.body h3 a { color: var(--text); }
.by { margin: 0; font-size: 0.82rem; color: var(--muted); }
.desc { margin: 0; color: #b9b3d0; font-size: 0.88rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tags span { padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; background: rgb(180 139 255 / 12%); border: 1px solid rgb(180 139 255 / 22%); color: #dccbff; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.empty-msg { text-align: center; padding: 40px 0; }
.more-wrap { text-align: center; margin-top: 24px; }

/* ---------- sections ---------- */
section.block { padding: 56px 0 8px; }
.section-title { font-size: clamp(1.5rem, 3.2vw, 2rem); letter-spacing: -0.02em; margin: 0 0 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0 0 12px; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(180deg, var(--accent-2), #4a31b8); box-shadow: 0 0 18px rgb(150 100 255 / 45%); }
.steps h3 { margin: 0 0 2px; font-size: 1rem; }
.steps p { margin: 0; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.note { padding: 14px 16px; border-radius: 12px; background: rgb(250 204 21 / 8%); border: 1px solid rgb(250 204 21 / 28%); color: #f3e3a3; font-size: 0.9rem; }

.footer { margin-top: 64px; border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--muted); font-size: 0.85rem; text-align: center; }
.footer p { margin: 4px 0; }

/* ---------- theme page ---------- */
.crumbs { padding: 28px 0 8px; font-size: 0.9rem; }
.detail { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; padding-top: 8px; }
.detail-pic { border-radius: 18px; padding: 6px; background: linear-gradient(160deg, rgb(180 139 255 / 35%), rgb(255 255 255 / 4%) 40%, rgb(109 76 240 / 30%)); box-shadow: 0 30px 80px rgb(70 40 170 / 30%); }
.detail-pic img { width: 100%; border-radius: 13px; background: #0c0a1a; }
.detail-pic.empty { min-height: 260px; display: grid; place-items: center; color: var(--muted); }
.detail h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; }
.detail .by { font-size: 0.95rem; margin-bottom: 14px; }
.detail .desc-full { color: #cbc6e2; margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.fact b { display: block; font-size: 1.15rem; }
.fact span { color: var(--muted); font-size: 0.78rem; }
.detail .actions { margin-top: 8px; }
.related { padding-top: 40px; }

@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } .detail { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
    .grid, .two { grid-template-columns: 1fr; }
    .hero { padding-top: 56px; }
    .glow-a { left: -220px; }
    .glow-b { left: auto; right: -220px; }
    .nav-links a { padding: 8px 8px; }
    .brand small { display: none; }
    .hero-search { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- safety badges ---------- */
.chk { display: inline-block; align-self: flex-start; margin-top: 8px; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; cursor: help; }
.chk-ok { background: rgb(74 222 128 / 12%); border: 1px solid rgb(74 222 128 / 35%); color: #86efac; }
.chk-review { background: rgb(250 204 21 / 10%); border: 1px solid rgb(250 204 21 / 35%); color: #fde68a; }
.chk-broken { background: rgb(251 146 60 / 10%); border: 1px solid rgb(251 146 60 / 35%); color: #fdba74; }
.filter-ok.active { background: rgb(74 222 128 / 16%); border-color: rgb(74 222 128 / 50%); color: #bbf7d0; }
.filter-ok.active b { color: #86efac; }

.chk-card h3 { margin-bottom: 6px; }
.chk-card-ok { border-color: rgb(74 222 128 / 30%); }
.chk-card-ok h3 { color: #86efac; }
.chk-card-review { border-color: rgb(250 204 21 / 30%); }
.chk-card-review h3 { color: #fde68a; }
.chk-card-broken { border-color: rgb(251 146 60 / 30%); }
.chk-card-broken h3 { color: #fdba74; }
.chk-notes { margin: 0 0 12px; padding-left: 18px; color: #cbc6e2; font-size: 0.9rem; }
.chk-notes li { margin: 3px 0; overflow-wrap: anywhere; }
.chk-fine { font-size: 0.8rem; color: var(--muted); }

/* ---------- click-to-enlarge preview ---------- */
.detail-pic img.zoomable { cursor: zoom-in; }
.detail-pic img.zoomable:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.zoom-hint { margin: 8px 0 2px; text-align: center; font-size: 0.8rem; color: var(--muted); }
.no-scroll { overflow: hidden; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgb(5 4 12 / 94%); animation: lb-in .18s ease; }
.lightbox-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: zoom-out; user-select: none; -webkit-user-select: none; }
.lightbox-stage img { max-width: 96vw; max-height: 86vh; width: auto; height: auto; border-radius: 12px; box-shadow: 0 30px 90px rgb(70 40 170 / 45%); transform-origin: center center; cursor: zoom-in; -webkit-user-drag: none; }
.lightbox-stage.zoomed img { cursor: grab; }
.lightbox-stage.zoomed img:active { cursor: grabbing; }
.lightbox-bar { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 14px; background: rgb(20 18 32 / 88%); border: 1px solid rgb(255 255 255 / 14%); backdrop-filter: blur(8px); }
.lightbox-bar button { min-width: 38px; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: rgb(255 255 255 / 8%); color: #fff; font: inherit; font-size: 1.1rem; cursor: pointer; }
.lightbox-bar button:hover { background: rgb(255 255 255 / 18%); }
.lightbox-zoom { min-width: 52px; text-align: center; font-size: 0.85rem; color: #cfcbe3; }
.lightbox-close { position: absolute; top: 16px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgb(255 255 255 / 25%); background: rgb(255 255 255 / 8%); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lightbox-close:hover { background: rgb(255 255 255 / 16%); }
.lightbox-hint { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); margin: 0; padding: 6px 14px; border-radius: 999px; background: rgb(255 255 255 / 7%); color: #cfcbe3; font-size: 0.82rem; pointer-events: none; white-space: nowrap; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 620px) { .lightbox-hint { display: none; } }

/* ---------- like button ---------- */
.like { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgb(255 255 255 / 5%); color: #cfcbe3; font: inherit; font-size: 0.83rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.like:hover { border-color: rgb(244 114 182 / 50%); color: #fbcfe8; }
.like:active { transform: scale(0.95); }
.like-heart svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; transition: fill .15s, transform .2s; }
.like.on { background: rgb(244 114 182 / 14%); border-color: rgb(244 114 182 / 55%); color: #fbcfe8; }
.like.on .like-heart svg { fill: #f472b6; stroke: #f472b6; transform: scale(1.1); }
.like-lg { padding: 9px 16px; font-size: 0.93rem; margin-left: 0; }
.like:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the Themes / Snippets buttons in the top corner */
.nav-links a#navThemes, .nav-links a#navSnippets { border: 1px solid var(--line); }
.nav-links a#navThemes.current, .nav-links a#navSnippets.current { background: rgb(109 76 240 / 28%); border-color: rgb(180 139 255 / 55%); }

.how-sub { margin: 26px 0 12px; font-size: 1.15rem; }


/* ---------- speed badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.chk-light { background: rgb(96 165 250 / 12%); border: 1px solid rgb(96 165 250 / 35%); color: #93c5fd; }
.chk-heavy { background: rgb(248 113 113 / 12%); border: 1px solid rgb(248 113 113 / 40%); color: #fca5a5; }
.filter-light.active { background: rgb(96 165 250 / 16%); border-color: rgb(96 165 250 / 50%); color: #bfdbfe; }
.filter-light.active b { color: #93c5fd; }

/* the pinned, official Vantacord theme */
.theme.pinned { border-color: rgb(180 139 255 / 70%); box-shadow: 0 0 0 1px rgb(180 139 255 / 35%), 0 10px 40px rgb(110 60 230 / 30%); }
.kind.madeby { background: linear-gradient(135deg, #7b55f2, #b48bff); color: #fff; border-color: transparent; }
.kind.inline { position: static; display: inline-block; margin-bottom: 10px; }

.copies { font-size: 0.74rem; color: var(--muted); align-self: center; margin-left: 4px; }
.copies:empty { display: none; }

.filter-vc { border-color: rgb(180 139 255 / 55%); color: #efe3ff; }
.filter-vc.active { background: linear-gradient(135deg, #7b55f2, #b48bff); color: #fff; border-color: transparent; }
