/* =====================================================
   Karaoke Bar - White & Brown Theme
   ===================================================== */

/* --- Base --- */
body {
  background-color: #6B3A2A;
  color: #F0E0D0;
}

/* --- Navbar --- */
#mainNav {
  background-color: #3D1F0A !important;
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

#mainNav.navbar-shrink {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.navbar-brand img {
  height: 40px;
}

.navbar-nav .nav-link {
  color: #D4B89A !important;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, background-color 0.2s ease;
  padding: 0.5rem 1rem !important;
  border-radius: 6px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active-link {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1);
}

/* --- Page Layout --- */
.page-wrapper {
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 40px;
}

/* --- Page Title --- */
.page-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: #F5EDE0;
  text-align: center;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.page-title i {
  color: #D4A070;
  flex-shrink: 0;
}

/* --- Search Container (sticky) --- */
.search-wrapper {
  position: sticky;
  top: 80px;
  z-index: 99;
  padding: 12px 0 16px;
  background: linear-gradient(to bottom, #6B3A2A 80%, transparent);
}

.search-input-group {
  position: relative;
}

.search-input-group .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #B89070;
  font-size: 1rem;
  pointer-events: none;
  z-index: 5;
}

.search-input-group .search-spinner {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  z-index: 5;
}

.search-input-group .search-spinner .spinner-border {
  width: 1.1rem;
  height: 1.1rem;
  border-width: 2px;
  color: #8B5E3C;
}

.search-input {
  background-color: #FFFFFF !important;
  border: 2px solid #E0C8B4 !important;
  border-radius: 50px !important;
  color: #2C1A0E !important;
  padding: 12px 48px !important;
  font-size: 1rem !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  width: 100%;
  box-shadow: 0 2px 8px rgba(61, 31, 10, 0.07) !important;
}

.search-input:focus {
  border-color: #8B5E3C !important;
  box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.15) !important;
  outline: none !important;
}

.search-input::placeholder {
  color: #B89070 !important;
}

/* --- Result Count --- */
.result-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
  min-height: 24px;
}

.result-count {
  font-size: 0.82rem;
  color: #C4987A;
}

.result-count .count-number {
  color: #F0C8A0;
  font-weight: 600;
}

.result-hint {
  font-size: 0.78rem;
  color: #ffffff;
}

/* --- Song List --- */
#listaNacionales,
#listaExtranjero {
  list-style: none;
  padding: 0;
  margin: 0;
}

.song-item {
  background-color: #FFFFFF !important;
  border: 1px solid #E0C8B4 !important;
  border-radius: 12px !important;
  margin-bottom: 8px !important;
  padding: 14px 16px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
}

.song-item:hover {
  border-color: #8B5E3C !important;
  box-shadow: 0 4px 14px rgba(61, 31, 10, 0.12) !important;
  transform: translateX(3px);
}

.song-item-info {
  flex: 1;
  min-width: 0;
  margin-right: 12px;
}

.song-artist {
  font-weight: 700;
  color: #6B3A2A;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-title {
  color: #8B7060;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* --- Request Button --- */
.btn-pedir {
  background-color: #6B3A2A;
  border: none;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 50px;
  padding: 7px 18px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-pedir:hover {
  background-color: #4E2A1A;
  color: #ffffff;
  transform: scale(1.05);
}

.btn-pedir:active {
  transform: scale(0.97);
}

/* --- Empty / Hint States --- */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #8B5E3C;
}

.empty-state i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 14px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.95rem;
  margin: 0;
}

.search-hint {
  text-align: center;
  padding: 50px 20px;
  color: #8B5E3C;
}

.search-hint i {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
  opacity: 0.4;
}

.search-hint p {
  font-size: 0.95rem;
  margin: 0;
}

/* --- Modal --- */
.modal-content {
  background-color: #FFFFFF;
  border: 1px solid #E0C8B4;
  border-radius: 16px;
  color: #2C1A0E;
  box-shadow: 0 16px 48px rgba(61, 31, 10, 0.18);
}

.modal-header {
  border-bottom: 1px solid #EAD8C8;
  padding: 20px 24px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid #EAD8C8;
  padding: 16px 24px;
}

.modal-title {
  color: #3D1F0A;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.modal-song-preview {
  background: #FDF0E8;
  border: 1px solid #E0C8B4;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.modal-song-preview .preview-artist {
  color: #6B3A2A;
  font-weight: 700;
  font-size: 0.9rem;
}

.modal-song-preview .preview-title {
  color: #8B7060;
  font-size: 0.85rem;
  margin-top: 2px;
}

.btn-close {
  filter: none;
  opacity: 0.5;
}

.btn-close:hover {
  opacity: 1;
}

.form-label {
  color: #7A5A44;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.form-control,
.form-select {
  background-color: #FDF8F4 !important;
  border: 1px solid #E0C8B4 !important;
  border-radius: 10px !important;
  color: #2C1A0E !important;
  padding: 10px 14px !important;
  transition: border-color 0.2s ease !important;
}

.form-control:focus,
.form-select:focus {
  border-color: #8B5E3C !important;
  box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.15) !important;
  background-color: #FFFFFF !important;
}

.form-control::placeholder {
  color: #C4A882 !important;
}

/* Submit button in modal */
.btn-submit-pedido {
  background-color: #6B3A2A;
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50px;
  padding: 12px 32px;
  width: 100%;
  letter-spacing: 0.03em;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-submit-pedido:hover {
  background-color: #4E2A1A;
  color: #ffffff;
  transform: translateY(-1px);
}

/* --- Toast Notification --- */
.toast-container-custom {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

.toast-karaoke {
  background-color: #FFFFFF;
  border: 1px solid #E0C8B4;
  border-radius: 14px;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(61, 31, 10, 0.18);
  overflow: hidden;
  animation: slideInToast 0.3s ease;
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast-karaoke .toast-header {
  background-color: #6B3A2A;
  border-bottom: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
}

.toast-karaoke .toast-body {
  color: #5A3828;
  font-size: 0.88rem;
  padding: 12px 16px;
}

.toast-karaoke .btn-close {
  filter: invert(1);
  opacity: 0.7;
}

/* --- Queue List (lista.html) --- */
.queue-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.queue-item {
  background-color: #FFFFFF;
  border: 1px solid #E0C8B4;
  border-radius: 14px;
  margin-bottom: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.queue-item:first-child {
  border-color: #8B5E3C;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.queue-item:hover {
  box-shadow: 0 4px 16px rgba(61, 31, 10, 0.1);
}

.queue-number {
  background-color: #F0E0D0;
  color: #8B7060;
  font-weight: 700;
  font-size: 0.85rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: "Montserrat", sans-serif;
}

.queue-item:first-child .queue-number {
  background-color: #6B3A2A;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(107, 58, 42, 0.35);
}

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

.queue-song-title {
  font-weight: 600;
  color: #2C1A0E;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-artist-name {
  color: #6B3A2A;
  font-size: 0.85rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.queue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.queue-meta-item {
  color: #B89070;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.queue-meta-item i {
  color: #C4A882;
  font-size: 0.75rem;
}

.queue-delete-btn {
  background: none;
  border: 1px solid #EAD8C8;
  color: #C4A882;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
}

.queue-delete-btn:hover {
  border-color: #dc3545;
  color: #dc3545;
  background-color: rgba(220, 53, 69, 0.06);
}

.queue-empty {
  text-align: center;
  padding: 60px 20px;
  color: #8B5E3C;
}

.queue-empty i {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
  opacity: 0.4;
}

/* Auto-refresh indicator */
.refresh-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7A5538;
  font-size: 0.78rem;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #7A4A32;
}

.live-dot {
  width: 7px;
  height: 7px;
  background-color: #6B9E6B;
  border-radius: 50%;
  flex-shrink: 0;
  animation: livePulse 1.8s ease infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* --- Admin Page --- */
.admin-card {
  background-color: #FFFFFF;
  border: 1px solid #E0C8B4;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.admin-card-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #6B3A2A;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-upload-area {
  border: 2px dashed #E0C8B4;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  display: block;
}

.file-upload-area:hover {
  border-color: #8B5E3C;
  background-color: #FDF0E8;
}

.file-upload-area.has-file {
  border-color: #8B5E3C;
  background-color: #FDF0E8;
}

.file-upload-area i {
  font-size: 1.8rem;
  color: #C4A882;
  display: block;
  margin-bottom: 10px;
}

.file-upload-area p {
  color: #A07850;
  font-size: 0.85rem;
  margin: 0;
}

.file-name-display {
  color: #6B3A2A;
  font-size: 0.85rem;
  margin-top: 8px;
  font-weight: 600;
}

.upload-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}

.btn-upload {
  background-color: #6B3A2A;
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 50px;
  padding: 10px 24px;
  letter-spacing: 0.03em;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.btn-upload:hover:not(:disabled) {
  background-color: #4E2A1A;
  color: #ffffff;
}

.btn-upload:disabled {
  background-color: #D4B89A;
  cursor: not-allowed;
}

.upload-status {
  font-size: 0.85rem;
}

.upload-status.loading { color: #A07850; }
.upload-status.success { color: #3A7A3A; }
.upload-status.error   { color: #dc3545; }

/* --- Home Page Masthead --- */
/* Use header.masthead to match specificity of styles.css and override the background image */
header.masthead,
.masthead {
  background: linear-gradient(135deg, #3D1F0A 0%, #6B3A2A 50%, #3D1F0A 100%) !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.masthead::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

header.masthead .masthead-subheading,
.masthead-subheading {
  color: #D4B89A !important;
  font-size: 1rem !important;
  font-style: normal !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: "Montserrat", sans-serif;
}

header.masthead .masthead-heading,
.masthead-heading {
  color: #ffffff !important;
  font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
  font-family: "Montserrat", sans-serif !important;
  font-weight: 800 !important;
  margin-bottom: 12px;
  line-height: 1.1 !important;
}

.masthead-heading .highlight {
  color: #F0C8A0;
}

.masthead-divider {
  width: 60px;
  height: 3px;
  background-color: #D4A070;
  margin: 20px auto;
  border-radius: 2px;
}

.masthead-subtitle {
  color: #C4987A;
  font-size: 1rem;
  margin-bottom: 36px;
}

.btn-xl {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  padding: 16px 40px;
  border-radius: 50px;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

.btn-xl.btn-primary {
  background-color: #FFFFFF !important;
  border: 2px solid #FFFFFF !important;
  color: #6B3A2A !important;
}

.btn-xl.btn-primary:hover {
  background-color: #F0E0D0 !important;
  border-color: #F0E0D0 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-xl.btn-outline {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
}

.btn-xl.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.22) !important;
  border-color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.home-features {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.home-feature {
  text-align: center;
  color: #C4987A;
}

.home-feature i {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 8px;
  color: #D4A882;
}

.home-feature span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Footer --- */
.footer {
  background-color: #6B3A2A;
  border-top: 1px solid #7A4A32;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #6B3A2A; }
::-webkit-scrollbar-thumb { background: #8B5E3C; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #D4A070; }

/* --- Mobile --- */
@media (max-width: 576px) {
  .page-title { font-size: 1.5rem; }
  .search-wrapper { top: 80px; }
  .song-item { padding: 12px 14px !important; }
  .song-artist { font-size: 0.85rem; }
  .song-title { font-size: 0.8rem; }
  .btn-pedir { padding: 6px 14px; font-size: 0.75rem; }
  .queue-item { padding: 12px 14px; gap: 10px; }
  .queue-number { width: 30px; height: 30px; font-size: 0.75rem; }
  .queue-song-title { font-size: 0.9rem; }
  .toast-container-custom { bottom: 16px; right: 16px; left: 16px; }
  .toast-karaoke { min-width: unset; width: 100%; }
  .admin-card { padding: 20px; }
  .masthead-heading { font-size: 2.2rem; }
  .btn-xl { padding: 14px 28px; font-size: 0.82rem; }
}
