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

        body {
            margin: 0;
            padding: 0;
            background: #1a1625;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            font-family: 'Arial', sans-serif;
            overflow: hidden;
        }

        #gameContainer {
    position: relative;
    width: 90vw;
    height: 60vw; /* maintain aspect ratio */
    max-width: 1500px;
    max-height: 1000px;
}

        canvas {
            display: block;
            border: 3px solid rgba(94, 52, 0, 1);
            box-shadow: 0 0 30px rgba(94, 52, 0, 0.5);
        }

        /* Start Screen */
        #startScreen {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('./floor-bottom.png');
            background-repeat: repeat;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 10;
        }

        #startScreen.hidden {
            display: none;
        }

        .title {
            background-image: url('./ForrestQuest.png');
            background-position: center;
            background-repeat: no-repeat;
            background-size: contain;
            height: 20vh;
            width: 50vw;
        }

        .controls {
            background: rgba(0, 0, 0, 0.5);
            padding: 30px 50px;
            border-radius: 20px;
            border: 2px solid rgba(94, 52, 0, 1);
            margin: 20px 0;
        }

        .controls h2 {
            color: #fff;
            font-size: 28px;
            margin-bottom: 20px;
            text-align: center;
        }

        .control-item {
            color: #ddd;
            font-size: 18px;
            margin: 10px 0;
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .key {
            background: rgba(94, 52, 0, 1);
            color: white;
            padding: 5px 12px;
            border-radius: 5px;
            font-weight: bold;
            min-width: 80px;
            text-align: center;
        }

        .start-button {
            background: rgba(94, 52, 0, 1);
            color: white;
            font-size: 28px;
            font-weight: bold;
            padding: 20px 60px;
            border: none;
            border-radius: 15px;
            cursor: pointer;
            margin-top: 30px;;
        }

        .start-button:hover {
            transform: scale(1.05);
            box-shadow: 0 0 30px rgba(94, 52, 0, 1);
        }

        .goal {
            color: black;
            font-size: 22px;
            margin-top: 20px;
            font-weight: bold;
        }

        .credit {
            color: black;
            font-size: 14px;
            margin-top: 30px;
        }

        /* End Screen */
        #endScreen {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('./floor-bottom.png');
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 10;
        }

        #endScreen.show {
            display: flex;
        }

        .victory-title {
            font-size: 100px;
            font-weight: bold;
            color: black;
            text-shadow: 0 0 30px rgba(255, 215, 0, 0.8),
                         0 0 60px rgba(255, 215, 0, 0.4);
            margin-bottom: 20px;
        }

        @keyframes victoryPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .stars {
            font-size: 60px;
            margin-bottom: 30px;
        }

        .stats-box {
            background: rgba(255, 255, 255, 0.1);
            padding: 40px 80px;
            border-radius: 20px;
            border: 2px solid #FFD700;
            margin: 20px 0;
            backdrop-filter: blur(10px);
        }

        .stat {
            color: #fff;
            font-size: 36px;
            margin: 15px 0;
            font-weight: bold;
        }

        .rating {
            font-size: 44px;
            font-weight: bold;
            margin: 30px 0;
            animation: ratingGlow 2s ease-in-out infinite;
        }

        @keyframes ratingGlow {
            0%, 100% { opacity: 0.8; }
            50% { opacity: 1; }
        }

        .restart-button {
            background: rgba(94, 52, 0, 1);
            color: #000;
            font-size: 26px;
            font-weight: bold;
            padding: 20px 60px;
            border: none;
            border-radius: 15px;
            cursor: pointer;
            margin-top: 20px;
            transition: transform 0.2s;
        }

        .restart-button:hover {
            transform: scale(1.05);
            box-shadow: 0 0 30px rgba(94, 52, 0, 1);
        }

        .hidden {
            display: none !important;
        }