:root {
  --primary-color: #00B4D8;
  --dark-bg: #121212;          
  --light-text: #FFFFFF;
  --gray-text: #B3B3B3;
  --hover-color: #48CAE4;
  --bg-color: var(--dark-bg);
  --text-color: var(--light-text);
  --border-color: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--dark-bg);
  color: var(--light-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.container-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(0, 0, 0, 0.3);
}

.nav-bar a {
  color: var(--light-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-bar a:hover {
  color: var(--primary-color);
}

.btn {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
}

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

.form-container {
  max-width: 800px;
  margin: 2.0rem auto;
  padding: 1.5rem;
  padding-bottom: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

select, textarea {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--dark-bg);
  color: var(--light-text);
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.results-container {
  width: 100%;
  margin: 0 auto;
}

.results-section {
  background-color: rgba(255, 255, 255, 0.05);
  width: 100%;
  padding: 2rem;
  border-radius: 10px;
  margin-top: 2rem;
}

.results-section h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.song-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  margin-bottom: 0;
  border-radius: 4px;
  overflow: hidden;
}

.song-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  gap: 1rem;
  margin-bottom: 0;
}

.song-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.song-item:last-child {
  border-bottom: none;
}

.song-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
}

.song-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 0.25rem;
}

.song-info h3 {
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-info p {
  margin: 0;
  color: var(--gray-text);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-name {
  font-size: 0.8rem;
  color: var(--gray-text);
  opacity: 0.8;
}

.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--gray-text);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: rgba(0, 180, 216, 0.1);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.feature-card {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--gray-text);
}

.logo {
  font-size: 1.6rem;
  font-weight: bold;
  letter-spacing: -0.5px;
  color: var(--light-text);
  text-decoration: none;
  position: relative;
  padding: 0.2rem 0.1rem;
}

.logo::after {
  content: ".";
  color: var(--primary-color);
  font-size: 1.8rem;
  position: relative;
  top: -2px;
}

.logo span {
  display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--gray-text);
    margin-right: 1rem;
}

.auth-required {
    text-align: center;
    padding: 4rem 2rem;
}

.auth-required h2 {
    margin-bottom: 2rem;
    color: var(--gray-text);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
}

.results-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.btn-queue {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-left: auto;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-queue img {
    height: 21px;
    width: auto;
}

.btn-success {
    background-color: #00B4D8;
    cursor: default;
}

.btn-error {
    background-color: var(--primary-color);
    opacity: 0.8;
    cursor: pointer;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.song-info {
    flex: 1;
    min-width: 0;
}

button:disabled {
    opacity: 0.7;
    cursor: default;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.btn-lucky {
    background-color: #9147ff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-lucky:hover {
    background-color: #7d3cdb;
}

.btn-lucky span {
    font-size: 1.2rem;
}

.flash-message {
    background-color: rgba(0, 180, 216, 0.1);
    border: 1px solid #00B4D8;
    color: #fff;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flash-message .close {
    cursor: pointer;
    opacity: 0.7;
}

.flash-message .close:hover {
    opacity: 1;
}

@media (hover: none) {
  .btn:hover,
  .btn-queue:hover {
      background-color: var(--primary-color);
      transform: none;
  }
}

.error-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 100px);
  padding: 2rem;
}

.error-content {
  text-align: center;
  max-width: 600px;
}

.error-message {
  color: var(--error-color);
  margin: 1rem 0;
}

.error-details {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.btn[type="submit"] {
  display: flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
}

.btn[type="submit"] .button-text {
  display: inline-block;
}

.btn[type="submit"] .dots {
  display: inline-block;
  width: 24px;
  text-align: left;
}

.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--dark-bg);
  background: linear-gradient(
    rgba(18, 18, 18, 0.95),
    rgba(18, 18, 18, 0.95)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--light-text);
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  text-align: center;
  border: 1px solid var(--border-color);
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.modal-content h3 {
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.modal-content p {
  margin-bottom: 10px;
  color: var(--gray-text);
}

.modal-content .btn {
  min-width: 100px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  color: #888;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.setlist-card {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0;
    background-color: transparent;
}

.prompt-text {
    white-space: pre-wrap;
    font-style: italic;
    color: var(--light-text);
    margin: 1rem 0;
    padding: 0.5rem 0;
    border-bottom: none;
}

.track-stats {
    text-align: right;
    min-width: 120px;
    margin-left: auto;
    padding-left: 1rem;
}

.queue-count {
    background-color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.text-muted {
    color: var(--gray-text) !important;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

.ms-2 {
    margin-left: 0.5rem;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.nav-buttons .btn {
    flex: 0 0 auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.form-group {
    position: relative;
}

.form-group::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--gray-text);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.form-group:has(textarea)::after {
    display: none;
}

.form-group.select-group::after {
    content: '▼';
}

select:hover {
    border-color: var(--primary-color);
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

select option {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 0.5rem;
}

.button-base {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
}

.results-section {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
}

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

.form-select-base {
    background-color: var(--dark-bg);
    color: var(--light-text);
    border: 1px solid var(--border-color);
    width: 100%;
    cursor: pointer;
}

.btn, .btn-secondary, .btn-queue, .modal-close {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
}

.select-group {
    position: relative;
}

.form-group::after {
    display: none;
}

.song-info h3 a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.song-info h3 a:hover {
    color: var(--primary-color);
}

.song-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.song-image a:hover img {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.spotify-attribution {
    text-align: right;
    margin-top: 0.75rem;
    padding-top: 0;
    border-top: none;
}

.spotify-logo {
    height: 24px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    margin-right: 1rem;
}

.spotify-logo:hover {
    opacity: 1;
}

/* Add this if you want to make the logo white */
.spotify-logo {
    filter: brightness(0) invert(1);  /* This makes any color white */
}

.footer {
    margin-top: auto;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    margin-bottom: 0.75rem;
}

.footer-link {
    color: var(--gray-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-copyright {
    color: var(--gray-text);
    font-size: 1.0rem;
}

.privacy-content {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.privacy-content h1 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.privacy-content section {
    margin: 2rem 0;
}

.privacy-content h2 {
    margin-bottom: 1rem;
    color: var(--light-text);
}

.privacy-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.privacy-content ul {
    list-style-type: disc;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.privacy-content .last-updated {
    color: var(--gray-text);
    font-style: italic;
}

.song-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 0.25rem;
}

.song-details h3 {
    margin: 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-details p {
    margin: 0;
    color: var(--gray-text);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.results-content {
    max-width: 800px;
    margin: 0 auto;
}

.btn-spotify {
  background-color: #1DB954; /* Spotify green */
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  color: var(--light-text);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  /* Adding important flag to ensure this style takes precedence */
  background-color: #1DB954 !important; 
}

.btn-spotify:hover {
  /* Explicitly override any hover colors */
  background-color: #1DB954 !important;
  transform: scale(1.05);
  color: var(--light-text);
}

.btn-spotify img {
  height: 21px;
  width: auto;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--hover-color);
    transform: scale(1.05);
}

.got-it-btn {
    margin-top: 10px;
    min-width: 120px;
    font-size: 1.1rem;
    padding: 0.9rem 1.6rem;
}

a.btn-spotify, .btn.btn-spotify {
  /* This increases specificity to beat .btn styles */
  background-color: #1DB954 !important;
}

a.btn-spotify:hover, .btn.btn-spotify:hover {
  background-color: #1DB954 !important;
  transform: scale(1.05);
  color: var(--light-text);
}

/* Make btn-spotify inline-block so it's only as wide as needed */
.modal-body .btn-spotify {
  display: inline-flex;
  width: auto;
  justify-content: center;
  padding: 0.8rem 2rem;
  margin: 1rem auto 0;
}

/* Fix album cover cropping on mobile */
@media (max-width: 640px) {
  .song-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
  }
  
  .song-image {
    width: 100%;
    height: auto; /* Let height be determined by aspect ratio */
    max-width: 100%;
    border-radius: 6px;
    aspect-ratio: 1 / 1; /* Maintain square aspect ratio */
  }
  
  .song-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .song-info {
    padding-bottom: 0.5rem;
  }
  
  .song-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }
  
  .btn-queue {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    padding: 0.75rem;
  }
}

/* Keep this button styling */
.btn-queue {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  margin-left: auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.padding-top-2rem {
    padding-top: 2rem;
}

/* Make the setlist-card have similar padding to form-container */
.setlist-card {
    max-width: 800px;
    margin: 2rem auto; /* Similar to the form-container margin */
    padding: 0; /* Remove any internal padding */
    background-color: transparent;
}

/* Keep the results-section styling but add more top padding */
.setlist-card .results-section {
    margin-top: 0;
    padding-top: 1.25rem; /* Increase from 0.5rem to 1.25rem */
    padding-bottom: 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

/* Add more padding to the header as well */
.setlist-card .results-header {
    padding-top: 0.5rem; /* Increase from 0.25rem to 0.5rem */
    margin-top: 0;
}

/* Adjust heading spacing but keep it clean */
.setlist-card .results-header h2 {
    margin-top: 0;
    padding-top: 0;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

/* Make sure the Back button is visible with correct margin */
.setlist-card a.btn-secondary.mt-4 {
    display: inline-block;
    margin-bottom: 1rem;
}

/* Style for the history page layout */
.setlist-meta {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

/* Adjust the prompt text on history page */
.results-header .prompt-text {
    margin: 0;
    padding: 0;
    flex: 1;
    max-width: 75%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Make the history page results header align items properly with vertical centering */
.setlist-card .results-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* This should already be vertically centering */
    margin-bottom: 0.5rem;
    padding-top: 0.5rem;
    margin-top: 0;
    min-height: 50px; /* Set a minimum height for the container */
}

/* Adjust the View Details button for better vertical alignment */
.results-header a.btn-secondary {
    margin-top: 0 !important;
    margin-bottom: 0;
    align-self: center; /* Ensure the button itself is centered */
    padding: 0.6rem 1.2rem; /* Slightly adjust padding for better proportions */
    flex-shrink: 0; /* Prevent the button from shrinking */
}

/* New layout for history cards */
.history-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.history-content {
    flex: 1;
    min-width: 0; /* Important for text overflow to work */
}

.history-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Make the prompt text in history cards maintain the styling but work in new layout */
.history-content .prompt-text {
    margin: 0 0 0.5rem 0;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: italic;
    color: var(--light-text);
}

/* Make setlist-meta work in the new layout */
.history-content .setlist-meta {
    margin: 0;
    display: flex;
    align-items: center;
}

/* Style for the prompt text as a header */
.prompt-as-header {
    white-space: normal; /* Allow wrapping for longer prompts */
    font-style: italic;
    color: var(--light-text);
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.6rem; /* Match the standard h2 size */
    overflow-wrap: break-word; /* Handle very long words */
}

/* Increase the queue-all-btn text size to match other buttons */
.queue-all-btn {
    font-size: 1rem; /* Standard button text size */
    padding: 0.8rem 1.5rem; /* Standard button padding */
    font-weight: 600; /* Standard button font weight */
}

/* Make the button height match content */
.setlist-card .results-header button {
    height: fit-content;
    align-self: center;
}

/* Ensure the results header has proper alignment for the new layout */
.setlist-card .results-header {
    padding-top: 0.5rem;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align to top since prompt might be multi-line */
    margin-bottom: 1rem;
}