html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding-top: 5vh;
    padding-bottom: 5vh;
    font-family: 'Inter', sans-serif;
    background-color: #1e1e2f;
    color: #e0e0f0;
    text-align: center;
}

h1 {
    color: #c084fc;
    margin: 3vh 0 0.5rem 0;
}

h2 {
    font-size: 2rem;
    color: #ffffff;
    margin: 1rem 0 0.5rem 0;
}

form {
    background-color: #2c2c3e;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(192, 132, 252, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 300px;
    margin: 1rem 0 0.5rem 0;
}

input[type="date"] {
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #555;
    background-color: #3a3a50;
    color: #e0e0f0;
}

button {
    padding: 0.5rem;
    background-color: #7c3aed;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #9f4dfc;
}

p {
    margin-top: 1rem;
    color: #ff6b6b;
}

.button-link {
    margin-top: 2rem;
    display: inline-block;
    background-color: #7c3aed;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.button-link:hover {
    background-color: #9f4dfc;
}

.youtube-preview {
    margin-top: 0.5rem;
}

.youtube-thumbnail {
    width: 100%;
    max-width: 560px;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.youtube-thumbnail:hover {
    transform: scale(1.02);
}

.spotify-button-container {
    margin-top: 1.2rem;
}

.spotify-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #1DB954;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.spotify-button:hover {
    background-color: #1ed760;
}

.back-link {
    margin-top: 1rem;
    display: inline-block;
    text-decoration: none;
    color: #deceec;
    background-color: #7c3aed;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.back-link:hover {
    background-color: #9f4dfc;
}

.site-footer {
    margin-top: auto;
    padding: 1rem;
    font-size: 0.8rem;
    color: #888;
    background: transparent;
    text-align: center;
    width: 100%;
}

.site-footer p {
    margin: 0.2rem 0;
    color: #888;
}

.site-footer a {
    color: #aaa;
    text-decoration: none;
    font-weight: 500;
}

.site-footer a:hover {
    color: #c084fc;
    text-decoration: underline;
}

.spotify-embed-container {
    margin-top: 0.5rem;
  }

@media (max-width: 768px) {
  .zoom-wrapper {
    transform-origin: top center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .zoom-wrapper > * {
    width: 100%; /* no scaling on wrapper */
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Slightly zoom form and back button for touch-friendly UI */
  form {
    transform: scale(1.1);
    transform-origin: top center;
  }

  .back-link {
    transform: scale(1.1);
    transform-origin: top center;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
  }

  /* Slightly shrink Spotify iframe to reduce visual weight */
  .spotify-embed-container iframe {
    transform: scale(1.1);
    transform-origin: top center;
    width: 100%;
    height: 130px;
  }

  /* Unscale any container using .no-zoom */
  .no-zoom {
    transform: scale(0.833);
    transform-origin: top center;
    width: 100%;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
  }

  .youtube-preview {
    margin-bottom: 2rem;
  }

  /* Extra spacing if both YouTube and Spotify are present */
  .youtube-preview + .spotify-embed-container {
    margin-top: 2rem;
  }

  /* Ensure long text doesn't overflow */
  h1, h2, p, form {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Slightly lift footer to avoid being too close to screen edge */
  .site-footer {
    padding-bottom: 3rem;
  }
}
