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

body {
  font-family: 'Karla', cursive;
  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;
}

#languageContainer {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background-color: black;
  padding: 5px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1002; 
}

/* Styling for the Font Awesome language icon */
#languageContainer .fa-language {
  color: #9d46ff;
  font-size: 20px;
  position: absolute;
  left: 15px;
  pointer-events: none; /* Allow clicks to pass through to select */
}

/* Styling for the select element */
#languageSelect {
  padding: 5px 10px 5px 35px; /* Left padding to make space for the icon */
  border-radius: 4px;
  border: 1px solid #9d46ff;
  background-color: black;
  color: #ffffff;
  font-size: 12px;
  appearance: none; /* Remove default styling */
  cursor: pointer;
  width: 150px; /* Adjust as needed */
}

.container {
  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;
}

@media screen and (max-width: 768px) {
  .container {
    max-width: 100%;
    padding: 0.5rem;
    margin: 0;
  }
}

@media screen and (max-width: 480px) {
  .container {
    max-width: 100%;
    padding: 0.25rem;
    margin: 0;
  }
}

@media screen and (max-width: 320px) {
  .container {
    max-width: 100%;
    padding: 0.125rem;
    margin: 0;
  }
}

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: linear-gradient(135deg, #0a0a0a 0%, #2a0a2a 20%, #3d1a4f 40%, #1a0a3d 60%, #4f1a3d 80%, #0a0a0a 100%);
  padding: 20px;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 0px 15px rgba(255, 255, 255, 0.3), 0 0px 25px rgba(157, 70, 255, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.2);
  width: 90%;
}

@media screen and (max-width: 768px) {
  form {
    width: 98%;
    margin: 0 auto 1rem auto;
  }
}

@media screen and (max-width: 480px) {
  form {
    width: 100%;
    border-radius: 0;
    margin: 0 0 1rem 0;
  }
}

@media screen and (max-width: 320px) {
  form {
    width: 100%;
    border-radius: 0;
    margin: 0 0 1rem 0;
    padding: 8px;
  }
}

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

.credentials-container {
  display: flex;
  flex-direction: row;
  gap: 0;
  margin-bottom: 1.5rem;
  width: 100%;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

.credentials-container .form-group {
  flex: 1;
  margin-bottom: 0;
  width: 50%;
}

.credentials-container input[type="email"],
.credentials-container input[type="password"] {
  background-color: black;
  color: var(--primary-light);
  border: 1px solid var(--primary);
  width: 100%;
  height: 40px;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.credentials-container input[type="email"]:focus,
.credentials-container input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
}

#userOwner {
  height: 40px;
  background-color: black;
  color: var(--primary-light);
  border: 1px solid var(--primary);
  text-align: center;
  font-size: 16px;
  padding: 0.75rem;
  border-radius: 4px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

#userOwner:focus {
  outline: none;
  border-color: var(--primary);
}

/* Keep row layout even on mobile */
@media screen and (max-width: 480px) {
  .credentials-container {
    flex-direction: row;
    gap: 0;
  }
}

@media screen and (max-width: 320px) {
  .credentials-container {
    flex-direction: row;
    gap: 0;
  }
}

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;
}

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.6em;
  height: 1.6em;
  border: 2px solid var(--primary);
  border-radius: 50%;  /* Make it round */
  outline: none;
  cursor: pointer;
  margin-right: 0.8em;
  position: relative;
  background-color: black;
  transition: all 0.3s ease;
  padding: 10px
}

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

.checkbox-wrapper input[type="checkbox"]:checked::before {
  content: '\2714';
  font-size: 1.2em;
  color: black;
  position: absolute;
  right: 50%;
  top: 50%;
  transform: translate(50%, -50%);
}

.checkbox-wrapper input[type="checkbox"]:hover {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.checkbox-wrapper label {
  cursor: pointer;
  font-size: 1em;
  padding: 0.2em 0;
}

/* Songs container styles */


/* 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: 10px;
  }

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

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


  #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: 10px;
  }

  .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 {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
margin-top: -15px;
}

.checkbox-wrapper {
  float: left;
}

#checkboxSpanContainer {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
  width: 100%;
left: 0;
right: 0;
}

#checkboxSpanContainer span {
width: 100%;
color: #9900ff;
font-weight: light;
}

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

#upload-icon {
    position: fixed;
    top: 80px;
    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;
}

.password-toggle-icon {
  cursor: pointer;
  float: right;
  color: var(--primary-light);
  font-size: 16px;
  transition: color 0.3s ease;
  margin-top: 2px;
}

.password-toggle-icon:hover {
  color: var(--primary-color);
}

.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;
}

#micIcon {
position: absolute;
left: 50%;
transform: translateX(-50%);
cursor: pointer;
color: var(--primary-light);
font-size: 20px;
}

#micIcon:hover {
color: lime;
box-shadow: 0 0 10px lime;
border-radius: 50%;
padding: 2px;
background-color: black;
}

#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;
padding: 20px !important;
box-sizing: border-box;
color: white!important;
font-weight: lighter;
}

#title {
background-color: black;
  text-align: center;
  font-size: 20px;
  color: white;
}

#description,
#personaSelect,
#gptPrompt,
#negativeTags,
#modelType {
background-color: black;
}

#generationType {
background-color: black;
text-align: center;
height: 50px;
  font-size: 16px;
}

/* 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;
}

#generateButtonContainer button {
  background-color: #7437b9;
}

#extendSongButton {
display: none;
}

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

.form-select {
  width: 100%;
  height: 40px;
  background-color: black;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 5px;
  padding: 0 10px;
  margin-bottom: 15px;
}

.form-select option {
  background-color: black;
  color: var(--primary);
  padding: 5px;
}

.form-input {
  width: 100%;
  height: 40px;
  background-color: black;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 5px;
  padding: 0 10px;
  margin-bottom: 15px;
  font-size: 16px;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #9932cc;
  box-shadow: 0 0 5px rgba(153, 50, 204, 0.5);
}

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

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: #1a1a1a; /* Dark background for modal */
  margin: auto;
  padding: 20px;
  border: 1px solid #8A2BE2; /* Purple border */
  width: 80%;
  max-width: 500px;
  color: #e0e0e0; /* Light text for contrast */
  border-radius: 8px;
  position: relative;
}

.close-btn {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
  color: #fff; /* White on hover */
  text-decoration: none;
  cursor: pointer;
}

.modal-content h2 {
    color: #8A2BE2; /* Purple heading */
    margin-top: 0;
}

.modal-content .form-group {
    margin-bottom: 15px;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

.modal-content input[type="text"],
.modal-content input[type="number"],
.modal-content textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #555;
    background-color: #333;
    color: #e0e0e0;
    border-radius: 4px;
    box-sizing: border-box;
}

.modal-content button[type="submit"] {
    background-color: #8A2BE2; /* Purple button */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.modal-content button[type="submit"]:hover {
    background-color: #7a1cc1; /* Darker purple on hover */
}

