/* ============================================
   download.html 弹窗组件样式 — v2 升级版
   ============================================ */

/* ---------- Modal Overlay ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ---------- Modal Box ---------- */
.modal {
    position: relative;
    overflow: hidden;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 20px;
    padding: 40px 44px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
    transform: translateY(-18px) scale(0.96);
    transition: transform 0.32s cubic-bezier(.22, 1, .36, 1);
}
.modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary, #2563EB), var(--accent, #06B6D4));
}
.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}
.modal-command {
    max-width: 560px;
}

/* ---------- Modal Icon ---------- */
.modal-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #E0F2FE 0%, #DBEAFE 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #2563EB);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.modal-icon svg {
    width: 38px;
    height: 38px;
    animation: bounce 1.2s ease infinite;
}
.modal-icon-info {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #D97706;
}
.modal-icon-info svg {
    animation: none;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---------- Modal Content ---------- */
.modal-title {
    position: relative;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary, #111827);
    margin-bottom: 12px;
}
.modal-desc {
    font-size: 15px;
    color: var(--text-secondary, #4B5563);
    margin-bottom: 12px;
    line-height: 1.7;
}
.modal-tip {
    font-size: 13px;
    color: var(--text-muted, #9CA3AF);
    margin-bottom: 28px;
}
.modal-note {
    font-size: 13px;
    color: var(--text-muted, #9CA3AF);
    margin: 12px 0 20px;
    text-align: left;
    line-height: 1.7;
}

/* ---------- Modal Button ---------- */
.modal-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 42px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary, #3B82F6) 0%, var(--primary-dark, #2563EB) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.38);
}
.modal-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 52%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.28), transparent);
    border-radius: inherit;
    pointer-events: none;
}
.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(59, 130, 246, 0.5);
}
.modal-btn:active {
    transform: translateY(0);
}

/* ---------- Command Box (for Homebrew/AUR) ---------- */
.command-box {
    position: relative;
    background: #0F172A;
    border-radius: 12px;
    padding: 18px 22px;
    margin: 18px 0 0;
    text-align: left;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.4), 0 8px 24px rgba(15, 23, 42, 0.3);
}
.command-box code {
    display: block;
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
    font-size: 13px;
    color: #E2E8F0;
    word-break: break-all;
    white-space: pre-wrap;
    padding-right: 40px;
    line-height: 1.7;
}
.btn-copy {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.15s, transform 0.15s;
}
.btn-copy:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-50%) scale(1.06);
}
.btn-copy.copied {
    background: #22C55E;
}

/* ---------- Button Cursor ---------- */
.btn-dl {
    cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .modal {
        padding: 30px 22px;
    }
    .modal-icon {
        width: 66px;
        height: 66px;
    }
    .modal-icon svg {
        width: 32px;
        height: 32px;
    }
    .modal-title {
        font-size: 20px;
    }
    .modal-btn {
        padding: 13px 34px;
        font-size: 14px;
    }
    .command-box {
        padding: 14px 16px;
    }
    .command-box code {
        font-size: 12px;
    }
}
