* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #0a0a0a;
    background-image: url('background.jpg'); /* Add your background image here */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Courier New', monospace;
}

#gameCanvas {
    border: 3px solid #91003f;
    box-shadow: 0 0 30px rgba(184, 187, 13, 0.5), 0 0 10px rgba(0, 255, 0, 0.3);
    display: block;
    touch-action: none;
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
}

/* Mobile responsiveness */
@media screen and (max-width: 1250px) {
    #gameCanvas {
        width: 100vw !important;
        height: auto !important;
        border: 2px solid #ff006e;
    }
}

@media screen and (max-height: 650px) {
    #gameCanvas {
        height: 100vh !important;
        width: auto !important;
        border: 2px solid #ff006e;
    }
}

/* Mobile landscape */
@media screen and (max-width: 900px) and (orientation: landscape) {
    #gameCanvas {
        height: 100vh !important;
        width: auto !important;
    }
}

/* Mobile portrait */
@media screen and (max-width: 900px) and (orientation: portrait) {
    #gameCanvas {
        width: 100vw !important;
        height: auto !important;
    }

    body {
        background-attachment: scroll; /* Better performance on mobile */
    }
}

.hidden {
    display: none;
}

/* Rotate message styling */
#rotate-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: #fff;
    text-align: center;
    padding: 20px;
}

#rotate-message .rotate-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: rotate-pulse 2s ease-in-out infinite;
}

#rotate-message p {
    font-size: 20px;
    font-weight: bold;
    color: #b8bb0d;
}

@keyframes rotate-pulse {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(90deg) scale(1.2); }
}

/* Show rotate message only on mobile in portrait mode */
@media screen and (max-width: 900px) and (orientation: portrait) {
    #rotate-message {
        display: flex;
    }

    #gameCanvas {
        display: none;
    }
}