:root {
  --naviBlue: #363f5b;
  --fontFamily: "Montserrat", sans-serif;
}

body {
  padding: 0;
  margin: 0;
  overflow: hidden;
}

#Rotate {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 5;
}

#unity-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;

}#unity-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background: #000;
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    z-index: 99999;
}

.before-load {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
}

#unity-container.unity-desktop {
  width: 100vw;
  height: 100vh;
}


@media (max-height: 180px) {
    #unity-loading-bar {
        gap: 8px !important;
    }

    .logo-part {
        max-width: 120px !important;
    }

    #unity-progress-bar-empty {
        width: 180px !important;
        height: 10px !important;
    }
}
#unity-container.unity-mobile {
  width: 100vw;
  height: 100vh;
}

/* New responsive canvas styling */
#unity-canvas {
  display: block;

  /* Maintain 16:9 aspect ratio while fitting screen */
  width: 100vw;
  height: 56.25vw;
  /* 9/16 * 100vw for 16:9 ratio */
  max-height: 100vh;
  max-width: 177.78vh;
  /* 16/9 * 100vh for 16:9 ratio */

  /* Center the canvas */
  margin: 0 auto;
}

/* Mobile-specific canvas adjustments */
.unity-mobile #unity-canvas {
  width: 100vw;
  height: 56.25vw;
  max-height: 100vh;
  max-width: 177.78vh;
}

/* Ensure canvas fills available space properly on very wide screens */
@media (aspect-ratio > 16 / 9) {
  #unity-canvas {
    width: 177.78vh;
    height: 100vh;
  }

  .unity-mobile #unity-canvas {
    width: 177.78vh;
    height: 100vh;
  }
}

/* Ensure canvas fills available space properly on very tall screens */
@media (aspect-ratio < 16 / 9) {
  #unity-canvas {
    width: 100vw;
    height: 56.25vw;
  }

  .unity-mobile #unity-canvas {
    width: 100vw;
    height: 56.25vw;
  }
}

#unity-canvas.real-device {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

.unity-mobile #unity-canvas.real-device {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  align-items: center;
  flex-direction: column;
  
  gap: clamp(20px, 10vh, 120px);
}

#unity-footer {
  position: relative;
}

.unity-mobile #unity-footer {
  display: none;
}

#unity-webgl-logo {
  float: left;
  width: 204px;
  height: 38px;
  background: url("webgl-logo.png") no-repeat center;
}

#unity-build-title {
  float: right;
  margin-right: 10px;
  line-height: 38px;
  font-family: arial;
  font-size: 18px;
}

#unity-fullscreen-button {
  float: right;
  width: 38px;
  height: 38px;
  background: url("fullscreen-button.png") no-repeat center;
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: white;
  padding: 10px;
  display: none;
}

.logo-image {
  margin: 60px 100px;
  width: 75vmin;
  height: auto;
}

#StartGame {
  z-index: 5;
}

.background {
  width: 100vw;
  height: 100vh;
  display: flex;
  background-color: white;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;

  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

#FullScreen {
  display: none;
  z-index: 4;
}

.StartBtn {
  box-shadow: 0 0 40px 40px linear-gradient(to bottom right, #ff8c00, #ff00ff) inset, 0 0 0 0 #3498db;
  transition: all 300ms ease-in-out;
  background: #242445;

  &:hover,
  &:focus {
    background-color: white;
    box-shadow: 0px 0px 0px 0px #0000 inset;
    border: 2px solid var(--naviBlue);
  }
}

.btn {
  box-sizing: border-box;
  appearance: none;

  background-color: transparent;
  border: 2px solid transparent;

  box-shadow: 0px 0px 100px 100px var(--naviBlue) inset;

  color: white;
  border-radius: 15px;
  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 30px 40px;

  font-size: 32px;
  text-decoration: none;
  text-wrap: nowrap;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  line-height: 1;

  font-family: var(--fontFamily);
  font-weight: 700;

  animation: BtnAnimation 1.5s infinite ease-in-out 1s;

  &:not(:hover, :focus) {
    animation-play-state: running;
    animation-delay: 1s;
  }

  &:hover,
  &:focus {
    color: var(--naviBlue);
    outline: 0;
    animation-play-state: paused;
  }
}

@keyframes BtnAnimation {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.logo-part {
  position: relative;
  max-width: 300px;
  animation: fadeIn 1s ease-in-out forwards;
}
 
.logo-part .logo {
  height: auto;
  max-width: 100%;
}
 
.logo-part .EyeWinkOppi {
  position: absolute;
  left: 0;
  top: 15px;
  height: auto;
  width: 40%;
  max-width: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10%);
  }
 
  to {
    opacity: 1;
    transform: translateY(0%);
  }
}

@media screen and (min-height: 480px) and (orientation: landscape) {
  .logo-image {
    margin: 0px 100px;
    width: 80vmin;
  }

  .btn {
    font-size: 28px;
  }
}

@media (max-width: 1199px) {
  .logo-part {
    max-width: 180px;
  }
}

@media screen and (max-width: 1920px) {
  .btn {
    font-size: 32px;
  }
}

@media screen and (min-width: 1080px) {
  .btn {
    font-size: 28px;
  }
}

@media screen and (min-width: 820px) {
  .btn {
    font-size: 36px;
  }
}

@media only screen and (max-device-width: 1027px) and (orientation: landscape) {
  .background {
    flex-direction: row;
  }

  .logo-image {
    margin: 0px 60px;
    width: 105vmin;
  }

  .btn {
    font-size: 24px;
  }
}

/* Utility */
.hidden {
  display: none;
  opacity: 0;
}

.game-bg-blur {
  position: absolute;
  inset: -24px;
  filter: blur(12px);
  z-index: -1;
}

@media screen and (max-width: 768px) {
  #unity-loading-bar {
    position: absolute;
  
   
    transform: translate(-50%, -50%);
    display: none;

  }
}

#unity-logo {
  display: flex;
}

#unity-logo img {
  width: 300px;
  /* transform: translateX(-50vw); */
  /* animation: slideInFromLeft 2.3s linear 0.2s forwards; */
}

@keyframes slideInFromLeft {
  0% {
    transform: translateX(-50vw);
  }

  100% {
    transform: translateX(0);
  }
}


@media (max-width: 992px) {
  #unity-logo img {
    width: 450px;
  }
}
#unity-progress-bar-empty {
    width: 450px;
    height: 18px;
    position: relative;
    overflow: hidden;
    border-radius: 50px;
    background: rgba(0,120,255,0.15);
    border: 2px solid rgba(0,180,255,0.4);

    box-shadow:
        0 0 10px rgba(0,180,255,.5),
        inset 0 0 10px rgba(0,180,255,.3);
}

#unity-progress-bar-full {
    position: absolute;
    left: 0;
    top: 0;
    width: 0%;
    height: 100%;
    border-radius: 50px;

    background: linear-gradient(
        90deg,
        #00c6ff 0%,
        #3de0ff 25%,
        #ffffff 50%,
        #3de0ff 75%,
        #00c6ff 100%
    );

    background-size: 200% 100%;
    animation: shine 1.2s linear infinite;

    transition: width 1s ease;
}

@keyframes shine {
    from { background-position: -200% 0; }
    to   { background-position: 200% 0; }
}

@media (max-width: 767px) {
    #unity-progress-bar-empty {
        width: 300px;
        height: 16px;
    }
}

@media (max-width: 576px) {

  #unity-logo img {
    width: 375px;
    margin: auto;
  }

  #unity-progress-bar-empty {
    width: 240px;
   
  }

 
}

@media screen and (max-height: 420px) {

  #unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: none;
  }
}

@media screen and (orientation: portrait) {
  #unity-loading-bar {
    gap: 200px;
  }
}
