.iframe_fs_back{z-index:1999;}
.iframeoverlay{z-index:2000;}
.contentLoader{z-index:2001;}
.gameStrip_in{z-index:2002;}

.mothergameholder * {
box-sizing: border-box;
user-select: none;
}

.mothergameholder{
background-color: #dcdcdc;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
touch-action: none;
}

canvas {
display: block;
}

/* UI Overlay Styles */
#ui-layer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 10;
}

#main-menu,
#death-screen,
#win-screen {
background: rgba(255, 255, 255, 0.95);
padding: 50px;
border-radius: 25px;
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
text-align: center;
pointer-events: auto;
transition: opacity 0.3s;
display: none;
/* Default hidden */
flex-direction: column;
align-items: center;
justify-content: center;
gap: 20px;
}

#main-menu {
display: flex;
}

.gh1 {
margin: 0;
font-size: 56px;
color: #2c3e50;
text-transform: uppercase;
letter-spacing: 3px;
font-weight: 900;
}

p.subtitle {
color: #7f8c8d;
margin: 0;
font-size: 20px;
font-weight: 500;
}

.mothergameholder button {
background: #ff4757;
color: white;
border: none;
padding: 18px 50px;
font-size: 26px;
font-weight: bold;
border-radius: 50px;
cursor: pointer;
box-shadow: 0 8px 20px rgba(255, 71, 87, 0.4);
transition: transform 0.1s, background 0.2s, box-shadow 0.2s;
text-transform: uppercase;
margin-top: 10px;
/* Extra space for buttons */
}

.mothergameholder button:hover {
background: #ff6b81;
transform: translateY(-3px) scale(1.02);
box-shadow: 0 12px 25px rgba(255, 71, 87, 0.5);
}

.mothergameholder button:active {
transform: translateY(2px) scale(0.98);
}

/* HUD */
#hud {
position: absolute;
top: 20px;
left: 20px;
right: 20px;
display: flex;
justify-content: space-between;
align-items: flex-start;
pointer-events: none;
opacity: 0;
transition: opacity 0.3s;
z-index: 5;
}

#leaderboard {
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(5px);
color: white;
padding: 15px;
border-radius: 15px;
font-size: 14px;
width: 200px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.lb-entry {
display: flex;
justify-content: space-between;
margin-bottom: 6px;
font-weight: 600;
align-items: center;
}

.lb-entry:last-child {
margin-bottom: 0;
}

#stats {
display: flex;
flex-direction: column;
gap: 10px;
}

.stat-box {
background: rgba(255, 255, 255, 0.95);
padding: 8px 20px;
border-radius: 30px;
font-weight: 800;
color: #2c3e50;
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
font-size: 18px;
display: flex;
align-items: center;
gap: 8px;
}

#death-screen h2 {
font-size: 40px;
color: #ff4757;
margin: 0;
font-weight: 900;
}

#win-screen h2 {
font-size: 44px;
color: #2ed573;
margin: 0;
font-weight: 900;
text-transform: uppercase;
letter-spacing: 2px;
}

/* Responsive UI */
@media (max-width: 600px) {
.gh1 {
font-size: 32px;
}

#main-menu,
#death-screen,
#win-screen {
padding: 30px;
border-radius: 20px;
width: 90%;
gap: 15px;
}

p.subtitle {
font-size: 16px;
}

.mothergameholder button {
padding: 14px 35px;
font-size: 20px;
margin-top: 5px;
}

#death-screen h2 {
font-size: 32px;
}

#win-screen h2 {
font-size: 36px;
}

#hud {
top: 10px;
left: 10px;
right: 10px;
}

#leaderboard {
width: 140px;
padding: 10px;
font-size: 12px;
}

.stat-box {
padding: 6px 15px;
font-size: 14px;
}
}
/* Mobile Performance Fixes */
.mothergameholder{
touch-action: none !important;
user-select: none !important;
-webkit-user-select: none !important;
overscroll-behavior: none !important;
}
.mothergameholder * {
-webkit-tap-highlight-color: transparent !important;
}
canvas {
transform: translateZ(0);
}