/* ════════════════════════════════════════════════════════════════
   TOPDREAMS BLACK GLASSY PROFESSIONAL PWA & STORE OVERLAYS
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;800&family=Manrope:wght@400;500;700;800&display=swap');

/* ── Floating PWA Install Banner (Black Glassy Professional) ── */
#pwaInstallBanner {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 20px;
    right: 20px;
    max-width: 580px;
    margin: 0 auto;
    background: rgba(10, 10, 15, 0.95);
    color: #ffffff;
    padding: 18px 24px;
    border-radius: 24px;
    z-index: 10000;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    animation: pwaSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaSlideUp {
    from { transform: translateY(120px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pwa-banner-btn {
    background: #10b981;
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 12px 28px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.pwa-banner-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
}

/* ── Fullscreen / Modal App Store Overlay ── */
#appStoreOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 8, 0.88);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    z-index: 10000;
    overflow-y: auto;
    animation: pwaFadeIn 0.3s ease;
}

@keyframes pwaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Store Container Modal (Obsidian Glass) */
.store-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #09090b;
    color: #f4f4f5;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .store-container {
        max-width: 900px;
        min-height: auto;
        margin: 40px auto;
        border-radius: 32px;
        box-shadow: 0 40px 100px rgba(0,0,0,0.9);
        overflow: hidden;
        border: 1px solid rgba(255,255,255,0.12);
    }
}

/* ── Google Play & Apple Store Dark Luxury Styling ── */
.play-style, .apple-style {
    font-family: 'Manrope', sans-serif;
    background: #09090b;
    color: #f4f4f5;
}

.play-style .store-header-bar, .apple-style .apple-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
}

.play-style .play-logo-text, .apple-style .apple-back-link {
    color: #ffffff;
    font-weight: 700;
}

.store-close-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.store-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.play-style .play-app-hero, .apple-style .apple-app-hero {
    padding: 30px 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: #09090b;
}

.play-style .play-app-icon, .apple-style .apple-app-icon {
    width: 104px;
    height: 104px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.15);
    flex-shrink: 0;
}

.play-style .play-app-title, .apple-style .apple-app-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    font-family: 'Cinzel', serif;
}

.play-style .play-developer-name, .apple-style .apple-app-sub {
    font-size: 13px;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 6px;
}

.play-style .play-stats-bar, .apple-style .apple-stats-scroll {
    background: #0d0d12;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.play-style .play-stat-pill, .apple-style .apple-stat-card {
    text-align: center;
    flex: 1;
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 0 8px;
}

.play-style .play-stat-pill:last-child, .apple-style .apple-stat-card:last-child {
    border-right: none;
}

.play-style .play-stat-val, .apple-style .apple-stat-val {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
}

.play-style .play-stat-sub, .apple-style .apple-stat-label {
    font-size: 10px;
    color: #a1a1aa;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 2px;
}

.play-style .btn-play-install, .apple-style .btn-apple-get {
    background: #10b981;
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 28px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.apple-style .btn-apple-get {
    background: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    border-radius: 100px;
}

/* ── BRANDED STORE INSTALLATION COMPLETION DIALOG (Black Glassy) ── */
#storeCompleteModal, #deviceMismatchModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 8, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10015;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: pwaFadeIn 0.3s ease;
}

.store-complete-card, .mismatch-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: rgba(15, 15, 22, 0.95);
    backdrop-filter: blur(32px);
    border-radius: 32px;
    padding: 32px 24px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f4f4f5;
    overflow: hidden;
}

.store-complete-card.play-complete { border-top: 6px solid #10b981; }
.store-complete-card.apple-complete { border-top: 6px solid #3b82f6; }

.complete-badge-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.complete-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    font-size: 16px;
}

.play-complete .complete-badge-icon { background: #10b981; }
.apple-complete .complete-badge-icon { background: #3b82f6; }

.complete-badge-text {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.play-complete .complete-badge-text { color: #10b981; }
.apple-complete .complete-badge-text { color: #3b82f6; }

.complete-app-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

.complete-app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.complete-app-info h4 {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    font-family: 'Cinzel', serif;
}

.complete-app-info p {
    font-size: 12px;
    color: #10b981;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.complete-steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.complete-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.step-num-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.play-complete .step-num-badge { background: #10b981; }
.apple-complete .step-num-badge { background: #3b82f6; }

.step-text-content h5 {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 2px;
}

.step-text-content p {
    font-size: 12px;
    color: #a1a1aa;
    line-height: 1.4;
}

.btn-complete-action, .btn-mismatch-recommend {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 900;
    color: #ffffff;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.play-complete .btn-complete-action, .btn-mismatch-recommend {
    background: #10b981;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.apple-complete .btn-complete-action {
    background: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.mismatch-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #ffffff;
}

.mismatch-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    font-family: 'Cinzel', serif;
}

.mismatch-card p {
    font-size: 13px;
    color: #a1a1aa;
    line-height: 1.5;
    margin-bottom: 24px;
}

.mismatch-card .highlight-device {
    color: #10b981;
    font-weight: 800;
}

.btn-mismatch-continue {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    font-size: 12.5px;
    font-weight: 800;
    color: #a1a1aa;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
    white-space: nowrap;
}

.btn-mismatch-continue:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* ── Store Section Boxes ── */
.store-section-box, .apple-whats-new {
    background: #0d0d12 !important;
    border-top: 1px solid rgba(255,255,255,0.08) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    color: #f4f4f5 !important;
}

.store-section-heading, .apple-whats-new h3 {
    color: #ffffff !important;
}

.review-item-card, .user-review-card {
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    color: #f4f4f5 !important;
}

.safety-info-card, .store-safety-box {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #10b981 !important;
}

.safety-info-text h5, .store-safety-text h4 {
    color: #34d399 !important;
}

.safety-info-text p, .store-safety-text p {
    color: #a7f3d0 !important;
}

/* ── iOS Walkthrough Overlay (FIXED HIDDEN BY DEFAULT) ── */
#iosWalkthrough {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 8, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10030;
    animation: pwaFadeIn 0.3s ease;
}

.walkthrough-card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 360px;
    background: rgba(15, 15, 22, 0.95);
    border-radius: 32px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f4f4f5;
}

.walkthrough-step {
    display: none;
}

.walkthrough-step.active {
    display: block;
    animation: pwaScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaScaleUp {
    from { transform: scale(0.88); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ios-icon-circle {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #3b82f6;
}

.ios-arrow {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10035;
    animation: bounceArrow 1.5s infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 14px); }
}
