html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}
.container-fluid {
    height: auto; /* Let it grow if needed */
    overflow-y: auto;
}

a.logo{
    text-decoration: none;
    font-size: 1.4em;
    display: inline-block;
    padding: 0.3em 0.4em 0.4em 0.4em;
    border: #1aff31 2px solid;
    color: #FFF;
    border-radius: 0.4em;
    box-shadow: 0 0 0.2em #20ee3f;
    background-color: #1dc845;
}


.panel {  
    overflow-y: auto;
}
.panel-heading {
    background-color: #343a40;
    color: white;
}
.panel-body {
    padding: 15px;
}

#threeContainer {
   height: 100vh;  /* Full viewport height */
    z-index: 99;
    position: fixed;
    bottom: 0;
    width: -webkit-fill-available;
}

#threeContainer canvas {
    width: 100% !important;
    height: 100vh;
    display: block;
}

.rotate-ccw-90 {
    transform: rotate(-90deg);
    transform-origin: center center;
}

.rotate-ccw-45 {
    transform: rotate(-45deg);
    transform-origin: center center;
}
.btn {
    border-radius: 1em;
    padding: 0.2em 0.8em;
    box-shadow: 0 2px 5px #adadad;
}
    .btn-xs {
        box-shadow: none;
        border: none;
    }
    .btn-xs:focus{
        border: none;
    }

    .btn-xl {
        padding: 0.4em 1.2em;
        font-size: 2em;
    }
    .btn-xl.round {
        padding: 0.4em 0.8em;
        font-size: 2em;
        border-radius: 50%;
    }

#modelUrl {
    border-radius: 1em 0 0 1em;
    box-shadow: 0 2px 5px #adadad;
}

.model-select{
    font-size: 1.2em;
}
    .model-select label{
        font-weight: 500;
        color: #2f2f2f;
    }

#modelSelect {
    border-radius: 1em;
    padding: 0em 0.6em;
    border: 1px solid #ddd;
}

/* If mobile portrait make the canvas fixed at bottom of screen */
@media (max-width: 768px) and (orientation: portrait) {
    #threeContainer {
        position: fixed;
        top: 0;
        bottom: auto;
        left: 0;
        right: 0;
        height: 45vh; /* Adjust as needed */
        box-shadow: 0px 2px 7px 1px rgba(94,94,94,0.5);
        -webkit-box-shadow: 0px 2px 7px 1px rgba(94,94,94,0.5);
        -moz-box-shadow: 0px 2px 7px 1px rgba(94,94,94,0.5);
    }
    #threeContainer canvas {
        height: 45vh !important;
    }
    /* Make extra room at bottom of page for hidden content behind canvas to scroll into view */
    .panel {
        padding-top: 45vh; /* Same as canvas height */
    }
}
/* if width < 1080 reduce font size of the panel body */
@media (max-width: 1080px) {
    .panel-body {
        font-size: 0.7em; /* Reduce font size */
        padding: 2em 0; /* Reduce padding */
        padding-top: 1em;
    }
    .model-select{
        font-size: 1.5em;
    }
    h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 2em;
    }
    h3 {
        font-size: 1.5em;
    }
    h4 {
        font-size: 1.25em;
    }
}
   


.note{
    font-size: 0.8em;
    color: #6c757d;
}
.note a {
    color: #007bff;
    text-decoration: none;
}

.info {
    color: #b7bdc2;
}
h3 i.info {
    font-size: 0.8em;
}
.info:hover {
    color: #007bff;
    cursor: pointer;
}

.clear {
    clear: both;
}

.no-select {
    user-select: none;
}


/* Use space-bg.jpg as background for the canvas and slowly slide it to the left */
#threeContainer  {
    background-image: url('space-bg.jpg');
    background-repeat: repeat-x;
    background-size: 200% 100%; /* Ensure enough width to tile seamlessly */
    background-position: 0 0;
    animation: slide 40s linear infinite;
}
#threeContainer.road {
    animation: none !important;
    background-image: none;
    background: linear-gradient(270deg, #292725, #252220);
    /*background: #25851e;*/
    background-image: url(road-side-bg.jpg);
}

#threeContainer.start {
    background-image: url(start-image.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    animation: none !important;
}
#threeContainer.road.start {
    background-image: url(start-image-race.png);
}
#threeContainer.road canvas {
    background-color: #000;
    background-image: none;
    background-repeat: repeat-y;
    background-size: 100% auto;
    background-position: 0 0;
    animation: none!important;
}
#threeContainer.road canvas {
    background-color: #000;
    background-image: none;
    background-repeat: repeat-y;
    background-size: 100% auto;
    background-position: 0 0;
    animation: none!important;
}


@keyframes slide {
    from {
        background-position: -100% 0;
    }
    to {
        background-position: 100% 0;
    }
}

@keyframes roadScroll {
    from {
        background-position: 0 1000%;
    }
    to {
        background-position: 0 0;
    }
}


#myfilter {
    width: 100%;
    position: absolute;
    /*background-color: #00000050;*/
    height: 100%;
    color: #FFF;
    text-align: center;
    padding-top: 10%;
    z-index: 150;
}
/* first div inside myfilter */
#myfilter > div {
    background-color: #00000050;
    padding-top: 2em;
    padding-bottom: 2em;
    display: inline-block;
    padding-left: 5em;
    padding-right: 5em;
    border-radius: 5em;
}
#myfilter h2{
	font-size: 6em;
}
#myfilter #score {
	font-size: 3em;
    background: #00000070;
    border-radius: 1em;
    padding: 0 1em 0.1em;
    display: inline-block;
    margin-bottom: 0.2em;
}
@media (max-width: 1400px)  {
    #myfilter {
        font-size: 0.8em; /* Adjust font size for smaller screens */
        padding-top: 10% !important; /* Adjust padding for smaller screens */
    }
}
@media (max-width: 1400px) and (min-height: 900px) {
    #myfilter {
        padding-top: 25% !important;  
    }
}
@media (max-width: 1200px) {
    #myfilter {
        padding-top: 30%;
    }
}

@media (max-width: 1000px) {
    #myfilter {
        font-size: 0.6em;
        padding-top: 25%; 
    }
    .sign {
        border-width: 8px !important;
    }
}
@media (max-width: 900px) {
    #myfilter {
        font-size: 0.5em;
        padding-top: 5% !important; 
    }
}


@media (max-width: 768px) {
    #myfilter {
        padding-top: 10% !important; 
    }
    .sign {
        border-width: 8px !important;
    }
}
@media (max-width: 650px) {
    #myfilter {
        padding-top: 10% !important; 
    }
}

@media (max-width: 450px) {
    #myfilter {
        padding-top: 15% !important;
    }
	#myfilter h2{
		font-size: 3em;
		margin-top: 0.5em;
	}
}


nav {
    margin-left: -2em;
    margin-right: -1.9em;
    margin-top: -1em;
    z-index: 102;
}
    nav a{
        margin: auto !important;
    }

@media (max-width: 768px) {
    nav {
        z-index: 90;
    }
}
#game-selector {
    font-size: 1.2em;
    font-weight: 400;
}
    #game-selector label {
        font-size: 1.2em;
        font-weight: 600;
    }
    #game-selector select {
        font-size: 1.1em;
        border-radius: 1em;
    }


#console{
	overflow:auto;
	border:4px solid black;
	padding:0;
	font-family: monospace;
	text-align: center;
	max-height: 10em;
	background-color: #FFF;
}
#console hr {
	margin: 0.2em 0;
	padding: 0;
}

/* Initial highlight */
.console-line.new {
    background-color: #f3f094;
    color: #000000;
    font-weight: bold;
    transition: background-color 0.5s ease-in-out, color 0.5s ease-in-out;
}

/* Final state after transition */
.console-line {
    background-color: transparent; /* valid way to remove background color */
    color: #000;
    font-weight: normal;
    transition: background-color 0.5s ease-in-out, color 0.5s ease-in-out;
	padding: 0.2em 0.5em;
}



.hover-text-content {
    display: none;
}
.hover-text:hover .hover-text-content {
    display: inline;
}

#control-panel-show {
    position: absolute;
    z-index: 100;
    top: 10px;
}

#show-control-panel {
    border-radius: 0 1em 1em 0;
    box-shadow: 2px 2px 5px #000000;
    left: -4px;
}

#hide-control-panel {
    border-radius: 0 1em 1em 0;
    margin-top: 10px;
    box-shadow: 2px 2px 5px #000000;
    position: absolute;
    z-index: 151;
    left: 0;
}

#radio-options {
    border-radius: 0 1em 1em 0;
    margin-top: 55px;
    box-shadow: 2px 2px 5px #000000;
    position: absolute;
    z-index: 151;
    left: 0;
    padding-left: 0;
}


#radio-options  button.btn {
    margin-top: -0.6em;
}

#full-screen-controls{
    text-align: center;
    display: inline-block;
    position: absolute;
    bottom: 30px;
    left: 30px;
}

#game-messages {
    text-align: center;
    display: block;
    position: absolute;
    bottom: 30px;
    /* centered horizontally */
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Courier New', Courier, monospace;
    color: #ffffff;
    background-color: #00000050;
    padding: 0.5em 1em;
    border-radius: 1em;
}

.ribbon {
    border-radius: 1em 0 0 1em;
    box-shadow: 2px 2px 5px #000000;
    position: absolute;
    z-index: 101;
	right: 0;
    cursor: unset;
    font-size: 1.5em;
}
#high-score-ribbon {
    margin-top: 10px;
}
#score-ribbon {
    margin-top: 65px;
}
#time-ribbon {
    margin-top: 120px;
}
#kills-ribbon {
    margin-top: 175px;
}
@media (max-width: 1000px) {
    .ribbon, #show-control-panel, #radio-options {
        font-size: 1em;
    }
    #high-score-ribbon {
        margin-top: 5px;
    }
    #score-ribbon {
        margin-top: 40px;
    }
    #time-ribbon {
        margin-top: 75px;
    }
    #kills-ribbon {
        margin-top: 110px;
    }
    #game-messages {
        bottom: 20px;
        font-size: 0.8em;
        padding: 0.3em 0.5em;
    }
    #radio-options {
        margin-top: 55px;
    }
}
/* if portrait mode on mobile, move the ribbons to the top */
@media (max-width: 768px) and (orientation: portrait) {
    #radio-options {
        margin-top: 10px;
    }
}

#start-control {
    text-align: center;
    height: 100vh; /* or 100vh if you want it full screen */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
    #start-control img {
        max-width: 300px;
        margin-top: 30em;
    }

    #start-control.race #startButton {
        font-weight: 700;
        font-size: 3em;
        padding: 0.3em 0.5em 0.4em;
        border-width: 0.4em !important;
        box-shadow: 0 2px 4px #000;
    }
    #start-control.race #startButton:hover {
        box-shadow: 0 4px 2px #000;
    }

@media (max-width: 768px) and (orientation: portrait) {
    #start-control {
        height: 45vh;
    }
}
@media (max-height: 900px) and (orientation: landscape) {
     #start-control img {
		 margin-top: 20em !important;
		}
}
@media (max-height: 550px) and (orientation: landscape) {
     #start-control img {
		 margin-top: 10em !important;
		}
}
@media (max-width: 1000px)  {

     #start-control.race #startButton {
        font-weight: 700;
        font-size: 2em;
        padding: 0.3em 0.5em 0.4em;
        border-width: 0.4em !important;
    }

    #start-control img {
        max-width: 150px;
        margin-top: 9em;
    }
}

#pause-control {
    text-align: center;
    display: none; /* Hidden by default */
    position: absolute;
    bottom: 30px;
    right: 30px;
}
    #pauseButton {
        border-radius: 1em;
        box-shadow: 2px 2px 5px #000000;
        font-size: 1.2em;
        padding: 0.6em 1em;
    }

#pause-control.race #pauseButton, #start-control.race #startButton {
    border-radius: 50%;
    border: 10px solid #ed2929;
    color: #000;
    background: #FFF;
}
@media (max-width: 930px) {
    #pause-control {
        bottom: 0px;
        right: 10px;
    }
    #pauseButton {
        font-size: 0.8em !important;
        border-width: 6px !important;
    }
}

.no-shadow {
    box-shadow: none !important;
}

@media (min-width: 768px) and (min-height: 350px) {
    .non-mobile {
        display: inline-block ; /* Show only on larger screens */
    }
}
/* else is mobile */
@media (max-width: 768px) {
    .non-mobile {
        display: none; /* Hide on smaller screens */
    }
}



.sign{
    padding-top: 1.4em;
    color: #000;
    background: #FFF;
    display: inline-block;
    width: 8em;
    height: 8em;
    border-radius: 50%;
    border: 13px solid #ed2929;
    box-shadow: 0 4px 6px #000;
}