html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Custom */

body {
  background: linear-gradient(135deg, #1d2671, #c33764);
  min-height: 100vh;
  color: #fff;
}

.glass {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 20px;
}

.drop-zone {
  min-height: 80px;
  border: 2px dashed rgba(255,255,255,0.4);
  border-radius: 12px;
  padding: 10px;
}

.box {
  background: #fff;
  color: #222;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  /* REQUIRED for mobile drag */
  touch-action: none;
  user-select: none;
}

.flag {
  width: 48px;
  height: auto;          
  max-height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.song-name {
  flex: 1;
}

.box.dragging {
  opacity: 0.3;
}

.drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.rank-badge {
  width: 56px;
  height: 48px;
  border-radius: 50%;
  background: #6f42c1;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ranked {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer {
  color: white;
}

.rank-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-popup.hidden {
  display: none;
}

.rank-popup-content {
  width: 90%;
  max-width: 320px;
}

#voteButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}