:root {
  --primary: #6200ea;
  --primary-light: #9d46ff;
  --primary-dark: #0a00b6;
  --text: #ffffff;
  --background: #121212;
  --surface: #1e1e1e;
  --surface-light: #2a2a2a;
  --error: #cf6679;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: black;
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

.container,
#extendContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 800px;
  margin: auto;
  padding: 1rem;
  box-sizing: border-box;
  box-shadow: 0 0px 10px rgb(167, 1, 244, 0.5);
}

h1, h2 {
  color: var(--primary-light);
  text-align: center;
  margin-bottom: 1rem;
  word-wrap: break-word;
}

form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--surface);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 0px 10px rgb(250, 244, 244, 0.6);
  width: 100%;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary-light);
}

input[type="text"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--surface-light);
  border: 1px solid var(--primary-dark);
  color: var(--text);
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

#prompt {
  border-color: var(--primary-dark);
  outline: none;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239d46ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7em top 50%;
  background-size: 1em auto;
  text-align: center;
}

button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: var(--text);
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background: var(--primary-light);
}

#progressContainer {
  background: var(--surface);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
}

#progressBar {
  height: 8px;
  background-color: var(--primary);
  border-radius: 4px;
  transition: width 0.5s ease-in-out;
}

#progressText {
  text-align: center;
  margin-top: 0.5rem;
  color: var(--primary-light);
}

#result {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  overflow-x: hidden;
}

#songInfo {
  margin-bottom: 1rem;
}

#coverImage img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1rem;
}

#audioPlayer {
  width: 100%;
  margin-bottom: 1rem;
  background-color: var(--surface-light);
  border-radius: 4px;
}

#lyricsContainer {
  white-space: pre-wrap;
  background-color: white;
  color: black;
  padding: 1rem;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  text-align: left;
  width: 100%;
}

.hidden {
  display: none;
}

footer {
  margin-top: auto;
  text-align: center;
  padding: 0.5rem;
  background-color: var(--surface);
}

footer p {
  font-size: 0.8rem;
  color: var(--text);
  margin: 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.container > * {
  animation: fadeIn 0.5s ease-in-out;
}

/* Custom checkbox style */
.checkbox-wrapper {
  display: flex;
  align-items: center;
}

.checkbox-wrapper input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.2em;
  height: 1.2em;
  border: 2px solid var(--primary);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  margin-right: 0.5em;
}

.checkbox-wrapper input[type="checkbox"]:checked {
  background-color: var(--primary);
  position: relative;
}

.checkbox-wrapper input[type="checkbox"]:checked::before {
  content: '\2714';
  font-size: 1em;
  color: var(--text);
  position: absolute;
  right: 1px;
  top: -1px;
}

.checkbox-wrapper label {
  cursor: pointer;
}

/* Credits container styles */
#upload-icon {
  position: fixed;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  font-weight: bold;
  color: var(--primary-light);
  z-index: 1000;
  font-size: 24px;
  cursor: pointer;
}



/* Tags input styles */
.tags-input-container {
  display: flex;
  align-items: center;
}

.tags-input-container select {
  flex-grow: 1;
  margin-right: 0.5rem;
   background-color: black;
}

.add-tag-button {
  background-color: var(--primary);
  color: var(--text);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.add-tag-button:hover {
  background-color: var(--primary-light);
}

.tags-display {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background-color: var(--primary);
  color: var(--text);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.tag .remove-tag {
  margin-left: 0.5rem;
  cursor: pointer;
}

/* Responsive Styles */
@media screen and (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .container {
    padding: 0.5rem;
  }

  form {
    padding: 0.75rem;
  }

  .form-group {
    margin-bottom: 0.75rem;
  }

  input[type="text"],
  textarea,
  select,
  button {
    padding: 0.5rem;
    font-size: 14px;
  }

  #credits-container {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }

  #credits-icon {
    font-size: 0.9rem;
  }

  #result {
    padding: 0.75rem;
  }

  #lyricsContainer {
    padding: 0.75rem;
    max-height: 150px;
  }

  footer p {
    font-size: 0.7rem;
  }

  .add-tag-button {
    width: 25px;
    height: 25px;
    font-size: 16px;
  }

  .tag {
    font-size: 0.8rem;
  }
}

@media screen and (max-width: 320px) {
  h1 {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1rem;
  }

  .container {
    padding: 0.3rem;
  }

  form {
    padding: 0.5rem;
  }

  .form-group {
    margin-bottom: 0.5rem;
  }

  input[type="text"],
  textarea,
  select,
  button {
    padding: 0.4rem;
    font-size: 12px;
  }

  #credits-container {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }

  #credits-icon {
    font-size: 0.8rem;
  }

  #result {
    padding: 0.5rem;
  }

  #lyricsContainer {
    padding: 0.5rem;
    max-height: 120px;
  }

  footer p {
    font-size: 0.6rem;
  }

  .add-tag-button {
    width: 22px;
    height: 22px;
    font-size: 14px;
  }

  .tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}

.popup {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: black;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 0px 10px rgba(250, 244, 244, 0.6);
  color: var(--text);
  width: 90%;
  max-width: 300px;

}

.popup-content h3 {
  color: var(--primary-light);
  margin-bottom: 1rem;
}

.popup-content button {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: var(--primary);
  color: var(--text);
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.popup-content button:hover {
  background: var(--primary-light);
}

.popup-content button#removeAllTags {
  background-color: var(--error);
}

.popup-content button#removeAllTags:hover {
  background-color: red;
}

.popup-content button#closePopup {
  background-color: var(--surface-light);
}

.popup-content button#closePopup:hover {
  background-color: #3a3a3a;
}

@media screen and (max-width: 480px) {
  .popup-content {
    padding: 1rem;
    max-width: 250px;
  }
  .popup-content button {
    padding: 0.5rem;
    font-size: 14px;
  }
}

@media screen and (max-width: 320px) {
  .popup-content {
    padding: 0.75rem;
    max-width: 200px;
  }
  .popup-content button {
    padding: 0.4rem;
    font-size: 12px;
  }
}


.checkbox-container {
dispay: flex;
flex-direction: row;
align-items: center;
justify-content: space-evenly;

.upload-notice {
    background: rgba(157, 70, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: white;
}

.upload-notice ul {
    list-style-type: none;
    padding-left: 20px;
}

.upload-notice li {
    margin: 5px 0;
    position: relative;
}

.upload-notice li:before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: -15px;
}

#uploadTrimmedBtn {
    margin-top: 20px;
    background: var(--primary);
    transition: all 0.3s ease;
}

#uploadTrimmedBtn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

width: 100%;
}

#reset-icon {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 24px;
    cursor: pointer;
  z-index: 99999;
  color: var(--primary-light);
}




.copy-icon {
  cursor: pointer;
  margin-left: 50px;
  color: var(--primary-light);
  font-size: 30px;
}

.audio-container, .video-container {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

#searchInput {
margin-bottom: 20px;
   background-color: black;
}

#clearIcon {
float: right;
cursor: pointer;
color: var(--primary-light);
font-size: 14px;
}

#copyIcon {
float: right;
cursor: pointer;
color: var(--primary-light);
font-size: 16px;
}

#charCounter {
    margin-top: 5px;
    text-align: right;
    font-size: 0.9em;
  float: right;
  color: white;
}

.tags-input-container i {
  float: left;
  font-size: 20px;
}


#prompt {
height: 150px;
resize: none;
   background-color: black;
}

#title {
background-color: black;
}

#songUrl {
background-color: black;
}

#songId {
background-color: black;
}

/* Styles for dynamically created buttons */
.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 20px;
}

.button-container button {
  background-color: #8a2be2; /* Purple color */
  color: white;
  border: none;
  padding: 12px 24px;
  margin: 10px 0;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  width: 80%; /* Increased width */
  max-width: 300px; /* Maximum width */
  box-shadow: 0 0px 10px rgb(255, 255, 255, 0.2);
  transition: all 0.3s ease;

  /* New styles for icon alignment */
  display: flex;
  align-items: center;
  justify-content: center;
}

.button-container button i {
  margin-right: 10px; /* Space between icon and text */
  font-size: 18px; /* Slightly larger icon */
}

.button-container button:hover {
  background-color: #9932cc; /* Slightly lighter purple on hover */
  box-shadow: 0 6px 8px rgba(138, 43, 226, 0.3);
}

.button-container button:active {
  transform: translateY(2px); /* Slight push effect when clicked */
  box-shadow: 0 2px 4px rgba(138, 43, 226, 0.2); /* Reduced shadow when clicked */
}

/* Media query for smaller screens */
@media screen and (max-width: 480px) {
  .button-container button {
    width: 90%;
    font-size: 14px;
    padding: 10px 20px;
  }

  .button-container button i {
    font-size: 16px; /* Slightly smaller icon on mobile */
  }
}

.continueContainer {
float: left;
}

.continueContainer input {
background-color: black;
height: 40px;
font-size: 16px;
padding: 0 10px;
border-radius: 5px;
color: white;
border: 1px solid var(--primary);
}

#generateButtonContainer {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}

#extendSongButton {
display: block;
}

#tags {
width: 100%;
height: 40px;
}

#tags option {
background-color: black;
color: var(--primary);
  width: 100vw;
}


#extendContainer  {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

#extendContainer input {
background-color: black;
margin-top: 10px;
margin-bottom: 10px;
height: 40px;
}

#extendContainer button {
margin-top: 10px;
margin-bottom: 30px;
height: 40px;
}

#extendContainer label {
background-color: black;
margin-top: 10px;
margin-bottom: 10px;
height: 40px;
width: 95%;
padding-top: 20px;
text-align: center;
border-radius: 5px;
box-shadow: 0 0px 50px rgb(167, 1, 244, 0.5);
border: 1px solid var(--primary-dark);
cursor: pointer;
}

#songDetails {
  width: 95%;
  margin: 20px auto;
  padding: 15px;
  border-radius: 8px;
  background: rgba(157, 70, 255, 0.1);
  border: 1px solid var(--primary);
  display: none;
}

#songDetails p {
  margin: 5px 0;
  color: white;
}

#songDetails div {
  margin: 10px 0;
}

#songDetails button { 
background-color: #7837c3;
color: white;
}

.upload-container {
    text-align: center;
    margin: 20px 0;
}

.file-upload-label {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.file-upload-label:hover {
    background: var(--primary-light);
}

input[type="file"] {
    display: none;
}
.form-input {
  width: 100%;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 0 16px;
  margin-bottom: 20px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 15px rgba(157, 70, 255, 0.3);
  transform: translateY(-2px);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}