:root {
    --bg: #090b0d;
    --surface: #12161a;
    --surface-2: #191e23;
    --line: #2b3238;
    --text: #f5f7f8;
    --muted: #aab1b7;
    --gold: #ffc400;
    --gold-strong: #ffdf5a;
    --cyan: #52d7d3;
    --danger: #ff6565;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(255, 196, 0, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(82, 215, 211, .025) 1px, transparent 1px),
        var(--bg);
    background-size: 64px 64px;
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
}

.site-header,
main,
footer {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: var(--gold);
    color: #080808;
    font-size: 24px;
    font-weight: 900;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 18px;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.trust {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 14px;
}

main {
    min-height: calc(100vh - 180px);
}

.catalog-heading,
.app-detail {
    padding: 54px 0 32px;
}

.catalog-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 32px;
}

.eyebrow {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

.catalog-heading h1,
.detail-copy h1 {
    margin: 8px 0 10px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.05;
}

.catalog-heading p,
.detail-copy p {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.catalog-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--muted);
    white-space: nowrap;
}

.catalog-count strong {
    color: var(--cyan);
    font-size: 36px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding-bottom: 60px;
}

.app-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 176px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    transition: border-color .2s, transform .2s;
}

.app-card:hover {
    border-color: #5c6267;
    transform: translateY(-2px);
}

.card-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 18px;
    padding: 24px;
    text-decoration: none;
}

.app-icon {
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #4c4a34;
    border-radius: 8px;
    background: #0c0f11;
    color: var(--gold);
    font-size: 24px;
    font-weight: 900;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-copy {
    min-width: 0;
}

.card-copy h2 {
    margin-bottom: 7px;
    font-size: 21px;
}

.card-copy p {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 15px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--muted);
    font-size: 13px;
}

.meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card-arrow {
    color: #626a70;
}

.card-download {
    width: 112px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-left: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.card-download i {
    font-size: 22px;
}

.card-download:hover {
    background: var(--gold);
    color: #080808;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    color: var(--muted);
    text-decoration: none;
}

.detail-main {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
}

.app-icon-large {
    width: 140px;
    height: 140px;
    font-size: 42px;
}

.download-button {
    min-width: 210px;
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 22px;
    border-radius: 6px;
    background: var(--gold);
    color: #080808;
    font-weight: 900;
    text-decoration: none;
}

.download-button i {
    font-size: 22px;
}

.download-button span,
.download-button small {
    display: block;
}

.download-button small {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 600;
}

.release-band {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
    gap: 50px;
    padding: 36px 0 60px;
    border-top: 1px solid var(--line);
}

.release-band h2 {
    font-size: 20px;
}

.changelog {
    color: var(--muted);
    line-height: 1.7;
}

.release-facts {
    margin: 0;
}

.release-facts div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.release-facts dt {
    color: var(--muted);
}

.release-facts dd {
    margin: 0;
    text-align: right;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 64px 20px;
    border: 1px solid var(--line);
    text-align: center;
    color: var(--muted);
}

.empty-state i {
    margin-bottom: 16px;
    color: var(--gold);
    font-size: 34px;
}

.empty-state h2 {
    color: var(--text);
}

footer {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 820px) {
    .app-grid {
        grid-template-columns: 1fr;
    }

    .detail-main {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .app-icon-large {
        width: 100px;
        height: 100px;
    }

    .download-button {
        grid-column: 1 / -1;
    }

    .release-band {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 560px) {
    .site-header,
    main,
    footer {
        width: min(100% - 24px, 1180px);
    }

    .site-header {
        min-height: 74px;
    }

    .trust {
        font-size: 0;
    }

    .trust i {
        font-size: 18px;
    }

    .catalog-heading {
        align-items: start;
        flex-direction: column;
        padding-top: 36px;
    }

    .catalog-heading h1,
    .detail-copy h1 {
        font-size: 32px;
    }

    .app-card {
        grid-template-columns: 1fr;
    }

    .card-main {
        grid-template-columns: 62px minmax(0, 1fr) 14px;
        gap: 14px;
        padding: 18px;
    }

    .app-icon {
        width: 62px;
        height: 62px;
    }

    .card-download {
        width: 100%;
        min-height: 48px;
        flex-direction: row;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .card-download i {
        font-size: 15px;
    }

    .detail-main {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 18px;
    }

    .app-icon-large {
        width: 80px;
        height: 80px;
    }

    .detail-copy p {
        font-size: 15px;
    }

    footer {
        flex-direction: column;
        justify-content: center;
    }
}
