/* 官服客户端下载弹窗(2026-10-29 重做,沿用首页的配色与组件;手机上从底部弹出) */
.download-dialog {
    width: min(680px, calc(100% - 32px));
    max-width: none;
    max-height: min(90dvh, 760px);
    margin: auto;
    padding: 26px 28px 24px;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xl);
    color: var(--text);
    background:
        radial-gradient(circle at 0% 0%, rgba(126, 163, 111, 0.22), transparent 42%),
        radial-gradient(circle at 100% 0%, rgba(214, 177, 115, 0.14), transparent 40%),
        linear-gradient(180deg, #17251c, #0f1813);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 248, 230, 0.06);
}

.download-dialog[open] { animation: dlIn 0.35s cubic-bezier(0.22, 1, 0.36, 1); }

.download-dialog::backdrop {
    background: rgba(4, 9, 6, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@keyframes dlIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes dlUp {
    from { transform: translateY(100%); }
    to { transform: none; }
}

.dl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dl-logo {
    display: block;
    height: 46px;
    width: auto;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
}

.download-close {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(255, 248, 230, 0.05);
    color: var(--text-dim);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.download-close:hover { color: var(--text); background: rgba(255, 248, 230, 0.10); }
.download-close .ic { width: 20px; height: 20px; }

.download-dialog h2 {
    margin: 20px 0 2px;
    font-family: var(--font-display);
    font-size: 1.6rem;
    line-height: 1.3;
    color: #fff6e5;
}

.download-description { color: var(--text-soft); font-size: 0.88rem; }

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

.download-platform {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 248, 230, 0.04);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.download-platform:hover { border-color: var(--line-strong); background: rgba(255, 248, 230, 0.06); }

.dl-row { display: flex; align-items: center; gap: 12px; }

.download-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--gold);
    background: linear-gradient(145deg, rgba(214, 177, 115, 0.18), rgba(214, 177, 115, 0.06));
    border: 1px solid rgba(214, 177, 115, 0.22);
}

.download-icon .ic { width: 24px; height: 24px; }

.download-platform h3 { font-size: 1rem; line-height: 1.35; color: #fff5df; }

.download-format { color: var(--text-soft); font-size: 0.76rem; }

.download-meta {
    min-height: 1.6em;
    color: var(--text-dim);
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.download-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    color: #142014;
    background: linear-gradient(135deg, #78a067, #9cbb84);
    box-shadow: 0 14px 30px rgba(105, 143, 92, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.download-action:hover { transform: translateY(-2px); filter: brightness(1.06); }

.download-action[aria-disabled="true"] {
    opacity: 0.38;
    box-shadow: none;
    pointer-events: none;
}

.dl-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    min-height: 34px;
}

.download-status { color: var(--text-dim); font-size: 0.82rem; }

.download-retry {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--sage);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.download-retry[hidden] { display: none; }

@media (max-width: 560px) {
    .download-dialog {
        width: 100%;
        max-height: 92dvh;
        margin: auto 0 0;
        padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
        border-bottom: 0;
        border-radius: 24px 24px 0 0;
    }
    .download-dialog[open] { animation: dlUp 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
    .dl-logo { height: 36px; }
    .download-dialog h2 { margin-top: 14px; font-size: 1.35rem; }
    .download-platforms { grid-template-columns: 1fr; gap: 10px; margin: 16px 0 10px; }
    .download-platform { padding: 16px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .download-dialog[open] { animation: none; }
}

/* 官服弹窗里的“下载内测版”入口(2026-10-31) */
.dl-beta {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin-top: 14px;
    padding: 12px 16px;
    font: inherit;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg, 16px);
    background: rgba(214, 177, 115, 0.08);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.dl-beta:hover { background: rgba(214, 177, 115, 0.16); border-color: rgba(214, 177, 115, 0.6); transform: translateY(-1px); }
.dl-beta-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: rgba(214, 177, 115, 0.16); color: #e6c68b; }
.dl-beta-text { flex: 1; display: grid; gap: 2px; }
.dl-beta-text small { color: var(--text-dim); font-size: 0.8rem; }
