/* Import Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* Mengatur properti untuk semua elemen */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* Mengatur tampilan halaman */
body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #dfa6a6;
}

/* Container utama */
.wrapper {
  width: 780px;
  padding: 35px 40px;
  border-radius: 20px;
  background: #1f1f1f;
}

/* Gaya untuk judul */
header h2 {
  color: #fff;
  font-size: 1.6rem;
}

/* Kolom dalam header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

header .column {
  display: flex;
  align-items: center;
  margin-top: 20px;
  color: #fff;
}

header .column span {
  margin-right: 15px;
  font-size: 1.19rem;
}

/* Input dalam header */
header input {
  margin-left: 15px;
  font-size: 1.1rem;
  outline: none;
  border-radius: 11px;
}

/* Slider volume */
.volume-slider input {
  accent-color: #fff;
}

/* Checkbox untuk menampilkan tombol */
.keys-checkbox input {
  height: 30px;
  width: 60px;
  cursor: pointer;
  appearance: none;
  position: relative;
  background: #444;
  border-radius: 20px;
}

/* Desain tombol toggle saat belum dicentang */
.keys-checkbox input::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 5px;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  transition: all 0.3s ease;
}

/* Desain tombol toggle saat dicentang */
.keys-checkbox input:checked::before {
  left: 35px;
  background: #fff;
}

/* Gaya untuk daftar tombol piano */
.piano-keys {
  display: flex;
  margin-top: 20px;
  list-style: none;
}

.piano-keys .key {
  list-style: none;
  cursor: pointer;
  user-select: none;
  position: relative;
  text-transform: uppercase;
}

/* Gaya untuk tombol hitam */
.piano-keys .key.black {
  z-index: 2;
  height: 140px;
  width: 44px;
  margin: 0 -22px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(#333, #000);
}

/* Efek saat tombol hitam ditekan */
.piano-keys .key.black.active {
  box-shadow: inset -5px -8px 10px rgba(255,255,255,0.1);
  background: linear-gradient(to bottom, #000, #434343);
}

/* Gaya untuk tombol putih */
.piano-keys .key.white {
  height: 240px;
  width: 70px;
  border-radius: 8px;
  border: 1px solid #000;
  background: linear-gradient(#fff 96%, #eee 4%);
}

/* Efek saat tombol putih ditekan */
.piano-keys .key.white.active {
  box-shadow: inset -5px 5px 20px rgba(0,0,0,0.2);
  background: linear-gradient(to bottom, #fff, #ccc);
}

/* Gaya teks pada tombol piano */
.piano-keys .key span {
  position: absolute;
  bottom: 13px;
  width: 100%;
  text-align: center;
  font-size: 1.13rem;
  color: #888;
}

/* Menyembunyikan teks tombol piano saat opsi disembunyikan */
.piano-keys .key.hide span {
  display: none;
}

/* Responsif untuk layar kecil (maksimum 815px) */
@media screen and (max-width: 815px) {
  .wrapper {
    padding: 25px;
  }
  header {
    flex-direction: column;
  }
  header .column {
    margin-top: 10px;
  }
  .volume-slider input {
    max-width: 100px;
  }
  .piano-keys {
    margin-top: 20px;
  }
  .piano-keys .key.black:nth-child(9),
  .piano-keys .key.black:nth-child(10) {
    display: none;
  }
  .piano-keys .key.black {
    height: 120px;
    width: 40px;
    margin: 0 -20px;
  }
  .piano-keys .key.white {
    height: 200px;
    width: 60px;
  }
}

/* Responsif untuk layar lebih kecil (maksimum 615px) */
@media screen and (max-width: 615px) {
  .piano-keys .key.black:nth-child(2),
  .piano-keys .key.black:nth-child(5),
  .piano-keys .key.black:nth-child(7),
  .piano-keys .key.black:nth-child(10),
  .piano-keys .key.black:nth-child(12),
  .piano-keys .key.black:nth-child(14) {
    display: none;
  }
  .piano-keys .key.white {
    width: 50px;
  }
}