* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Arial", sans-serif;
}

body {
    height: 100vh;
    background: linear-gradient(to bottom, #1e1e1e, #3c3c3c);
    transition: background 2s;
    overflow: hidden;
    color: #fff;
}

canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: inherit;
    transition: filter 1000ms;
}

/* Game Start Button */
.newGame {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translateX(-50%);
    z-index: 99;
    padding: 15px 30px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.855);
    border: 2px solid #fff;
    color: black;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.newGame:hover {
    background: #fff;
    color: #000;
}

/* Score & Info */
.score,
.highscore,
.instr{
    top: 600px;
    left: 50%;
    position: absolute;
    z-index: 3;
}

.score {
    top: 30px;
    left: 40%;
    transform: translateX(-50%);
    font-size: 3rem;
    font-weight: 100;
    text-align: center;
}

.highscore {
    top: 30px;
    left: 30px;
    font-size: 1rem;
    color: #332f2f;
}

.instr {
    top: 30px;
    right: 30px;
    font-size: 1rem;
    color: #332f2f;
}

.info {
    top: 30px;
    left: 30px;
    font-size: 1rem;
    font-weight: 10;
    text-align: right;
}

/* Game Buttons */
.mobileui {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 100px;
}

.game-btn {
    font-size: 24px;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(40, 50, 50, 0.15);
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(40, 50, 50, 0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.3s, transform 0.1s;
    user-select: none;
    touch-action: manipulation;
}

.game-btn:active {
    background: rgba(40, 50, 50, 0.15);
    transform: scale(0.95);
}

/* Settings Panel */
.settings {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 50%;
    opacity: 0;
    z-index: 3;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.3);
    transition: opacity 1.5s, height 1.5s;
}

.settingsVis {
    opacity: 1;
    height: 30%;
}

/* Settings Group */
.group {
    display: inline-block;
    margin: 3px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: #fff;
    transform: scale(0.9)
}

.group h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 400;
}

.select {
    display: block;
    width: 100px;
    margin: 5px auto;
    padding: 1px;
    opacity: 0.6;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.2s;
}

.select:hover {
    opacity: 1;
}

.focus {
    opacity: 1;
    border: 1px solid #fff;
}

/* Pause Screen */
.pause {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 400px;
    height: 200px;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    text-align: center;
    z-index: 4;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s;
}

.pause h3 {
    padding: 20px;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.menu,
.unpause {
    margin: 5px auto;
    padding: 10px 20px;
    width: 160px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.menu:hover,
.unpause:hover {
    background: rgba(0, 0, 0, 0.7);
}
