/* ═══════════════════════════════════════════
   CSS Reset & Base
   ═══════════════════════════════════════════ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: radial-gradient(circle at top, rgba(99, 102, 241, 0.16), transparent 32%),
                radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.1), transparent 28%),
                #020617;
    display: flex;
    justify-content: center;
    color: #e2e8f0;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

.page-shell {
    width: 100%;
    padding: 12px;
    padding-bottom: 80px; /* space for sticky CTA */
}

/* ═══════════════════════════════════════════
   Container
   ═══════════════════════════════════════════ */
.container {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    background: #080b18;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    text-align: center;
}

/* ═══════════════════════════════════════════
   Social Proof Toast
   ═══════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    pointer-events: none;
    padding: 12px 16px;
}

.toast {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 14px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    max-width: 340px;
    width: 100%;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.toast-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════
   Hero Bar
   ═══════════════════════════════════════════ */
.hero-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.hero-pill {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(249, 115, 22, 0.18));
    color: #fecaca;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: pillPulse 2s ease-in-out infinite;
}

@keyframes pillPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hero-urgency {
    color: #fde68a;
    font-size: 12px;
    font-weight: 600;
    align-self: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.15);
}

.hero-urgency strong {
    color: #fbbf24;
}

/* ═══════════════════════════════════════════
   Center Block (App Info)
   ═══════════════════════════════════════════ */
.center-block {
    text-align: center;
}

.app-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 16px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(15, 23, 42, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(30, 41, 59, 0.32);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.app-icon:hover {
    transform: translateY(-3px);
}

.app-icon img {
    width: 72%;
    height: 72%;
    object-fit: contain;
}

.meta-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.app-meta,
.rating {
    font-size: 12px;
    color: #94a3b8;
}

.rating {
    color: #fde68a;
}

h1 {
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 8px;
    line-height: 1.15;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}

.eyebrow {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 16px;
    line-height: 1.5;
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   Urgency Strip (Countdown + Live Counter)
   ═══════════════════════════════════════════ */
.urgency-strip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.countdown {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
}

.countdown-timer {
    color: #f87171;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.live-activity {
    color: #fbbf24;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    animation: livePulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

@keyframes livePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.4);
        opacity: 0.6;
    }
}

/* ═══════════════════════════════════════════
   Final Push (Microcopy above CTA)
   ═══════════════════════════════════════════ */
.final-push {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 10px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   CTA Button
   ═══════════════════════════════════════════ */
.cta-button {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 50%, #8b5cf6 100%);
    color: white;
    border: none;
    width: 100%;
    padding: 0 24px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                opacity 0.2s ease;
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.35);
    position: relative;
    outline: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    overflow: hidden;
    letter-spacing: -0.01em;
    -webkit-user-select: none;
    user-select: none;
}

/* Shimmer sweep */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2) 50%,
        transparent);
    border-radius: 16px;
    animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(124, 58, 237, 0.45);
}

.cta-button:active {
    transform: scale(0.97) translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.btn-text {
    transition: transform 0.2s ease, opacity 0.2s ease;
    position: relative;
    z-index: 1;
}

.cta-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.14);
}

.cta-button:disabled::before {
    animation: none;
}

.cta-button.loading .btn-text {
    opacity: 0;
}

/* Glow animation */
.pulse {
    animation: glow 2.8s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 16px 40px rgba(99, 102, 241, 0.35),
                    0 0 0px rgba(124, 58, 237, 0);
    }
    50% {
        box-shadow: 0 16px 50px rgba(99, 102, 241, 0.45),
                    0 0 28px rgba(124, 58, 237, 0.5);
    }
}

/* Spinner */
.spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.cta-button.loading .spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Ready state (green) */
.cta-button.ready {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 16px 40px rgba(16, 185, 129, 0.35);
    animation: glowGreen 2.8s ease-in-out infinite;
}

.cta-button.ready::before {
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes glowGreen {
    0%, 100% {
        box-shadow: 0 16px 40px rgba(16, 185, 129, 0.35),
                    0 0 0px rgba(5, 150, 105, 0);
    }
    50% {
        box-shadow: 0 16px 50px rgba(16, 185, 129, 0.5),
                    0 0 28px rgba(5, 150, 105, 0.4);
    }
}

/* ═══════════════════════════════════════════
   CTA Support Text
   ═══════════════════════════════════════════ */
.cta-sub {
    font-size: 12px;
    color: #94a3b8;
    margin: 8px 0 0;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.cta-support {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #64748b;
    font-size: 11px;
    margin: 10px 0 20px;
    font-weight: 500;
}

.cta-support span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ═══════════════════════════════════════════
   Feature Grid
   ═══════════════════════════════════════════ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 14px;
    padding: 10px 8px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 48px;
}

.feature-item span {
    color: #818cf8;
    font-size: 14px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   Short Description
   ═══════════════════════════════════════════ */
.short-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 auto 20px;
    line-height: 1.7;
    max-width: 440px;
}

/* ═══════════════════════════════════════════
   Screenshots
   ═══════════════════════════════════════════ */
.screenshots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.screenshot-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.screenshot-item img {
    width: 100%;
    border-radius: 16px;
    display: block;
    object-fit: cover;
    height: 200px;
}

.screenshot-caption {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    font-weight: 600;
    margin: 0;
}

/* ═══════════════════════════════════════════
   Steps Indicator
   ═══════════════════════════════════════════ */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 6px;
    transition: all 0.4s ease;
}

.step.active .step-circle {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.15);
}

.step-label {
    font-size: 11px;
    color: #475569;
    font-weight: 600;
}

.step.active .step-label {
    color: #818cf8;
}

.step-line {
    width: 56px;
    height: 2px;
    background: rgba(148, 163, 184, 0.15);
    transition: background 0.4s ease;
}

.step-line.active {
    background: #4f46e5;
}

/* ═══════════════════════════════════════════
   Progress Bar
   ═══════════════════════════════════════════ */
.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    transition: width 0.3s ease;
    border-radius: 999px;
}

/* ═══════════════════════════════════════════
   Instruction & Downloads
   ═══════════════════════════════════════════ */
.instruction {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.6;
}

.downloads {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 18px;
}

/* ═══════════════════════════════════════════
   Trust Elements
   ═══════════════════════════════════════════ */
.trust-elements {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.trust-text {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.trust-text svg {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    color: #10b981;
}

.trust-note {
    font-size: 11px;
    color: #64748b;
}

/* ═══════════════════════════════════════════
   Sticky Bottom CTA
   ═══════════════════════════════════════════ */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(2, 6, 23, 0.98) 60%, transparent);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    pointer-events: none;
}

.sticky-cta.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.sticky-cta-btn {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    display: block;
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 0 24px;
    height: 52px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.sticky-cta-btn:active {
    transform: scale(0.97);
}

/* ═══════════════════════════════════════════
   Urgency Popup (Bottom Sheet)
   ═══════════════════════════════════════════ */
.urgency-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 950;
    pointer-events: none;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.urgency-popup.show {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.urgency-popup-inner {
    background: linear-gradient(to bottom, #0f172a, #0c1120);
    border-top: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    text-align: center;
    position: relative;
    box-shadow: 0 -16px 60px rgba(0, 0, 0, 0.5);
}

.urgency-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(148, 163, 184, 0.1);
    border: none;
    color: #94a3b8;
    font-size: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.urgency-close:active {
    background: rgba(148, 163, 184, 0.2);
}

.urgency-popup-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.urgency-popup-title {
    font-size: 18px;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 6px;
}

.urgency-popup-text {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 18px;
    line-height: 1.5;
}

.urgency-popup-btn {
    width: 100%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 0 24px;
    height: 52px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.35);
    transition: transform 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.urgency-popup-btn:active {
    transform: scale(0.97);
}

/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */
@media (max-width: 380px) {
    .container {
        padding: 20px 16px;
    }

    h1 {
        font-size: 22px;
    }

    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cta-button {
        font-size: 16px;
        height: 56px;
    }
}

@media (max-width: 520px) {
    .container {
        border-radius: 24px;
    }

    .screenshots {
        grid-template-columns: 1fr;
    }

    .screenshot-item img {
        height: 180px;
    }
}