.iframe_fs_back{z-index:1999;}
.iframeoverlay{z-index:2000;}
.contentLoader{z-index:2001;}
.gameStrip_in{z-index:2002;}


.botgame * {
box-sizing: border-box;
margin: 0;
padding: 0;
}

.botgame{
position:relative;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
background: #ffffff;
color: #222;
font-family: 'Segoe UI', Arial, sans-serif;
user-select: none;
}

#app {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
background: #ffffff;
overflow: hidden;
}

/* ── Top HUD (Pill Style) ── */
/*.thisgameheader {
flex-shrink: 0;
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
padding: 10px 15px;
z-index: 5;
}*/
.collectCoins{position:absolute;top:10px;left:10px;z-index: 5;}
.savelife{position:absolute;top:10px;right:10px;z-index: 5;}

.hud-group {
display: flex;
flex-direction: row;
/* Saved vertical space */
gap: 8px;
align-items: center;
}

#heart-pill {
background: #ff5e5e;
box-shadow: 0 4px 0 #cc4a4a;
color: white;
}

.heart-icon {
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}

.icon-svg {
display: inline-block;
vertical-align: middle;
flex-shrink: 0;
}

.heart-svg {
fill: currentColor;
}

.search-svg {
margin-bottom: 2px;
}

.pill {
background: #7ca3ff;
border-radius: 10px;
padding: 6px 12px;
color: #fff;
font-weight: 800;
font-size: 15px;
/* Scaled down */
box-shadow: 0 4px 0 #5c85e6;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
min-width: 65px;
}

.pill-sm {
padding: 5px 10px;
font-size: 13px;
}

#coin-icon {
width: 16px;
height: 16px;
background: #ffd700;
border: 2px solid #b8860b;
border-radius: 50%;
}

/* ── Bottom Controls ── */
/*.thisgamefooter {
flex-shrink: 0;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding:10px 10px 20px;
box-sizing: border-box;
position: absolute;
bottom:0;
}*/

.footer-btn {
width: 46px;
height: 46px;
/* Scaled down */
background: #7ca3ff;
border-radius: 12px;
box-shadow: 0 4px 0 #5c85e6;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 20px;
cursor: pointer;
border: none;
color: white;
position: absolute;
bottom:20px;
}
.ftrbtn_grid{left:10px;}
.ftrbtn_find{right:10px;}

@media (max-width: 400px) {
.footer-btn {
width: 50px;
height: 50px;
font-size: 24px;
}

.pill {
font-size: 15px;
min-width: 65px;
padding: 4px 10px;
}

#settings-btn {
width: 38px;
height: 38px;
font-size: 20px;
}

.pill-sm {
font-size: 12px;
}
}

.footer-btn:active {
transform: translateY(4px);
box-shadow: 0 2px 0 #5c85e6;
}

.footer-btn span {
position: absolute;
bottom: -18px;
font-size: 10px;
color: #666;
font-weight: bold;
text-transform: uppercase;
}

/* ── Canvas wrapper ── */
#canvas-wrap {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
/* Prevent extra space leaking */
}

canvas {
display: block;
}

/* ── Overlays ── */
.overlay {
display: none;
position: absolute;
inset: 0;
align-items: center;
justify-content: center;
flex-direction: column;
background: rgba(255, 255, 255, 0.92);
backdrop-filter: blur(4px);
border-radius: 12px;
z-index: 20;
text-align: center;
padding: 20px;
}

.overlay.show {
display: flex;
}

.overlay-card {
background: #fff;
padding: 24px;
border-radius: 16px;
position: relative;
max-width: 360px;
width: 90%;
text-align: center;
}

.close-btn {
position: absolute;
top: 10px; right: 15px;
background: none; border: none;
font-size: 24px; cursor: pointer;
color: #666;
}

.level-grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 10px;
max-height: 280px;
overflow-y: auto;
padding: 5px;
}

.level-node {
padding: 12px 0;
border-radius: 10px;
border: 2px solid #ddd;
background: #f8f9fa;
font-weight: bold;
font-size: 15px;
color: #333;
cursor: pointer;
transition: all 0.2s ease;
}

.level-node.unlocked {
border-color: #2ed573;
background: #e8fae8;
color: #2ed573;
}

.level-node.unlocked:hover {
background: #2ed573;
color: #fff;
}

.level-node.current {
background: #2ed573 !important;
color: #fff !important;
border-color: #2ed573 !important;
box-shadow: 0 4px 10px rgba(46, 213, 115, 0.4);
}

.level-node.disabled {
opacity: 0.4;
cursor: not-allowed;
border-color: #a1a1a1;
background: #f0f0f0;
color: #000;
}

#win-overlay {
color: #333;
padding: 25px;
gap: 10px;
height: auto;
min-height: auto;
}

#win-overlay .completed-pill {
background: #5c85e6;
padding: 8px 30px;
border-radius: 30px;
font-size: 14px;
font-weight: 900;
letter-spacing: 2px;
box-shadow: 0 4px 0 #4a6ec5;
display: inline-flex;
align-items: center;
gap: 10px;
margin-bottom: 5px;
}

#win-overlay .completed-pill::before,
#win-overlay .completed-pill::after {
content: "✖";
font-size: 10px;
}

#win-overlay h2 {
color: #2c3e50;
font-size: 40px;
font-weight: 900;
line-height: 1.1;
text-transform: uppercase;
margin: 0;
}

#chest-container {
margin: 10px 0;
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
}

#chest-icon {
font-size: 70px;
filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

#win-coins-text {
font-size: 28px;
font-weight: 900;
color: #fff;
text-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
}

#congrats-text {
font-size: 13px;
font-weight: 800;
line-height: 1.4;
max-width: 250px;
text-transform: uppercase;
color: #666;
margin-bottom: 10px;
}

.ovl-btn {
border: none;
border-radius: 10px;
font-weight: 700;
cursor: pointer;
transition: transform 0.1s, opacity 0.15s;
letter-spacing: 0.5px;
}

#win-btn {
background: #27ae60;
color: #fff;
border-radius: 12px;
padding: 14px 40px;
font-size: 18px;
box-shadow: 0 6px 0 #219150;
}

#win-btn:active {
transform: translateY(4px);
box-shadow: 0 2px 0 #219150;
}

#lose-overlay {
background: rgba(255, 255, 255, 0.95);
}

#lose-overlay h2 {
color: #c0392b;
font-size: 32px;
margin-bottom: 10px;
}

#lose-overlay p {
color: #666;
margin-bottom: 20px;
}

#lose-btn {
background: #e74c3c;
color: #fff;
padding: 14px 40px;
font-size: 18px;
border-radius: 12px;
box-shadow: 0 6px 0 #c0392b;
}

#lose-btn:active {
transform: translateY(4px);
box-shadow: 0 2px 0 #c0392b;
}

#level-pill {
cursor: pointer;
user-select: none;
}



/* ── Message toast ── */
#toast {
position: absolute;
bottom: 30px;
left: 50%;
transform: translateX(-50%) translateY(60px);
background: #333;
color: #fff;
padding: 8px 22px;
border-radius: 20px;
font-size: 13px;
pointer-events: none;
opacity: 0;
transition: transform 0.3s, opacity 0.3s;
z-index: 100;
}

#toast.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
}

/* Coin Animation Styles */
.flying-coin {
position: absolute;
width: 22px;
/* Increased size */
height: 22px;
background: #ffd700;
border: 2px solid #b8860b;
border-radius: 50%;
z-index: 1000;
pointer-events: none;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.particle {
position: absolute;
pointer-events: none;
z-index: 1000;
border-radius: 2px;
}
/* Mobile Performance Fixes */
.botgame{
touch-action: none !important;
user-select: none !important;
-webkit-user-select: none !important;
overscroll-behavior: none !important;
}
* {
-webkit-tap-highlight-color: transparent !important;
}
canvas {
transform: translateZ(0);
}



/* Loader Overlay */
.loader-overlay {
    display: none;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 300;
    color: #ffffff;
    font-weight: bold;
    font-family: sans-serif;
}

.loader-overlay.show {
    display: flex;
}

/* Animated Ring Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: #2ed573;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}