/* style.css */

:root {
    --app-bg: #F2F2F7;
    --card-bg: #FFFFFF;
    --text-main: #1C1C1E;
    --brand-color: #007AFF; 
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --nav-height: 60px;
}
 
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: 0; user-select: none; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: #e4e5e8;
    font-family: var(--font-stack);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    padding-bottom: 120px;
}

.app-header {
    background: #FC5301;
    position: fixed; top: 0; width: 100%; max-width: 500px; z-index: 1000;
    padding: 0 15px; height: var(--nav-height); 
    display: flex; align-items: center; justify-content: flex-start;
    box-shadow: 0px 4px 4px -1px rgba(0, 0, 0, 0.2), 0px 5px 5px 0px rgba(0, 0, 0, 0.14), 0px 10px 10px 0px rgba(0, 0, 0, 0.12);
}
.brand { font-weight: 800; font-size: 22px; color: #FFFFFF; margin: 0; text-shadow: none; }
 
.app-container { background-color: #FFFFFF; max-width: 500px; margin: 0 auto; min-height: 100vh; position: relative; box-shadow: 0 0 30px rgba(0,0,0,0.1); overflow: hidden; }
.content-area { padding: 20px; margin-top: var(--nav-height); }
 
.section-wrapper { margin-bottom: 32px; }
.section-header { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.section-bar { width: 5px; height: 22px; background: var(--brand-color); margin-right: 12px; border-radius: 10px; }
.section-title { font-size: 19px; font-weight: 800; color: #1a1a1a; letter-spacing: -0.5px; margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px }
 
.card { text-decoration: none; display: flex; flex-direction: column; background-color: #ffffff; border: 1px solid #f0f0f0; box-shadow: 0 4px 10px rgba(0, 0, 0, .6), 0 1px 3px rgba(255, 255, 255, .2); border-radius: 16px; overflow: hidden; position: relative; }
.card:active { transform: scale(0.95) }
.card-image { width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover; background: #f0f0f0; border-radius: 16px 16px 0 0; }
.card-label { padding: 10px 8px; text-align: center; font-size: 14px; font-weight: 700; color: #333; display: flex; align-items: center; justify-content: center; min-height: 48px; line-height: 1.1 }
 
.app-footer { padding: 30px 20px 40px 20px; text-align: center; border-top: 1px solid rgba(0,0,0,0.05); margin-top: 20px }
.footer-links a { font-size: 12px; color: #8E8E93; text-decoration: none; font-weight: 600; margin: 0 5px; }
.copyright { font-size: 11px; color: #aaa; margin-top: 10px; }

/* Modal Styles */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); z-index: 9999999; justify-content: center; align-items: center; padding: 20px; animation: fadeIn 0.3s ease; }
.modal-card { background: #fff; border-radius: 24px; padding: 32px 24px; width: 100%; max-width: 380px; text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.3); transform: translateY(20px); animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.modal-title { margin: 0 0 8px 0; font-size: 24px; font-weight: 800; color: #1C1C1E; letter-spacing: -0.5px; }
.modal-desc { font-size: 14px; color: #666; margin-bottom: 24px; line-height: 1.5; font-weight: 500; }
.modal-btn-primary { width: 100%; background: #00D287; color: #fff; border: none; padding: 18px; border-radius: 14px; font-weight: 800; font-size: 16px; cursor: pointer; transition: transform 0.2s, background 0.2s; margin-top: 8px; box-shadow: 0 8px 20px rgba(0, 210, 135, 0.3); text-transform: uppercase; letter-spacing: 0.5px; }
.modal-btn-primary.blue { background: #007AFF; box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3); }
.modal-btn-primary:active { transform: scale(0.96); }
.modal-btn-secondary { width: 100%; background: transparent; color: #8E8E93; border: none; padding: 14px; font-weight: 600; cursor: pointer; margin-top: 8px; font-size: 15px; }
 
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* CUSTOM TOAST NOTIFICATION */
.custom-toast {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translate(-50%, -100px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    color: #1C1C1E;
    padding: 14px 20px;
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    font-size: 15px;
    font-weight: 600;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    width: max-content;
    max-width: 90%;
}
.custom-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}
.custom-toast svg { width: 22px; height: 22px; flex-shrink: 0; }

/* IG REELS STYLES */
.ig-mute-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    transform: none;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}
.ig-mute-indicator.hidden {
    opacity: 0;
    visibility: hidden;
}
.ig-mute-indicator svg { fill: #fff; width: 32px; height: 32px; }
 
.shorts-feed-container { display: flex; flex-direction: column; height: 70vh; max-height: 800px; overflow-y: hidden; scroll-snap-type: y mandatory; margin-bottom: 15px; -ms-overflow-style: none; scrollbar-width: none; position: relative; transition: all 0.3s ease; border-radius: 16px; background: #000; }
.shorts-feed-container.is-fullscreen { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; max-height: none; border-radius: 0; margin: 0; z-index: 999999; overflow-y: scroll; }
.shorts-feed-container::-webkit-scrollbar { display: none; }
.short-video-item { flex: 0 0 100%; height: 100%; width: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; justify-content: center; align-items: center; background: #000; position: relative; container-type: size; overflow: hidden; }
.video-thumbnail, .short-video-item iframe { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1.20); width: max(100cqi, 56.25cqb); height: max(100cqb, 177.78cqi); }
.video-thumbnail { background-size: cover; background-position: center; z-index: 1; }
.short-video-item iframe { border: none; pointer-events: auto; z-index: 2; opacity: 0; transition: opacity 0.5s ease-in-out; }
.short-video-item iframe.iframe-ready { opacity: 1; }
.video-click-overlay { position: absolute; inset: 0; z-index: 5; }
.shorts-feed-container.is-unmuted .video-click-overlay { cursor: pointer; }

@keyframes tapPulse { 0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; } 50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.4; } 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; } }
.shorts-feed-container.is-unmuted .video-click-overlay::after { content: ''; position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 70%); border-radius: 50%; pointer-events: none; animation: tapPulse 2.5s infinite ease-in-out; z-index: 6; }

.close-fullscreen-btn { display: none; position: fixed; top: 20px; left: 20px; width: 44px; height: 44px; background: rgba(0, 0, 0, 0.6); border: none; border-radius: 50%; z-index: 1000000; color: white; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(4px); }
.close-fullscreen-btn svg { width: 24px; height: 24px; fill: currentColor; }
.shorts-feed-container.is-fullscreen .close-fullscreen-btn { display: flex; }

.fullscreen-btn { background: #f0f0f0; color: #000; border: 1px solid #ddd; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; }
.fullscreen-btn:active { transform: scale(0.9); }
 
.shorts-nav-buttons { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 30px; }
.shorts-feed-container.is-fullscreen + .shorts-nav-buttons { display: none; }
.nav-btn { flex: 1; padding: 14px 20px; background: var(--brand-color); color: #fff; border: none; border-radius: 12px; font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3); display: flex; align-items: center; justify-content: center; gap: 8px; text-transform: uppercase; transition: transform 0.1s ease, box-shadow 0.1s ease; }
.nav-btn:active { transform: scale(0.96); box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2); }

.video-loader { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin-top: -22px; margin-left: -22px; border: 4px solid rgba(255, 255, 255, 0.2); border-top-color: #ffffff; border-radius: 50%; animation: spin-loader 0.8s infinite linear; z-index: 3; pointer-events: none; transition: opacity 0.4s ease, visibility 0.4s ease; }
.video-loader.is-loaded { opacity: 0; visibility: hidden; }
@keyframes spin-loader { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* =========================================
    KIDS STYLE FULL SCREEN INSTALLER UI 
    ========================================= */
#install-popup-backdrop { display: none !important; }

#install-popup {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    background-color: #FC5301;
    z-index: 2147483647;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt', sans-serif;
    color: #FFFFFF;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    transform: none;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 20px;
}
#install-popup.show {
    opacity: 1;
    display: flex;
}

.kids-install-logo { width: 140px; height: 140px; margin-bottom: 25px; }
.kids-install-title { font-size: 25px; font-weight: 900; margin-bottom: 8px; text-shadow: 3px 3px 0px rgba(0,0,0,0.15); letter-spacing: 1px; }
.kids-install-subtitle { font-size: 22px; font-weight: 600; margin-bottom: 40px; opacity: 0.95; }
.kids-progress-wrapper { width: 85%; max-width: 350px; background: rgba(255, 255, 255, 0.3); border: 5px solid #FFF; border-radius: 30px; height: 35px; position: relative; overflow: hidden; box-shadow: inset 0 3px 6px rgba(0,0,0,0.1); }
.kids-progress-bar { height: 100%; width: 0%; background: #00D287; border-radius: 20px; transition: width 0.1s linear; box-shadow: inset 0 -4px 0 rgba(0,0,0,0.1); position: relative; }
.kids-progress-bar::after { content: ""; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent); background-size: 30px 30px; animation: moveStripes 1s linear infinite; }
@keyframes moveStripes { 0% { background-position: 0 0; } 100% { background-position: 30px 0; } }
.kids-install-percent { font-size: 28px; font-weight: 900; margin-top: 15px; text-shadow: 2px 2px 0 rgba(0,0,0,0.2); }
.kids-action-btn { display: none; margin-top: 20px; background: #FFF; color: #FC5301; border: none; padding: 16px 45px; font-size: 26px; font-weight: 900; border-radius: 50px; box-shadow: 0 6px 0px rgba(0,0,0,0.1), 0 10px 20px rgba(0,0,0,0.2); cursor: pointer; text-transform: uppercase; font-family: inherit; animation: pulseBtn 1.5s infinite; }
.kids-action-btn:active { transform: translateY(6px); box-shadow: 0 0px 0px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.2); animation: none; }
@keyframes pulseBtn { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }

#payment-strip { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background: #FFFFFF; padding: 15px 20px; z-index: 999999 !important; box-shadow: 0px -4px 4px -1px rgba(0, 0, 0, 0.2), 0px -5px 5px 0px rgba(0, 0, 0, 0.14), 0px -10px 10px 0px rgba(0, 0, 0, 0.12); align-items: center; justify-content: space-between; transform: translateY(150%); transition: transform .4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
#payment-strip.visible { display: flex !important; transform: translateY(0); }
.sheet-content-left { display: flex; flex-direction: column; justify-content: center; position: relative; }

@keyframes discountPulse { 0%, 100% { transform: rotate(-25deg) scale(1); } 50% { transform: rotate(-25deg) scale(1.1); } }
.discount-tag { position: absolute; top: -20px; left: 35px; background: #F44336; color: #fff; font-weight: 900; font-size: 11px; padding: 3px 8px; transform: rotate(-25deg); z-index: 2; box-shadow: 0 4px 8px rgba(244, 67, 54, 0.4); border-radius: 4px; animation: discountPulse 2s infinite ease-in-out; pointer-events: none; }
.price-line { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.price-main { font-size: 24px; font-weight: 800; color: #1a1a1a; } 
.price-cross { font-size: 14px; color: #999; text-decoration: line-through; font-weight: 500; }
.timer-section { display: flex; flex-direction: column; gap: 2px; }
.validity-text { font-size: 9px; color: #007AFF; font-weight: 700; text-transform: uppercase; margin-bottom: 2px; letter-spacing: 0.5px; }
.timer-boxes { display: flex; align-items: center; gap: 4px; color: #666; font-weight: 700; font-size: 14px; }
.time-box { background: #f0f0f0; color: #000; font-family: monospace; font-weight: 800; padding: 1px 4px; border-radius: 3px; min-width: 24px; text-align: center; }
.timer-warning { color: #F44336 !important; transition: color 0.5s ease; }
.timer-warning .time-box { background: #FFEBEB !important; color: #F44336 !important; border: 1px solid #F44336; box-shadow: 0 0 8px rgba(244, 67, 54, 0.3); }

@keyframes nudge-button { 0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0, 0, 0, .2); } 80% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4); } 82%, 86% { transform: translateX(-2px) scale(1.05); } 84%, 88% { transform: translateX(2px) scale(1.05); } }
@keyframes shake-animation { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.shake-animation { animation: shake-animation 0.5s cubic-bezier(.36,.07,.19,.97) both !important; }
 
.btn-continue { background: #1a1a1a; color: #FFFFFF; border: none; padding: 12px 24px; border-radius: 10px; font-weight: 800; font-size: 16px; cursor: pointer; transition: all .2s ease; text-transform: uppercase; animation: nudge-button 5s infinite; }
.btn-continue:active { transform: scale(.94); animation: none; }

.secure-badge { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px; opacity: 0.8; }
.secure-badge svg { width: 12px; height: 12px; fill: #666; }
.secure-text { font-size: 10px; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: 0.3px; }

#ios-prompt { display: none; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 350px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-radius: 14px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); z-index: 999999; padding: 15px 20px; text-align: center; border: 1px solid rgba(0,0,0,0.1); }
#ios-prompt::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); border-width: 10px 10px 0; border-style: solid; border-color: rgba(255,255,255,0.95) transparent transparent transparent; }
.ios-close { position: absolute; top: 5px; right: 10px; font-size: 20px; color: #888; cursor: pointer; }
.ios-prompt-text { font-size: 15px; font-weight: 600; color: #000; margin-bottom: 5px; }
.ios-prompt-subtext { font-size: 13px; color: #555; display: flex; align-items: center; justify-content: center; gap: 5px; }
 
.razorpay-container { z-index: 2147483647 !important; }
 
.game-preview-container {
    content-visibility: auto;
    contain-intrinsic-size: 100% 450px; 
}
 
/* Custom Spinner Color for App Previews */
.game-preview-container .video-loader {
    border-color: rgba(0, 210, 135, 0.2); 
    border-top-color: #00D287;          
}