@font-face {
    font-family: space;
    src: url(../font/Space.ttf);
    font-display: swap;
}
@font-face {
    font-family: space-mono;
    src: url(../font/SpaceMono.ttf);
    font-display: swap;
}
*{
    margin: 0;
    padding: 0;
}

/* Global: pointer cursor for all interactive elements */
a, button, select, label[for], [onclick], input[type="range"], input[type="checkbox"],
input[type="color"], .block, .cross, .back-icon, .nav-btn, .room-item button {
    cursor: pointer;
}

/* Achievement pop-in animation */
@keyframes achievementFadeIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
html{
    background-color: #202124;
}
body{
    font-family: space;
    text-align: center;
    overflow: hidden;
    background-image: url('../img/galaxy-bg.webp');
    background-image: image-set(url('../img/galaxy-bg.webp') type('image/webp'), url('../img/galaxyAll.gif') type('image/gif'));
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #202124;
    transition: 300ms;
    width: 100vw;
    height: 100vh;

}

main{
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    padding: clamp(8px, 2.5vh, 16px);
    padding-top: calc(clamp(40px, 6vh, 60px) + clamp(6px, 1.5vh, 20px));
    overflow: hidden;
    transition: 500ms all ease-in-out;
}

/*MENU*/
#clearMenu{
    transition: 500ms all ease-in-out;
}
/*
.blur{
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    filter: blur(1em);
}
*/

#menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92vw;
    max-width: 1000px;
    height: 85vh;
    max-height: 700px;
    background: rgba(20, 21, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(151, 0, 189, 0.3);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(151, 0, 189, 0.15);
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: #ffffff;
}

.menu-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 2.5rem;
    overflow-y: auto;
    flex: 1;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(151, 0, 189, 0.5) rgba(0, 0, 0, 0.2);
    -webkit-overflow-scrolling: touch;
}

.menu-content::-webkit-scrollbar {
    width: 6px;
}

.menu-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.menu-content::-webkit-scrollbar-thumb {
    background: rgba(151, 0, 189, 0.4);
    border-radius: 10px;
}

.menu-content::-webkit-scrollbar-thumb:hover {
    background: rgba(151, 0, 189, 0.7);
}

#playerholder {
    margin: 0 0 1rem 0;
    width: 100%;
}

#whatplayer {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: #1a1a20;
    border: 1px solid rgba(151, 0, 189, 0.4);
    color: #fff;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

#whatplayer:focus {
    border-color: #9700bd;
    box-shadow: 0 0 8px rgba(151, 0, 189, 0.3);
}

#menu h2 {
    color: #fff;
    margin: 0 0 1rem 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(151, 0, 189, 0.5);
    border-bottom: 2px solid rgba(151, 0, 189, 0.2);
    padding-bottom: 0.5rem;
    text-align: left;
}

#menu h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.keyinput {
    width: 100px;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(151, 0, 189, 0.4);
    background-color: #1a1a20;
    color: #fff;
    text-align: center;
    font-weight: bold;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.keyinput:focus {
    border-color: #9700bd;
    box-shadow: 0 0 8px rgba(151, 0, 189, 0.4);
    outline: none;
}

#charface {
    width: 60px;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(151, 0, 189, 0.4);
    background-color: #1a1a20;
    color: #fff;
    text-align: center;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

#charface:focus {
    border-color: #9700bd;
    box-shadow: 0 0 8px rgba(151, 0, 189, 0.4);
    outline: none;
}

.customholder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.8rem;
}

.menu-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.keybox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.colorinput {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(151, 0, 189, 0.4);
    background: none;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    overflow: hidden;
}

.colorinput::-webkit-color-swatch-wrapper {
    padding: 0;
}

.colorinput::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.colorinput:hover {
    transform: scale(1.1);
    border-color: #9700bd;
    box-shadow: 0 0 10px rgba(151, 0, 189, 0.4);
}

#Player-Color, #Platform-Shadow, #Platform-Color {
    cursor: pointer;
}

.cross {
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(151, 0, 189, 0.4);
    color: #d67bff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10100;
}

.cross:hover {
    background: rgba(255, 0, 0, 0.15);
    border-color: #ff5252;
    color: #ff8080;
    transform: rotate(90deg);
}

/*SWITCH*/
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin: 0;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked+.slider {
    background-color: #9700bd;
    border-color: #9700bd;
}

input:focus+.slider {
    box-shadow: 0 0 8px rgba(151, 0, 189, 0.5);
}

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

/* Rounded sliders */
.slider.round {
    border-radius: 26px;
}

.slider.round:before {
    border-radius: 50%;
}

.menu-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(180deg, #a80dc9 0%, #9700bd 60%, #7d009d 100%);
    border: 1px solid rgba(224, 123, 255, 0.35);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 12px rgba(151, 0, 189, 0.3);
}

.menu-btn:hover {
    background: linear-gradient(180deg, #c222e6 0%, #b700dd 60%, #9700bd 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 16px rgba(151, 0, 189, 0.5);
    transform: translateY(-1px);
}

.menu-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.menu-btn:active {
    transform: translateY(0);
}

.host-only-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 0.2rem;
    text-align: right;
}

.leave-btn-holder {
    margin-top: auto;
    padding-top: 1.5rem;
}

#menu-game-mode {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: #1a1a20;
    border: 1px solid rgba(151, 0, 189, 0.4);
    color: #fff;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

#menu-game-mode:focus {
    border-color: #9700bd;
    box-shadow: 0 0 8px rgba(151, 0, 189, 0.3);
}

#menu-game-mode:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

#keymapHolder {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0;
    box-sizing: border-box;
}

#keymap {
    font-family: monospace;
    color: #00ffcc;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    word-break: break-all;
    text-align: left;
}

@media (max-width: 768px) {
    .nomobile {
        display: none !important;
    }
    #menu {
        width: 95vw !important;
        height: 95vh !important;
        max-height: none !important;
        border-radius: 16px;
    }
    .menu-content {
        padding: 1.5rem !important;
        gap: 1.2rem !important;
        grid-template-columns: 1fr !important;
    }
    #menu h2 {
        font-size: 1.4rem;
    }
    .cross {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

@media (max-height: 500px) {
    #menu {
        height: 95vh !important;
        max-height: none !important;
    }
    .menu-content {
        padding: 1rem !important;
        gap: 1rem !important;
    }
}.flex{
    display: flex;
}

.game-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: clamp(40px, 6vh, 60px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(10px, 4vw, 40px);
    box-sizing: border-box;
    z-index: 100;
    background: rgba(20, 20, 24, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(151, 0, 189, 0.2);
}

.game-header #scores {
    position: static;
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 0;
    font-family: space-mono, monospace;
}

.game-header #scores #coins {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    color: gold;
}

.game-header #scores .score {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    color: aliceblue;
}

.header-logo a {
    font-family: space;
    font-size: clamp(1.2rem, 3.5vw, 2.2rem);
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 0 8px rgba(151, 0, 189, 0.6);
    transition: all 0.3s ease;
}

.header-logo a:hover {
    color: #d67bff;
    text-shadow: 0 0 12px #9700bd, 0 0 20px #9700bd;
}

.header-nav {
    display: flex;
    gap: clamp(10px, 2vw, 20px);
}

/* <button> nav items get the exact same design as <a> nav items.
   (Never color:inherit here – the body has no text color set, so buttons
   would fall back to black text on the dark header.) */
button.nav-btn {
    font-family: space-mono, monospace;
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(151, 0, 189, 0.4);
}


.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 1vw, 8px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(151, 0, 189, 0.4);
    border-radius: 8px;
    padding: clamp(6px, 1.2vh, 10px) clamp(10px, 1.5vw, 16px);
    color: #ffffff;
    text-decoration: none;
    font-family: space-mono, monospace;
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-btn:hover {
    background: rgba(151, 0, 189, 0.25);
    border-color: rgba(183, 0, 221, 0.95);
    box-shadow: 0 0 15px rgba(183, 0, 221, 0.5);
    transform: translateY(-2px);
}

.nav-svg {
    width: clamp(12px, 2vw, 18px);
    height: clamp(12px, 2vw, 18px);
    fill: currentColor;
}


#icon{
    position: absolute;
    opacity: 1;
    height: 10vh;
    top: 2vh;
    left: 1vw;
}

#surface{
    /*border: solid 5px #000;*/ 
    margin: auto;
}

#scores{
    position: absolute;
    top: 3vh;
    left: 2vw;
    text-align: left;
    font-size: larger;
    font-family: serif;
}

#coins{
    color: gold;
    font-family: 'Cascadia Code';
}


/* nav-label: hide text on very narrow screens to keep buttons compact */
@media (max-width: 480px) {
    .nav-label {
        display: none;
    }
}

#mobile{
    position: absolute;
    top: 75vh;
    left: 5;
    text-align: left;
}
#mobile button{
    background-color: #000000;
    border: 0;
    color: #ffffff;
    font-size: 10em;
    margin: 5%;
}

#mobileJump{
    position: absolute;
    left: 50vw;
    width: 50vw;    
    height: 100vh;
    top: 18vh;
}

.invis{
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

#music{
    position: absolute;
    bottom: 2vh;
    left: 1vw;
}

/* remap keys */
table, td, input, select, textarea {
    font-family: Arial, Helvetica, sans-serif;
}

.headline {
    font-family: space, sans-serif;
    font-size: clamp(1.4rem, 4vw, 3.2rem);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: clamp(2px, 0.8vh, 10px);
    margin-bottom: clamp(4px, 1.2vh, 14px);
    text-shadow: 0 0 10px rgba(151, 0, 189, 0.6), 0 0 20px rgba(151, 0, 189, 0.4), 0 0 30px rgba(151, 0, 189, 0.2);
    display: inline-block;
    transition: all 0.3s ease;
}

.headline:hover {
    text-shadow: 0 0 15px rgba(151, 0, 189, 0.9), 0 0 30px rgba(151, 0, 189, 0.7), 0 0 45px rgba(151, 0, 189, 0.5);
}

#keymapHolder{
  display:none;
}
table{
  margin:5px;
  background-color: #444;
  border-top: 3px solid #aaa;
  border-left: 3px solid #999;
  border-right: 3px solid #333;
  border-bottom: 4px solid #222;
  border-radius: 4px;
  color: whitesmoke;
  padding: 3px;
}
td{
  padding:5px;
  text-align:center;
}
input{
  text-align:center;
  outline:none;
}
input:focus{
  color:white;
}
td{
  text-transform: capitalize;
}
input{
  width:50px;
}








.btnwrapper{
    font-family: space;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    gap: clamp(8px, 1.5vh, 16px);
    height: auto;
    max-height: calc(100vh - clamp(50px, 8vh, 70px) - 180px);
    width: min(450px, 85vw);
    padding-top: 1vh;
    transition: .5s;
    opacity: .9;
    z-index: 1;
}

.btnwrapper:hover{
    opacity: 1;
}

.block {
    position: relative;
    flex: 1 1 auto;
    min-height: clamp(40px, 6vh, 65px);
    width: 100%;
    z-index: 1;
    transition: transform 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.block:hover {
    transform: scale(1.05);
    z-index: 10;
}

.block:before, .block:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(280deg, #0000ff, #00ff00,#ffff00, #ff0000, #fb0094, 
        #0000ff, #00ff00,#ffff00, #ff0000, #fb0094, #0000ff);
    background-size: 600%;
    opacity: 0;
    z-index: -10;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    transition: 1s;
} 

.block:hover:before, .block:hover:after {
    opacity: 1;
    animation: steam 35s ease-in-out infinite;
}

@keyframes steam {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 600% 0;
    }
    100% {
        background-position: 0 0;
    }
}

.block:after {
    filter: blur(50px);
}

.btnwrapper button{
    height: 100%;
    width: 100%;
    font-size: clamp(1rem, 2.5vh, 1.8rem);
    font-family: space;
    border-radius: 10px;
    border: 1px solid rgba(151, 0, 189, 0.45);
    transition: background-color 250ms ease, box-shadow 250ms ease, color 250ms ease, border-color 250ms ease, transform 120ms ease;
    color: rgb(255, 255, 255);
    background: linear-gradient(180deg, rgba(30, 30, 38, 1) 0%, rgba(0, 0, 0, 1) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 2px 12px rgba(0, 0, 0, 0.55);
    position: relative;
    box-sizing: border-box;
    padding: clamp(6px, 1vh, 12px) 10px;
    cursor: pointer;
}

.btnwrapper button:hover{
    color: rgb(255, 255, 255);
    background: linear-gradient(180deg, rgba(40, 20, 48, 1) 0%, rgba(10, 0, 12, 1) 100%);
    border-color: rgba(183, 0, 221, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 18px rgba(151, 0, 189, 0.5);
}

.btnwrapper button:active {
    transform: scale(0.98);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 8px rgba(151, 0, 189, 0.35);
}

/* Buttons carrying the tiny SCORE tag get headroom so it never
   touches the main label */
.btnwrapper button:has(.tiny-info) {
    padding-top: clamp(12px, 2vh, 20px);
}

#playerslider {
    -webkit-appearance: none;
    width: 20vw;
    height: 1vh;
    background: #00e5ff;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
}

#playerslider:hover {
    opacity: 1;
}

#playerslider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: .5vw;
    height: 2vh;
    background: #9700bd;
    cursor: pointer;
}

#playerslider::-moz-range-thumb {
    width: .5vw;
    height: 2vh;
    background: #9700bd;
    cursor: pointer;
}

#buttonpressed {
    position: absolute;
    top: 35vh;
    left: 40vw;
    width: 20vw;
    height: 30vh;
    font-size: 5em;
    color: #d67bff;
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/*themeswitch*/
.themeswitch {
    position: absolute;
    display: inline-block;
    width: 60px;
    height: 34px;
    bottom: 2vh;
    right: 2vh;
}

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

.themeslider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgb(246, 255, 0);
    -webkit-transition: .4s;
    transition: .4s;
}

.themeslider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: rgb(255, 166, 0);
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.themeslider {
    background-color: #000000;
}

input:focus+.themeslider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked+.themeslider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded themesliders */
.themeslider.round {
    border-radius: 34px;
}

.themeslider.round:before {
    border-radius: 50%;
}




/* NEW */


.coinDispImg{
    height: 3vmin;
}



#coins{
    font-size: 1.8em;
    font-family: space-mono;
}

#scores{
    top: 0vh;
    font-family: space-mono;
}

#a{
    font-family: space-mono;
}

.progressBarWrapper{
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    transition: 500ms;
    color: #fff;
    z-index: 99;
}

.progressBar{
    background-color: #000000;

    transition: 1ms;
    border: solid #9700bd00 2px;
    border-radius: 30px;
    height: 1.5vmin;
    width:1%;

    box-shadow: 0 0 5px #9700bd;
}


/*LOGIN und so icons*/

.icons{
	position: absolute;
	margin: 2vmax;
	width: 2vmax;
	filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(350deg) brightness(102%) contrast(102%);
	opacity: 0.8;
	transition: 300ms;
}

.icons:hover{
	margin: 1.75vmax;
	width: 2.5vmax;
	opacity: 1;
}

.back{
	transform: rotate(180deg);
}

.user{
	right: 0;	
}

.score{
    font-size: 1.8em;
    font-family: space-mono;
    margin-left: 2.5vmax;
}

.scorerocket{

	position: absolute;
	margin: 0vmax;
	width: 1.6vmax;
	filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(350deg) brightness(102%) contrast(102%);
	opacity: 0.8;
	transition: 300ms;
    margin-top: 0.6vmax;
    
}

.scorerocket:hover{
	margin: 0vmax;
	width: 1.6vmax; 
	opacity: 1;
}

#scores{
    top: calc(clamp(40px, 6vh, 60px) + 20px);
    left: 2vw;
}

#donate-button-container{
    position: absolute;
    bottom: 3vmin;
    right: 5vmin;
    height: 3vmin;
}


.tiny-info{
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.34em;
    color: gold;
    letter-spacing: 0.18em;
    margin: 0;
    line-height: 1;
}



#loggeduser{
    position: absolute;
    font-size: 4.5vmin;
    left: 2vmin;
    bottom: 2vmin;

    text-shadow: 0px 0px 0.4vmin #9700bd,
                0px 0px 0.5vmin #ffffff55,
                0px 0px 0.5vmin #ffffff55,
                0px 0px 0.4vmin #9700bd;
}



#left{
    width: 100%;    
    background-color: #00000000;
}

#right{
    
    width: 100%;
    background-color: #00000000;

}

#mobile{
    margin-top: -5%;
    background-color: #00000000;
    justify-content: space-around;
    width: 25%;
}


#mobile button{
    background-color: #00000000;
    padding: 2%;
}
/* ══════════════════════════════════════════════════════════════
   SpaceRunner v2 – consistency, accessibility & touch layer
   (appended; later rules win over legacy ones on conflicts)
   ══════════════════════════════════════════════════════════════ */

/* Visible keyboard focus everywhere (beats legacy outline:none rules) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #e07bff;
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Homepage headline link */
.headline a.home {
    color: inherit;
    text-decoration: none;
}

/* Solo seed row (styles moved out of index.html) */
#seed-row {
    display: flex;
    margin-top: 8px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#seed-row[hidden] {
    display: none;
}

#seed-row label {
    font-family: space-mono, monospace;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

#solo-seed {
    padding: 6px 10px;
    background: rgba(20, 20, 25, 0.8);
    border: 1px solid rgba(151, 0, 189, 0.4);
    border-radius: 6px;
    color: #fff;
    font-family: space-mono, monospace;
    font-size: 0.78rem;
    width: 160px;
    text-align: center;
}

#seed-random-btn {
    padding: 5px 10px;
    background: rgba(151, 0, 189, 0.3);
    border: 1px solid rgba(151, 0, 189, 0.5);
    border-radius: 6px;
    color: #fff;
    font-size: 0.78rem;
}

/* Site footer (all pages) */
.site-footer {
    position: absolute;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-family: space-mono, monospace;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    z-index: 5;
    width: max-content;
    max-width: 94vw;
}

.site-footer nav {
    margin-bottom: 2px;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.site-footer a:hover {
    color: #e07bff;
    text-decoration: underline;
}

.noscript-note {
    margin-top: 16px;
    color: #ffd75e;
    font-family: space-mono, monospace;
}

.error-sub {
    font-family: space-mono, monospace;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

/* Game page: score layout, seed badge, achievement overlay */
.score-flex {
    align-items: center;
    gap: 8px;
}

.score-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    color: #fff;
    opacity: 0.8;
}

.seed-display {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: space-mono, monospace;
    align-self: center;
}

.seed-display[hidden] {
    display: none;
}

.achievement-overlay {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.achievement-overlay[hidden] {
    display: none;
}

/* Canvas + touch surface */
#surface {
    touch-action: none;
    position: relative;
    max-width: 100vw;
}

#surface canvas {
    display: block;
    touch-action: none;
    max-width: 100vw;
}

#touch-controls {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 5vw calc(3vh + env(safe-area-inset-bottom));
    z-index: 60;
    pointer-events: none;
}

#touch-controls[hidden] {
    display: none;
}

.touch-move {
    display: flex;
    gap: 4vw;
}

/* ID selectors beat the legacy #left/#right/#mobileJump rules above */
#touch-controls #left,
#touch-controls #right,
#touch-controls #mobileJump {
    pointer-events: auto;
    position: static;
    width: clamp(64px, 17vw, 104px);
    height: clamp(64px, 17vw, 104px);
    margin: 0;
    padding: 0;
    font-size: clamp(1.4rem, 6vw, 2rem);
    line-height: 1;
    color: #fff;
    background: rgba(151, 0, 189, 0.22);
    border: 2px solid rgba(183, 0, 221, 0.55);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#touch-controls #mobileJump {
    width: clamp(80px, 21vw, 128px);
    height: clamp(80px, 21vw, 128px);
    border-color: rgba(0, 229, 255, 0.55);
    background: rgba(0, 229, 255, 0.16);
}

#touch-controls #left:active,
#touch-controls #right:active {
    background: rgba(183, 0, 221, 0.5);
}

#touch-controls #mobileJump:active {
    background: rgba(0, 229, 255, 0.4);
}

/* Donate pill (bottom-right) – on-design support button */
.donate-link {
    position: absolute;
    bottom: 3vmin;
    right: 5vmin;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(151, 0, 189, 0.22);
    border: 1px solid rgba(183, 0, 221, 0.55);
    color: #fff;
    font-family: space-mono, monospace;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    z-index: 5;
}

.donate-link:hover {
    background: rgba(183, 0, 221, 0.4);
    box-shadow: 0 0 12px rgba(183, 0, 221, 0.5);
    transform: translateY(-1px);
}

.donate-link .donate-heart {
    color: #ff6b9d;
    font-size: 0.95rem;
}

/* Narrow screens: icon-only nav, tighter footer */
@media (max-width: 900px) {
    /* The seed number is long – hide it before the header can crowd.
       !important beats the inline display set by the game script. */
    .game-header .seed-display {
        display: none !important;
    }

    .game-header #scores {
        gap: 12px;
    }
}

@media (max-width: 560px) {
    .nav-label {
        display: none;
    }

    .site-footer small {
        display: none;
    }

    .game-header #scores {
        gap: 14px;
    }

    .game-header #scores #coins,
    .game-header #scores .score {
        font-size: 1rem;
    }

    /* Guest name sits above the footer instead of colliding with it */
    #loggeduser {
        bottom: 52px;
        font-size: 1rem;
    }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .block:hover,
    .nav-btn:hover,
    .menu-btn:hover {
        transform: none;
    }
}

/* Collapsible wordmark: full name on desktop, "SR" on narrow screens
   so the header never clips into the nav buttons */
.logo-short {
    display: none;
}

@media (max-width: 640px) {
    .header-logo .logo-full {
        display: none;
    }

    .header-logo .logo-short {
        display: inline;
    }
}

/* SCORE-mode HUD badge: visible only when the run counts for the leaderboard */
.score-mode-badge {
    font-family: space-mono, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: #0a0a0c;
    background: gold;
    border-radius: 4px;
    padding: 2px 8px;
    white-space: nowrap;
}

.score-mode-badge[hidden] {
    display: none;
}

/* Secondary reset buttons inside the settings menu */
.menu-btn.menu-reset-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    font-size: 0.95rem;
    margin-top: 1rem;
}

.menu-btn.menu-reset-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

#menu-reset-all-btn {
    border-color: rgba(255, 107, 107, 0.45);
}

#menu-reset-all-btn:hover {
    background: rgba(255, 107, 107, 0.14);
    border-color: rgba(255, 107, 107, 0.7);
}
