html, body {
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
            color: white;
            height: 100%;
            overflow-x: hidden;
            overflow-y: hidden;
        }

        body.menu-open {
            overflow: hidden;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 20px;
            background-color: transparent;
            position: absolute;
            width: 100%;
            box-sizing: border-box;
            z-index: 10;
        }

        .logo img {
            height: 40px;
        }

        .hamburger-menu {
            position: relative;
            display: inline-block;
        }

        .hamburger-icon {
            width: 30px;
            height: 25px;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            cursor: pointer;
            padding: 5px;
        }

        .hamburger-icon span {
            display: block;
            width: 100%;
            height: 3px;
            background-color: white;
            border-radius: 5px;
            transition: all 0.3s ease-in-out;
        }

        .hamburger-icon.open span:nth-child(1) {
            transform: translateY(11px) rotate(45deg);
        }
        .hamburger-icon.open span:nth-child(2) {
            opacity: 0;
        }
        .hamburger-icon.open span:nth-child(3) {
            transform: translateY(-11px) rotate(-45deg);
        }

        .menu-content {
            display: block;
            position: absolute;
            background-color: #333;
            /* Reverted to min-width for dropdown to adapt to content */
            min-width: 300px; /* Original width before question mark */
            box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
            z-index: 1;
            padding: 0;
            right: 0;
            border-radius: 10px;
            max-height: 0;
            overflow-y: hidden;
            opacity: 0;
            transform: translateY(-10px);
            transition: max-height 0.5s ease-out, opacity 0.3s ease-out, transform 0.3s ease-out;
            color: white;
            box-sizing: border-box;
        }

        .hamburger-menu.open .menu-content {
            opacity: 1;
            transform: translateY(0);
        }

        .menu-content.allow-scroll {
            overflow-y: scroll;
            scrollbar-width: none;
        }

        .menu-content.allow-scroll::-webkit-scrollbar {
            display: none;
        }

        .menu-content-inner {
            padding: 20px;
            box-sizing: border-box;
        }

        .menu-content h3 {
            margin-top: 0;
            margin-bottom: 15px;
            color: white;
        }

        .menu-content a {
            color: white;
            padding: 12px 0;
            text-decoration: none;
            display: block;
            word-wrap: break-word;
        }

        .menu-content a:hover {
            color: #ff6600;
        }

        .upload-section {
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid #555;
        }

        .upload-field {
            border: 2px dashed #ff6600;
            padding: 15px;
            text-align: center;
            cursor: pointer;
            margin-bottom: 15px;
            border-radius: 8px;
            background-color: #444;
            color: white;
        }

        .upload-field:hover {
            background-color: #555;
        }

        .upload-field.error {
            border-color: red;
            color: red;
        }

        .select-map label {
            display: block;
            margin-bottom: 5px;
            font-size: 0.9em;
        }

        .select-map select {
            width: 100%;
            padding: 8px;
            border: 1px solid #777;
            border-radius: 5px;
            background-color: #555;
            color: white;
            appearance: none;
        }

        .action-button {
            padding: 10px 15px;
            text-decoration: none;
            color: white;
            background: linear-gradient(135deg, #d45500, #bb3f00);
            border-radius: 8px;
            font-size: 1em;
            font-weight: normal;
            letter-spacing: 0px;
            transition: background 0.3s ease, letter-spacing 0.3s ease;
            display: inline-block;
            white-space: nowrap;
            overflow: hidden;
            border: none;
            text-align: center;
            cursor: pointer;
            width: 100%;
            margin-top: 15px;
        }

        .action-button:hover {
            background: linear-gradient(135deg, #b24400, #992f00);
            letter-spacing: 0.5px;
        }

        .mini-map {
            width: 100%;
            max-width: 250px;
            margin: 15px auto 0 auto;
            height: 0;
            padding-bottom: 100%;
            background-color: #555;
            border-radius: 8px;
            position: relative;
            overflow: hidden;

            background-image: repeating-linear-gradient(
                45deg,
                #444,
                #444 10px,
                #555 10px,
                #555 20px
            );
            background-size: cover;

            max-height: 100px;
            transition: max-height 0.5s ease-in-out;
            box-sizing: border-box;
        }

        .mini-map.expanded {
            max-height: 250px;
            background-image: none;
        }

        .minimap-placeholder {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #ccc;
            font-style: italic;
            font-size: 0.9em;
            text-align: center;
            padding: 10px;
            box-sizing: border-box;
            z-index: 1;
            transition: opacity 0.5s ease-in-out;
        }

        .minimap-placeholder.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .minimap-image-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            opacity: 0;
            transition: opacity 0.5s ease-in-out;
            z-index: 2;
        }

        .minimap-image-overlay.active {
            opacity: 1;
        }

        .settings-section {
            padding-top: 10px;
            background-size: cover;
            border-radius: 10px;
            position: relative;
        }

        .switch-container {
            margin: 10px 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 28px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: 0.4s;
            border-radius: 28px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: 0.4s;
            border-radius: 50%;
        }

        input:checked + .slider {
            background-color: #de4e00;
        }

        input:checked + .slider:before {
            transform: translateX(22px);
        }

        .main-content {
            text-align: center;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100vh;
            position: relative;
            z-index: 5;
            padding-top: 60px;
            box-sizing: border-box;
            width: 100%;
            overflow-x: hidden;
        }

        .main-content h1 {
            font-size: 8em;
            margin-bottom: 20px;
            white-space: nowrap;
        }

        .main-content .subtext {
            font-size: 1.8em;
            margin-bottom: 40px;
            max-width: 90%;
            box-sizing: border-box;
        }

        .button-container {
            display: flex;
            justify-content: center;
            gap: 100px;
            margin-bottom: 50px;
        }

        .button-container a {
            padding: 15px 25px;
            text-decoration: none;
            color: white;
            background: linear-gradient(135deg, #d45500, #bb3f00);
            border-radius: 10px;
            font-size: 1.5em;
            font-weight: normal;
            letter-spacing: 0px;
            transition: background 0.3s ease, letter-spacing 0.3s ease;
            display: inline-block;
            white-space: nowrap;
            overflow: hidden;
            border: none;
            text-align: center;
            cursor: pointer;
            min-width: 140px;
        }

        .button-container a:hover {
            background: linear-gradient(135deg, #b24400, #992f00);
            letter-spacing: 0.5px;
        }

        .overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.8);
            z-index: -1;
        }

        .image-carousel {
            width: 100%;
            height: 100%;
            overflow: hidden;
            position: absolute;
            top: 0;
            left: 0;
            z-index: -2;
        }

        .image-carousel img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            position: absolute;
            top: 0;
            left: 0;
            opacity: 0;
            transition: opacity 1s ease-in-out;
        }

        /* mobile optimizations */
        @media (max-width: 768px) {
            .main-content h1 {
                font-size: 4em;
                white-space: normal;
                word-break: break-word;
            }

            .main-content .subtext {
                font-size: 1.2em;
                margin-bottom: 30px;
            }

            .button-container {
                flex-direction: column;
                gap: 20px;
                width: 80%;
                max-width: 300px;
                margin-bottom: 30px;
                align-items: center;
                margin-left: auto;
                margin-right: auto;
            }

            .button-container a {
                width: 100%;
                font-size: 1.2em;
                padding: 12px 20px;
                white-space: normal;
            }

            .mini-map {
                max-width: 300px;
            }

            .mini-map.expanded {
                max-height: 300px;
            }

            .menu-content-inner {
                padding-bottom: 70px;
            }

            /* Adjust menu content width for mobile */
            .menu-content {
                /* Reverted to original responsive width from before question mark */
                min-width: unset; /* Reset min-width */
                width: calc(100% - 40px); /* Fill available width with padding consideration */
                max-width: 350px; /* Max width to prevent it from getting too wide on tablets */
            }
        }

        @media (max-width: 480px) {
            .main-content h1 {
                font-size: 3em;
            }

            .main-content .subtext {
                font-size: 1em;
            }
        }

        .switch-wrapper {
            position: relative;
            display: inline-block;
        }


        .settings-section {
            padding-top: 10px;
            background-size: cover;
            border-radius: 10px;
            position: relative;
        }

        /* Optional – Switch-Optik etwas matter machen */
        .switch input:disabled + .slider {
            background-color: #666 !important;
        }

        .switch input:disabled + .slider:before {
            background-color: #aaa !important;
        }


        .switch-container label[for="music-switch"],
        .switch-container label[for="sfx-switch"] {
            color: rgba(255, 255, 255, 0.4);
        }

        .settings-content {
            background-image: repeating-linear-gradient(
                45deg,
                #444,
                #444 10px,
                #555 10px,
                #555 20px
            );
            background-size: cover;
            padding: 15px;
            border-radius: 10px;
            position: relative;
            margin-bottom: 15px; /* adds space between pattern and Clear Data */
        }

        /* Styles for username field */
        .username-field {
            display: flex;
            align-items: center;
            /* Reverted to original flex-wrap behaviour */
            flex-wrap: wrap; /* Allow items to wrap if needed on smaller screens */
            gap: 10px;
            margin-bottom: 15px;
            position: relative; /* Still needed for potential future positioned elements */
        }

        .username-field label {
            color: white;
            white-space: nowrap;
        }

        .username-field input[type="text"] {
            flex-grow: 1;
            min-width: 100px; /* Original min-width */
            padding: 8px;
            border: 1px solid #777;
            border-radius: 5px;
            background-color: #555;
            color: white;
            font-size: 1em;
            box-sizing: border-box;
            /* Transition for the flash effect */
            transition: background-color 0.2s ease-out; /* Adjusted transition for initial green flash */
        }

        .username-field input[type="text"]::placeholder {
            color: #bbb;
        }

        .username-field input[type="text"]:focus {
            outline: none;
            box-shadow: 0 0 5px rgba(255, 102, 0, 0.2);
        }

        /* Added new class for the flash effect */
        .flash-green {
            /* No !important needed here because animation will handle the background-color */
            animation: flashUsername 1s ease-in-out forwards; /* 1 second duration, forwards to keep final state */
        }

        /* Keyframe animation for the smooth green flash */
        @keyframes flashUsername {
            0% { background-color: #555; } /* Start with original color */
            20% { background-color: #78a84a; }ckly reach green */
            100% { background-color: #555; } /* Smoothly fade back to original */
        }

        /* Adjust button container on smaller screens if username button wraps */
        @media (max-width: 400px) {
            .username-field {
                flex-direction: column; /* Stack label, input, button vertically */
                align-items: flex-start;
            }
            .username-field label {
                margin-bottom: 5px;
            }
            .username-field input[type="text"] {
                width: 100%; /* Make them full width when stacked */
                margin-top: 5px; /* Add some space between stacked items */
            }
        }
