/* ═══════════════════════════════════════════════════════════════════════════
   static/nv-desktop-download-overlay.css
   THE NANOVERSE Desktop Download Promotion Overlay
   Glassmorphic design matching welcome-overlay.css language
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Overlay Container ──────────────────────────────────────────────────── */
.nv-download-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.nv-download-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nv-download-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* ─── Backdrop ───────────────────────────────────────────────────────────── */
.nv-download-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg,
            rgba(0, 229, 255, 0.06) 0%,
            rgba(100, 120, 255, 0.05) 25%,
            rgba(140, 80, 255, 0.06) 50%,
            rgba(0, 200, 220, 0.05) 75%,
            rgba(0, 229, 255, 0.04) 100%
        );
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* Floating orbs */
.nv-download-backdrop::before,
.nv-download-backdrop::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    animation: nvDlOrb 18s ease-in-out infinite;
    pointer-events: none;
}

.nv-download-backdrop::before {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.25), transparent 70%);
    top: -120px;
    left: -80px;
}

.nv-download-backdrop::after {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(124, 77, 255, 0.22), transparent 70%);
    bottom: -100px;
    right: -60px;
    animation-delay: -9s;
}

@keyframes nvDlOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, 25px) scale(1.08); }
    50% { transform: translate(-20px, 50px) scale(0.95); }
    75% { transform: translate(30px, -15px) scale(1.05); }
}

/* ─── Glass Panel ────────────────────────────────────────────────────────── */
.nv-download-panel {
    position: relative;
    width: 90%;
    max-width: 520px;
    background: rgba(14, 14, 26, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 40px 36px 32px;
    box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.08),
        0 24px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.nv-download-overlay.active .nv-download-panel {
    transform: translateY(0) scale(1);
}

/* Animated border glow */
.nv-download-panel::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    padding: 1px;
    background: linear-gradient(135deg, #00e5ff33, #7c4dff33, #00e5ff33);
    background-size: 300% 300%;
    animation: nvDlBorderGlow 6s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes nvDlBorderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ─── Close Button ───────────────────────────────────────────────────────── */
.nv-download-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}

.nv-download-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
}

/* ─── Content ────────────────────────────────────────────────────────────── */
.nv-download-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.nv-download-logo img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

.nv-download-logo-text {
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #00e5ff, #7c4dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nv-download-title {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    line-height: 1.3;
}

.nv-download-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ─── Feature List ───────────────────────────────────────────────────────── */
.nv-download-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 28px;
}

.nv-download-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    transition: border-color 0.2s ease;
}

.nv-download-feature:hover {
    border-color: rgba(0, 229, 255, 0.15);
}

.nv-download-feature-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.nv-download-feature-icon.offline { background: rgba(0, 229, 255, 0.12); color: #00e5ff; }
.nv-download-feature-icon.terminal { background: rgba(124, 77, 255, 0.12); color: #7c4dff; }
.nv-download-feature-icon.speed { background: rgba(0, 230, 118, 0.12); color: #00e676; }
.nv-download-feature-icon.updates { background: rgba(255, 171, 64, 0.12); color: #ffab40; }

.nv-download-feature-text {
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.3;
}

/* ─── Platform Buttons ───────────────────────────────────────────────────── */
.nv-download-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nv-download-primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    background: linear-gradient(135deg, #00e5ff, #00b8d4);
    color: #0a0a12;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.2);
}

.nv-download-primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(0, 229, 255, 0.35);
}

.nv-download-primary-btn:active {
    transform: translateY(0);
}

.nv-download-primary-btn i {
    font-size: 16px;
}

.nv-download-secondary-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.nv-download-alt-link {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.nv-download-alt-link:hover {
    color: rgba(0, 229, 255, 0.8);
}

.nv-download-alt-sep {
    color: rgba(255, 255, 255, 0.1);
    font-size: 11px;
}

.nv-download-dismiss {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px 0;
    margin-top: 4px;
    text-align: center;
    display: block;
    width: 100%;
    transition: color 0.2s ease;
}

.nv-download-dismiss:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* ─── Version Badge ──────────────────────────────────────────────────────── */
.nv-download-version {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(0, 229, 255, 0.1);
    color: #00e5ff;
    border: 1px solid rgba(0, 229, 255, 0.15);
    margin-left: 8px;
    vertical-align: middle;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .nv-download-panel {
        max-width: 95%;
        padding: 28px 20px 24px;
    }

    .nv-download-features {
        grid-template-columns: 1fr;
    }

    .nv-download-title {
        font-size: 19px;
    }
}

/* ─── Hide on very small mobile screens (desktop app not useful) ─────── */
@media (max-width: 480px) {
    .nv-download-overlay {
        display: none !important;
    }
}
