@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Flex:wdth,wght@25..151,100..1000&display=swap');
html, body {
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 0;
  font-size: 2vmin;
  background: rgb(0, 0, 0);
  background-image: url(https://ready.so/images/Sand-Texture.webp);
}

button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: transparent;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  box-shadow: inset 0 0 0 0.04rem transparent; 
}

button:hover {
  box-shadow: inset 0 0 0 0.15rem rgb(248, 226, 174); 
  font-weight: bold;
}

button:active{
  color: white;
  background: rgba(255,255,255,0.2); 
}


header {
  position: fixed;
  top: 0;
  left: 0;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-radius: 1em;
  margin: 1em;
  padding: 0.2em;
  will-change: background-color;
  transition: all 0.3s ease-out 0s;
}

header:hover {
  background-color: #FFC94B;
  box-shadow: 0 0 2rem -1.2rem black; 
}

header nav {
  display: flex;
  margin: 0;
  padding: 0;
  gap: 0.5em;
  align-items: center;
}

img {
  image-rendering: -webkit-optimize-contrast;
}

header button {
  position: relative;
  border-radius: 0.4em;
  padding: 0.4em;
  width: 7em;
  height: 100%;
  box-sizing: border-box;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 1vw + 0.5vh, 2rem);
  color: black;
  border-radius: 1rem;
  border-color: transparent;
  cursor: pointer;
  transition: all 0.3s ease-out 0s;
  font-variation-settings: 'wdth' 100, 'wght' 450;
}

header button:hover {
  font-variation-settings: 'wdth' 150, 'wght' 750;
}


/* Loading Screen */
#loadingScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0, 0, 0);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#loadingScreen.hidden {
  display: none;
}

#loadingScreen h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  color: white;
  margin-bottom: 2rem;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: lightsalmon;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#NameButton {
  display: block;
  text-align: center;
  font-weight: 700;
  font-size: clamp(1.1rem, 1.2vw, 1.6rem);
  line-height: 1.1;
  max-width: 14ch;
  flex: 0 0 auto;
  margin: 0;
  height: 100%;
}


/*——————————————————
  MOBILE HEADER  (≤ 768px)
  ~70% width, centered, larger buttons, horizontal row
——————————————————*/
@media (max-width: 768px) {
  header {
    left: 50%;
    transform: translateX(-50%);
    margin: 0.6em 0 0 0;
    width: 90%;

    border-radius: 1.2rem;
    padding: 0.4em 0.6em;
  }

  header nav {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    align-items: center;
    gap: 0.4em;
  }

  header nav a {
    width: 100%;
  }

  header button {
    width: 100%;
    padding: 0.55em 0.4em;
    font-size: clamp(0.65rem, 3vh, 2rem);
    border-radius: 0.8rem;
        height: 6vh;
  }

  #NameButton {
    font-size: clamp(0.65rem, 3vh, 1.3rem);
    max-width: 8ch;
    flex: 0 0 auto;
    text-align: left;
    align-content: center;
    line-height: 1.2;
  }

  a {
    width: auto;
    flex: 1;
  }
}


footer {
  margin: auto;
  text-align: center;
}