/* ════════════════════════════════════════════════════════════════
   TOPDREAMS AUTHENTIC STORE SIMULATION STYLES
   Google Play Store & Apple App Store Pixel-Perfect Simulation
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');

/* ── Floating PWA Install Banner ── */
#pwaInstallBanner {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 20px;
    right: 20px;
    max-width: 580px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    padding: 18px 22px;
    border-radius: 24px;
    z-index: 10000;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    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: #01875f;
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 12px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(1, 135, 95, 0.4);
}

.pwa-banner-btn:hover {
    background: #00704f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 135, 95, 0.5);
}

/* ── Fullscreen / Modal App Store Overlay ── */
#appStoreOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    overflow-y: auto;
    animation: pwaFadeIn 0.3s ease;
}

@keyframes pwaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Store Container Modal */
.store-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #ffffff;
    color: #1f1f1f;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .store-container {
        max-width: 880px;
        min-height: auto;
        margin: 30px auto;
        border-radius: 28px;
        box-shadow: 0 30px 70px rgba(0,0,0,0.45);
        overflow: hidden;
        border: 1px solid rgba(255,255,255,0.25);
    }
}

/* ── Google Play Store Styling ── */
.play-style {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
}

.play-style .store-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.play-style .play-logo-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.play-style .play-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #5f6368;
    letter-spacing: -0.3px;
}

.play-style .play-search-mockup {
    flex: 1;
    max-width: 380px;
    margin: 0 16px;
    background: #f1f3f4;
    border-radius: 24px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #5f6368;
    font-size: 13px;
}

.play-style .play-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #01875f;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

/* Play Store Tabs */
.play-style .play-tabs-bar {
    display: flex;
    gap: 24px;
    padding: 0 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff;
}

.play-style .play-tab {
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    cursor: pointer;
    position: relative;
}

.play-style .play-tab.active {
    color: #01875f;
    font-weight: 700;
}

.play-style .play-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #01875f;
    border-radius: 3px 3px 0 0;
}

/* Play Store Hero App Details */
.play-style .play-app-hero {
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.play-style .play-app-icon {
    width: 96px;
    height: 96px;
    border-radius: 22%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}

@media (min-width: 768px) {
    .play-style .play-app-icon {
        width: 112px;
        height: 112px;
    }
}

.play-style .play-app-title {
    font-size: 22px;
    font-weight: 700;
    color: #202124;
    line-height: 1.25;
    margin-bottom: 4px;
}

.play-style .play-developer-name {
    font-size: 14px;
    font-weight: 500;
    color: #01875f;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.play-style .play-ads-badge {
    font-size: 11px;
    color: #5f6368;
    margin-bottom: 16px;
}

/* Play Install Action Button */
.play-style .btn-play-install {
    width: 100%;
    max-width: 320px;
    background: #01875f;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 6px rgba(1, 135, 95, 0.3);
}

.play-style .btn-play-install:hover {
    background: #00704f;
}

/* ── FIXED GOOGLE PLAY STORE 4-PILL STATS BAR CSS ── */
.play-style .play-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 16px 12px;
    border-top: 1px solid #f1f3f4;
    border-bottom: 1px solid #f1f3f4;
    background: #ffffff;
    overflow-x: auto;
}

.play-style .play-stat-pill {
    flex: 1;
    text-align: center;
    border-right: 1px solid #e0e0e0;
    padding: 0 12px;
    min-width: 80px;
    flex-shrink: 0;
}

.play-style .play-stat-pill:last-child {
    border-right: none;
}

.play-style .play-stat-val {
    font-size: 15px;
    font-weight: 700;
    color: #202124;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    line-height: 1.2;
}

.play-style .play-stat-sub {
    font-size: 11px;
    color: #5f6368;
    margin-top: 3px;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Google Play Wavy Animated Circular Progress Indicator ── */
.play-wavy-box {
    display: none;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    max-width: 320px;
}

.play-wavy-spinner {
    width: 44px;
    height: 44px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.play-wavy-svg {
    animation: rotateWavy 2.5s linear infinite;
    width: 44px;
    height: 44px;
}

@keyframes rotateWavy {
    100% { transform: rotate(360deg); }
}

.play-wavy-bg {
    stroke: #e0e0e0;
    stroke-width: 4;
    fill: none;
}

.play-wavy-path {
    stroke: #01875f;
    stroke-width: 4;
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 125;
    stroke-dashoffset: 125;
    transition: stroke-dashoffset 0.18s linear;
}

.play-wavy-info {
    flex: 1;
}

.play-wavy-title {
    font-size: 13px;
    font-weight: 700;
    color: #202124;
}

.play-wavy-sub {
    font-size: 11px;
    color: #5f6368;
    margin-top: 2px;
}

.btn-play-cancel {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #dadce0;
    background: #ffffff;
    color: #01875f;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-play-cancel:hover {
    background: #f1f3f4;
}

/* ── Apple App Store Styling ── */
.apple-style {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
    background: #f2f2f7;
    color: #000000;
}

.apple-style .apple-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #e5e5ea;
    position: sticky;
    top: 0;
    z-index: 50;
}

.apple-style .apple-back-link {
    color: #007aff;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.apple-style .apple-app-hero {
    background: #ffffff;
    padding: 24px 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.apple-style .apple-app-icon {
    width: 100px;
    height: 100px;
    border-radius: 22.5%;
    object-fit: cover;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    border: 1px solid #e5e5ea;
    flex-shrink: 0;
}

.apple-style .apple-app-title {
    font-size: 20px;
    font-weight: 800;
    color: #000000;
    margin-bottom: 2px;
    letter-spacing: -0.4px;
}

.apple-style .apple-app-sub {
    font-size: 13px;
    color: #8e8e93;
    margin-bottom: 12px;
}

.apple-style .btn-apple-get {
    background: #007aff;
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    padding: 6px 24px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.apple-style .btn-apple-get:hover {
    background: #0062cc;
}

/* ── Apple Circular Progress Button with Center Square Stop Icon (■) ── */
.apple-progress-circle-box {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.apple-progress-ring-wrapper {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.apple-ring-svg {
    transform: rotate(-90deg);
    width: 36px;
    height: 36px;
}

.apple-ring-bg {
    stroke: #e5e5ea;
    stroke-width: 3;
    fill: none;
}

.apple-ring-fill {
    stroke: #007aff;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 0.18s linear;
}

.apple-stop-square {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #007aff;
    border-radius: 2px;
}

.apple-progress-status-text {
    font-size: 12px;
    font-weight: 600;
    color: #8e8e93;
}

.apple-style .apple-stats-scroll {
    background: #ffffff;
    display: flex;
    padding: 16px 20px;
    border-top: 1px solid #e5e5ea;
    border-bottom: 1px solid #e5e5ea;
    overflow-x: auto;
    gap: 20px;
}

.apple-style .apple-stat-card {
    min-width: 90px;
    text-align: center;
    border-right: 1px solid #e5e5ea;
    padding-right: 20px;
    flex-shrink: 0;
}

.apple-style .apple-stat-card:last-child {
    border-right: none;
    padding-right: 0;
}

.apple-style .apple-stat-label {
    font-size: 10px;
    font-weight: 600;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.apple-style .apple-stat-val {
    font-size: 18px;
    font-weight: 800;
    color: #1c1c1e;
}

/* What's New Card in Apple Style */
.apple-style .apple-whats-new {
    background: #ffffff;
    padding: 20px;
    margin-top: 12px;
    border-top: 1px solid #e5e5ea;
    border-bottom: 1px solid #e5e5ea;
}

/* ── Screenshots Carousel ── */
.store-section-box {
    background: #ffffff;
    padding: 20px;
    margin-top: 12px;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.store-section-heading {
    font-size: 16px;
    font-weight: 700;
    color: #202124;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.screenshots-scroll-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
}

.screenshot-preview-card {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 210px;
    height: 370px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    background: #f8f9fa;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.screenshot-preview-card:hover {
    transform: scale(1.02);
}

.screenshot-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Reviews Breakdown */
.reviews-grid-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.rating-score-large {
    text-align: center;
}

.rating-score-val {
    font-size: 48px;
    font-weight: 900;
    color: #202124;
    line-height: 1;
}

.rating-score-stars {
    color: #f59e0b;
    font-size: 13px;
    margin-top: 4px;
}

.rating-score-count {
    font-size: 11px;
    color: #5f6368;
    margin-top: 2px;
}

.rating-bars-stack {
    flex: 1;
}

.bar-stack-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #5f6368;
    margin-bottom: 3px;
}

.bar-stack-track {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 100px;
    overflow: hidden;
}

.bar-stack-fill {
    height: 100%;
    background: #01875f;
    border-radius: 100px;
}

.apple-style .bar-stack-fill {
    background: #007aff;
}

/* User Review Cards */
.review-item-card {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.review-author-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: #202124;
    margin-bottom: 4px;
}

.review-body-text {
    font-size: 12.5px;
    color: #3c4043;
    line-height: 1.45;
}

/* Data Safety Box */
.safety-info-card {
    background: #e6f4ea;
    border: 1px solid #ceead6;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.safety-info-icon {
    color: #137333;
    font-size: 22px;
}

.safety-info-text h5 {
    font-size: 13px;
    font-weight: 700;
    color: #0d652d;
    margin-bottom: 2px;
}

.safety-info-text p {
    font-size: 11px;
    color: #137333;
    line-height: 1.4;
}

/* ── BRANDED STORE INSTALLATION COMPLETION DIALOG ── */
#storeCompleteModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10015;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: pwaFadeIn 0.3s ease;
}

.store-complete-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 28px;
    padding: 28px 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.store-complete-card.play-complete {
    font-family: 'Roboto', sans-serif;
    border-top: 6px solid #01875f;
}

.store-complete-card.apple-complete {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    border-top: 6px solid #007aff;
}

.complete-badge-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.complete-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 16px;
}

.play-complete .complete-badge-icon { background: #01875f; }
.apple-complete .complete-badge-icon { background: #007aff; }

.complete-badge-text {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.play-complete .complete-badge-text { color: #01875f; }
.apple-complete .complete-badge-text { color: #007aff; }

.complete-app-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border-radius: 20px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.complete-app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.complete-app-info h4 {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.complete-app-info p {
    font-size: 12px;
    color: #16a34a;
    font-weight: 600;
    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: #f1f5f9;
    padding: 12px 16px;
    border-radius: 16px;
}

.step-num-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.play-complete .step-num-badge { background: #01875f; }
.apple-complete .step-num-badge { background: #007aff; }

.step-text-content h5 {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.step-text-content p {
    font-size: 12px;
    color: #475569;
    line-height: 1.4;
}

.btn-complete-action {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
}

.play-complete .btn-complete-action {
    background: #01875f;
    box-shadow: 0 4px 14px rgba(1, 135, 95, 0.35);
}

.apple-complete .btn-complete-action {
    background: #007aff;
    box-shadow: 0 4px 14px rgba(0, 122, 255, 0.35);
}

.btn-complete-action:hover {
    opacity: 0.9;
}

/* ── DEVICE MISMATCH DETECTED MODAL ── */
#deviceMismatchModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10025;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: pwaFadeIn 0.3s ease;
}

.mismatch-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 28px;
    padding: 28px 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.mismatch-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #0f172a;
}

.mismatch-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.mismatch-card p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 24px;
}

.mismatch-card .highlight-device {
    color: #01875f;
    font-weight: 700;
}

.btn-mismatch-recommend {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
    background: #01875f;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(1, 135, 95, 0.35);
    margin-bottom: 10px;
    transition: all 0.2s;
}

.btn-mismatch-recommend:hover {
    background: #00704f;
}

.btn-mismatch-continue {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-mismatch-continue:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ── iOS Walkthrough Overlay ── */
#iosWalkthrough {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 10005;
    animation: pwaFadeIn 0.3s ease;
}

.walkthrough-card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 360px;
    background: #ffffff;
    border-radius: 32px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.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: #f2f2f7;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #007aff;
}

.ios-arrow {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10010;
    animation: bounceArrow 1.5s infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 14px); }
}

/* Zoom Modal */
#screenshotZoomModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10020;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#screenshotZoomImg {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 16px;
    object-fit: contain;
}
