* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    margin-bottom: 15px;
    font-size: 26px;
    color: #38bdf8;
}

.scoreboard {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
}

.canvas-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    border: 4px solid #38bdf8;
    border-radius: 8px;
    overflow: hidden;
    background-color: #020617;
}

canvas {
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    transition: opacity 0.3s ease;
}

.overlay h2 {
    font-size: 22px;
    color: #f8fafc;
    padding: 0 20px;
    text-align: center;
}

#start-btn {
    background-color: #22c55e;
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}


.mobile-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.control-row {
    display: flex;
    gap: 15px;
}

.control-btn {
    width: 60px;
    height: 60px;
    font-size: 24px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: none;
    transition: background 0.2s;
}

.control-btn:active {
    background-color: rgba(56, 189, 248, 0.5);
}
#start-btn:hover {
    background-color: #16a34a;
}

.controls-hint {
    margin-top: 15px;
    font-size: 14px;
    color: #94a3b8;
}