/* ========================================
   «Скачать приложения» (/apps)
   Шапка — из auth.css, остальное — в стиле страниц приглашения (join.css)
======================================== */

* {
    box-sizing: border-box;

    margin: 0;
    padding: 0;
}


.apps-body {

    min-height: 100vh;

    display: flex;

    flex-direction: column;

    background:
        radial-gradient(
            ellipse 70% 40% at 50% 0%,
            rgba(110, 70, 180, 0.14),
            transparent 70%
        ),
        #090909;

    color: #eeeeee;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}


a {
    color: rgba(190, 165, 255, 0.9);
}


a.archive-brand {
    color: inherit;

    text-decoration: none;
}


[hidden] {
    display: none !important;
}


code {

    padding: 1px 6px;

    border-radius: 5px;

    background: rgba(255, 255, 255, 0.07);

    color: #cfc4ee;

    font-family:
        "JetBrains Mono",
        "Cascadia Code",
        Consolas,
        monospace;

    font-size: 0.92em;
}


.apps-page {

    flex: 1;

    width: 100%;

    max-width: 1080px;

    margin: 0 auto;

    padding:
        124px 24px 56px;
}


/* ---------- заголовок ---------- */

.apps-hero {
    max-width: 640px;
}


.apps-eyebrow {

    margin-bottom: 14px;

    color: rgba(180, 150, 255, 0.75);

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 2px;

    text-transform: uppercase;
}


.apps-hero h1 {

    color: #f1f1f1;

    font-size: 38px;

    font-weight: 500;

    letter-spacing: -1px;

    line-height: 1.1;
}


.apps-lead {

    margin-top: 14px;

    color: #8f8f8f;

    font-size: 15px;

    line-height: 1.6;
}


.apps-os {

    margin-top: 10px;

    color: rgba(190, 165, 255, 0.8);

    font-size: 13px;
}


.apps-os:empty {
    display: none;
}


/* ---------- карточки ---------- */

.apps-grid {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));

    gap: 18px;

    margin-top: 36px;
}


.apps-loading {

    grid-column: 1 / -1;

    padding: 28px;

    border: 1px dashed rgba(255, 255, 255, 0.09);

    border-radius: 16px;

    color: #777;

    font-size: 14px;

    text-align: center;
}


.app-card {

    --app-accent: #a37bff;

    display: flex;

    flex-direction: column;

    gap: 14px;

    padding: 24px 24px 20px;

    border: 1px solid rgba(255, 255, 255, 0.07);

    border-radius: 20px;

    background:
        linear-gradient(
            160deg,
            color-mix(in srgb, var(--app-accent) 9%, transparent),
            transparent 45%
        ),
        rgba(255, 255, 255, 0.025);

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);

    transition:
        border-color 0.2s,
        transform 0.2s;
}


.app-card:hover {

    border-color: color-mix(in srgb, var(--app-accent) 35%, rgba(255, 255, 255, 0.07));

    transform: translateY(-2px);
}


.app-head {

    display: flex;

    align-items: center;

    gap: 14px;
}


.app-icon {

    flex: none;

    width: 52px;
    height: 52px;

    display: grid;

    place-items: center;

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            var(--app-accent),
            color-mix(in srgb, var(--app-accent) 45%, #1a1030)
        );

    color: #0b0618;

    font-size: 24px;

    font-weight: 700;

    box-shadow: 0 8px 24px color-mix(in srgb, var(--app-accent) 30%, transparent);
}


.app-titles {
    min-width: 0;
}


.app-titles h2 {

    color: #f1f1f1;

    font-size: 18px;

    font-weight: 600;

    letter-spacing: -0.3px;

    line-height: 1.25;
}


.app-service {

    margin-top: 3px;

    color: #888;

    font-size: 12.5px;
}


.app-desc {

    color: #9a9a9a;

    font-size: 13.5px;

    line-height: 1.6;
}


.app-meta {

    display: flex;

    flex-wrap: wrap;

    gap: 4px 10px;

    color: #777;

    font-size: 12px;
}


.app-version {

    color: color-mix(in srgb, var(--app-accent) 70%, #eee);

    font-weight: 600;
}


.app-actions {

    display: flex;

    margin-top: auto;
}


.app-button {

    flex: 1;

    display: inline-flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 2px;

    min-height: 50px;

    padding: 8px 18px;

    border: 1px solid rgba(255, 255, 255, 0.10);

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.055);

    color: #ddd;

    font-size: 14px;

    font-weight: 500;

    text-decoration: none;

    transition:
        background 0.15s,
        border-color 0.15s;
}


.app-button small {

    color: rgba(255, 255, 255, 0.6);

    font-size: 11.5px;

    font-weight: 400;
}


.app-button.primary {

    border-color: color-mix(in srgb, var(--app-accent) 55%, transparent);

    background: color-mix(in srgb, var(--app-accent) 26%, transparent);

    color: #fff;
}


.app-button.primary:hover {
    background: color-mix(in srgb, var(--app-accent) 38%, transparent);
}


/* другие системы и форматы */

.app-files {

    border-top: 1px solid rgba(255, 255, 255, 0.06);

    padding-top: 12px;

    font-size: 13px;
}


.app-files summary {

    color: #888;

    cursor: pointer;

    user-select: none;
}


.app-files summary:hover {
    color: #ccc;
}


.app-files-group {
    margin-top: 10px;
}


.app-files-os {

    margin-bottom: 6px;

    color: #666;

    font-size: 10.5px;

    letter-spacing: 1px;

    text-transform: uppercase;
}


.app-file {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    padding: 8px 12px;

    border-radius: 9px;

    color: #ccc;

    text-decoration: none;
}


.app-file:hover {
    background: rgba(255, 255, 255, 0.045);
}


.app-file small {

    flex: none;

    color: #777;

    font-variant-numeric: tabular-nums;
}


.app-warn {

    color: #b49c6a;

    font-size: 12.5px;
}


.app-links {

    display: flex;

    gap: 16px;

    font-size: 12.5px;
}


.app-links a {
    text-decoration: none;
}


.app-links a:hover {
    text-decoration: underline;
}


.app-retry {

    margin-left: 6px;

    padding: 6px 12px;

    border: 1px solid rgba(255, 255, 255, 0.12);

    border-radius: 8px;

    background: rgba(255, 255, 255, 0.05);

    color: #ddd;

    font: inherit;

    font-size: 13px;

    cursor: pointer;
}


/* ---------- как установить ---------- */

.apps-help {
    margin-top: 48px;
}


.apps-help h2 {

    color: #e8e8e8;

    font-size: 20px;

    font-weight: 500;
}


.apps-help-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));

    gap: 14px;

    margin-top: 16px;
}


.apps-help-item {

    padding: 18px 20px;

    border: 1px solid rgba(255, 255, 255, 0.06);

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.02);
}


.apps-help-item b {

    color: #ddd;

    font-size: 14px;

    font-weight: 600;
}


.apps-help-item p {

    margin-top: 8px;

    color: #888;

    font-size: 13px;

    line-height: 1.6;
}


/* ---------- подвал ---------- */

.apps-footer {

    display: flex;

    flex-wrap: wrap;

    justify-content: space-between;

    gap: 10px 24px;

    width: 100%;

    max-width: 1080px;

    margin: 0 auto;

    padding: 22px 24px 30px;

    border-top: 1px solid rgba(255, 255, 255, 0.05);

    color: #555;

    font-size: 12px;
}


.apps-footer-links {

    display: flex;

    gap: 18px;
}


.apps-footer-links a {

    color: #777;

    text-decoration: none;
}


.apps-footer-links a:hover {
    color: #ddd;
}


@media (max-width: 600px) {

    .apps-page {
        padding: 104px 16px 40px;
    }

    .apps-hero h1 {
        font-size: 30px;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .app-card {
        padding: 20px 18px 18px;
    }
}


@media (prefers-reduced-motion: reduce) {

    .app-card {
        transition: none;
    }

    .app-card:hover {
        transform: none;
    }
}
