* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: hsl(0, 0%, 0%);
  --bg: hsl(0, 0%, 5%);
  --bg-light: hsl(0, 0%, 10%);
  --text: hsl(0, 0%, 95%);
  --text-muted: hsl(0, 0%, 70%);
  --bg-button: hsl(0, 0%, 85%);
}

body.light {
  --bg-dark: hsl(0, 0%, 90%);
  --bg: hsl(0, 0%, 95%);
  --bg-light: hsl(0, 0%, 100%);
  --text: hsl(0, 0%, 5%);
  --text-muted: hsl(0, 0%, 30%);
  --bg-button: hsl(0, 0%, 15%);
}

body {
  background: var(--bg-dark);
  color: var(--text-muted);
  width: 100%;
  height: 100dvh;
  user-select: none;
}

header {
  width: inherit;
  height: 3em;
  position: sticky;
  top: 0;
}

nav {
  width: inherit;
  height: inherit;
  background-color: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  justify-content: space-between;
  padding: 0 10%;
  font-size: clamp(1rem, 1vw + 0.5rem, 2rem);
}

nav > span:hover {
  color: var(--text);
  cursor: pointer;
}

nav > .theme {
  width: 3em;
  height: 1.5em;
  background-color: var(--bg-light);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: left;
}

.theme-circle {
  width: 1.5em;
  height: 1.5em;
  background-color: var(--bg-button);
  border-radius: 50%;
}

main {
  width: inherit;
  height: calc(100dvh - 5em);
  display: flex;
  justify-content: center;
  align-items: center;
}

main > .game {
  width: 80%;
  height: 50dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
}

.winning-effect.enable {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 90dvh;
  background-image: url("./public/video/winning-effect.gif");
  background-position: center;
  background-size: contain;
}

.lose-effect.enable {
  position: absolute;
  z-index: 2;
  width: 100%;
  height: 30dvh;
  top: 15%;
  background-image: url("https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExNjhyNGoyeWE0dzNla3l0djRwMGJscmltcHExM2d3b2ZzeHpldTJjcSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9cw/xMFAPwvgAK1Lj1EmEM/giphy.gif");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.hint,
.moves,
.user-guess {
  width: inherit;
  height: 3em;
  display: flex;
  justify-content: center;
  align-items: center;
}

.input {
  width: 15em;
  height: 4em;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  appearance: textfield;
}

.input > input {
  all: unset;
  background: var(--bg);
  width: 100%;
  height: 100%;
  font-size: 1.5em;
  text-align: center;
}

.enter {
  width: 15em;
  height: 2.5em;
}

.enter > button {
  width: 100%;
  height: 100%;
}

footer {
  width: inherit;
  height: 2em;
  position: fixed;
  bottom: 0;
  background-color: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  letter-spacing: 0.2cap;
  word-spacing: 0.5cap;
}

footer > span:hover {
  color: var(--text);
  cursor: pointer;
}

.login-screen {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100dvh;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 1em;
  justify-content: center;
  align-items: center;
}

.login-input {
  all: unset;
  width: 10em;
  height: 1.5em;
  font-size: 1.5em;
  background: var(--bg-light);
  text-align: center;
}

.login-button {
  all: unset;
  background-color: var(--bg-button);
  color: var(--bg-dark);
  width: 10em;
  height: 1.5em;
  font-size: 1.5em;
  text-align: center;
  cursor: pointer;
}
