* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
  color: #000;
}

.screen {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* Loading Screen */
.loading-container,
.access-denied-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid #e5e7eb;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

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

.loading-container p {
  color: #6b7280;
}

/* Auth Screen */
.auth-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.icon-music {
  flex-shrink: 0;
}

.brand-name {
  font-weight: 600;
  font-size: 14px;
}

.brand-subtitle {
  font-size: 12px;
  color: #6b7280;
}

.auth-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
}

.form-group input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.form-group input:focus {
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.error-message {
  padding: 0.75rem;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 4px;
  font-size: 14px;
}

.btn-primary {
  padding: 0.5rem 1rem;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #374151;
}

.btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 0.5rem 1rem;
  background: #fff;
  color: #000;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f9fafb;
}

/* Access Denied */
.icon-shield-large {
  stroke: #dc2626;
  margin-bottom: 1rem;
}

.access-denied-container h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.access-denied-container p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* Control Panel Layout */
#controlPanel {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 256px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
}

.sidebar-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* Reduced margin to accommodate the new card */
  margin-bottom: 1rem;
}

/* NEW MODERATOR INFO STYLES */
.mod-info-card {
  /* Separates the card from the navigation */
  margin-bottom: 2rem;
  padding: 0.75rem 0.75rem;
  background: #f3f4f6;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.mod-info-label {
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.mod-artist-name {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mod-user-id {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* END NEW MODERATOR INFO STYLES */

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-section {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.nav-section:first-child {
  margin-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  color: #000;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background: #f9fafb;
}

.nav-item.active {
  background: #f3f4f6;
  font-weight: 500;
}

.icon {
  flex-shrink: 0;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  margin-top: auto;
}

.logout-btn:hover {
  background: #f9fafb;
}

/* Main Content */
.main-content {
  margin-left: 256px;
  flex: 1;
}

/* Header */
.content-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 2rem 2rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-top h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.tabs {
  display: flex;
  gap: 1.5rem;
  margin-bottom: -1px;
}

.tab {
  padding: 0.75rem 0.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover {
  color: #374151;
}

.tab.active {
  color: #000;
  border-bottom-color: #000;
}

/* Stats */
.stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
}

/* Songs Container */
.songs-container {
  padding: 1.5rem 2rem;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  text-align: center;
}

.loading-state p {
  color: #6b7280;
}

.songs-list {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

/* Songs Table */
.songs-table {
  width: 100%;
}

.table-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-body {
  display: flex;
  flex-direction: column;
}

.song-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.2s;
}

.song-row:hover {
  background: #f9fafb;
}

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

.song-date {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.song-date-day {
  font-size: 14px;
  color: #000;
}

.song-date-time {
  font-size: 12px;
  color: #6b7280;
}

.song-details {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

/* Song Cover and Play/Pause Indicator Styles */
.song-cover-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.song-cover {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
}

/* Styles for the new play/pause state icons */
.song-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for contrast */
  border-radius: 4px;
  opacity: 0; /* Hidden by default to remove "button" look */
  transition: opacity 0.2s;
  /* Crucial: ensures clicks go through to the row element */
  pointer-events: none;
}

/* Make icons white */
.song-play-overlay svg {
  stroke: #fff;
  fill: #fff;
}

/* Show play icon on row hover (if not playing) */
.song-row:hover .song-play-overlay:has(.play-icon:not(.hidden)) {
  opacity: 1;
}

/* When a row is playing, the pause icon is made visible by JS (by removing .hidden class) */
.song-play-overlay:has(.pause-icon:not(.hidden)) {
  opacity: 1;
}
/* End of new icon styles */

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

.song-artist {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.song-artist svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.song-title {
  font-size: 14px;
  font-weight: 500;
  color: #000;
  margin-bottom: 0.25rem;
}

.song-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 12px;
  color: #6b7280;
}

.status-badge {
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-approved {
  background: #d1fae5;
  color: #065f46;
}

.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.mod-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-reject,
.btn-approve {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reject {
  background: #fff;
  color: #000;
}

.btn-reject:hover {
  background: #f9fafb;
}

.btn-approve {
  background: #000;
  color: #fff;
  border-color: #000;
}

.btn-approve:hover {
  background: #374151;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  text-align: center;
}

.empty-state svg {
  color: #d1d5db;
  margin-bottom: 0.75rem;
}

.empty-state p {
  font-size: 14px;
  color: #6b7280;
}

/* Bottom Audio Player */
.bottom-player {
  position: fixed;
  bottom: 0;
  left: 256px;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  z-index: 50;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.bottom-player.hidden {
  display: none;
}

.player-track-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 250px;
}

.player-cover {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
}

.player-details {
  flex: 1;
  min-width: 0;
}

.player-title {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Updated Player Button Styling (Square Black Button) */
.player-btn {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: #000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.player-btn:hover {
  background: #374151;
  transform: none;
}

.player-btn svg {
  color: #fff;
  position: absolute;
}

/* Playback Time and Progress */
.player-progress-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.player-time {
  font-size: 12px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  width: 3ch;
}

.player-progress {
  flex: 1;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.player-progress-fill {
  height: 100%;
  background: #000;
  width: 0%;
  transition: width 0.1s linear;
}

.player-close {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #9ca3af;
  flex-shrink: 0;
}

.player-close:hover {
  background: #f3f4f6;
  color: #000;
}

@media (max-width: 768px) {
  .bottom-player {
    left: 0;
    padding: 1rem;
    gap: 1rem;
  }

  .player-track-info {
    min-width: auto;
  }

  .player-progress-section {
    display: none;
  }
}