body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bs-dark);
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0;
}

.game-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 90vh;
    margin: 20px 0;
    background-color: var(--bs-gray-900);
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--bs-gray-900);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
    -webkit-font-smoothing: none;
    touch-action: none;
}

.stats-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.health-container {
    position: absolute;
    top: 50px;
    left: 20px;
    z-index: 10;
    display: flex;
    gap: 5px;
}

.health-container img {
    width: 24px;
    height: 24px;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.5));
}

#score, #orbCounter, #enemyCounter {
    color: var(--bs-light);
    font-size: 18px;
    font-family: 'Press Start 2P', monospace;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
}

#score {
    color: #FFD700;
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.game-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.game-controls button {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--bs-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.game-controls button:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media screen and (min-width: 1200px) {
    .game-container {
        width: 90%;
        margin: 40px auto;
    }
    
    .stats-container {
        font-size: 20px;
        padding: 15px 30px;
    }
}

@media screen and (orientation: landscape) and (max-height: 768px) {
    .game-container {
        margin: 10px 0;
        height: 85vh;
    }
    
    .stats-container {
        padding: 5px 20px;
    }
    
    .game-controls {
        top: 10px;
        right: 10px;
    }
    
    .game-controls button {
        width: 32px;
        height: 32px;
    }
}

.hidden {
    display: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: #1a1a1a;
    color: white;
    margin: 15% auto;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    text-align: center;
}

.score-submit-form {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.score-submit-form input {
    padding: 12px;
    border-radius: 4px;
    border: none;
    width: 100%;
    max-width: 300px;
}

.score-submit-form button,
.score-submit-form + button {
    width: 100%;
    max-width: 300px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.score-submit-form button:hover,
.score-submit-form + button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#highScores {
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

#highScoresTable {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

#highScoresTable th,
#highScoresTable td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

#startScreen h1 {
    color: white;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}