/* =========================================================
   下载页 · 页面样式
   ========================================================= */

.dl-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(2.8rem, 6vw, 4.2rem) 1.5rem clamp(2.4rem, 5vw, 3.4rem);
    margin-bottom: 1.8rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #fff;
    box-shadow: var(--shadow-lg);
    background-image:
        linear-gradient(125deg, rgba(5, 18, 12, 0.88) 0%, rgba(6, 16, 12, 0.68) 55%, rgba(8, 20, 28, 0.8) 100%),
        url('../images/background/hero-bg.png');
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

.dl-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4ade80, #22c55e, #3b82f6, #f59e0b);
    background-size: 200% 100%;
    animation: gradientSlide 6s linear infinite;
}

@keyframes gradientSlide {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.dl-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(520px 340px at 12% 8%, rgba(74, 222, 128, 0.24), transparent 70%),
        radial-gradient(420px 320px at 88% 92%, rgba(59, 130, 246, 0.2), transparent 70%);
    pointer-events: none;
}

/* 应用信息卡 */
.app-card {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 100%;
    padding: 1.4rem 2rem;
    border-radius: 22px;
    background: rgba(8, 20, 14, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    text-align: left;
}

.app-icon {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 26px;
    border: 3px solid rgba(255, 255, 255, 0.85);
    background: #101a14;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-tag {
    display: inline-block;
    padding: 0.16rem 0.7rem;
    margin-bottom: 0.45rem;
    border-radius: var(--radius-pill);
    background: rgba(74, 222, 128, 0.16);
    border: 1px solid rgba(74, 222, 128, 0.45);
    color: #bbf7d0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.app-name {
    font-size: clamp(2rem, 5vw, 2.7rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: #fff;
    text-shadow: 0 6px 26px rgba(0, 0, 0, 0.45);
}

.app-sub {
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.94rem;
}

.version-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.7rem;
    border-radius: var(--radius-pill);
    background: var(--grad);
    color: #04220f;
    font-size: 0.78rem;
    font-weight: 700;
}

.pill-soft {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 500;
}

/* 按钮 */
.dl-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2.1rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 2.3rem;
    border-radius: var(--radius-pill);
    background: var(--grad);
    color: #04220f;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 16px 34px rgba(34, 197, 94, 0.4);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.btn-download:hover {
    color: #04220f;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 22px 44px rgba(34, 197, 94, 0.5);
    filter: brightness(1.04);
}

.btn-download:active {
    transform: translateY(-1px) scale(0.99);
}

.btn-size {
    padding: 0.12rem 0.55rem;
    border-radius: var(--radius-pill);
    background: rgba(4, 34, 15, 0.18);
    font-size: 0.76rem;
    font-weight: 700;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.95rem 1.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.dl-hint {
    position: relative;
    z-index: 1;
    min-height: 1.4rem;
    margin: 1.1rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
}

.dl-hint a {
    color: #bbf7d0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 参数 */
.dl-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.stat {
    position: relative;
    overflow: hidden;
    padding: 1.25rem 1rem;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--grad-cool);
    opacity: 0.8;
}

.stat:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--primary-strong);
}

[data-theme="dark"] .stat-value {
    color: #86efac;
}

.stat-label {
    margin-top: 0.15rem;
    color: var(--text-faint);
    font-size: 0.82rem;
}

/* 两栏 */
.dl-cols {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
    gap: 1.5rem;
}

.dl-about {
    margin-top: 1.5rem;
}

/* 安装步骤 */
.step {
    display: flex;
    gap: 1rem;
    padding: 0.95rem 0;
    border-bottom: 1px dashed var(--border);
}

.step:first-of-type {
    padding-top: 0;
}

.step:last-of-type {
    padding-bottom: 0;
    border-bottom: none;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-soft);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: var(--primary-strong);
    font-size: 0.9rem;
    font-weight: 800;
}

[data-theme="dark"] .step-num {
    color: #86efac;
}

.step-body h3 {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.step-body p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.7;
}

.step-body code {
    padding: 0.05rem 0.35rem;
    border-radius: 6px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-family: ui-monospace, Consolas, 'Courier New', monospace;
    font-size: 0.83em;
    word-break: break-all;
}

[data-theme="dark"] .step-body code {
    color: #86efac;
}

/* 文件信息 */
.file-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.68rem 0;
    border-bottom: 1px dashed var(--border);
}

.file-row:last-of-type {
    border-bottom: none;
}

.file-key {
    flex-shrink: 0;
    color: var(--text-faint);
    font-size: 0.88rem;
    white-space: nowrap;
}

.file-val {
    text-align: right;
    color: var(--text);
    font-size: 0.88rem;
    word-break: break-all;
}

.file-val.mono {
    color: var(--text-light);
    font-family: ui-monospace, Consolas, 'Courier New', monospace;
    font-size: 0.74rem;
    line-height: 1.55;
    letter-spacing: -0.01em;
}

.copy-hash {
    width: 100%;
    margin-top: 0.9rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.copy-hash:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-2px);
}

[data-theme="dark"] .copy-hash {
    color: #86efac;
}

/* 引言 */
.about-quote {
    margin-top: 1.2rem;
    padding: 0.9rem 1.1rem;
    border-left: 3px solid rgba(34, 197, 94, 0.55);
    border-radius: 0 12px 12px 0;
    background: var(--primary-soft);
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.75;
}

/* 小提示 */
.tips-card {
    margin-top: 1.5rem;
    padding: 1.5rem clamp(1.15rem, 3vw, 2rem);
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid rgba(245, 158, 11, 0.65);
    box-shadow: var(--shadow-sm);
}

.tips-card h2 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.tips-card h2 i {
    margin-right: 0.4rem;
    color: var(--accent);
}

.tips-card ul {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tips-card li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.7;
}

.tips-card li::before {
    content: '\f00c';
    position: absolute;
    left: 0;
    top: 0.1em;
    color: var(--primary);
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.78rem;
}

@media (max-width: 900px) {
    .dl-cols {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dl-hero {
        padding: 2rem 1rem;
        border-radius: 22px;
    }

    .app-card {
        gap: 1rem;
        padding: 1.2rem 1rem;
        text-align: center;
    }

    .app-icon {
        width: 84px;
        height: 84px;
        border-radius: 22px;
    }

    .app-name {
        font-size: 1.9rem;
    }

    .version-row {
        justify-content: center;
    }

    .btn-download,
    .btn-ghost {
        width: 100%;
        justify-content: center;
    }

    .dl-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat {
        padding: 1rem 0.75rem;
        border-radius: 16px;
    }

    .stat-value {
        font-size: 1.12rem;
    }

    .file-row {
        flex-direction: column;
        gap: 0.15rem;
    }

    .file-val {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .pill {
        font-size: 0.74rem;
    }

    .app-tag {
        letter-spacing: 0.1em;
    }
}
