* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    color: white;
    overflow: hidden;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-canvas {
    background: #000;
    display: block;
}

.menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.menu h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-buttons button {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background: #4ecdc4;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-buttons button:hover {
    background: #45b7aa;
    transform: translateY(-2px);
}

#touch-controls {
    position: absolute;
    display: none;
    z-index: 10;
}

#touch-controls.portrait {
    flex-direction: column;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 20px;
    justify-content: space-between;
    align-items: center;
}

#touch-controls.landscape {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    justify-content: space-between;
}

.control-group {
    display: flex;
    gap: 20px;
}

.d-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
}

.d-pad-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    user-select: none;
}

.touch-button {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    user-select: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #2c3e50;
    padding: 2rem;
    border-radius: 15px;
    min-width: 300px;
}

.settings-group {
    margin-bottom: 1rem;
}

.settings-group label {
    display: block;
    margin-bottom: 0.5rem;
}

#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#game-over h2 {
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

#final-score {
    font-size: 2rem;
    margin-bottom: 2rem;
}