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

html,
body {
  height: 100%;
  width: 100%;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

main {
  min-height: 100vh;
  width: 100%;
  background: #444444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem;
}

/* MOBILE FIRST */

main h1 {
  font-size: 2rem;
  text-transform: uppercase;
  color: white;
  text-align: center;
}

.wrapper {
  width: 95%;
  max-width: 900px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  background-color: black;
  border-radius: 1rem;
}

.wrapper h3 {
  color: white;
  font-size: 1.2rem;
  text-transform: uppercase;
}

/* piano container */

.container {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 0.5rem 0.5rem 0.5rem;
}

/* hide scrollbar (optional) */

.container::-webkit-scrollbar {
  display: none;
}

/* keys */

.Key {
  border: 2px solid black;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 0.9rem;
  padding-bottom: 0.4rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, transform 0.1s;
}

.Key.active {
  transform: scale(0.96);
}

/* white keys */

.white {
  width: 2.8rem;
  height: 160px;
  background: white;
  z-index: 0;
}

.white:active {
  background: #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  font-weight: 600;
}

/* black keys */

.black {
  width: 1.6rem;
  height: 100px;
  background: black;
  color: white;
  margin-left: -0.8rem;
  margin-right: -0.8rem;
  margin-top: -0.5rem;
  z-index: 1;
}

.black:active {
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  font-weight: 600;
}

/* TABLET */

@media (min-width: 768px) {

  main h1 {
    font-size: 3rem;
  }

  .wrapper {
    width: 90%;
  }

  .wrapper h3 {
    font-size: 1.5rem;
  }

  .white {
    width: 4rem;
    height: 220px;
  }

  .black {
    width: 2.5rem;
    height: 150px;
    margin-left: -1.25rem;
    margin-right: -1.25rem;
  }

  .Key {
    font-size: 1.2rem;
  }
}

/* DESKTOP */

@media (min-width: 1024px) {

  main {
    gap: 4rem;
  }

  main h1 {
    font-size: 5rem;
  }

  .wrapper {
    width: 90%;
     max-width: 1400px;
    gap: 2rem;
    padding: 2rem;
  }

  .wrapper h3 {
    font-size: 2rem;
  }

  .container {
  justify-content: center;
}

  .white {
    width: 6rem;
    height: 300px;
  }

  .black {
    width: 4rem;
    height: 200px;
    margin-left: -2rem;
    margin-right: -2rem;
    margin-top: -1rem;
  }

  .Key {
    font-size: 1.8rem;
  }
}