body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #080810;
	
	 /* 🎨 ОБЩИЙ ФОН ИГРЫ */
    background-image: url("images/bg.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-color: #080810; /* fallback */
	
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
	 overscroll-behavior: none;
    overscroll-behavior-y: none;
    touch-action: none;
}

#game-aspect-ratio-container {
    position: relative;
    width: 100vw;
    height: 177.77vw;
    max-height: 100vh;
    max-width: 56.25vh;
    background-color: #111122;
    box-shadow: 0 0 100px rgba(0,0,0,0.8);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    touch-action: none;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
    background-color: #111122;
}

#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e272e, #080810);
	

	
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 0.5s ease;
    padding: 20px;
    box-sizing: border-box;
}

#start-screen h1 {
    color: #f1c40f;
    font-size: clamp(20px, 7.5vh, 32px);
    margin: 0 0 4vh 0;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 95%;
    line-height: 1.1;
    flex-shrink: 1;
    font-weight: 900;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.btn-main {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border: none;
    width: 65%;
    max-width: 260px;
    height: clamp(45px, 9vh, 70px);
    font-size: clamp(16px, 3.5vh, 24px);
    font-weight: bold;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 6px 0 #a04000, 0 12px 20px rgba(0,0,0,0.4);
    outline: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-main:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #a04000, 0 6px 10px rgba(0,0,0,0.4);
}

.modal {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    padding: 30px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
    z-index: 300;
    width: 80%;
}

.modal h2 { margin: 0 0 15px 0; color: #2c3e50; }
.modal p { font-size: 18px; color: #555; margin-bottom: 25px; }

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-modal {
    padding: 15px 30px;
    border-radius: 15px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 18px;
    outline: none;
}

.btn-confirm { background: #2ecc71; color: white; }
.btn-cancel { background: #e74c3c; color: white; }
.btn-next { background: #3498db; color: white; width: 100%; }

#pause-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 500;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 40px;
    font-weight: bold;
    pointer-events: none;
}