body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: "Oxanium", sans-serif;
    background: #340770 url('../images/mindstack-page-bg.svg') repeat;
  background-size: 1000px; /* or try 'contain' / '50px 50px' if you want smaller pattern tiles */
  animation: bgScroll 60s linear infinite;
/*
    display: flex;
    justify-content: center;
    align-items: center;
*/
}







/* Animation */
@keyframes bgScroll {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 1000px -1000px; /* move right + up */
  }
}




#game-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    max-width: 300px;
    max-height: 660px;
    border: 10px solid #016160;
    border-radius: 30px;
    overflow: hidden;
    margin: auto;
        display: flex;
    align-items: flex-end;
    background: #00ACAB;
    
}
#splash-screen, #start-screen, #game-over-screen, #pause-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 45px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color:#00ACAB;
    z-index: 1000;
    color: white;
    text-align: center;
}
.mindstack-title {
    animation: blink 1s infinite;padding: 0 30px;
}

.mindstack-title img{
    width: 100%;
        animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}


#device-selection{
        display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-direction: column;
    width: 240px;
    margin-top: 60px;

    
}


#select-pc, #select-mobile, #start-button, #restart-button {
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    background-color: #FFEB20;
    color: #000;
    border: 2px solid #FFEB20;
    height: 60px;
    border-radius: 100px;
    transition: all 0.3s;
    font-family: "Oxanium", sans-serif;
    width: 100%;
    font-weight: 600;

    
}
#select-pc:hover, #select-mobile:hover, #start-button:hover, #restart-button:hover {
    background-color: #00ACAB;
    border: 2px solid #fff;
    color: #fff;
}

.top-logo{
    text-align: center;
}
.top-logo img{
    height: 60px;
    margin-bottom: 15px;
}


#hud {
       position: absolute;
    top: 0;
    width: 100%;
    padding: 15px !important;
    box-sizing: border-box;
    background: #019998;
}
.top-hud{
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.top-hud div{
      font-size: 12px;
    color: #fff;
        font-family: "Oxanium", sans-serif;
    text-transform: uppercase;
    font-weight: 500; 
}

canvas {
     margin: 60px auto 0 auto;
    top: 70px;
    position: absolute;
    z-index: -1;
}


.timer-container{
    display: flex;
    align-items: center;gap: 5px;
}


.start-screen-wrapper{
    padding: 30px;
    box-sizing: border-box;
    width: 100%;
}


#rules {
    font-size: 14px;
    font-weight: 500;
box-sizing: border-box;
text-align: left;
}


#rules h2{
    font-family: "Oxanium", sans-serif;
    font-size: 22px;
    margin: 0 0 5px 0;
}

#rules h3{
    font-family: "Oxanium", sans-serif;
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 20px 0;
}

#rules ul {
  margin: 0 0 60px 0;       /* removes the default top/bottom margin */
  padding-left: 0px; /* removes the left indent */
    text-align: left;
  list-style-position: outside; /* keeps bullets aligned with text */
    font-family: "Montserrat";
    list-style: none
}

#rules li {
    margin-bottom: 10px;
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  margin: 0 2px;
  border-radius: 4px;
  background: #eee;
  box-shadow: 0 2px 0 #bbb;
  position: relative; /* Needed for tooltip positioning */
  cursor: default;
    color: #888;
}

.key img {
  width: 18px;
  height: 18px;
  display: block;
}



#credits {
    position: absolute;
    bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    color: #fff;
}
#code-credit {
    margin-left: 10px;
}
#graphics-credit {
    margin-right: 10px;
}
#scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.2) 2px,
        rgba(0, 0, 0, 0.2) 4px
    );
    pointer-events: none;
    z-index: 500;
}
#touch-controls {
    position: absolute;
    bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    z-index: 1000;
}
.control {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
}
#pause-button {
    position: absolute;
    top: 30px;
    left: 10px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
}




#game-over-screen{
    padding: 0 30px;
    width: calc(100% - 60px)
}

#game-over-screen p, #game-over-screen p span{
    color: #fff;
}
#game-over-screen p span{
    display: block!important
}

#game-over-screen p  a{
    color: #fff!important;
    text-decoration: underline!important;
}

#game-over-screen p span a:hover{
    text-decoration: none!important;
}
#final-score{
    padding: 8px 15px;
    background: #00CAC9;
    font-size: 20px;
    border-radius: 100px;
    font-weight: 600;
    margin-left: 5px;
}

#restart-button{
    margin-top: 30px;
}





.footer{
    position: absolute;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 30px !important;
    box-sizing: border-box;
    background: #019998
}

.footer a{
    font-size: 12px;
    color: #fff;
    text-decoration: none;
        font-family: "Oxanium", sans-serif;
    text-transform: uppercase;
    font-weight: 500;
}

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