@import url('https://fonts.googleapis.com/css2?family=Anton&family=Roboto:wght@700&display=swap');

.mothergameholder * {
box-sizing: border-box;
user-select: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
}

.mothergameholder  {
background-color: #1a3c5a;
font-family: 'Anton', sans-serif;
}

#game-container {
position: absolute;
top: 50%;
left: 50%;
width: 480px;
height: 850px;
transform: translate(-50%, -50%);
background-color: #1a3c5a;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
overflow: hidden;
transform-origin: center center;
}

canvas {
display: block;
width: 480px;
height: 850px;
}

/* UI Overlays */
.ui-layer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
display: flex;
flex-direction: column;
align-items: center;
}

/* Timer Bar */
#timer-container {
position: absolute;
top: 25px;
width: 45%;
height: 22px;
background-color: #000;
border-radius: 11px;
overflow: hidden;
display: none;
box-shadow: 0 5px 0px rgba(0, 0, 0, 0.3);
}

#timer-bar {
width: 100%;
height: 100%;
background-color: #72ff00;
transform-origin: left;
border-radius: 11px;
transition: background-color 0.3s;
}

#score-display {
position: absolute;
top: 80px;
font-size: 70px;
color: white;
text-shadow: 0px 5px 0px #cccccc, 0px 10px 0px rgba(0, 0, 0, 0.6);
display: none;
line-height: 1;
}

/* Screens */
.screen {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: rgba(26, 60, 90, 0.9);
pointer-events: auto;
opacity: 0;
transition: opacity 0.3s;
z-index: 10;
}

.screen.active {
opacity: 1;
}

#start-screen {
background: transparent;
}

.gmlogo {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 80px;
position: relative;
}

.logo-text {
font-family: 'Anton', sans-serif;
font-size: 85px;
text-transform: uppercase;
letter-spacing: 2px;
line-height: 0.9;
}

.logo-text.yellow {
color: #ffcc00;
text-shadow:
0px 6px 0px #c19300,
0px 12px 0px #0f2233;
}

.logo-text.white {
color: #ffffff;
position: relative;
text-shadow:
0px 6px 0px #cccccc,
0px 12px 0px #0f2233;
z-index: 2;
}

.speed-lines {
position: absolute;
top: 55%;
left: 50%;
width: 320px;
height: 60px;
transform: translate(-50%, -50%);
background: #142e44;
border-radius: 30px;
z-index: -1;
box-shadow: -40px 15px 0 #142e44, 40px -15px 0 #142e44;
}

/* Start Button */
.start-btn-container {
width: 130px;
height: 130px;
background-color: #244663;
/* ring color */
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 8px 0px #112739;
border: 8px solid #33618a;
transition: transform 0.1s, box-shadow 0.1s;
}

.start-btn-container:active {
transform: translateY(8px);
box-shadow: 0 0px 0px #112739;
}

.subtitle {
font-family: 'Anton', sans-serif;
color: #ffffff;
font-size: 38px;
margin-top: 25px;
text-shadow: 0 4px 0 #0f2233;
}

@keyframes pulse {
0% {
transform: scale(1);
opacity: 1;
}

50% {
transform: scale(1.1);
opacity: 0.7;
}

100% {
transform: scale(1);
opacity: 1;
}
}

/* Game Over Screen */
.game-over-title {
color: #ffffff;
font-size: 48px;
letter-spacing: 2px;
text-shadow: 0px 5px 0px #b3b3b3, 0px 10px 0px #0f2233;
margin-bottom: 5px;
line-height: 1.1;
text-align: center;
}

.game-over-score {
color: #ffffff;
font-size: 110px;
text-shadow: 0px 8px 0px #cccccc, 0px 15px 0px #0f2233;
margin: 15px 0;
}

.best-score {
font-family: 'Anton', sans-serif;
color: #246399;
font-size: 32px;
margin-bottom: 50px;
text-shadow: 0 3px 0 #113655;
}

.btn-group {
display: flex;
flex-direction: column;
gap: 20px;
}

.icon-btn {
width: 80px;
height: 80px;
background-color: #246399;
border: none;
border-radius: 15px;
box-shadow: 0 8px 0px #113655;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.1s, box-shadow 0.1s;
outline: none;
}

.icon-btn:active {
transform: translateY(8px);
box-shadow: 0 0px 0px #113655;
}

.icon-btn svg {
width: 45px;
height: 45px;
fill: #113655;
}

.icon-btn.restart svg {
fill: #ffffff;
}
/* Mobile Performance Fixes */
.mothergameholder {
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);
}