/* =====================================================
   DOWNLOAD PAGE
   Legends War 2 Classic — cinematic black / gold / red theme
   Scope: .download-page only
   ===================================================== */

:root {
    --download-gold: var(--site-gold, #c89142);
    --download-gold-2: var(--site-gold-2, #b77a32);
    --download-gold-bright: var(--site-gold-bright, #ffe1a1);
    --download-red: var(--site-red, #ab2416);
    --download-red-bright: var(--site-red-bright, #f04c32);
    --download-blue: var(--site-blue, #4a8dff);
    --download-success: var(--site-success, #63d08a);
    --download-text: var(--site-text, #f3e5c8);
    --download-text-soft: var(--site-text-soft, #cdb98e);
    --download-muted: var(--site-muted, #8d7756);
    --download-edge: var(--site-edge, rgba(129, 82, 35, 0.42));
    --download-edge-strong: var(--site-edge-strong, rgba(230, 171, 82, 0.64));
    --download-surface: var(--site-surface, rgba(14, 8, 5, 0.88));
    --download-surface-2: var(--site-surface-2, rgba(29, 17, 8, 0.84));
    --download-radius: var(--site-radius, 18px);
}

.download-page {
    width: min(100%, 1180px);
    max-width: 1180px;
    padding: 52px 16px 76px;
    animation: download-page-enter 0.45s ease both;
}

@keyframes download-page-enter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.download-hero-card,
.download-main-panel,
.download-side-card,
.download-guide-panel,
.download-mirror-card,
.download-step-card {
    position: relative;
    border: 1px solid var(--download-edge);
    border-radius: var(--download-radius);
    background:
        linear-gradient(180deg, rgba(255, 224, 150, 0.06), transparent 45%),
        linear-gradient(145deg, var(--download-surface-2), var(--download-surface));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 18px 42px rgba(0, 0, 0, 0.38);
    overflow: hidden;
}

.download-hero-card::before,
.download-main-panel::before,
.download-side-card::before,
.download-guide-panel::before,
.download-mirror-card::before,
.download-step-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 225, 161, 0.36), transparent);
    pointer-events: none;
}

.download-hero-card {
    margin-bottom: 18px;
    isolation: isolate;
}

.download-hero-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 15% 18%, rgba(74, 141, 255, 0.16), transparent 18rem),
        radial-gradient(circle at 82% 24%, rgba(240, 76, 50, 0.18), transparent 20rem),
        radial-gradient(circle at 48% 110%, rgba(200, 145, 66, 0.2), transparent 28rem);
    pointer-events: none;
}

.download-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: clamp(24px, 3vw, 36px);
}

.download-hero-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 231, 170, 0.62);
    border-radius: 24px;
    color: #2b1404;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent),
        linear-gradient(135deg, #ffe08a, #a66c20);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 12px 26px rgba(188, 109, 29, 0.22);
    font-size: 30px;
}

.download-eyebrow,
.download-section-head span {
    display: block;
    margin-bottom: 7px;
    color: var(--download-gold-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}

.download-hero-text h1,
.download-section-head h2 {
    margin: 0;
    color: var(--download-gold-bright);
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.68);
}

.download-hero-text h1 {
    font-size: clamp(27px, 3.4vw, 44px);
}

.download-hero-text p,
.download-section-head p {
    margin: 9px 0 0;
    color: var(--download-text-soft);
    font-size: 14px;
    line-height: 1.72;
}

.download-hero-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.download-hero-status.is-ready {
    color: #caffdf;
    border: 1px solid rgba(99, 208, 138, 0.34);
    background: rgba(35, 132, 72, 0.14);
}

.download-hero-status.is-disabled {
    color: #ffe0a8;
    border: 1px solid rgba(255, 193, 93, 0.32);
    background: rgba(160, 97, 21, 0.13);
}

.download-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding: 15px 16px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.55;
}

.download-alert i {
    margin-top: 2px;
    font-size: 18px;
}

.download-alert strong {
    display: block;
    margin-bottom: 3px;
    color: #fff0c8;
    font-weight: 700;
}

.download-alert p {
    margin: 0;
    color: rgba(255, 232, 190, 0.76);
}

.download-alert code {
    color: var(--download-gold-bright);
}

.download-alert.is-warning {
    border: 1px solid rgba(255, 193, 93, 0.28);
    background: rgba(160, 97, 21, 0.13);
    color: #ffe0a8;
}

.download-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.38fr);
    gap: 18px;
    align-items: start;
}

.download-main-panel,
.download-guide-panel,
.download-side-card {
    padding: clamp(20px, 2.5vw, 28px);
}

.download-section-head {
    margin-bottom: 18px;
    text-align: center;
}

.download-section-head.is-left {
    text-align: left;
}

.download-section-head h2 {
    font-size: clamp(22px, 2.7vw, 32px);
}

.download-section-head p {
    color: var(--download-muted);
}

/* Language selector for admin-managed game clients */
.download-lang-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.download-lang-tab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid var(--download-edge);
    border-radius: 12px;
    background: var(--download-surface);
    color: var(--download-text-soft);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.download-lang-tab:hover {
    transform: translateY(-2px);
    border-color: var(--download-edge-strong);
    color: var(--download-text);
}

.download-lang-tab.is-active {
    border-color: rgba(255, 215, 133, 0.7);
    color: #2b1404;
    background: linear-gradient(135deg, #ffe08a, #e0a23a);
    box-shadow: 0 8px 22px rgba(224, 162, 58, 0.35);
}

.download-lang-flag {
    font-size: 18px;
    line-height: 1;
}

.download-lang-count {
    min-width: 20px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.28);
    color: inherit;
}

.download-lang-tab.is-active .download-lang-count {
    background: rgba(43, 20, 4, 0.22);
}

.download-mirror-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.download-mirror-card {
    min-height: 100%;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.18s ease, border-color 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.download-mirror-card:hover {
    transform: translateY(-3px);
    border-color: var(--download-edge-strong);
    filter: brightness(1.04);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
}

.download-mirror-card.is-primary {
    border-color: rgba(255, 215, 133, 0.54);
}

.download-mirror-card.is-unavailable {
    opacity: 0.68;
}

.download-mirror-tag {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 225, 161, 0.28);
    border-radius: 999px;
    color: var(--download-gold-bright);
    background: rgba(5, 3, 1, 0.44);
    font-size: 10px;
    font-weight: 700;
}

.download-mirror-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 222, 145, 0.22);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.18);
    color: var(--download-gold-bright);
    font-size: 23px;
}

.download-mirror-body h3 {
    margin: 0;
    color: #fff4d2;
    font-size: 19px;
    font-weight: 700;
}

.download-mirror-body span {
    display: block;
    margin-top: 3px;
    color: var(--download-gold-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.download-mirror-body p {
    margin: 10px 0 0;
    color: var(--download-muted);
    font-size: 13px;
    line-height: 1.6;
}

.download-btn,
.download-mini-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.download-btn {
    width: 100%;
    margin-top: auto;
    border: 1px solid rgba(255, 170, 89, 0.58);
    color: #fff7df;
    background:
        linear-gradient(180deg, rgba(255, 160, 76, 0.22), transparent),
        linear-gradient(135deg, #b72d1b 0%, #6f160c 100%);
    box-shadow: 0 12px 28px rgba(125, 22, 10, 0.32);
}

.download-btn:hover {
    color: #fff;
    border-color: rgba(255, 198, 111, 0.75);
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.download-btn.is-disabled,
.download-btn:disabled {
    border-color: rgba(150, 130, 100, 0.25);
    background: rgba(5, 3, 1, 0.48);
    color: rgba(205, 185, 142, 0.56);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.download-side-panel {
    display: grid;
    gap: 14px;
}

.download-side-card.is-red {
    border-color: rgba(240, 76, 50, 0.28);
    background:
        linear-gradient(180deg, rgba(255, 120, 82, 0.07), transparent 44%),
        linear-gradient(145deg, rgba(38, 12, 7, 0.9), rgba(14, 8, 5, 0.88));
}

.download-side-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 14px;
}

.download-side-title i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 222, 145, 0.2);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.18);
    color: var(--download-gold-bright);
}

.download-side-title h2 {
    margin: 0;
    color: var(--download-gold-bright);
    font-size: 18px;
    font-weight: 700;
}

.download-check-list {
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.download-check-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--download-text-soft);
    font-size: 13px;
    line-height: 1.5;
}

.download-check-list i {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    background: rgba(200, 145, 66, 0.12);
    color: var(--download-gold-bright);
    font-size: 12px;
}

.download-side-card p {
    margin: 0;
    color: var(--download-muted);
    font-size: 13px;
    line-height: 1.65;
}

.download-mini-link {
    margin-top: 14px;
    padding: 0 14px;
    border: 1px solid rgba(203, 145, 65, 0.36);
    color: #efd9a8;
    background: rgba(14, 7, 3, 0.66);
}

.download-mini-link:hover {
    color: var(--download-gold-bright);
    border-color: var(--download-edge-strong);
    background: rgba(39, 22, 10, 0.78);
    transform: translateY(-2px);
}

.download-guide-panel {
    margin-top: 18px;
}

.download-step-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.download-step-card {
    min-height: 220px;
    padding: 22px 18px;
}

.download-step-card b {
    position: absolute;
    top: 14px;
    right: 16px;
    color: rgba(255, 225, 161, 0.18);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.download-step-card > i {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 222, 145, 0.2);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.18);
    color: var(--download-gold-bright);
    font-size: 19px;
}

.download-step-card h3 {
    margin: 0;
    color: #fff4d2;
    font-size: 16px;
    font-weight: 700;
}

.download-step-card p {
    margin: 9px 0 0;
    color: var(--download-muted);
    font-size: 13px;
    line-height: 1.6;
}

.download-step-card a {
    display: inline-flex;
    margin-top: 13px;
    color: var(--download-gold-bright);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.download-step-card a:hover {
    color: #fff4d2;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 1100px) {
    .download-layout {
        grid-template-columns: 1fr;
    }

    .download-side-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .download-step-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .download-page {
        padding: 36px 14px 58px;
    }

    .download-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .download-hero-status {
        width: 100%;
    }

    .download-mirror-grid,
    .download-side-panel,
    .download-step-grid {
        grid-template-columns: 1fr;
    }

    .download-section-head.is-left {
        text-align: center;
    }
}

@media (max-width: 420px) {
    .download-main-panel,
    .download-guide-panel,
    .download-side-card,
    .download-mirror-card {
        padding: 18px;
        border-radius: 16px;
    }

    .download-hero-icon {
        width: 64px;
        height: 64px;
        border-radius: 20px;
        font-size: 25px;
    }
}

/* =====================================================
   Download page — auto mirror 01-09 + runtime links
   ===================================================== */
.download-section-head code,
.download-empty-state code {
    color: var(--download-gold-bright);
    font-size: 0.92em;
}

.download-mirror-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.download-mirror-grid.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.download-runtime-card {
    border-color: rgba(74, 141, 255, 0.3);
    background:
        linear-gradient(180deg, rgba(74, 141, 255, 0.075), transparent 44%),
        linear-gradient(145deg, rgba(15, 24, 42, 0.9), rgba(14, 8, 5, 0.88));
}

.download-tool-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.download-tool-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px;
    border: 1px solid rgba(74, 141, 255, 0.26);
    border-radius: 15px;
    background: rgba(8, 16, 32, 0.42);
    color: var(--download-text-soft);
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.download-tool-link:hover {
    color: #eef5ff;
    border-color: rgba(120, 174, 255, 0.56);
    background: rgba(25, 55, 105, 0.34);
    transform: translateY(-2px);
}

.download-tool-link > i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(120, 174, 255, 0.22);
    border-radius: 13px;
    color: #b8d4ff;
    background: rgba(74, 141, 255, 0.12);
    font-size: 16px;
}

.download-tool-link strong {
    display: block;
    color: #edf4ff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.download-tool-link small {
    display: block;
    margin-top: 3px;
    color: rgba(200, 220, 255, 0.62);
    font-size: 12px;
    line-height: 1.35;
}

.download-empty-state {
    min-height: 220px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 28px;
    border: 1px dashed rgba(255, 193, 93, 0.28);
    border-radius: 18px;
    background: rgba(5, 3, 1, 0.28);
    text-align: center;
}

.download-empty-state > i {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 193, 93, 0.22);
    border-radius: 18px;
    color: #ffe0a8;
    background: rgba(160, 97, 21, 0.12);
    font-size: 22px;
}

.download-empty-state h3 {
    margin: 0;
    color: var(--download-gold-bright);
    font-size: 18px;
    font-weight: 700;
}

.download-empty-state p {
    max-width: 560px;
    margin: 0;
    color: var(--download-muted);
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .download-side-panel {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

/* =====================================================
   Download page — EMPHASIS PASS
   Goal: make (1) the MAIN download card and (2) the
   "recommended runtime files" card clearly stand out.
   Additive only — overrides earlier rules by source order.
   ===================================================== */

/* ---------- (1) MAIN download card ---------- */
.download-mirror-card.is-primary {
    border-color: rgba(255, 199, 102, 0.85);
    background:
        radial-gradient(circle at 50% -30%, rgba(255, 199, 102, 0.2), transparent 62%),
        linear-gradient(180deg, rgba(255, 224, 150, 0.1), transparent 46%),
        linear-gradient(145deg, var(--download-surface-2), var(--download-surface));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 50px rgba(0, 0, 0, 0.45),
        0 0 40px rgba(230, 171, 82, 0.3);
    transform: translateY(-2px);
}

.download-mirror-card.is-primary:hover {
    transform: translateY(-5px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 26px 60px rgba(0, 0, 0, 0.5),
        0 0 54px rgba(230, 171, 82, 0.42);
}

/* animated gold halo ring around the main card */
.download-mirror-card.is-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(255, 225, 161, 0.95), rgba(255, 160, 76, 0.25), rgba(255, 225, 161, 0.95));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: download-primary-halo 2.6s ease-in-out infinite;
}

@keyframes download-primary-halo {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.95; }
}

/* "MAIN" tag turns into a solid gold chip */
.download-mirror-card.is-primary .download-mirror-tag {
    border-color: transparent;
    color: #2b1404;
    background: linear-gradient(135deg, #ffe08a, #e0a23a);
    box-shadow: 0 4px 14px rgba(224, 162, 58, 0.4);
}

/* bigger, gold-filled icon + larger heading on the main card */
.download-mirror-card.is-primary .download-mirror-icon {
    width: 62px;
    height: 62px;
    border-color: rgba(255, 231, 170, 0.6);
    color: #2b1404;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent),
        linear-gradient(135deg, #ffe08a, #a66c20);
    box-shadow: 0 10px 24px rgba(188, 109, 29, 0.28);
    font-size: 26px;
}

.download-mirror-card.is-primary .download-mirror-body h3 {
    font-size: 22px;
}

/* main CTA becomes the bright GOLD button (others stay red) */
.download-mirror-card.is-primary .download-btn {
    min-height: 50px;
    font-size: 15px;
    border-color: rgba(255, 231, 170, 0.7);
    color: #2b1404;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent),
        linear-gradient(135deg, #ffd87a 0%, #d99a2c 100%);
    box-shadow: 0 12px 30px rgba(217, 154, 44, 0.4);
    animation: download-cta-pulse 2.4s ease-in-out infinite;
}

.download-mirror-card.is-primary .download-btn:hover {
    color: #2b1404;
    filter: brightness(1.06);
    box-shadow: 0 16px 38px rgba(217, 154, 44, 0.55);
    animation: none;
}

@keyframes download-cta-pulse {
    0%, 100% { box-shadow: 0 12px 30px rgba(217, 154, 44, 0.32); }
    50% { box-shadow: 0 12px 34px rgba(217, 154, 44, 0.6); }
}

/* ---------- (2) "Recommended runtime files" card ---------- */
.download-runtime-card {
    border-color: rgba(120, 174, 255, 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 14px 36px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(74, 141, 255, 0.24);
}

/* glowing top accent bar so it reads as an important panel */
.download-runtime-card::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(120, 174, 255, 0.9), transparent);
    pointer-events: none;
}

.download-runtime-card .download-side-title h2 {
    font-size: 20px;
    color: #dcebff;
}

.download-runtime-card .download-side-title i {
    border-color: rgba(120, 174, 255, 0.5);
    color: #dcebff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent),
        linear-gradient(135deg, rgba(74, 141, 255, 0.34), rgba(74, 141, 255, 0.12));
    box-shadow: 0 8px 20px rgba(74, 141, 255, 0.25);
}

/* full-width runtime section, placed directly under the main download */
.download-runtime-section {
    margin-top: 18px;
}

/* grouped by software type — each group holds its x86/x64 sub-links */
.download-runtime-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.download-runtime-group {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(120, 174, 255, 0.3);
    border-radius: 16px;
    background: rgba(10, 20, 40, 0.5);
}

.download-runtime-group.is-recommended {
    border-color: rgba(255, 196, 84, 0.6);
    background:
        linear-gradient(180deg, rgba(255, 196, 84, 0.12), transparent 60%),
        rgba(28, 24, 12, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 196, 84, 0.18), 0 10px 30px rgba(255, 170, 40, 0.12);
}

.download-runtime-group.is-recommended .download-runtime-group-icon {
    border-color: rgba(255, 196, 84, 0.55);
    color: #ffe6b0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
        linear-gradient(135deg, rgba(255, 184, 60, 0.32), rgba(255, 184, 60, 0.1));
}

.download-runtime-recommend-badge {
    position: absolute;
    top: -11px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    color: #2a1c00;
    background: linear-gradient(135deg, #ffd166, #ffae34);
    box-shadow: 0 4px 12px rgba(255, 170, 40, 0.35);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.download-runtime-recommend-badge i {
    font-size: 10px;
}

.download-runtime-group-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.download-runtime-group-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(120, 174, 255, 0.4);
    border-radius: 14px;
    color: #dcebff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
        linear-gradient(135deg, rgba(74, 141, 255, 0.3), rgba(74, 141, 255, 0.1));
    font-size: 20px;
}

.download-runtime-group-text h3 {
    margin: 0;
    color: #eff5ff;
    font-size: 16px;
    font-weight: 700;
}

.download-runtime-group-text p {
    margin: 5px 0 0;
    color: rgba(200, 220, 255, 0.7);
    font-size: 12.5px;
    line-height: 1.55;
}

.download-runtime-group-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: auto;
}

.download-runtime-sublink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(120, 174, 255, 0.45);
    border-radius: 12px;
    color: #eaf2ff;
    background:
        linear-gradient(180deg, rgba(120, 174, 255, 0.18), transparent),
        rgba(20, 44, 86, 0.6);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, filter 0.18s ease;
}

.download-runtime-sublink:hover {
    border-color: rgba(160, 198, 255, 0.85);
    background:
        linear-gradient(180deg, rgba(120, 174, 255, 0.3), transparent),
        rgba(33, 70, 130, 0.7);
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.download-runtime-sublink i {
    font-size: 12px;
    color: #b8d4ff;
}

@media (max-width: 760px) {
    .download-mirror-card.is-primary .download-mirror-body h3 {
        font-size: 20px;
    }

    .download-runtime-groups {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   FLOATING DISCORD CTA (download page)
   Revealed after a client download is clicked; wiggles
   periodically so it can't be missed. See page-download.php.
   ===================================================== */
.download-discord-fab-wrap {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 500;
    width: min(340px, calc(100vw - 32px));
    animation: dl-dc-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes dl-dc-in {
    from { opacity: 0; transform: translateY(28px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.download-discord-fab {
    position: relative;
    padding: 16px 18px 15px;
    border: 1px solid rgba(88, 101, 242, 0.55);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(88, 101, 242, 0.18), transparent 46%),
        linear-gradient(145deg, rgba(22, 25, 46, 0.98), rgba(12, 13, 26, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 22px 50px rgba(0, 0, 0, 0.62),
        0 0 34px rgba(88, 101, 242, 0.3);
    color: #e9ebff;
    /* Periodic wiggle to draw attention — mostly still, short shake every ~3s. */
    animation: dl-dc-attention 3.2s ease-in-out 0.8s infinite;
    transform-origin: 80% 80%;
}

@keyframes dl-dc-attention {
    0%, 80%, 100% { transform: translateY(0) rotate(0deg); }
    84% { transform: translateY(-6px) rotate(-2.5deg); }
    88% { transform: translateY(0) rotate(2.5deg); }
    92% { transform: translateY(-3px) rotate(-1.5deg); }
    96% { transform: translateY(0) rotate(0.5deg); }
}

.download-discord-fab-close {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    color: #c9cdff;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.download-discord-fab-close:hover {
    color: #fff;
    background: rgba(88, 101, 242, 0.42);
    border-color: rgba(140, 150, 255, 0.6);
}

.download-discord-fab-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(140deg, #5865f2, #4149c9);
    box-shadow: 0 10px 22px rgba(88, 101, 242, 0.42);
    font-size: 20px;
}

.download-discord-fab-text strong {
    display: block;
    margin-bottom: 4px;
    color: #eef0ff;
    font-size: 15px;
    font-weight: 800;
    padding-right: 24px;
}

.download-discord-fab-text p {
    margin: 0 0 13px;
    color: #b6bbe6;
    font-size: 12.5px;
    line-height: 1.55;
}

.download-discord-fab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(140deg, #5865f2, #4149c9);
    box-shadow: 0 12px 26px rgba(88, 101, 242, 0.42);
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.download-discord-fab-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(88, 101, 242, 0.56);
    filter: brightness(1.08);
}

@media (max-width: 520px) {
    .download-discord-fab-wrap {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .download-discord-fab-wrap { animation: none; }
    .download-discord-fab { animation: none; }
}

/* =====================================================
   DISCORD RECOMMENDATION (download/go page)
   Prominent inline CTA below the manual-download button.
   ===================================================== */
.download-go-discord {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(88, 101, 242, 0.6);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(88, 101, 242, 0.2), transparent 55%),
        linear-gradient(145deg, rgba(22, 25, 46, 0.96), rgba(13, 14, 28, 0.96));
    color: #e9ebff;
    text-decoration: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: dl-go-dc-pulse 2.4s ease-in-out infinite;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

/* Prominent attention pulse via the glow ring (no transform, so hover lift
   still composes cleanly). */
@keyframes dl-go-dc-pulse {
    0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 28px rgba(0,0,0,0.4), 0 0 0 rgba(88,101,242,0); }
    50%      { box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 28px rgba(0,0,0,0.4), 0 0 26px rgba(88,101,242,0.55); }
}

.download-go-discord:hover {
    color: #fff;
    transform: translateY(-2px);
    border-color: rgba(140, 150, 255, 0.85);
    filter: brightness(1.06);
}

.download-go-discord-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(140deg, #5865f2, #4149c9);
    box-shadow: 0 10px 22px rgba(88, 101, 242, 0.44);
    font-size: 21px;
}

.download-go-discord-text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.download-go-discord-text strong {
    display: block;
    margin-bottom: 3px;
    color: #eef0ff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
}

.download-go-discord-text small {
    display: block;
    color: #b6bbe6;
    font-size: 12px;
    line-height: 1.5;
}

.download-go-discord-arrow {
    flex: 0 0 auto;
    color: #aab0ee;
    font-size: 14px;
    transition: transform 0.18s ease, color 0.18s ease;
}

.download-go-discord:hover .download-go-discord-arrow {
    color: #fff;
    transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
    .download-go-discord { animation: none; }
}

/* =====================================================
   AUTO-DOWNLOAD COUNTDOWN (download/go page)
   ===================================================== */
.download-go-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 6px 0 4px;
    text-align: center;
}

.download-go-timer-ring {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: 2px solid rgba(255, 209, 102, 0.55);
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 224, 138, 0.28), transparent 70%),
        rgba(20, 12, 4, 0.6);
    color: #ffe6ad;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 22px rgba(255, 174, 52, 0.28);
    animation: dl-count-pulse 1s ease-in-out infinite;
}

@keyframes dl-count-pulse {
    0%, 100% { transform: scale(1);    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 0 18px rgba(255,174,52,0.22); }
    50%      { transform: scale(1.07); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 0 30px rgba(255,174,52,0.5); }
}

.download-go-timer-ring.is-done {
    border-color: rgba(120, 220, 150, 0.6);
    color: #8ff0b6;
    background:
        radial-gradient(circle at 50% 35%, rgba(120, 220, 150, 0.22), transparent 70%),
        rgba(8, 18, 10, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 20px rgba(46, 204, 113, 0.28);
    font-size: 24px;
    animation: none;
}

.download-go-timer p {
    margin: 0;
    max-width: 320px;
    color: #cdb98e;
    font-size: 13px;
    line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
    .download-go-timer-ring { animation: none; }
}
