/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Nunito:wght@400;500&display=swap');

/* Base Theme Colors */
:root {
  --bg-color: #f7f7f7;
  --text-color: #222;
  --card-bg: rgba(255, 255, 255, 0.25);
  --border-glass: rgba(255, 255, 255, 0.3);
  --accent: #2b6cb0;
}

/* Full-Screen Repeating Music Notes + Rainbow Background */
body {
  font-family: "Nunito", sans-serif;
  margin: 0;
  color: var(--text-color);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23000' fill-opacity='0.05'%3E%3Ctext x='10' y='30' font-size='28'%3E%26%239837%3B%3C/text%3E%3Ctext x='70' y='90' font-size='32'%3E%26%239839%3B%3C/text%3E%3Ctext x='40' y='60' font-size='24'%3E%26%239838%3B%3C/text%3E%3Ctext x='90' y='20' font-size='28'%3E%26%239836%3B%3C/text%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(270deg, #ff9a9e, #fad0c4, #fbc2eb, #a6c1ee, #b2fefa);
  background-repeat: repeat, no-repeat;
  background-size: 200px 200px, 1200% 1200%;
  animation: rainbow 150s ease infinite;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

@keyframes rainbow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Layout */
header, footer {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

h1, h2, h3, legend {
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.5px;
  color: var(--accent);
}

h1 {
  margin: 0.5rem 0;
  font-family: "Righteous", cursive;
  font-size: 2.5rem;
  letter-spacing: 1px;
  color: var(--accent);
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

main {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  z-index: 2;
}

/* Glassmorphism Forms */
form {
  background: var(--card-bg);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label, legend {
  font-weight: 600;
  font-family: "Nunito", sans-serif;
}

input, select, button {
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  font-family: "Nunito", sans-serif;
}

button {
  background-color: var(--accent);
  color: white;
  cursor: pointer;
  border: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.3s;
}

button:hover {
  transform: scale(1.03);
  background-color: #1a4e89;
}

fieldset {
  border: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Playlist Preview */
#playlist-preview {
  grid-column: 1 / -1;
  text-align: center;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 2;
}

.playlist {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.song-card {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  width: 150px;
  padding: 0.5rem;
  text-align: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.song-card:hover {
  transform: scale(1.05);
}

.song-card img {
  width: 100%;
  border-radius: 8px;
}

.song-card p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  font-family: "Nunito", sans-serif;
}

/* Footer */
footer {
  font-size: 0.9rem;
  opacity: 0.8;
  z-index: 2;
}
