/* Color Variables */
:root {
  --bg-color: #ffffff;
  --text-color: #333;
  --player-bg: #f9f9f9;
  --progress-track: #d3d3d3;
  --primary-color: #1a2b5a; /* Navy blue */
  --light-accent-color: #12421c; /* Record Green */
  --hover-color: #2c3e50; /* Lighter navy blue */
  --dark-header-color: #191919; /* Darker header color */
  --light-header-color: #f2f1f1; /* Lighter header color */
  --error-color: #d32f2f; /* Red for errors */
  --active-tab-color: #1e3a8a; /* Deeper blue for active tab */
}

body.dark-mode {
  --bg-color: #000000;
  --text-color: #ffffff;
  --accent-color: #39ff14; /* Neon green for dark mode */
  --player-bg: #1a1a1a;
  --progress-track: #333;
  --active-tab-color: #1e40af; /* Slightly lighter blue for dark mode */
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
  --accent-color: var(--light-accent-color); /* Record Green for light mode */
}

body.account-credits {
  height: 100vh;
  overflow: hidden;
}
body.account-credits .container {
  max-height: calc(100vh - 90px);
}
body.account-credits .credit-history {
  max-height: calc(100vh - 350px);
  overflow-y: auto;
  padding-bottom: 40px;
}
@media (max-width: 767px) {
  body.account-credits {
    height: auto;
    overflow: auto;
  }
  body.account-credits .container {
    max-height: none;
    overflow: auto;
  }
  body.account-credits .credit-history {
    max-height: 300px;
  }
}

body[dir="rtl"] {
  text-align: right;
}

.container {
  text-align: center;
  max-width: 700px;
  padding: 50px;
  background-color: var(--bg-color);
  border-radius: 10px;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2), -2px 0 8px rgba(0, 0, 0, 0.2);
  margin: 90px auto 0 auto;
  transition: background-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

body.dark-mode .container {
  box-shadow: 2px 0 8px rgba(51, 51, 51, 0.3), -2px 0 8px rgba(51, 51, 51, 0.3);
}

body[dir="rtl"] .container {
  text-align: right;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  z-index: 1000;
  background-color: var(--dark-header-color);
  transition: background-color 0.3s;
  min-height: 60px;
}

body:not(.dark-mode) .header {
  background-color: var(--light-header-color);
}

.header-content {
  display: flex;
  align-items: center;
}

body[dir="rtl"] .header-content {
  flex-direction: row-reverse;
}

.header-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
  z-index: 1000;
}

body[dir="rtl"] .header-buttons {
  flex-direction: row-reverse;
}

.header-buttons.not-signed-in {
  display: flex;
  align-items: center;
}

.signup-button-container {
  display: flex;
  justify-content: flex-start;
}

.login-theme-container {
  display: flex;
  gap: 5px;
  justify-content: flex-start;
}

.header-button {
  padding: 8px 16px;
  font-size: 1rem;
}

.signup-button {
  font-weight: 700;
}

.logo {
  max-height: 37.5px;
  max-width: 93.75px;
  transition: opacity 0.3s;
  cursor: pointer;
}

.logo:focus {
  outline: none;
}

.hamburger-menu {
  position: static;
  margin: 0;
  background-color: var(--primary-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  width: 40px;
  height: 40px;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.hamburger-menu svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

.hamburger-menu:hover::after {
  content: "Menu";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color, #1a2b5a);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: 'Oswald', sans-serif;
  white-space: nowrap;
  z-index: 10;
  margin-bottom: 8px;
}

body.dark-mode .hamburger-menu:hover::after {
  background-color: var(--accent-color, #39ff14);
  color: #000000;
}

.hamburger-menu-content {
  display: none;
  position: absolute;
  top: 50px;
  right: 10px;
  background-color: var(--bg-color);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  padding: 15px;
  width: 200px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  text-align: left;
  transition: background-color 0.3s;
}

body[dir="rtl"] .hamburger-menu-content {
  right: auto;
  left: 10px;
  text-align: right;
}

.hamburger-menu-content.show {
  display: block;
}

.menu-user-info {
  font-family: 'Oswald', sans-serif;
  color: var(--text-color);
  margin-bottom: 10px;
}

.menu-user-info .user-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.menu-user-info .user-email {
  font-size: 0.9rem;
  opacity: 0.8;
}

.menu-item {
  font-family: 'Oswald', sans-serif;
  color: var(--text-color);
  font-size: 1rem;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.3s;
}

.menu-item:hover {
  color: var(--primary-color);
}

.menu-item.logout {
  color: #dc3545;
}

.menu-item.logout:hover {
  color: #c82333;
}

.menu-divider {
  border: 0;
  border-top: 1px solid var(--primary-color);
  margin: 10px 0;
}

h1 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--accent-color);
  font-size: clamp(24px, 5vw, 40px);
  margin-bottom: 30px;
}

.site-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 25px;
  color: var(--text-color);
  transition: color 0.3s;
  margin-left: 10px;
  cursor: pointer;
  text-decoration: none;
}

body[dir="rtl"] .site-title {
  margin-left: 0;
  margin-right: 10px;
}

.site-title:focus {
  outline: none;
}

body.dark-mode .site-title {
  color: #ffffff;
}

form {
  display: flex;
  flex-direction: column;
}

.container form#musicForm label {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--text-color);
  text-align: left;
  font-size: 1rem;
  margin-bottom: 8px !important;
  padding-bottom: 8px;
  line-height: 1.2;
}
.container form#musicForm {
  margin-top: 40px;
}

body[dir="rtl"] .container form#musicForm label {
  text-align: right;
}

.checkbox-group label {
  margin-bottom: 0;
}

input[type="text"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  margin-bottom: 25px;
  margin-top: 0;
}

textarea {
  height: 120px;
  resize: vertical;
}

select#model {
  margin-bottom: 25px;
}

select:focus {
  outline: none;
  border-color: var(--accent-color);
}

.custom-dropdown {
  position: relative;
  width: 100%;
  margin-bottom: 25px;
}

.dropdown-display {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  font-size: 1rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.dropdown-display:focus,
.custom-dropdown.focused .dropdown-display {
  border-color: var(--accent-color);
  outline: none;
}

.dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background-color: var(--bg-color);
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  z-index: 1000;
  transition: background-color 0.3s;
}

.dropdown-list li {
  padding: 10px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-color);
  transition: background-color 0.2s, color 0.2s;
}

.dropdown-list li:hover {
  background-color: var(--hover-color);
  color: #ffffff;
}

.dropdown-list li.selected {
  background-color: var(--primary-color);
  color: #ffffff;
}

input[type="checkbox"] {
  margin-right: 10px;
  accent-color: var(--primary-color);
}

body[dir="rtl"] input[type="checkbox"] {
  margin-right: 0;
  margin-left: 10px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 25px;
}

body[dir="rtl"] .checkbox-group {
  justify-content: flex-end;
}

.button {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  font-size: 1.2rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s;
}

.button:hover {
  background-color: var(--hover-color);
}

.mode-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: nowrap;
}

.mode-button {
  position: relative;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 10px 16px;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  min-width: 120px;
  box-sizing: border-box;
}

.mode-button:hover {
  background-color: var(--hover-color);
}

.mode-button:focus {
  outline: 2px solid var(--accent-color);
  border: none;
}

.mode-button.active-tab {
  background-color: var(--active-tab-color);
}

body.dark-mode .mode-button.active-tab {
  background-color: var(--active-tab-color);
}

.pro-button::after {
  content: 'PRO';
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: var(--accent-color);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark-mode .pro-button::after {
  color: #000000;
}

body[dir="rtl"] .pro-button::after {
  right: auto;
  left: -10px;
}

.generate-track {
  width: 100%;
}

.generate-music {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 12px 24px;
  border: none;
  border-radius: 20px;
  font-size: 1.2rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  width: 100%;
  margin-bottom: 25px;
}

.generate-music:hover {
  background-color: var(--hover-color);
  transform: scale(1.05);
}

.generate-music:focus {
  outline: none;
  border: 2px solid var(--accent-color);
}

#status {
  margin-top: 20px;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-color);
  transition: color 0.3s;
}

.song-box {
  background-color: var(--bg-color);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  padding: 20px;
  margin: 20px auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 500px;
  transition: background-color 0.3s;
  box-sizing: border-box;
}

.song-box h2 {
  color: var(--primary-color);
  font-size: clamp(1.5rem, 4vw, 1.8rem);
  margin: 0 0 10px;
}

body.dark-mode .song-box h2 {
  color: var(--text-color);
}

.custom-player {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--player-bg);
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 15px;
  transition: background-color 0.3s;
}

body[dir="rtl"] .custom-player {
  flex-direction: row-reverse;
}

.play-pause {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.play-pause:hover {
  background-color: var(--hover-color);
}

.play-pause svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.time-display {
  font-size: 1rem;
  color: var(--text-color);
  min-width: 100px;
  transition: color 0.3s;
  font-weight: bold;
}

.progress-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: var(--progress-track);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent-color);
  border-radius: 50%;
  cursor: pointer;
}

.progress-bar::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--accent-color);
  border-radius: 50%;
  cursor: pointer;
}

.progress-bar::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--accent-color) var(--progress), var(--progress-track) var(--progress));
  height: 8px;
  border-radius: 4px;
}

body[dir="rtl"] .progress-bar::-webkit-slider-runnable-track {
  background: linear-gradient(to left, var(--accent-color) var(--progress), var(--progress-track) var(--progress));
}

.progress-bar::-moz-range-track {
  background: var(--progress-track);
  height: 8px;
  border-radius: 4px;
}

.progress-bar::-moz-range-progress {
  background: var(--accent-color);
  height: 8px;
  border-radius: 4px;
}

.get-full-song {
  font-size: 1.2rem;
}

.try-again {
  font-size: 1rem;
  margin-top: 20px;
}

.countdown {
  font-size: 1rem;
  color: var(--text-color);
  margin-top: 10px;
  transition: color 0.3s;
  font-weight: bold;
}

.loading-bar {
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.progress {
    width: 0;
    height: 100%;
    background-color: var(--primary-color, #1a2b5a);
    transition: width 300s linear;
}

@media (prefers-color-scheme: dark) {
    .loading-bar {
        background-color: #333;
    }

    .progress {
        background-color: var(--accent-color, #39ff14);
    }
}

.theme-toggle {
  position: static;
  margin: 0;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background-color 0.3s;
}

.theme-toggle:hover {
  background-color: var(--hover-color);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

.theme-toggle:hover::after {
  content: "Toggle Theme";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color, #1a2b5a);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: 'Oswald', sans-serif;
  white-space: nowrap;
  z-index: 10;
  margin-bottom: 8px;
}

body.dark-mode .theme-toggle:hover::after {
  background-color: var(--accent-color, #39ff14);
  color: #000000;
}

#countdown {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--text-color);
  text-align: center;
  margin-bottom: 20px;
}

.loading-bar {
  width: 300px;
  height: 12px;
  background: var(--progress-track);
  border-radius: 6px;
  overflow: hidden;
  margin: 0 auto 20px auto;
}

.progress {
  width: 0%;
  height: 100%;
  background: var(--accent-color);
  border-radius: 6px;
  transition: width 120s linear;
}

#loadingText {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-color);
  text-align: center;
}

.error {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--error-color);
  margin-top: 20px;
  text-align: center;
}

.email-container {
  display: none;
  margin-top: 20px;
  text-align: center;
}

.email-container.show {
  display: block;
}

.email-container p {
  font-family: 'Oswald', sans-serif;
  color: var(--text-color);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.email-input {
  width: 100%;
  max-width: 300px;
  padding: 10px;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  font-size: 1rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin-bottom: 10px;
}

.email-submit {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.email-submit:hover {
  background-color: var(--hover-color);
}

/* Details Toggle */
.title-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

body[dir="rtl"] .title-container {
  flex-direction: row-reverse;
}

.details-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-color);
  cursor: pointer;
  text-decoration: none;
}

.details-toggle svg {
  width: 20px;
  height: 20px;
}

.details-toggle:focus {
  outline: none;
}

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

.modal-content {
  background-color: var(--bg-color);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  padding: 20px;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s;
}

body[dir="rtl"] .modal-content {
  text-align: right;
}

.modal-content h2 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 0 0 15px;
}

body.dark-mode .modal-content h2 {
  color: var(--text-color);
}

.modal-content p {
  margin: 10px 0;
  font-size: 1.125rem;
  color: var(--text-color);
}

.modal-content strong {
  font-weight: 700;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

body[dir="rtl"] .modal-close {
  right: auto;
  left: 10px;
}

.modal-close svg {
  width: 24px;
  height: 24px;
  fill: var(--text-color);
}

.modal-close:focus {
  outline: none;
}

.modal-content form {
  display: flex;
  flex-direction: column;
}

.modal-content label {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--text-color);
  font-size: 1rem;
  margin-bottom: 8px;
  text-align: left;
}

body[dir="rtl"] .modal-content label {
  text-align: right;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  margin-bottom: 15px;
}

.modal-content button[type="submit"] {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.modal-content button[type="submit"]:hover {
  background-color: var(--hover-color);
}

.modal-content .signup-link {
  font-family: 'Oswald', sans-serif;
  color: var(--primary-color);
  text-align: center;
  margin-top: 10px;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: underline;
}

.modal-content .signup-link:hover {
  color: var(--hover-color);
}

/* Social Buttons */
.social-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 8px;
  border-radius: 5px;
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 1rem;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
  width: 100%;
  justify-content: center;
}

body[dir="rtl"] .social-button {
  flex-direction: row-reverse;
}

.social-button:hover {
  background-color: var(--hover-color);
}

.social-icon {
  width: 20px;
  height: 20px;
}

.social-icon2 {
  width: 24px;
  height: 24px;
}

.fb-login-button {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  color: #ffffff;
  border-radius: 5px;
  padding: 8px;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  transition: background-color 0.3s;
  margin: 0 auto;
  visibility: visible !important;
}
.fb-login-button span {
  font-size: 1.2rem;
  line-height: 1.5;
}
.fb-login-button .social-icon {
  width: 28px;
  height: 28px;
}

.fb-login-button:hover {
  background-color: var(--hover-color);
}

.x-btn {
  display: inline-block;
  background-color: #000000;
  color: #ffffff;
  padding: 8px;
  border-radius: 5px;
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 1rem;
  width: 300px;
  box-sizing: border-box;
  font-family: 'Oswald', sans-serif;
  transition: background-color 0.3s;
  cursor: pointer;
  text-align: center;
}
.x-btn:hover {
  background-color: #333333;
}
.x-btn i {
  margin-right: 10px;
}

.modal-content hr {
  border: 0;
  border-top: 1px solid var(--primary-color);
  margin: 15px 0;
}

/* Google Sign-In Container */
.google-signin-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  width: 100%;
  visibility: visible !important;
}

.google-signin-container > div {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  color: #ffffff;
  border-radius: 5px;
  padding: 8px;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  transition: background-color 0.3s;
  margin: 0 auto;
  margin-left: auto; 
  margin-right: auto;
  visibility: visible !important;
}

.google-signin-container > div:hover {
  background-color: var(--hover-color);
}

.google-signin-fallback {
  display: none;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 8px;
  border-radius: 5px;
  margin-bottom: 10px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.google-signin-fallback:hover {
  background-color: var(--hover-color);
}

/* Override potential inline styles from Google API */
.google-signin-container > div > * {
  margin: 0 auto !important;
}

/* Credits Display */
.user-credits {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 3px;
  transition: color 0.3s;
}

body.dark-mode .user-credits {
  color: #ffffff;
}

.user-credits .music-note {
  width: 34px;
  height: 34px;
}

body[dir="rtl"] .user-credits {
  flex-direction: row-reverse;
}

/* Pro Version Modal */
#proVersionModal .modal-content {
  background: linear-gradient(180deg, var(--bg-color) 0%, #f7f8fa 100%);
  border-radius: 16px;
  padding: 20px;
  max-width: 625px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  text-align: center;
  font-family: 'Oswald', sans-serif;
  position: relative;
  transform: translateY(0);
  animation: slideIn 0.4s ease-out;
}

body.dark-mode #proVersionModal .modal-content {
  background: linear-gradient(180deg, #1a1a1a 0%, #000000 100%);
}

@keyframes slideIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#proVersionModal .modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7.5px;
  transition: transform 0.2s, background-color 0.2s;
}

body[dir="rtl"] #proVersionModal .modal-close {
  right: auto;
  left: 15px;
}

#proVersionModal .modal-close svg {
  width: 25px;
  height: 25px;
  fill: var(--text-color);
}

#proVersionModal .modal-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  transform: scale(1.1);
}

#proVersionModal .pro-headline {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

body.dark-mode #proVersionModal .pro-headline {
  color: var(--text-color);
}

#proVersionModal .pro-features {
  margin: 15px 0;
  padding: 10px;
  background-color: #e6e8eb;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: left;
}

body.dark-mode #proVersionModal .pro-features {
  background-color: #2d2d2d;
}

body[dir="rtl"] .proVersionModal .pro-features {
  text-align: right;
}

#proVersionModal .pro-features p {
  font-size: 1.125rem;
  color: var(--text-color);
  margin: 10px 0;
  display: flex;
  align-items: center;
  line-height: 1.5;
}

#proVersionModal .pro-features p::before {
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%2312421c" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
  margin-right: 12px;
  display: inline-block;
  vertical-align: middle;
}

body.dark-mode #proVersionModal .pro-features p::before {
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%2339ff14" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
}

body[dir="rtl"] #proVersionModal .pro-features p::before {
  margin-right: 0;
  margin-left: 12px;
}

#proVersionModal .pro-discount {
  font-size: 1.25rem;
  font-weight: 600;
  color: #e53e3e;
  margin: 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

#proVersionModal .pro-pricing {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 12.5px 0;
  line-height: 1.3;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #ffffff;
}

body.dark-mode #proVersionModal .pro-pricing {
  color: var(--text-color);
  border-color: #4b5563;
  background-color: #1a1a1a;
}

#proVersionModal .pro-pricing .original-price {
  font-size: 1rem;
  color: #6b7280;
  text-decoration: line-through;
  margin-left: 8px;
  font-weight: 400;
}

#proVersionModal .pro-checkout {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent-color) 0%, #22c55e 100%);
  color: #ffffff;
  padding: 10px 25px;
  border-radius: 10px;
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  margin-top: 10px;
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3.75px 10px rgba(0, 0, 0, 0.2);
}

body.dark-mode #proVersionModal .pro-checkout {
  color: #000000;
}

#proVersionModal .pro-checkout:hover {
  background: linear-gradient(90deg, var(--hover-color) 0%, #16a34a 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
}

#proVersionModal .pro-checkout:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Credits Purchase Modal */
#creditsPurchaseModal .modal-content {
  background: linear-gradient(180deg, var(--bg-color) 0%, #f7f8fa 100%);
  border-radius: 16px;
  padding: 20px;
  max-width: 625px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  text-align: center;
  font-family: 'Oswald', sans-serif;
  position: relative;
  transform: translateY(0);
  animation: slideIn 0.4s ease-out;
}

body.dark-mode #creditsPurchaseModal .modal-content {
  background: linear-gradient(180deg, #1a1a1a 0%, #000000 100%);
}

#creditsPurchaseModal .modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7.5px;
  transition: transform 0.2s, background-color 0.2s;
}

body[dir="rtl"] #creditsPurchaseModal .modal-close {
  right: auto;
  left: 15px;
}

#creditsPurchaseModal .modal-close svg {
  width: 25px;
  height: 25px;
  fill: var(--text-color);
}

#creditsPurchaseModal .modal-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  transform: scale(1.1);
}

#creditsPurchaseModal .pro-headline {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

body.dark-mode #creditsPurchaseModal .pro-headline {
  color: var(--text-color);
}

#creditsPurchaseModal .pro-features {
  margin: 15px 0;
  padding: 10px;
  background-color: #e6e8eb;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: left;
}

body.dark-mode #creditsPurchaseModal .pro-features {
  background-color: #2d2d2d;
}

body[dir="rtl"] #creditsPurchaseModal .pro-features {
  text-align: right;
}

#creditsPurchaseModal .pro-features p {
  font-size: 1.125rem;
  color: var(--text-color);
  margin: 10px 0;
  display: flex;
  align-items: center;
  line-height: 1.5;
}

#creditsPurchaseModal .pro-features p::before {
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%2312421c" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
  margin-right: 12px;
  display: inline-block;
  vertical-align: middle;
}

body.dark-mode #creditsPurchaseModal .pro-features p::before {
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%2339ff14" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
}

body[dir="rtl"] #creditsPurchaseModal .pro-features p::before {
  margin-right: 0;
  margin-left: 12px;
}

#creditsPurchaseModal .pro-discount {
  font-size: 1.25rem;
  font-weight: 600;
  color: #e53e3e;
  margin: 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

#creditsPurchaseModal .pro-pricing {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 12.5px 0;
  line-height: 1.3;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #f1f3f5;
}

body.dark-mode #creditsPurchaseModal .pro-pricing {
  color: var(--text-color);
  border-color: #4b5563;
  background-color: #1a1a1a;
}

#creditsPurchaseModal .pro-pricing .original-price {
  font-size: 1rem;
  color: #6b7280;
  text-decoration: line-through;
  margin-left: 8px;
  font-weight: 400;
}

#creditsPurchaseModal .pro-checkout {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent-color) 0%, #22c55e 100%);
  color: #ffffff;
  padding: 10px 25px;
  border-radius: 10px;
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  margin-top: 10px;
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3.75px 10px rgba(0, 0, 0, 0.2);
}

body.dark-mode #creditsPurchaseModal .pro-checkout {
  color: #000000;
}

#creditsPurchaseModal .pro-checkout:hover {
  background: linear-gradient(90deg, var(--hover-color) 0%, #16a34a 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
}

#creditsPurchaseModal .pro-checkout:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#creditsPurchaseModal .pricing-container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12.5px;
}

#creditsPurchaseModal .pricing-box {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
  background-color: #f1f3f5;
}

body.dark-mode #creditsPurchaseModal .pricing-box {
  border-color: #4b5563;
  background-color: #1a1a1a;
}

#creditsPurchaseModal .modal-content p.intro-text {
  font-weight: 700;
}

/* Music Video Modal Button Styles */
#musicVideoModal .pro-checkout {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent-color) 0%, #22c55e 100%);
  color: #ffffff;
  padding: 10px 25px;
  border-radius: 10px;
  font-family: 'Oswald', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  margin-top: 10px;
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3.75px 10px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

body.dark-mode #musicVideoModal .pro-checkout {
  color: #000000;
}

#musicVideoModal .pro-checkout:hover {
  background: linear-gradient(90deg, var(--hover-color) 0%, #16a34a 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
}

#musicVideoModal .pro-checkout:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-top: 20px;
}

@media (max-width: 767px) {
  #musicVideoModal .pro-checkout {
    padding: 8px 16px;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
}

.feature-item {
  position: relative;
  padding-left: 30px;
  margin: 10px 0;
}

.feature-item:before {
  content: '\2713'; /* Checkmark Unicode */
  position: absolute;
  left: 0;
  color: var(--accent-color, #ff4d4d);
  font-size: 1.2rem;
  font-weight: bold;
}

.best-value {
  color: #ff0000;
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 10px;
}

.pricing-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.pricing-box {
  flex: 1;
  text-align: center;
  padding: 15px;
  border: 2px solid var(--accent-color, #ff4d4d);
  border-radius: 10px;
}

.download-song {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background-color: var(--primary-color, #1a2b5a);
  border-radius: 50%;
  margin-bottom: 10px;
  position: relative;
}

.download-song:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color, #1a2b5a);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: 'Oswald', sans-serif;
  white-space: nowrap;
  z-index: 10;
  margin-bottom: 8px;
}

body.dark-mode .download-song:hover::after {
  background-color: var(--accent-color, #39ff14);
  color: #000000;
}

.download-song svg {
  width: 24px;
  height: 24px;
}

.create-video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background-color: var(--primary-color, #1a2b5a);
  border-radius: 50%;
  margin-bottom: 10px;
  position: relative;
}

.create-video:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color, #1a2b5a);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: 'Oswald', sans-serif;
  white-space: nowrap;
  z-index: 10;
  margin-bottom: 8px;
}
.video-ready {
    background-color: var(--primary-color, #1a2b5a);
    color: #ffffff;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    margin-bottom: 10px;
}

.video-ready:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color, #1a2b5a);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: 'Oswald', sans-serif;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 8px;
}

@media (prefers-color-scheme: dark) {
    .video-ready {
        background-color: var(--accent-color, #39ff14);
        color: #000000;
    }

    .video-ready:hover::after {
        background-color: var(--accent-color, #39ff14);
        color: #000000;
    }
}

body.dark-mode .create-video:hover::after {
  background-color: var(--accent-color, #39ff14);
  color: #000000;
}

.create-video svg {
  width: 24px;
  height: 24px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

body[dir="rtl"] .action-buttons {
  flex-direction: row-reverse;
}

.error {
  color: var(--error-color, #d32f2f);
  font-size: 1rem;
  text-align: center;
  margin: 1rem 0;
}

.fix-it-container {
  display: flex;
  gap: 5px;
  font-size: 1rem;
  color: var(--text-color);
  margin-top: 10px;
  transition: color 0.3s;
  font-weight: bold;
}

.fix-it-link {
  color: var(--text-color);
  text-decoration: underline;
  font-size: 14px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.fix-it-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.loading-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color, #1a2b5a);
  border-radius: 50%;
  position: relative;
  cursor: default;
  pointer-events: none;
}

.loading-spinner::before,
.loading-spinner::after,
.loading-spinner span {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  animation: spin 1.2s infinite ease-in-out;
}

.loading-spinner::before {
  top: 8px;
  left: 8px;
  animation-delay: -0.4s;
}

.loading-spinner::after {
  top: 8px;
  right: 8px;
  animation-delay: -0.2s;
}

.loading-spinner span {
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.loading-spinner:hover::after {
  content: "Downloading...";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color, #1a2b5a);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: 'Oswald', sans-serif;
  white-space: nowrap;
  z-index: 10;
  margin-bottom: 8px;
}

body.dark-mode .loading-spinner:hover::after {
  background-color: var(--accent-color, #39ff14);
  color: #000000;
}

@keyframes spin {
  0%, 80% { transform: scale(0.8); opacity: 0.3; }
  40% { transform: scale(1.2); opacity: 1; }
}

@media (max-width: 767px) {
  .user-credits {
    font-size: 1rem;
    gap: 1px;
  }
  .header-buttons {
    flex-wrap: nowrap;
    flex-shrink: 1;
    gap: 3px;
  }
  .header-buttons.not-signed-in {
    flex-direction: column;
    align-items: flex-start;
  }
  .signup-button-container {
    width: 100%;
  }
  .login-theme-container {
    width: 100%;
    display: flex;
    gap: 5px;
    justify-content: flex-start;
  }
  .theme-toggle, .hamburger-menu {
    width: 40px;
    height: 40px;
  }
  .hamburger-menu {
    z-index: 1100;
  }
  .theme-toggle svg, .hamburger-menu svg {
    width: 24px;
    height: 24px;
  }
  .header-button {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
  .hamburger-menu-content {
    top: 60px;
    right: 5px;
    width: 180px;
  }
  body[dir="rtl"] .hamburger-menu-content {
    left: 5px;
  }
  .container {
  text-align: center;
  max-width: 700px;
  padding: 20px;
  background-color: var(--bg-color);
  border-radius: 10px;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2), -2px 0 8px rgba(0, 0, 0, 0.2);
  margin: 90px auto 0 auto;
  transition: background-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
  height: calc(100vh - 160px);
  overflow-y: auto;
}
  .song-box {
    max-width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }
  h1 {
    font-size: 2rem;
  }
  .song-box h2 {
    font-size: 1.5rem;
  }
  .custom-player {
    flex-wrap: wrap;
  }
  .time-display {
    min-width: 80px;
  }
  .logo {
    max-height: 30px;
    max-width: 75px;
  }
  #countdown {
    font-size: 2rem;
  }
  .loading-bar {
    width: 200px;
  }
  #loadingText {
    font-size: 1rem;
  }
  .error {
    font-size: 1rem;
  }
  input[type="text"],
  textarea,
  select,
  .dropdown-display {
    font-size: 0.9rem;
  }
  .container form#musicForm label {
    font-size: 0.9rem;
    margin-bottom: 8px !important;
    padding-bottom: 8px;
    line-height: 1.2;
  }
  .container form#musicForm {
    margin-top: 30px;
  }
  .container form#musicForm label[for="prompt"] {
    margin-top: 20px;
  }
  .button {
    font-size: 1rem;
  }
  .modal-content {
    width: 95%;
    padding: 15px;
  }
  .mode-button {
    padding: 8px 12px;
    font-size: 0.9rem;
    min-width: 100px;
  }
  .pro-button::after {
    font-size: 0.6rem;
    padding: 3px 6px;
    top: -8px;
    right: -8px;
  }
  #proVersionModal .modal-content {
    padding: 12px;
    max-width: 90%;
  }
  #proVersionModal .modal-content .intro-text {
    display: none;
  }
  #proVersionModal .pro-headline {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }
  #proVersionModal .pro-features {
    padding: 6px;
    margin: 10px 0;
  }
  #proVersionModal .pro-features p {
    font-size: 0.8rem;
    margin: 6px 0;
  }
  #proVersionModal .pro-features p::before {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%2312421c" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
    margin-right: 8px;
  }
  body.dark-mode #proVersionModal .pro-features p::before {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%2339ff14" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
  }
  body[dir="rtl"] #proVersionModal .pro-features p::before {
    margin-right: 0;
    margin-left: 8px;
  }
  #proVersionModal .pro-discount {
    font-size: 0.9rem;
    margin: 6px 0;
  }
  #proVersionModal .pro-pricing {
    font-size: 1.1rem;
    padding: 6px;
    margin: 8px 0;
  }
  #proVersionModal .pro-pricing .original-price {
    font-size: 0.7rem;
    margin-left: 4px;
  }
  #proVersionModal .pro-checkout {
    padding: 8px 16px;
    font-size: 0.8rem;
    margin-top: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
  #proVersionModal .modal-close {
    top: 10px;
    right: 10px;
    padding: 5px;
  }
  body[dir="rtl"] #proVersionModal .modal-close {
    right: auto;
    left: 10px;
  }
  #proVersionModal .modal-close svg {
    width: 18px;
    height: 18px;
  }
  #creditsPurchaseModal .modal-content {
    padding: 12px;
    max-width: 90%;
  }
  #creditsPurchaseModal .modal-content .intro-text {
    display: none;
  }
  #creditsPurchaseModal .pro-headline {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }
  #creditsPurchaseModal .pro-features {
    padding: 6px;
    margin: 10px 0;
  }
  #creditsPurchaseModal .pro-features p {
    font-size: 0.8rem;
    margin: 6px 0;
  }
  #creditsPurchaseModal .pro-features p::before {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%2312421c" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
    margin-right: 8px;
  }
  body.dark-mode #creditsPurchaseModal .pro-features p::before {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%2339ff14" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
  }
  body[dir="rtl"] #creditsPurchaseModal .pro-features p::before {
    margin-right: 0;
    margin-left: 8px;
  }
  #creditsPurchaseModal .pro-discount {
    font-size: 0.9rem;
    margin: 6px 0;
  }
  #creditsPurchaseModal .pro-pricing {
    font-size: 1.1rem;
    padding: 6px;
    margin: 8px 0;
  }
  #creditsPurchaseModal .pro-pricing .original-price {
    font-size: 0.7rem;
    margin-left: 4px;
  }
  #creditsPurchaseModal .pro-checkout {
    padding: 8px 16px;
    font-size: 0.8rem;
    margin-top: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
  #creditsPurchaseModal .pricing-container {
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
  }
  #creditsPurchaseModal .pricing-box {
    padding: 6px;
    margin: 6px 0;
  }
  #creditsPurchaseModal .modal-close {
    top: 10px;
    right: 10px;
    padding: 5px;
  }
  body[dir="rtl"] #creditsPurchaseModal .modal-close {
    right: auto;
    left: 10px;
  }
  #creditsPurchaseModal .modal-close svg {
    width: 18px;
    height: 18px;
  }
  .social-button, .fb-login-button {
    font-size: 0.95rem;
    padding: 8px;
  }
  .fb-login-button span {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  .fb-login-button .social-icon {
    width: 20px;
    height: 20px;
  }
  .modal-content button[type="submit"] {
    font-size: 1rem;
    padding: 10px;
  }
  .google-signin-container > div {
    max-width: 250px;
  }
  .fb-login-button {
    margin-left: auto;
    margin-right: auto;
  }
}
.get-credits-button {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent-color) 0%, #22c55e 100%);
  color: #ffffff;
  padding: 10px 25px;
  border-radius: 10px;
  font-size: 1.125rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  margin: 10px 0 20px;
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3.75px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  border: none;
}
.transaction-entry {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}
.transaction-entry .credit-column {
  flex: 0 0 120px;
}
.transaction-entry .title-column {
  flex: 0 0 180px;
}
.transaction-entry .date-column {
  flex: 0 0 120px;
}
.transaction-entry .desktop-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.transaction-entry .desktop-actions .details-column {
  flex: 0 0 40px;
  display: flex;
  align-items: center;
}
.transaction-entry .desktop-actions .download-column {
  flex: 0 0 40px;
  display: flex;
  align-items: center;
}
.transaction-entry .action-row {
  display: none;
}
@media (max-width: 767px) {
  .container {
    min-height: 100vh;
    padding: 10px;
  }
  .credit-history {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    min-width: 0;
  }
  .transaction-entry {
    flex-wrap: wrap;
  }
  .transaction-entry .credit-column,
  .transaction-entry .title-column,
  .transaction-entry .date-column {
    flex: 1;
    min-width: 100px;
  }
  .transaction-entry .desktop-actions {
    display: none;
  }
  .transaction-entry .action-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin-top: 5px;
    min-height: 30px;
  }
  .no-transaction-message {
    font-size: 1rem;
  }
}
body.dark-mode .get-credits-button {
  color: #000000;
}
.get-credits-button:hover {
  background: linear-gradient(90deg, var(--hover-color) 0%, #16a34a 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
}
.get-credits-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
@media (max-width: 767px) {
  .credit-history {
    max-height: 300px;
  }
  .get-credits-button {
    width: 100%;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* Song Details Modal - Enable vertical scroll when content overflows */
#songs-details-modal .modal-content {
  max-height: 85vh;                   /* Limit to ~85% of screen height */
  overflow-y: auto;                   /* Vertical scrollbar appears when needed */
  overflow-x: hidden;                 /* Prevent any horizontal scroll (already fine) */
  padding-bottom: 20px;               /* Extra bottom space for readability */
  box-sizing: border-box;             /* Ensure padding doesn't add extra height */
}

/* Credits Purchase Modal - Make taller and remove vertical scrollbar */
#creditsPurchaseModal .modal-content {
  max-height: 92vh !important;         /* Use almost full screen height */
  height: auto !important;             /* Allow content to expand naturally */
  overflow-y: hidden !important;       /* Disable vertical scrollbar */
  min-height: 650px;                   /* Ensure it's tall enough for content */
  padding: 35px 25px;                  /* Slightly more internal vertical space */
}

/* Optional: Force pricing container to fit without forcing scroll */
#creditsPurchaseModal .pricing-container {
  margin-top: 25px;
  gap: 25px;
}

/* Mobile: Full height, no scroll */
@media (max-width: 767px) {
  #creditsPurchaseModal .modal-content {
    max-height: 100vh !important;
    padding: 25px 15px;
    min-height: 100vh;
  }
}