:root {
    color-scheme: dark;
    --black: #050505;
    --panel: #0c0c0d;
    --panel-hover: #111113;
    --line: #242426;
    --text: #f4f4f5;
    --muted: #8b8b93;
    --blue: #63a7ff;
    --green: #78e6b0;
    --yellow: #f6c96d;
    --purple: #bf9cff;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { background: var(--black); }

body {
    margin: 0;
    min-width: 320px;
    background: var(--black);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

button, input { font: inherit; }
button { cursor: pointer; }

.page-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 48px 0 32px;
}

.hero { max-width: 760px; }

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #111;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--green);
    font: 700 11px/1 var(--font-mono);
    letter-spacing: .16em;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.1rem); line-height: 1; letter-spacing: -.055em; }
.accent { color: var(--blue); }

.hero-intro { display: flex; align-items: center; gap: 18px; }
.hero-copy {
    max-width: 610px;
    margin: 26px 0 24px;
    color: var(--muted);
    font-size: 1rem;
}
.cli-button { flex: 0 0 auto; padding: 9px 11px; border: 1px solid #2a473b; border-radius: 7px; background: #0d1a15; color: var(--green); font: 11px var(--font-mono); white-space: nowrap; }
.cli-button span { color: #5a9b7a; }
.cli-button:hover { border-color: var(--green); background: #12271e; }

.hero-rule { height: 1px; background: linear-gradient(90deg, var(--blue), transparent); opacity: .65; }

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 38px 0 22px;
}

.search-box {
    display: flex;
    align-items: center;
    width: min(420px, 100%);
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel);
    color: var(--muted);
}

.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #63a7ff18; }
.search-box svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.search-box input { width: 100%; padding: 11px 10px; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-box input::placeholder { color: #65656c; }
.clear-search { display: none; border: 0; background: transparent; color: var(--muted); font-size: 20px; }

.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.filter-btn { padding: 8px 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font-size: .85rem; }
.filter-btn:hover, .filter-btn.active { border-color: var(--line); background: var(--panel); color: var(--text); }
.filter-btn.active { color: var(--blue); }

.versions-grid { display: grid; gap: 18px; }

.version-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.version-card:hover { border-color: #414147; background: var(--panel-hover); transform: translateY(-2px); }
.version-card.featured { border-color: #356b58; }

.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; }
.title-row { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.version-name { margin: 0; font-size: 1.5rem; letter-spacing: -.03em; }
.version-badge { padding: 4px 7px; border-radius: 4px; font: 700 10px/1 var(--font-mono); letter-spacing: .04em; }
.badge-latest { background: #193a31; color: var(--green); }
.badge-stable { background: #332c19; color: var(--yellow); }
.badge-lts { background: #29213c; color: var(--purple); }
.version-meta { display: flex; align-items: center; gap: 8px; margin-top: 9px; color: var(--muted); font: 12px var(--font-mono); }
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item svg { color: #66666e; }
.btn-primary, .btn-secondary, .btn-mini-dl, .copy-hash-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 7px; text-decoration: none; cursor: pointer; }
.btn-primary { padding: 9px 12px; background: var(--blue); color: #07101c; font-size: .82rem; font-weight: 700; }
.btn-primary:hover { background: #8abfff; }
.btn-secondary { padding: 8px 11px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: .8rem; }
.btn-secondary:hover { border-color: #55555c; color: var(--text); }

.card-body { padding: 0 24px 24px; }
.card-left, .card-right { min-width: 0; }
.highlights-title, .downloads-title { display: flex; align-items: center; gap: 7px; margin-bottom: 13px; color: #c9c9ce; font: 700 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.highlights-title svg { color: var(--yellow); }
.downloads-title svg { color: var(--blue); }
.feature-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.feature-item { display: flex; gap: 9px; color: var(--muted); font-size: .87rem; }
.feature-item strong { color: #d9d9df; font-weight: 600; }
.icon-check { flex: 0 0 auto; color: var(--green); }
.platforms-grid { display: grid; gap: 7px; }
.platform-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid #1c1c1f; border-radius: 8px; background: #09090a; }
.platform-info { display: flex; align-items: center; gap: 9px; min-width: 0; }
.platform-icon { display: grid; width: 20px; height: 20px; place-items: center; color: var(--blue); }
.platform-icon img { display: block; width: 20px; height: 20px; object-fit: contain; }
.platform-details { display: grid; min-width: 0; }
.platform-name { color: #dbdbe0; font-size: .8rem; }
.platform-file { overflow: hidden; color: #6d6d75; font: 10px var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.platform-actions { display: flex; align-items: center; gap: 5px; }
.btn-mini-copy { padding: 6px; border: 0; background: transparent; color: #6d6d75; }
.btn-mini-copy:hover { color: var(--text); }
.btn-mini-dl { padding: 5px 8px; background: #182b42; color: var(--blue); font: 700 11px var(--font-mono); }
.btn-mini-dl:disabled { cursor: wait; opacity: .7; }
.btn-mini-dl.coming-soon { background: #1b1b20; color: #777780; cursor: default; }
.card-checksum-box { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; padding: 9px 10px; border: 1px dashed #333339; border-radius: 8px; }
.checksum-info { display: grid; min-width: 0; }
.checksum-label { color: #6d6d75; font: 10px var(--font-mono); }
.checksum-hash { overflow: hidden; color: #a8a8b0; font: 10px var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.copy-hash-btn { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #333339; background: transparent; color: var(--muted); font-size: 10px; }
.copy-hash-btn:hover { color: var(--text); border-color: #55555c; }

.empty-state { padding: 50px 20px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; color: var(--muted); }
.empty-icon { color: var(--muted); }
.empty-title { margin: 9px 0 3px; color: var(--text); }
.empty-desc { margin: 0; }
.site-footer { display: flex; justify-content: center; gap: 5px; margin-top: 42px; color: #55555c; font: 10px var(--font-mono); letter-spacing: .08em; }
.site-footer a { color: var(--muted); }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; padding: 11px 15px; border: 1px solid #356b58; border-radius: 8px; background: #10251e; color: var(--green); font-size: .84rem; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s ease; }
.toast.active { opacity: 1; transform: translateY(0); }
.modal-backdrop { display: none; position: fixed; inset: 0; z-index: 20; align-items: center; justify-content: center; padding: 20px; background: #000000c9; }
.modal-backdrop.active { display: flex; }
.modal { position: relative; width: min(700px, 100%); max-height: 90vh; overflow: auto; padding: 28px; border: 1px solid #3a3a40; border-radius: 14px; background: #101012; box-shadow: 0 20px 80px #000; }
.modal h2 { margin: 0 0 18px; font-size: 1.4rem; }
.modal-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; color: var(--muted); font-size: 24px; }
.modal-package-item { margin-top: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; }
.modal-package-title { display: flex; justify-content: space-between; gap: 10px; color: var(--text); font-size: .85rem; }
.modal-package-filename { margin-top: 4px; color: var(--muted); font: .75rem var(--font-mono); }
.modal-hash-container { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: #a8a8b0; font: .7rem var(--font-mono); }
.modal-dismiss { margin-top: 18px; }

@media (max-width: 760px) {
    .page-shell { width: min(100% - 28px, 600px); padding-top: 28px; }
    .hero-intro { align-items: flex-start; flex-direction: column; gap: 0; }
    .toolbar, .card-header { align-items: stretch; flex-direction: column; }
    .search-box { width: 100%; }
    .filter-tabs { justify-content: flex-start; }
    .card-body { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 430px) {
    .card-header, .card-body { padding-left: 16px; padding-right: 16px; }
    .brand-logo { width: 48px; height: 48px; }
    .version-name { font-size: 1.3rem; }
    .site-footer { flex-wrap: wrap; }
}
