/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Roboto:wght@400;500&display=swap');

/* Colors */
:root {
  --background-gray: #e0e5ec;
  --gray: #7e8a98;
  --dark-gray: #6b7683;
  --red: #e22d49;
  --track-color: #3fbbe9;
  --white: #ffffff;
  --dropdown-bg: #f9f9f9;
}

/* Neumorphism box-shadow effect */
.neu {
  box-shadow: -5px -5px 15px 0px #ffffff9e, 5px 5px 15px 0px #a3b1c6a8;
  background: var(--background-gray);
  border-radius: 2em;
  border: 0;
}

/*body setting to change main background*/
/* Base styles */
body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background: url(https://github.com/ecemgo/mini-samples-great-tricks/assets/13468728/8727c9b1-be21-4932-a221-4257b59a74dd);
  background-repeat: no-repeat;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(9px);
  animation: slidein 120s forwards infinite alternate;
  background-color: var(--background-gray);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: white;
}

/*edit sini untuk tukar kotak hitam tengah*/
/* iPhone-like container */
.iphone {
  position: relative;
  width: 100%;
  max-width: 350px; /* Limit max width */
  height: auto;
  aspect-ratio: 9 / 16; /* Maintain a phone-like aspect ratio */
  background-image: url('../jpg/cloud.png'); /* Replace with actual path */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  background-color: rgba(0, 0, 0, 0.458);
  background-blend-mode: darken;
  padding: 15px;
  box-sizing: border-box;
}

/* Close button */
#close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.2em;
  color: var(--red);
  cursor: pointer;
}

/* Title section */
.title {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1em;
}

#now-playing {
  font-family: 'Poppins', sans-serif;
  font-weight: bold;
  font-size: 1em;
  text-transform: uppercase;
  color: var(--white);
}

/* Album cover */
.album-cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 10px 0;
  box-sizing: border-box;
}

.album-cover img {
  width: 100%;
  height: auto; /* Make image height responsive */
  border-radius: 15px;
  object-fit: cover;
  margin-bottom: 10px;
}

/* Song title */
.song-title {
  text-align: center;
  margin-bottom: 5px;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.1em;
  color: var(--background-gray);
}

/* Artist title */
.artist-title {
  text-align: center;
  margin-top: 0;
  margin-bottom: 10px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 1em;
  color: var(--background-gray);
}

/* Progress bar container and timer */
.progress-container {
  width: 100%;
  display: flex;
  align-items: center;
  margin-top: -5px;
}

.timer {
  font-size: 0.8em;
  color: var(--white);
}

.progress-bar {
  flex: 1;
  height: 6px;
  background-color: #ddd;
  border-radius: 5px;
  margin: 0 10px;
  position: relative;
  box-shadow: inset 2px 2px 5px #ffffffa1, inset -2px -2px 5px #a3b1c6a8;
  cursor: pointer;
}

.progress {
  height: 100%;
  background-color: var(--track-color);
  width: 0%;
  border-radius: 5px;
  transition: width 0.1s ease;
}

/* Buttons styling */
.buttons {
  display: flex;
  justify-content: space-around;
  margin: 10px 0;
}

.btn {
  cursor: pointer;
  font-size: 1.5em; /* Adjust icon size for smaller screens */
  background: none;
  border: none;
  color: white;
  padding: 0;
  transition: transform 0.2s ease;
}

.btn:hover {
  transform: scale(1.2);
}

.btn.active {
  color: var(--track-color);
}

.red {
  color: var(--red);
}

/* Dropdown button style */
.dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 10px;
}

.dropbtn {
  background-color: #29684f;
  color: white;
  padding: 10px 15px;
  font-size: 14px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  transition: background-color 0.3s ease;
  box-shadow: -3px -3px 6px #ffffff9e, 3px 3px 6px rgba(0, 0, 0, 0.1);
}

.dropbtn:hover {
  background-color: #246d45;
}

/* Dropdown content */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--dropdown-bg);
  min-width: 100%;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 10px;
  overflow: hidden;
}

.dropdown-content a {
  color: black;
  padding: 10px 14px;
  text-decoration: none;
  display: block;
  font-family: 'Roboto', sans-serif;
  transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Media query for smaller screens (phones) */
@media (max-width: 480px) {
  body {
    padding: 5px;
  }

  .iphone {
    width: 100%; /* Take full screen width */
    max-width: none; /* Remove max-width */
    padding: 10px;
    height: auto; /* Let height adapt */
  }

  .title {
    font-size: 0.9em; /* Adjust font size */
  }

  .song-title {
    font-size: 1em;
  }

  .artist-title {
    font-size: 0.9em;
  }

  .progress-bar {
    height: 5px;
  }

  .btn {
    font-size: 1.2em; /* Smaller buttons */
  }

  .dropbtn {
    font-size: 12px;
    padding: 8px 10px;
  }

  .dropdown-content a {
    font-size: 12px;
  }

  .progress-container {
    margin-top: 5px;
  }
}
