* {
  box-sizing: border-box;
}

body {
  background-color: rgb(30, 30, 30);
  color: whitesmoke;
}

/* Accessibility - Skip to main content */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 0;
  background: #26abd4;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  z-index: 10001;
  font-weight: bold;
}

.skip-to-main:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Enhanced focus indicators */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #26abd4;
  outline-offset: 2px;
}

/* Focus visible for keyboard navigation only */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #26abd4;
  outline-offset: 2px;
}

/* Improved contrast for links */
a {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: rgba(255, 255, 255, 0.7);
}

a, a:hover, a:active, a:visited {
  color: whitesmoke;
}

img {
  margin: 0 auto;
  width: 100%;
}

input {
  margin: 2% 0;
}

form button {
  width: 100%;
}

footer {
  margin-top: 20px;
  width: 100%;
}

#mflash {
  color: red;
}

/* Flash messages */
.alert {
  margin: 15px 0;
  border-radius: 4px;
}

.alert-success {
  background-color: #28a745;
  color: white;
  border: 1px solid #1e7e34;
}

.alert-danger {
  background-color: #dc3545;
  color: white;
  border: 1px solid #bd2130;
}

/* top margin space */
#hero,
#spotify_embed,
.nav-space 
{
  margin-top: 20%;
}

@media (min-width: 768px) {
  #hero,
  #spotify_embed,
  .nav-space 
  {
    margin-top: 10%;
  }
}
/* Loading Spinner */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #26abd4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: white;
  margin-top: 20px;
  font-size: 16px;
}

/* Button loading state */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Disabled state for forms being submitted */
form.submitting {
  opacity: 0.6;
  pointer-events: none;
}

/* Radio Player Styles */
.radio-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-top: 2px solid #444;
  z-index: 1000;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
  padding: 12px 0;
}

.radio-album-art {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

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

.radio-title {
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  line-height: 1.3;
}

.radio-artist {
  font-size: 13px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.min-w-0 {
  min-width: 0;
}

.gap-1 {
  gap: 0.25rem;
}

.radio-player .btn {
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.2;
  flex-shrink: 0;
}

.radio-player .btn i {
  margin: 0;
}

/* Adjust body padding to account for fixed player */
body.radio-active {
  padding-bottom: 90px;
}

/* Make footer not overlap with radio player */
footer {
  margin-bottom: 0;
}

body.radio-active footer {
  margin-bottom: 90px;
}

/* Radio play button pulse animation when waiting to resume */
@keyframes radioPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(25, 135, 84, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
  }
}

.radio-resume-pulse {
  animation: radioPulse 2s infinite;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 250px;
  max-width: 400px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease-in-out;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  background-color: #28a745;
  border-left: 4px solid #1e7e34;
}

.toast-error {
  background-color: #dc3545;
  border-left: 4px solid #bd2130;
}

.toast-info {
  background-color: #26abd4;
  border-left: 4px solid #1e8db0;
}

.toast-warning {
  background-color: #ffc107;
  border-left: 4px solid #d39e00;
  color: #333;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
  /* Toast notifications - smaller and repositioned */
  .toast-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
    max-width: none;
    padding: 12px 15px;
    font-size: 13px;
  }

  /* Radio player - single line mobile layout */
  .radio-player {
    padding: 4px 0;
  }

  .radio-album-art {
    width: 32px;
    height: 32px;
  }

  .radio-title {
    font-size: 12px;
  }

  .radio-artist {
    font-size: 10px;
  }

  .radio-player .btn-sm {
    padding: 3px 6px;
    font-size: 13px;
    min-height: auto;
    min-width: auto;
  }

  .radio-player .btn-sm i {
    font-size: 13px;
  }

  .radio-song-info {
    max-width: calc(100vw - 220px);
  }

  body.radio-active {
    padding-bottom: 50px;
  }

  body.radio-active footer {
    margin-bottom: 50px;
  }

  /* Loading overlay - prevent horizontal scroll */
  .loading-overlay {
    position: fixed;
    overflow: hidden;
  }

  .loading-text {
    font-size: 14px;
    padding: 0 20px;
  }

  /* Improve touch targets */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }

  .btn-sm {
    min-height: 36px;
    min-width: 36px;
  }

  /* Forms - better mobile spacing */
  input.form-control,
  textarea.form-control,
  select.form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Images - prevent overflow */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Cards - better mobile padding */
  .card {
    margin-bottom: 15px;
  }

  .card-body {
    padding: 12px;
  }

  /* Navigation spacing */
  .nav-space {
    margin-top: 25% !important;
  }

  /* Tables - make scrollable */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  /* Modals - full screen on mobile */
  .modal-dialog {
    margin: 0;
    max-width: 100%;
  }

  .modal-content {
    border-radius: 0;
    min-height: 100vh;
  }

  /* Offcanvas improvements */
  .offcanvas {
    max-width: 85%;
  }

  /* Comment sections */
  .comment {
    padding: 10px;
    font-size: 14px;
  }

  /* Pagination - smaller on mobile */
  .pagination {
    font-size: 14px;
  }

  .page-link {
    padding: 6px 10px;
  }

  /* Profile images - consistent sizing */
  .profile-avatar {
    max-width: 120px;
  }

  /* Video players - responsive */
  video {
    width: 100%;
    height: auto;
  }

  /* Audio players - full width */
  audio {
    width: 100%;
  }

  /* Search results - compact */
  .search-result-item {
    padding: 10px;
  }

  /* Album grid - 2 columns on mobile */
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Hide text in small buttons, keep icons */
  .btn-icon-text .btn-text {
    display: none;
  }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 991px) {
  .radio-player .col-md-4 {
    flex: 0 0 33.333333%;
  }

  .nav-space {
    margin-top: 15% !important;
  }

  .album-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets */
  a, button {
    min-height: 44px;
    padding: 10px;
  }

  /* Remove hover effects on touch devices */
  .btn:hover {
    transform: none;
  }

  /* Smoother scrolling */
  * {
    -webkit-overflow-scrolling: touch;
  }

  /* Disable text selection on buttons */
  button, .btn {
    -webkit-user-select: none;
    user-select: none;
  }
}

/* Landscape mode on mobile */
@media (max-width: 767px) and (orientation: landscape) {
  .nav-space {
    margin-top: 15% !important;
  }

  .radio-player {
    padding: 2px 0;
  }

  body.radio-active {
    padding-bottom: 50px;
  }
}

/* Very small screens (iPhone SE, etc) */
@media (max-width: 375px) {
  .radio-album-art {
    width: 28px;
    height: 28px;
  }

  .radio-title {
    font-size: 11px;
  }

  .radio-artist {
    font-size: 9px;
  }

  .radio-player .btn-sm {
    padding: 2px 5px;
    font-size: 12px;
  }

  .radio-player .btn-sm i {
    font-size: 12px;
  }

  .radio-song-info {
    max-width: calc(100vw - 200px);
  }

  .toast-notification {
    padding: 10px 12px;
    font-size: 12px;
  }
}

/* Mobile device specific improvements */
.mobile-device {
  /* Disable text selection on interactive elements */
  -webkit-touch-callout: none;
}

.mobile-device button,
.mobile-device .btn {
  /* Remove tap highlight */
  -webkit-tap-highlight-color: transparent;
  /* Prevent text selection */
  -webkit-user-select: none;
  user-select: none;
}

/* Smooth scroll for iOS */
body {
  -webkit-overflow-scrolling: touch;
}

/* Fix iOS input zoom */
@media screen and (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Safe area insets for notched devices (iPhone X+) */
@supports (padding: max(0px)) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  .radio-player {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }

  body.radio-active {
    padding-bottom: calc(60px + max(0px, env(safe-area-inset-bottom)));
  }
}

/* ===== UX IMPROVEMENTS ===== */

/* Card defaults - override Bootstrap's white background */
.card {
  background-color: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(38, 171, 212, 0.2);
  border-color: rgba(38, 171, 212, 0.3) !important;
}

.card-body {
  color: white !important;
}

.card-text {
  color: rgba(255, 255, 255, 0.9) !important;
}

.card a {
  text-decoration: none;
}

.card-title {
  color: #26abd4 !important;
  font-weight: 600;
  margin-top: 1rem;
}

/* List group items - dark theme */
.list-group-item {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  transition: background-color 0.2s ease;
}

.list-group-item:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Ensure all text in cards is readable */
.card p,
.card span,
.card small,
.card strong,
.card td {
  color: white !important;
}

.card .text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

.card small {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Improved button styles */
.btn {
  transition: all 0.2s ease;
  font-weight: 500;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

/* Dropdown menus - dark theme */
.dropdown-menu {
  background-color: rgba(20, 20, 20, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.dropdown-item {
  color: white !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(38, 171, 212, 0.2) !important;
  color: white !important;
}

/* Form improvements */
.form-label, label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.form-control, .form-select {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #26abd4;
  box-shadow: 0 0 0 0.2rem rgba(38, 171, 212, 0.25);
  color: white;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

/* Required field indicator */
input[required] + label::after,
label:has(+ input[required])::after {
  content: " *";
  color: #ff6b6b;
  font-weight: bold;
}

/* Help text for forms */
.form-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Empty state improvements */
.empty-state {
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state i {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 1rem;
}

.empty-state h4 {
  color: white;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

/* Audio player improvements */
audio::-webkit-media-controls-panel {
  background-color: rgba(0, 0, 0, 0.5);
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
  color: white;
}

/* Video player improvements */
video {
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Pagination improvements */
.pagination .page-item.active .page-link {
  background-color: #26abd4;
  border-color: #26abd4;
}

.pagination .page-link {
  color: #26abd4;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.pagination .page-link:hover {
  background-color: rgba(38, 171, 212, 0.2);
  border-color: #26abd4;
  color: white;
}

/* Tooltips for onboarding */
.tooltip-hint {
  position: relative;
  display: inline-block;
  margin-left: 0.25rem;
}

.tooltip-hint .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.875rem;
}

.tooltip-hint .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.tooltip-hint:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Badge improvements */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
}

/* Card improvements for content pages */
.content-card {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.content-card:hover {
  border-color: rgba(38, 171, 212, 0.3);
}

/* Better spacing for dashboard categories */
.category-section {
  margin-bottom: 2rem;
}

.category-section:last-child {
  margin-bottom: 0;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Better modal styling */
.modal-content {
  background-color: rgb(30, 30, 30) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white !important;
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: white !important;
}

.modal-title {
  color: white !important;
}

.modal-body {
  color: white !important;
}

.modal-body p,
.modal-body span,
.modal-body label {
  color: white !important;
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ensure alerts have good contrast */
.alert {
  color: white !important;
}

.alert-info {
  background-color: rgba(38, 171, 212, 0.2) !important;
  border: 1px solid #26abd4 !important;
  color: white !important;
}

/* Table improvements for dark theme */
.table {
  color: white !important;
}

.table thead th {
  color: #26abd4 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.table td {
  color: white !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Badge contrast improvements */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
}

.badge-secondary {
  background-color: rgba(108, 117, 125, 0.8) !important;
  color: white !important;
}
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ===== COMPREHENSIVE CONTRAST FIXES ===== */

/* Ensure all text is readable on dark backgrounds */
h1, h2, h3, h4, h5, h6 {
  color: white !important;
}

p {
  color: rgba(255, 255, 255, 0.9);
}

/* Override any remaining Bootstrap defaults */
.text-dark {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Ensure small text is still readable */
small,
.small {
  color: rgba(255, 255, 255, 0.8);
}

/* Links should be visible */
a:not(.btn) {
  color: #26abd4;
}

a:not(.btn):hover {
  color: #5dc9e2;
}

/* Offcanvas menu styling */
.offcanvas {
  background-color: rgb(30, 30, 30) !important;
}

.offcanvas-title {
  color: white !important;
}

.offcanvas-body {
  color: white !important;
}

.offcanvas-body p,
.offcanvas-body span {
  color: white !important;
}

/* Nav items */
.nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
}

.nav-link:hover,
.nav-link:focus {
  color: white !important;
}

/* Navbar text */
.navbar-brand {
  color: white !important;
}

/* Input group text */
.input-group-text {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

/* Close buttons for dark backgrounds */
.btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Ensure content-card has proper contrast */
.content-card {
  background-color: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  border-radius: 8px;
  overflow: hidden;
}

.content-card:hover {
  border-color: rgba(38, 171, 212, 0.3) !important;
}

.content-card p,
.content-card span {
  color: white !important;
}

/* Description text under dashboard categories */
.category-section .small {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Make sure all buttons with outline variants are visible */
.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: white !important;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: white !important;
  color: white !important;
}

.btn-outline-primary {
  border-color: #26abd4 !important;
  color: #26abd4 !important;
}

.btn-outline-primary:hover {
  background-color: #26abd4 !important;
  border-color: #26abd4 !important;
  color: white !important;
}

.btn-outline-danger {
  border-color: #dc3545 !important;
  color: #dc3545 !important;
}

.btn-outline-danger:hover {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: white !important;
}

.btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: rgba(255, 255, 255, 0.8) !important;
}

.btn-outline-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: white !important;
}

/* Select dropdowns */
select.form-select,
select.form-control {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

select.form-select option,
select.form-control option {
  background-color: rgb(30, 30, 30);
  color: white;
}

/* Radio and checkbox labels */
.form-check-label {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* User stats card */
.user-stats-card {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.user-stats-card small {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* ===== ADMIN PAGES & SUPPORT BUTTON FIXES ===== */

/* Support button - make it stand out (NOT radio player buttons) */
.btn-light:not(.radio-player .btn-outline-light):not(#radioAddToPlaylistBtn) {
  background-color: white !important;
  color: rgb(30, 30, 30) !important;
  border: 2px solid white !important;
}

.btn-light:not(.radio-player .btn-outline-light):not(#radioAddToPlaylistBtn):hover {
  background-color: rgba(255, 255, 255, 0.9) !important;
  color: rgb(30, 30, 30) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.3);
}

/* Admin colored stat cards */
.bg-primary {
  background-color: #26abd4 !important;
}

.bg-success {
  background-color: #28a745 !important;
}

.bg-info {
  background-color: #17a2b8 !important;
}

.bg-warning {
  background-color: #ffc107 !important;
  color: rgb(30, 30, 30) !important;
}

.bg-danger {
  background-color: #dc3545 !important;
}

/* Ensure text in colored cards is always white */
.bg-primary *,
.bg-success *,
.bg-info *,
.bg-danger * {
  color: white !important;
}

.bg-warning * {
  color: rgb(30, 30, 30) !important;
}

/* Admin table styling */
.table-responsive {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1rem;
}

.table-hover tbody tr:hover {
  background-color: rgba(38, 171, 212, 0.1) !important;
}

/* Pagination in tables */
.pagination .page-item .page-link {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #26abd4 !important;
}

.pagination .page-item.active .page-link {
  background-color: #26abd4 !important;
  border-color: #26abd4 !important;
  color: white !important;
}

.pagination .page-item.disabled .page-link {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.3) !important;
}

/* Progress bars */
.progress {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.progress-bar {
  background-color: #26abd4 !important;
}

/* Badge styling */
.badge.bg-secondary {
  background-color: rgba(108, 117, 125, 0.9) !important;
}

.badge.bg-primary {
  background-color: #26abd4 !important;
}

.badge.bg-success {
  background-color: #28a745 !important;
}

.badge.bg-warning {
  background-color: #ffc107 !important;
  color: rgb(30, 30, 30) !important;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
}

/* Admin support section */
.admin-support-card {
  background-color: rgba(0, 0, 0, 0.3) !important;
}

/* Button variants for admin pages */
.btn-info {
  background-color: #17a2b8 !important;
  border-color: #17a2b8 !important;
  color: white !important;
}

.btn-info:hover {
  background-color: #138496 !important;
  border-color: #138496 !important;
}

.btn-warning {
  background-color: #ffc107 !important;
  border-color: #ffc107 !important;
  color: rgb(30, 30, 30) !important;
}

.btn-warning:hover {
  background-color: #e0a800 !important;
  border-color: #e0a800 !important;
}

.btn-secondary {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: white !important;
}

.btn-secondary:hover {
  background-color: #5a6268 !important;
  border-color: #5a6268 !important;
}

/* Ensure admin container text is readable */
.container h1,
.container h2,
.container h3,
.container h4,
.container h5 {
  color: white !important;
}

.container p.text-light {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Admin table headers */
.table thead th {
  background-color: rgba(38, 171, 212, 0.2) !important;
  color: white !important;
  border-bottom: 2px solid #26abd4 !important;
}

/* Ensure table row text is white */
.table tbody td {
  color: white !important;
}

.table tbody td strong {
  color: white !important;
}

/* Search input in admin pages */
.card .form-control {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: white !important;
}

.card .form-control:focus {
  background-color: rgba(255, 255, 255, 0.15) !important;
  border-color: #26abd4 !important;
}

.card .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* ===================================
   ADMIN PAGES - ADDITIONAL CONTRAST FIXES
   =================================== */

/* Admin list groups in cards */
.card .list-group-item {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
}

.card .list-group-item small {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Admin table with table-dark class */
.table-dark {
  background-color: transparent !important;
  color: white !important;
}

.table-dark thead th {
  background-color: rgba(38, 171, 212, 0.2) !important;
  color: white !important;
  border-bottom: 2px solid #26abd4 !important;
}

.table-dark tbody td {
  color: white !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.table-dark tbody tr:hover {
  background-color: rgba(38, 171, 212, 0.1) !important;
}

/* Table striped rows */
.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Inline card-body styles override */
.card-body[style*="background-color"] {
  color: white !important;
}

.card-body[style*="background-color"] small {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Comments collapse card */
.collapse .card-body {
  background-color: rgba(0, 0, 0, 0.4) !important;
  color: white !important;
}

/* Chart containers */
canvas {
  background-color: transparent !important;
}

/* Admin metrics in cards */
.card-body .text-primary,
.card-body .text-success,
.card-body .text-info,
.card-body .text-warning,
.card-body .text-danger {
  font-weight: 600;
}

/* Ensure all h3 in cards are white */
.card-body h3 {
  color: white !important;
}

/* Pagination links in admin */
.pagination .page-link {
  background-color: rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

.pagination .page-link:hover {
  background-color: rgba(38, 171, 212, 0.3) !important;
  border-color: #26abd4 !important;
}

.pagination .page-item.active .page-link {
  background-color: #26abd4 !important;
  border-color: #26abd4 !important;
  color: white !important;
}

.pagination .page-item.disabled .page-link {
  background-color: rgba(0, 0, 0, 0.2) !important;
  color: rgba(255, 255, 255, 0.3) !important;
}

/* Nav tabs for admin moderation */
.nav-tabs {
  border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
}

.nav-tabs .nav-link {
  background-color: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.7) !important;
  padding: 0.5rem 1rem;
  margin-bottom: -2px;
}

.nav-tabs .nav-link:hover {
  color: white !important;
  border-bottom: 2px solid rgba(38, 171, 212, 0.5) !important;
}

.nav-tabs .nav-link.active {
  background-color: transparent !important;
  color: #26abd4 !important;
  border: none !important;
  border-bottom: 2px solid #26abd4 !important;
}

/* Tab content background */
.tab-content {
  background-color: transparent !important;
}

.tab-pane {
  color: white !important;
}

/* Collapse buttons in tables */
.btn-outline-info {
  color: #26abd4 !important;
  border-color: #26abd4 !important;
}

.btn-outline-info:hover {
  background-color: #26abd4 !important;
  color: white !important;
}

/* Results summary text */
.row .text-light strong {
  color: white !important;
  font-weight: 600;
}

/* Fix for table td links */
.table td a {
  color: #26abd4 !important;
  text-decoration: none;
}

.table td a:hover {
  color: #3bc4ed !important;
  text-decoration: underline;
}

/* Small text in tables */
.table small.text-light {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Strong text in tables */
.table td strong,
.table th strong {
  color: white !important;
}

/* Button groups in admin */
.btn-group .btn-outline-primary {
  color: #26abd4 !important;
  border-color: #26abd4 !important;
  background-color: transparent !important;
}

.btn-group .btn-outline-primary:hover {
  background-color: rgba(38, 171, 212, 0.2) !important;
  color: white !important;
}

/* Ensure all admin page headings are white */
.container h1,
.container h2,
.container h3,
.container h4,
.container h5 {
  color: white !important;
}

/* Card titles in admin */
.card-title {
  color: white !important;
  font-weight: 600;
}

/* Fix colored stat cards text */
.card.text-white h5,
.card.text-white h2,
.card.text-white small {
  color: white !important;
}

/* Warning badge should have dark text */
.badge.bg-warning {
  color: rgb(30, 30, 30) !important;
}


/* ===================================
   PLAYLIST ACCORDION STYLES
   =================================== */

/* Playlist collapse button */
.card-body button[data-bs-toggle="collapse"] {
  transition: all 0.3s ease;
}

.card-body button[data-bs-toggle="collapse"]:hover {
  background-color: rgba(38, 171, 212, 0.1) !important;
  border-radius: 8px;
  padding: 8px !important;
}

.card-body button[data-bs-toggle="collapse"]:focus {
  outline: none;
  box-shadow: none;
}

/* Chevron rotation on expand */
.card-body button[data-bs-toggle="collapse"] i.bi-chevron-down {
  transition: transform 0.3s ease;
}

.card-body button[data-bs-toggle="collapse"][aria-expanded="true"] i.bi-chevron-down {
  transform: rotate(180deg);
}

/* Playlist card hover effect */
.card:has(button[data-bs-toggle="collapse"]) {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:has(button[data-bs-toggle="collapse"]):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(38, 171, 212, 0.2);
}

/* Smooth collapse animation */
.collapse {
  transition: all 0.35s ease;
}


/* ===================================
   PLAYLIST DROPDOWN Z-INDEX FIX
   =================================== */

/* CRITICAL: Dropdown menu must be on top of everything */
.dropdown-menu {
  z-index: 99999 !important;
  position: absolute !important;
  /* Force stacking context */
  isolation: isolate;
  /* Ensure it's not clipped */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Dark dropdown styling */
.dropdown-menu-dark {
  z-index: 99999 !important;
  background-color: rgba(20, 20, 20, 0.98) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;
}

/* Ensure dropdown items are visible and clickable */
.dropdown-menu .dropdown-item {
  z-index: 99999 !important;
  position: relative;
  color: white !important;
  pointer-events: auto !important;
}

/* Ensure the dropdown container has proper positioning */
.dropdown {
  position: relative;
  z-index: 10;
}

/* When dropdown is shown, elevate it further */
.dropdown.show {
  z-index: 99998 !important;
  position: relative;
}

/* Reset list items to not interfere */
.list-group-item {
  position: relative;
  z-index: 1;
  overflow: visible !important;
}

/* When a dropdown is open in a list item, elevate that specific item */
.list-group-item:has(.dropdown.show) {
  z-index: 99997 !important;
  position: relative;
  overflow: visible !important;
}

/* Same for cards */
.card:has(.dropdown.show) {
  z-index: 99997 !important;
  position: relative;
  overflow: visible !important;
}

/* Allow cards and list groups to show dropdowns */
.card,
.list-group,
.card-body {
  overflow: visible !important;
}

/* Remove any stacking contexts that might interfere */
.list-group-item .card {
  isolation: auto;
}

/* Ensure radio player select dropdown is also on top */
#radioPlaylistSelect {
  z-index: 99999 !important;
  position: relative !important;
}


/* ===================================
   DRAG AND DROP SONG REORDERING
   =================================== */

/* Drag handle styling */
.drag-handle {
  cursor: grab;
  user-select: none;
  transition: color 0.2s ease;
}

.drag-handle:hover {
  color: #26abd4 !important;
}

.drag-handle:active {
  cursor: grabbing;
}

/* Song item being dragged */
.song-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

/* Drop zone indicator */
.song-item.drag-over {
  border-top: 3px solid #26abd4 !important;
  background-color: rgba(38, 171, 212, 0.1) !important;
}

/* Make song items draggable */
.song-item[draggable="true"] {
  cursor: move;
  transition: background-color 0.2s ease, border 0.2s ease;
}

.song-item[draggable="true"]:hover {
  background-color: rgba(255, 255, 255, 0.03) !important;
}


/* ===================================
   NOW PLAYING PLAYER STYLES
   ================================== */

.now-playing-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 0;
  padding: 15px 0;
  margin-bottom: 0;
  box-shadow: 0 -4px 20px rgba(0, 255, 255, 0.2);
  z-index: 1000;
  border-top: 2px solid rgba(0, 255, 255, 0.3);
  animation: slideIn 0.3s ease-out;
}

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

.now-playing-player img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.now-playing-player > div:nth-child(2) {
  flex-grow: 1;
  min-width: 150px;
}

.now-playing-player #npTitle {
  font-weight: 600;
  font-size: 1rem;
  color: #00ffff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-player #npArtist {
  font-size: 0.875rem;
  color: #b0b0b0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-player .btn {
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 255, 255, 0.3);
}

.now-playing-player .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 255, 0.3);
  border-color: #00ffff;
}

.now-playing-player .btn-primary {
  background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
  border-color: #0099ff;
}

.now-playing-player .btn-danger {
  background: linear-gradient(135deg, #cc0000 0%, #ff3333 100%);
  border-color: #ff3333;
}

.now-playing-player .progress-container {
  flex: 1 1 200px;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.now-playing-player #npProgress {
  flex-grow: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.now-playing-player #npProgress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #00ffff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 255, 255, 0.5);
  transition: all 0.2s ease;
}

.now-playing-player #npProgress::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(0, 255, 255, 0.7);
}

.now-playing-player #npProgress::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #00ffff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 255, 255, 0.5);
  transition: all 0.2s ease;
}

.now-playing-player #npProgress::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(0, 255, 255, 0.7);
}

.now-playing-player .time-display {
  font-size: 0.75rem;
  color: #b0b0b0;
  font-family: 'Courier New', monospace;
  min-width: 40px;
  text-align: center;
}

.now-playing-player #npVolume {
  width: 80px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.now-playing-player #npVolume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #00ffff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 255, 255, 0.4);
}

.now-playing-player #npVolume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #00ffff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 255, 255, 0.4);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .now-playing-player {
    padding: 15px;
    gap: 10px;
  }

  .now-playing-player img {
    width: 50px;
    height: 50px;
  }

  .now-playing-player #npTitle {
    font-size: 0.9rem;
  }

  .now-playing-player #npArtist {
    font-size: 0.8rem;
  }

  .now-playing-player .btn {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .now-playing-player .progress-container {
    flex-basis: 100%;
  }
}

/* Body padding when player is active */
body.now-playing-active {
  padding-bottom: 140px;
}

@media (max-width: 768px) {
  body.now-playing-active {
    padding-bottom: 160px;
  }
}

