/* Basic page layout */
header {
  background-color: #333;
  color: #fff;
  padding: 1rem 0;
  text-align: center;
  }

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  color: #333;
  padding-bottom: 70px;
}

#app {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

/* Album title */
#album-title {
  font-size: 1.6em;
  margin: 0;
}

/* Album art */
#album-art-container {
  margin: 20px 0;
}

#album-art {
  max-width: 80%;
  height: auto;
  border-radius: 4px;
}

/* Playlist */
#playlist {
  margin: 20px 0;
  text-align: left;
}

#playlist div {
  padding: 6px 0;
  cursor: pointer;
}

#playlist div:hover {
  text-decoration: underline;
}

/* Controls */
#controls {
  margin: 20px 0;
}

#controls button {
  padding: 8px 12px;
  margin: 5px;
  font-size: 0.9em;
}

#volume {
  margin-left: 10px;
}

/* Progress bar */

#progress-container {
  display: flex;
  align-items: center;
  margin: 15px 0;
}

#current-time,
#duration {
  width: 50px;
  font-size: 0.9em;
}

#progress {
  flex: 1;
  height: 6px;
  background: #ddd;
  margin: 0 10px;
  position: relative;
  cursor: pointer;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: #333;
}

#progress-dot {
  width: 12px;
  height: 12px;
  background: #333;
  border-radius: 50%;
  position: absolute;
  top: -3px;
  left: 0%;
  transform: translateX(-50%);
}

/* Now playing */
#now-playing {
  font-size: 0.9em;
  margin-top: 10px;
  color: #555;
}

/* Fixed send email link */
#send-email-link {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #ffffff;
  color: #222;
  border: 1px solid #999;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

#send-email-link:hover,
#send-email-link:focus-visible {
  background: #f0f0f0;
}

.email-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.email-icon svg {
  width: 100%;
  height: 100%;
}

/* Email dialog */
#email-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid #aaa;
  border-radius: 8px;
  padding: 0;
}

#email-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

#email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

#email-form h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

#email-form input,
#email-form textarea {
  font: inherit;
  padding: 8px;
  border: 1px solid #bbb;
  border-radius: 4px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.dialog-actions button {
  padding: 8px 14px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  #album-title {
    font-size: 1.3em;
  }

  #progress-container {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
  }

  #current-time,
  #duration {
    min-width: 44px;
    width: auto;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  #progress {
    flex: 1 1 auto;
    min-width: 60px;
    min-height: 6px;
    width: auto;
    margin: 0 8px;
  }

  #send-email-link {
    width: calc(100vw - 28px);
    justify-content: center;
    bottom: 10px;
  }
}
