/* catalog.css */


  /* Import Modern Font */
  @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

  /* Base Styles */
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: #957e4d;
    line-height: 1.6;
    overflow-x: hidden;
  }

@media only screen and (min-width: 1025px) {
  .mobile-only {
    display: none !important; /* Hide mobile-only buttons (loginBtnMobile, logoutBtnMobile) */
  }

  .desktop-only {
    display: inline-block; /* Show desktop-only buttons (loginBtnDesktop, logoutBtnDesktop) */
  }

  .menu-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.5rem !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .menu-toggle {
    display: none !important; /* Hide hamburger toggle on desktop */
  }

  /* Show non-mobile buttons, but respect the hidden class */
  .menu-container > button:not(.mobile-only):not(.hidden) {
    display: inline-block !important; /* Show non-mobile, non-hidden buttons */
  }

  /* Ensure hidden buttons stay hidden */
  .menu-container > button.hidden {
    display: none !important; /* Override visibility for hidden buttons */
  }
}
  /* Header */
  header {
    background: #1a1a1a;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #957e4d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
  }
  header img {
    max-height: 70px;
    filter: drop-shadow(0 0 5px rgba(149, 126, 77, 0.5));
  }
  header h1 {
    color: #b89f6e;
  }



 

  /* Search Container */
  .search-container {
    position: sticky;
    top: 0px; /* Adjusted for header height */
    z-index: 500;
    background: #1a1a1a;
    padding: 1.0rem;
    border-bottom: 2px solid #957e4d;
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0rem;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    margin-top: 0px; /* Push content below the fixed header */
  }
  .search-container > div:first-child {
width: 95%; /* Slightly less than 100% to avoid overflow */
  max-width: 950px; /* Maintain max width */
  margin: 0 auto; /* Center the content */
    color: #cccccc;
    font-size: 1.1rem;
    font-weight: 400;
    text-align: center;
  }
  .search-container > div:nth-child(2) {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .search-container select,
  .search-container input,
  .search-container button {
    padding: 0.8rem;
    border: 1px solid #957e4d;
    border-radius: 8px;
    background: #000000;
    color: #957e4d;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
  }
  .search-container select:focus,
  .search-container input:focus {
    outline: none;
    border-color: #b89f6e;
  }
  .search-container input {
    flex: 1;
    min-width: 250px;
  }
  .search-container button {
    background: linear-gradient(45deg, #957e4d, #b89f6e);
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
  }
  .search-container button:hover {
    background: linear-gradient(45deg, #b89f6e, #d4b98a);
  }
  

 
  /* Songs Grid */
  .songs-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(900px, 1fr));
    gap: 2rem;
  }
  .song-card {
    background: #1a1a1a;
    border: 1px solid #957e4d;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(149, 126, 77, 0.3);
  }
  .song-card table {
    width: 100%;
    border-collapse: collapse;
  }
  .song-card td:first-child {
    padding: 1.5rem;
    vertical-align: top;
    width: 200px;
    text-align: center;
    background: transparent;
  }
  .song-card img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  }
  .song-card audio {
    width: 200px;
    margin-top: 1rem;
    filter: brightness(1.2);
  }
  .song-card td:first-child button {
    margin-top: 1rem;
  }
  .song-card td:first-child button.analyze-song-btn {
    margin-top: 0rem;
  }
  .song-card td:nth-child(2) {
    padding: 1.5rem;
    vertical-align: top;
    background: transparent;
  }
  .song-card .content {
    padding: 0;
  }

  /* Song Header - Added globally to fix desktop centering */
  .song-card .song-header {
    text-align: center; /* Center the song header for all views */
    margin-bottom: 1rem;
  }
  .song-card .song-header h3 {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
  }
  .song-card .song-header h4 {
    color: #b89f6e;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
  }

  .song-card p {
    color: #cccccc;
    font-size: 1rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: flex-start;
  }
  .song-card p strong {
    color: #957e4d;
    font-weight: 600;
    width: 110px;
    text-align: right;
    margin-right: 1rem;
    flex-shrink: 0;
  }
  .song-card p span {
    flex: 1;
    word-break: break-word;
  }
  .song-card button[data-lyrics] {
    background: linear-gradient(45deg, #957e4d, #b89f6e);
    color: #ffffff;
    width: 200px;
    border: none;
    padding: 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    display: block;
    margin: 1rem auto 0;
  }
  .song-card button[data-lyrics]:hover {
    background: linear-gradient(45deg, #b89f6e, #d4b98a);
    transform: translateY(-2px);
  }
  .song-card button {
    background: linear-gradient(45deg, #957e4d, #b89f6e);
    color: #ffffff;
    width: 200px;
    border: none;
    padding: 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    display: block;
    margin: 1rem auto 0;
  }
  .song-card button:hover {
    background: linear-gradient(45deg, #b89f6e, #d4b98a);
    transform: translateY(-2px);
  }
  .song-card button[style*="background:#cc3333"] {
    background: #cc3333;
  }
  .song-card button[style*="background:#cc3333"]:hover {
    background: #e64444;
  }

  /* Edit and Delete Buttons */
  .edit-buttons-right {
    margin-top: 2rem; /* Align with Analyze Song button vertically */
    text-align: right; /* Push to the far right */
    display: block; /* Ensure full width for alignment */
    white-space: nowrap; /* Prevent buttons from wrapping */
  }
  .song-card .edit-buttons-right .edit-delete-btn {
    width: 60px !important; /* Force width to 60px, overriding other rules */
    margin-left: 0.5rem; /* Spacing between Edit and Delete */
    background: linear-gradient(45deg, #957e4d, #b89f6e);
    color: #ffffff;
    border: none;
    padding: 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    display: inline-block; /* Ensure side by side */
    vertical-align: middle; /* Align vertically */
  }
  .song-card .edit-buttons-right .edit-delete-btn:hover {
    background: linear-gradient(45deg, #b89f6e, #d4b98a);
    transform: translateY(-2px);
  }
  .song-card .edit-buttons-right .edit-delete-btn[style*="background:#cc3333"] {
    background: #cc3333;
  }
  .song-card .edit-buttons-right .edit-delete-btn[style*="background:#cc3333"]:hover {
    background: #e64444;
  }

  /* Ensure the parent <td> has enough space */
  .song-card td:nth-child(2) {
    padding: 1.5rem;
    vertical-align: top;
    background: transparent;
    position: relative; /* For absolute positioning if needed */
  }

  /* Edit Section */
  .inline-edit-form {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid #957e4d;
    border-radius: 8px;
    background: #1a1a1a;
  }
  .inline-edit-form.hidden {
    display: none;
  }
  .form-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
  }
  .form-group label {
    color: #cccccc;
    font-weight: 600;
    min-width: 100px;
    text-align: right;
    flex-shrink: 0;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #957e4d;
    border-radius: 8px;
    background: #000000;
    color: #ffffff;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
  }
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: #b89f6e;
  }
  .form-group button {
    background: linear-gradient(45deg, #957e4d, #b89f6e);
    color: #ffffff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-left: auto;
  }
  .form-group button:hover {
    background: linear-gradient(45deg, #b89f6e, #d4b98a);
    transform: translateY(-2px);
  }

  /* Pagination */
  .pagination {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2.5rem 0;
  }
  .pagination button {
    background: linear-gradient(45deg, #957e4d, #b89f6e);
    color: #ffffff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
  }
  .pagination button:disabled {
    background: #555;
    cursor: not-allowed;
  }
  .pagination button:hover:not(:disabled) {
    background: linear-gradient(45deg, #b89f6e, #d4b98a);
    transform: translateY(-2px);
  }

/* Mobile adjustments for pagination (max-width: 768px) */
@media (max-width: 768px) {
  .pagination {
    gap: 0.5rem; /* Reduce gap between buttons */
    flex-wrap: wrap; /* Allow buttons to wrap if needed */
    padding: 0 0.5rem; /* Ensure consistent padding with parent */
    margin: 1.5rem 0 4rem 0; /* Reduce top margin, increase bottom margin */
  }
  .pagination button {
    padding: 0.6rem 1rem; /* Reduce padding to make buttons narrower */
    font-size: 0.85rem; /* Smaller text for better fit */
    min-width: 80px; /* Ensure buttons are wide enough for touch */
  }
}

/* Very small screens (max-width: 480px) */
@media (max-width: 480px) {
  .pagination {
    gap: 0.3rem; /* Further reduce gap */
    margin: 1.5rem 0 4rem 0; /* Adjust for smaller screens */
  }
  .pagination button {
    padding: 0.5rem 0.8rem; /* Even smaller padding */
    font-size: 0.8rem; /* Smaller text */
    min-width: 70px; /* Adjust for very small screens */
  }
}

  /* Modals */
  .modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  .modal {
    background: rgba(26, 26, 26, 0.95);
    border: 2px solid #957e4d;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    color: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
  }
  @keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
  }
  .modal h2 {
    color: #957e4d;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
  }
  .close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #957e4d;
    cursor: pointer;
    transition: color 0.3s ease;
  }
  .close-modal:hover {
    color: #b89f6e;
  }
  .form-group {
    margin-bottom: 1.5rem;
  }
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cccccc;
    font-weight: 600;
  }
  .form-group input,
  .form-group textarea,
  .form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #957e4d;
    border-radius: 8px;
    background: #000000;
    color: #ffffff;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
  }
  .form-group input:focus,
  .form-group textarea:focus,
  .form-group select:focus {
    outline: none;
    border-color: #b89f6e;
  }
  .form-group button {
    background: linear-gradient(45deg, #957e4d, #b89f6e);
    color: #ffffff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
  }
  .form-group button:hover {
    background: linear-gradient(45deg, #b89f6e, #d4b98a);
    transform: translateY(-2px);
  }
  #cancel-upload {
    background: #cc3333;
  }
  #cancel-upload:hover {
    background: #e64444;
  }

  /* Lyrics Scroll */
  .lyrics-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding: 1.5rem;
    background: #000000;
    border: 1px solid #957e4d;
    border-radius: 8px;
    color: #ffffff;
    white-space: pre-wrap;
    font-size: 0.95rem;
  }
  .close-lyrics-btn {
    background: linear-gradient(45deg, #957e4d, #b89f6e);
    color: #ffffff;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 1.5rem;
    font-weight: 600;
    transition: background 0.3s ease;
  }
  .close-lyrics-btn:hover {
    background: linear-gradient(45deg, #b89f6e, #d4b98a);
  }

  /* Inline Edit Form */
  .inline-edit-form {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid #957e4d;
    border-radius: 8px;
    background: #1a1a1a;
  }
  .inline-edit-form.hidden {
    display: none;
  }

  /* Upload Progress */
  #upload-progress-container {
    margin-bottom: 1.5rem;
  }
  #upload-progress-bar {
    height: 25px;
    background: linear-gradient(90deg, #957e4d, #b89f6e);
    border: 1px solid #957e4d;
    border-radius: 8px;
    transition: width 0.3s ease;
  }
  #upload-progress-text {
    text-align: center;
    margin: 0.5rem 0;
    color: #ffffff;
    font-weight: 600;
  }

  /* Responsive Design for Tablets and Smaller (max-width: 768px) */
  @media (max-width: 768px) {
    .songs-container {
      grid-template-columns: 1fr; /* Stack song cards vertically */
      padding: 0 1rem; /* Reduce padding on smaller screens */
    }
    .song-card {
      max-width: 100%; /* Ensure the card fits the screen */
    }
    .song-card td {
      display: block; /* Stack the left and right columns */
      width: 100%;
      text-align: center; /* Center content for better mobile appearance */
    }
    .song-card td:first-child {
      width: 100%;
    }
    .song-card img {
      width: 150px; /* Reduce album art size for mobile */
      height: 150px;
    }
    .song-card audio {
      width: 100%; /* Full width for the audio player */
      max-width: 300px; /* Prevent it from getting too wide */
      margin-top: 0.5rem; /* Reduce spacing */
    }
    .song-card td:first-child button {
      margin-top: 0.5rem; /* Reduce spacing between buttons */
      width: 100%; /* Full width buttons for touch-friendliness */
      max-width: 300px; /* Consistent with audio player width */
      padding: 0.8rem; /* Slightly larger padding for touch */
    }
    .song-card td:first-child button.analyze-song-btn {
      margin-top: 0.5rem; /* Consistent spacing */
    }
    .song-card .content {
      text-align: left; /* Align song details to the left for readability */
      padding: 0 1rem; /* Add padding for better spacing */
    }
    .song-card p {
      flex-direction: column; /* Stack label and value vertically */
      align-items: flex-start; /* Align to the left */
      text-align: left;
    }
    .song-card p strong {
      text-align: left;
      width: auto;
      margin-right: 0;
      margin-bottom: 0.2rem;
    }
    .edit-buttons-right {
      text-align: center; /* Center the Edit/Delete buttons */
      white-space: normal; /* Allow wrapping if needed */
      margin-top: 1rem; /* Space above the buttons */
    }
    .song-card .edit-buttons-right .edit-delete-btn {
      width: 100% !important; /* Full width for touch-friendliness */
      max-width: 300px; /* Consistent with other buttons */
      margin-left: 0;
      margin-bottom: 0.5rem; /* Space between buttons when stacked */
      padding: 0.8rem; /* Larger padding for touch */
    }
    .form-group {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }
    .form-group label {
      text-align: left;
      min-width: auto;
      margin-bottom: 0.2rem;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
      width: 100%;
    }
    .form-group button {
      margin-left: 0;
      width: 100%;
      max-width: 300px; /* Consistent with other buttons */
    }
  }

  /* Additional Breakpoint for Very Small Screens (max-width: 480px) */
  @media (max-width: 480px) {
    .song-card {
      padding: 0.5rem; /* Reduce padding for very small screens */
    }
    .song-card img {
      width: 120px; /* Further reduce album art size */
      height: 120px;
    }
    .song-card audio {
      max-width: 100%; /* Full width on very small screens */
    }
    .song-card td:first-child button {
      max-width: 100%; /* Full width buttons */
      padding: 0.6rem; /* Slightly smaller padding */
    }
    .song-card h3 {
      font-size: 1.5rem; /* Reduce title font size */
    }
    .song-card h4 {
      font-size: 1.2rem; /* Reduce artist font size */
    }
    .song-card p {
      font-size: 0.9rem; /* Slightly smaller text */
    }
    .song-card .edit-buttons-right .edit-delete-btn {
      max-width: 100%; /* Full width on very small screens */
      padding: 0.6rem; /* Slightly smaller padding */
    }
  }

/* Tablet adjustments for iPad (min-width: 769px and max-width: 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .search-container {
    padding: 0.5rem;
    margin-top: 0px;
    top: 0px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    z-index: 500;
    justify-content: flex-start;
    width: 100%;
    align-items: center;
  }

  .search-container > div {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 0.3rem;
    width: 95%;
    max-width: 950px;
    overflow: visible;
    min-height: 40px;
    position: relative;
    margin-top: 0rem;
  }

  .search-container select {
    flex: 0 0 auto;
    width: 130px;
    min-width: 110px;
    max-width: 140px;
    padding: 0.5rem;
    font-size: 0.95rem;
    overflow: visible;
    box-sizing: border-box;
    position: relative;
    visibility: visible;
    opacity: 1;
    margin: 0;
  }

  .search-container input {
    flex: 1;
    min-width: 200px;
    max-width: 350px;
    padding: 0.5rem;
    font-size: 0.95rem;
    box-sizing: border-box;
    position: relative;
  }

  .search-container button {
    width: 90px;
    padding: 0.5rem;
    font-size: 0.95rem;
    box-sizing: border-box;
    margin: 0;
  }
}

/* Mobile adjustments for search container (max-width: 768px) */
@media (max-width: 768px) {
  .search-container {
    padding: 0.5rem;
    margin-top: 0px;
    top: 0px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    z-index: 500;
    justify-content: flex-start;
    background: #1a1a1a;
    border-bottom: 2px solid #957e4d;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  }

  .search-container > div {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.4rem;
    width: 100%;
    overflow: visible;
    min-height: 40px;
    position: relative;
    align-self: flex-start;
    margin-top: 0rem;
  }

  .search-container select {
    flex: 0 0 auto;
    width: 100px;
    min-width: 90px;
    max-width: 110px;
    padding: 0.4rem;
    font-size: 0.8rem;
    overflow: visible;
    box-sizing: border-box;
    position: relative;
    visibility: visible;
    opacity: 1;
    margin: 0;
  }

  .search-container input {
    flex: 1;
    min-width: 150px;
    max-width: 100%;
    padding: 0.5rem;
    font-size: 0.85rem;
    box-sizing: border-box;
    position: relative;
  }

  .search-container button {
    flex: 0 0 auto;
    width: 80px;
    min-width: 70px;
    max-width: 90px;
    padding: 0.5rem;
    font-size: 0.85rem;
    box-sizing: border-box;
    position: relative;
  }
}





  }
