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

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Align items from top to bottom */
  overflow-y: auto; /* Enable vertical scrolling */
  width: 100vw;
  height: 100vh;
  font-family: sans-serif;
  padding: 10px; /* Reduce padding */
  background-color: #f5f5f5;
}

h1 {
  margin-bottom: 5px;
  font-size: 2rem;
}

.song-title {
  font-size: 2rem;
  margin-bottom: 7px;
  color: #555;
}

.info {
  font-size: 2rem;
  text-align: left;
  margin-bottom: 0;
  width: 90%;
  max-width: 500px;
  display: flex;
  flex-wrap: wrap; /* 允許換行 */
}

.info div {
  display: flex;
  margin-bottom: 2px;
  width: 50%; /* 每個子元素佔一半寬度 */
}

.info div span:first-child {
  width: 100px;
  text-align: right;
  margin-right: 10px;
}

.label {
  width: 80px;
  text-align: right;
  margin-right: 10px;
}

.controls {
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  width: 90%;
  max-width: 500px;
}

.controls button {
  flex: 1;
  font-size: 1.8rem;
  margin: 0 5px;
  padding: 15px 0px;
  border: none;
  border-radius: 10px;
  background-color: #4CAF50;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.controls button:active {
  background-color: #3e8e41;
}

#progressContainer {
  width: 90%;
  margin: 10px 0; /* Reduce top and bottom margins */
  max-width: 500px;
}

.progress-bar {
  background: #e0e0e0;
  margin-bottom: 12px; /* Reduce margin between progress bars */
  height: 40px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.progress-fill {
  background: #3498db;
  height: 100%;
  width: 0;
  transition: width 0.2s;
}

.flash {
  animation: flash 0.1s;
}

@keyframes flash {
  0% {
    background-color: rgba(255, 255, 0, 0.5);
  }
  100% {
    background-color: #f5f5f5;
  }
}

/* Progress bar color for muted segments */
.progress-bar.mute .progress-fill {
  background: #999;
}

.progress-bar.prep-mode {
  background-color: #ffecb3; /* 預備拍時的背景色 */
}

.progress-fill.prep-mode {
  background-color: #ff9800; /* 預備拍時的填充色 */
}

.progress-fill.reverse {
  margin-left: auto; /* 由右至左顯示時，將填充條靠右 */
}
