/* 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; /* Menghilangkan margin bawaan */
    padding: 0; /* Menghilangkan padding bawaan */
    box-sizing: border-box; /* Menggunakan box-sizing border-box */
    font-family: 'Poppins', sans-serif;
}

/* Mengatur tampilan halaman */
body {
    display: flex; /* Menggunakan flexbox untuk tata letak */
    align-items: center; /* Memusatkan secara vertikal */
    justify-content: center; /* Memusatkan secara horizontal */
    min-height: 100vh; /* Tinggi minimum 100% viewport */
    background: #121212; /* Warna latar belakang */
}

/* 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 .column {
    display: flex;
    align-items: center;
    margin-top: 20px;
    color: #fff;
}

/* Input dalam header */
header input {
    margin-left: 15px;
    font-size: 1.1rem;
}

/* Slider volume */
.volume-slider input {
    accent-color: #fff; /* Warna slider */
}

/* 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;
}

/* Gaya untuk setiap tombol */
.piano-keys .key {
    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 -5px 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: 0 0 5px 5px;
    background: linear-gradient(#fff 96%, #ccc 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%;
    color: #888;
    font-size: 1.1rem;
}

/* Menyembunyikan teks tombol 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:nth-child(9),
    .piano-keys .key: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:nth-child(1),
    .piano-keys .key:nth-child(2),
    .piano-keys .key:nth-child(3),
    .piano-keys .key:nth-child(4),
    .piano-keys .key:nth-child(5),
    .piano-keys .key:nth-child(6),
    .piano-keys .key:nth-child(7) {
        display: none;
    }
    .piano-keys .key.white {
        width: 50px;
    }
}