@charset "UTF-8";

* {
  box-sizing: border-box;
}

:root {
  --bg: #24C3E3;
  --out: .1rem .2rem .5rem #0003;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  width: 100%;
  height: 100dvh;
  overflow: hidden;

  >div {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
  }

  .main {
    position: relative;
    width: min(20rem, 90vw);
    height: min(20rem, 90vw);
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    gap: min(1rem, 4vw);
  }

  .sub {
    cursor: pointer;
    width: min(20rem, 90vw);
    height: 3rem;
    padding: 0;
    margin-top: .5rem;
    position: relative;
    border: none;
    appearance: none;
    outline: none;
    background-color: white;
    box-shadow: var(--out);
    border-radius: 1.5rem;
    font-size: 1.2rem;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #start:hover,
  #back:hover {
    opacity: .8;
  }

  #start>p,
  #back>p,
  #cand {
    color: black;
    font-family: sans-serif;
  }

  img.keyhint {
    height: 1rem;
    margin-right: .3rem;
  }


  >button {
    position: absolute;
    width: min(4rem, 18vw);
    height: min(4rem, 18vw);
    top: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background: none;
    appearance: none;
    outline: none;
    padding: none;
    opacity: .4;

    img {
      height: 75%;
    }
  }

  #quit {
    display: none;
    left: 0;
  }

  #sound {
    right: 0;
  }

  >button:hover {
    opacity: 1;
  }
}

#home {
  .level {
    width: 100%;
    height: min(5rem, 20vw);
    border-radius: 1.5rem;
    color: #fffa;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "Zen Maru Gothic";
    box-shadow: var(--out);
    border: solid .15rem transparent;
    cursor: pointer;

    b {
      font-size: min(1.5rem, 7vw);
      font-weight: 900;
    }

    p {
      font-size: min(.9rem, 4.5vw);
      margin: 0;
    }
  }

  .level.selected {
    color: white;
    border-color: white;
  }

  .level:hover {
    background-color: #fff3;
  }
}

#quiz {
  display: none;

  #question {
    overflow: hidden;

    > b {
      color: white;
      font-size: min(5rem, 20vw);
      line-height: min(5rem, 20vw);
      font-family: "Zen Maru Gothic";
      font-weight: 700;
    }

    > img {
      position: absolute;
      width: 100%;
      height: 100%;
    }
  }


  #input {
    width: 100%;
    height: 100%;
    appearance: none;
    border: none;
    outline: none;
    background: none;
    font-size: 1.2rem;
  }

  #input:focus {
    appearance: none;
  }

  #cand {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 0 1rem;
    left: 0;
    top: 0;
    text-align: right;
    font-size: 1.2rem;
    line-height: 3rem;
    pointer-events: none;
    display: flex;
    justify-content: right;
    align-items: center;
    opacity: .4;
  }
}

#result {
  display: none;

  .main>p {
    text-align: center;
    color: white;
    font-family: "Zen Maru Gothic";
    font-weight: 500;
    font-size: 1.3rem;
    margin: 0;
  }

  #record {
    color: white;
    font-size: min(5rem, 20vw);
    line-height: min(5rem, 20vw);
    font-family: "Zen Maru Gothic";
    font-weight: 700;

    .small {
      vertical-align: .2rem;
      font-size: min(2.5rem, 10vw);
      margin: 0 .2rem;
      font-weight: 500;
    }
  }

  #share {
    display: flex;

    a {
      width: 2.7rem;
      height: 2.7rem;
      display: flex;
      justify-content: center;
      align-items: center;

      img {
        width: 2rem;
        height: 2rem;
        border-radius: 1rem;
        box-shadow: var(--out);
      }
    }

    a:hover {
      opacity: .7;
    }
  }
}