/* ===== JUDGE.CSS — Mobile judge panel (9:16) — Liquid Glass Edition ===== */

/* ============================================================
   DESIGN TOKENS — Edit these to restyle the entire glass UI
   ============================================================ */
:root {
  /* ── Core glass panel ── */
  --glass-bg:             rgba(6, 6, 20, 0.58);          /* panel fill */
  --glass-blur:           5px;                            /* backdrop blur */
  --glass-saturate:       160%;                           /* backdrop saturate */
  --glass-border-color:   rgba(255, 255, 255, 0.13);     /* panel border */
  --glass-radius:         2rem;                           /* panel corner radius */
  --glass-outer-shadow:   0 8px 32px rgba(0, 0, 14, 0.65); /* outer drop shadow */
  --glass-inner-shadow:   inset 0 1px 0 rgba(255, 255, 255, 0.5); /* inner highlight */
  /* ── Shine overlay (::after pseudo-element) ── */
  --glass-shine-bg:       rgba(255, 255, 255, 0.04);
  --glass-shine-opacity:  0.4;
  /* ── Input fields ── */
  --glass-input-bg:       rgba(6, 6, 20, 0.52);
  --glass-input-border:   rgba(255, 255, 255, 0.18);
  /* ── Sticky header bar ── */
  --glass-header-bg:      rgba(4, 4, 16, 0.72);
  --glass-header-border:  rgba(255, 255, 255, 0.10);
  /* ── Modal sheet ── */
  --glass-modal-bg:       rgba(4, 4, 16, 0.78);
  --glass-modal-border:   rgba(255, 255, 255, 0.13);
  /* ── History items inside modal ── */
  --glass-item-bg:        rgba(255, 255, 255, 0.05);
  --glass-item-border:    rgba(255, 255, 255, 0.09);
  /* ── Floating action button ── */
  --glass-fab-bg:         rgba(6, 6, 22, 0.62);
  --glass-fab-border:     rgba(255, 255, 255, 0.18);
}

/* ============================================================
   BACKGROUND — Night scene image fills the judge page
   ============================================================ */
body.judge-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: none;   /* lo spostiamo nel ::before */
}


body.judge-page::before {
  content: "";
  position: fixed;
  bottom: 0; left: 0; 
  inset: 0;
  background: url('../img/sfondonotturnoT.jpg?r=1') center/cover no-repeat;
  z-index: -1;
  transform: translateZ(0);
  pointer-events: none;
}

/* Hide background image when on login screen */
body.judge-page.judge-login::before {
  display: none;
}

/* Video background for login screen */
#login-bg-video {
  display: none;
}

/* Show video only on login screen */
body.judge-page.judge-login #login-bg-video {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
}


/* ============================================================
   LIQUID GLASS — Core utility
   Applies a dark glass panel look.
   ============================================================ */
.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border-color);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-outer-shadow), var(--glass-inner-shadow);
  overflow: hidden;
}

.glass::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--glass-shine-bg);
  border-radius: inherit;
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  box-shadow:
    inset -10px -8px 0px -11px rgba(255, 255, 255, 1),
    inset 0px -9px 0px -8px rgba(255, 255, 255, 1);
  opacity: var(--glass-shine-opacity);
  z-index: 0;
  filter: blur(1px) drop-shadow(10px 4px 6px rgba(0,0,0,0.4)) brightness(115%);
  pointer-events: none;
}

/* Ensure content inside .glass sits above the ::after overlay */
.glass > * {
  position: relative;
  z-index: 1;
}

/* ============================================================
   SCREENS
   ============================================================ */
.screen {
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ============================================================
   TEXT OVERRIDES — Legible over dark glass
   ============================================================ */
body.judge-page,
body.judge-page h2,
body.judge-page h3,
body.judge-page p,
body.judge-page label,
body.judge-page small {
  color: #fff;
}



body.judge-page .song-title-display,
body.judge-page .song-artist-display {
  color: #fed77b;
}




body.judge-page .text-muted {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* ============================================================
   LOGIN SCREEN — Video Background
   ============================================================ */
#login-screen {
  position: relative;
  z-index: 1;
}
.login-container {
  text-align: center;
  max-width: 360px;
  width: 100%;
  padding: 36px 28px;
  /* glass */
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border-color);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-outer-shadow), var(--glass-inner-shadow);
  overflow: hidden;
}

.login-container::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--glass-shine-bg);
  border-radius: inherit;
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  box-shadow:
    inset -10px -8px 0px -11px rgba(255, 255, 255, 1),
    inset 0px -9px 0px -8px rgba(255, 255, 255, 1);
  opacity: var(--glass-shine-opacity);
  z-index: 0;
  filter: blur(1px) drop-shadow(10px 4px 6px rgba(0,0,0,0.4)) brightness(115%);
  pointer-events: none;
}

.login-container > * {
  position: relative;
  z-index: 1;
}

.login-logo {
  width: 90%;
  margin-bottom: 32px;
  filter: drop-shadow(0 4px 24px rgba(108, 99, 255, 0.45)) brightness(1.1);
}

#login-code {
  display: block;
  width: 100%;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 2.5rem;
  letter-spacing: 0.6em;
  padding: 16px 12px 16px 28px;
  background: var(--glass-input-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  color: #fff;
  border: 1.5px solid var(--glass-input-border);
  border-radius: 1.2rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  caret-color: rgba(255, 255, 255, 0.8);
}

#login-code::placeholder {
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.4em;
}

#login-code:focus {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.35), 0 0 20px rgba(108, 99, 255, 0.2);
}

#login-btn {
  margin-top: 16px;
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 1.2rem;
  background: rgba(108, 99, 255, 0.55);
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.3);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1.5px solid var(--glass-input-border);
  color: #fff;
  letter-spacing: 0.04em;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

#login-btn:hover,
#login-btn:focus {
  background: rgba(108, 99, 255, 0.75);
  box-shadow: 0 6px 28px rgba(108, 99, 255, 0.55), inset 0 1px 0 rgba(255,255,255,0.35);
  transform: translateY(-1px);
}

#login-btn:active {
  transform: scale(0.97);
}

#login-error {
  color: rgba(255, 100, 120, 0.95);
  margin-top: 10px;
  font-size: 0.9rem;
  text-shadow: 0 0 8px rgba(255, 50, 70, 0.4);
}

/* ============================================================
   JUDGE PANEL WRAPPER
   ============================================================ */
#judge-panel {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

/* ============================================================
   JUDGE HEADER — Sticky frosted bar
   ============================================================ */
.judge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--glass-header-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border-bottom: 1px solid var(--glass-header-border);
  box-shadow: 0 2px 16px rgba(0, 0, 14, 0.50);
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0;
}

.judge-name {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
  letter-spacing: 0.03em;
}

/* Logout button — glass pill */
#logout-btn {
  background: var(--glass-item-bg);
  border: 1px solid var(--glass-input-border);
  color: #fff;
  border-radius: 0.8rem;
  padding: 5px 12px;
  font-size: 0.85rem;
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  transition: background 0.2s, transform 0.15s;
}

#logout-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.04);
}

#logout-btn:active {
  transform: scale(0.95);
}

/* ============================================================
   PANEL STATES — Each state panel is a glass card
   ============================================================ */
.panel-state {
  padding: 28px 22px;
  text-align: center;
  animation: fadeIn 0.4s ease-out;
  max-width: 480px;
  margin: 20px auto;
  width: calc(100% - 32px);
  /* glass */
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border-color);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-outer-shadow), var(--glass-inner-shadow);
  overflow: hidden;
}

.panel-state::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--glass-shine-bg);
  border-radius: inherit;
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  box-shadow:
    inset -10px -8px 0px -11px rgba(255, 255, 255, 1),
    inset 0px -9px 0px -8px rgba(255, 255, 255, 1);
  opacity: var(--glass-shine-opacity);
  z-index: 0;
  filter: blur(1px) drop-shadow(10px 4px 6px rgba(0,0,0,0.4)) brightness(115%);
  pointer-events: none;
}

.panel-state > * {
  position: relative;
  z-index: 1;
}

.state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.85;
  text-shadow: 0 2px 12px rgba(255,255,255,0.3);
}

.sunremo-scritta {
  width: 100%;
  filter: drop-shadow(0 2px 16px rgba(108, 99, 255, 0.3));
}

.song-title-display {
  color: var(--gold);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(255, 215, 0, 0.35);
}

/* ============================================================
   VOTE SLIDERS
   ============================================================ */
.vote-slider-group {
  margin-bottom: 18px;
  text-align: left;
  background: var(--glass-item-bg);
  border: 1px solid var(--glass-item-border);
  border-radius: 1.2rem;
  padding: 14px 16px;
}

.vote-slider-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
  color: #fff;
}

.slider-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
  line-height: 1.35;
}

.slider-val {
  font-family: 'Courier New', monospace;
  font-size: 1.15rem;
  color: #fff;
  min-width: 3.5ch;
  text-align: right;
  background: rgba(108, 99, 255, 0.45);
  border-radius: 0.5rem;
  padding: 1px 7px;
  border: 1px solid rgba(255,255,255,0.3);
  text-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* Range slider track */
.vote-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
  border: none;
}

/* Webkit track fill — accent gradient */
.vote-slider::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(108, 99, 255, 0.7), rgba(180, 140, 255, 0.5));
}

/* Webkit thumb */
.vote-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: pointer;
  box-shadow:
    0 0 0 3px rgba(108, 99, 255, 0.55),
    0 4px 16px rgba(31, 38, 135, 0.4),
    inset 0 1px 0 rgba(255,255,255,1);
  border: none;
  margin-top: -14px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.vote-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow:
    0 0 0 4px rgba(108, 99, 255, 0.7),
    0 6px 20px rgba(31, 38, 135, 0.5),
    inset 0 1px 0 rgba(255,255,255,1);
}

/* Firefox thumb */
.vote-slider::-moz-range-thumb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  box-shadow:
    0 0 0 3px rgba(108, 99, 255, 0.55),
    0 4px 16px rgba(31, 38, 135, 0.4);
  border: none;
}

/* Firefox track */
.vote-slider::-moz-range-track {
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(108, 99, 255, 0.7), rgba(180, 140, 255, 0.5));
}

/* Disabled/locked slider */
.vote-slider:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.vote-slider:disabled::-webkit-slider-thumb {
  background: rgba(200, 200, 220, 0.5);
  box-shadow: 0 0 0 2px rgba(200, 200, 220, 0.35);
  margin-top: -14px;
}

.vote-slider:disabled::-moz-range-thumb {
  background: rgba(200, 200, 220, 0.5);
  box-shadow: none;
}

/* ============================================================
   SUBMIT VOTE BUTTON
   ============================================================ */
#submit-vote-btn {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 1.4rem;
  background: rgba(108, 99, 255, 0.55);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1.5px solid var(--glass-input-border);
  color: #fff;
  letter-spacing: 0.04em;
  box-shadow:
    0 6px 28px rgba(108, 99, 255, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

#submit-vote-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
  pointer-events: none;
}

#submit-vote-btn:hover::after {
  left: 120%;
}

#submit-vote-btn:hover,
#submit-vote-btn:focus {
  background: rgba(108, 99, 255, 0.72);
  box-shadow:
    0 8px 36px rgba(108, 99, 255, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}

#submit-vote-btn:active {
  transform: scale(0.97);
}

#submit-vote-btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* ============================================================
   VOTE SUCCESS & LOCKED STATE
   ============================================================ */
.vote-success {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.vote-success i {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
  color: #6dffb0;
  text-shadow: 0 0 20px rgba(109, 255, 176, 0.6), 0 0 40px rgba(109, 255, 176, 0.3);
}

.locked-values {
  text-align: left;
}

.locked-value-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
}

.locked-value-row:last-child {
  border-bottom: none;
}

.locked-value-row .lv-label {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
}

.locked-value-row .lv-val {
  font-family: 'Courier New', monospace;
  color: #fff;
  background: rgba(108, 99, 255, 0.38);
  border-radius: 0.4rem;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1rem;
  text-shadow: 0 0 6px rgba(255,255,255,0.4);
}

/* ============================================================
   MESSAGE FORM
   ============================================================ */
.message-form {
  max-width: 340px;
  margin: 0 auto;
}

.message-form .input-group {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(31, 38, 135, 0.2);
}

#msg-input {
  background: var(--glass-input-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1.5px solid var(--glass-input-border);
  border-right: none;
  color: #fff;
  font-size: 1rem;
  border-radius: 1rem 0 0 1rem;
  padding: 12px 16px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

#msg-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

#msg-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

#msg-send-btn {
  background: rgba(108, 99, 255, 0.55);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1.5px solid var(--glass-input-border);
  border-left: none;
  color: #fff;
  font-size: 1.1rem;
  padding: 12px 18px;
  border-radius: 0 1rem 1rem 0;
  transition: background 0.2s, transform 0.15s;
}

#msg-send-btn:hover {
  background: rgba(108, 99, 255, 0.78);
}

#msg-send-btn:active {
  transform: scale(0.93);
}

#msg-send-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

#msg-cooldown,
#msg-error {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}

#msg-error {
  color: rgba(255, 120, 130, 0.95);
}

/* ============================================================
   FLOATING VOTE HISTORY BUTTON
   ============================================================ */
.btn-vote-history {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--glass-fab-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1.5px solid var(--glass-fab-border);
  color: #fff;
  box-shadow:
    0 6px 24px rgba(0, 0, 14, 0.60),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  z-index: 50;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  padding: 0;
  overflow: hidden;
}

.btn-vote-history::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset -6px -5px 0px -7px rgba(255, 255, 255, 1),
    inset 0px -6px 0px -5px rgba(255, 255, 255, 1);
  opacity: 0.55;
  filter: blur(0.5px) brightness(118%);
  pointer-events: none;
}

.btn-vote-history:hover,
.btn-vote-history:focus {
  background: rgba(20, 16, 50, 0.75);
  transform: scale(1.1);
  box-shadow:
    0 8px 32px rgba(108, 99, 255, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-vote-history:active {
  transform: scale(0.93);
}

/* ============================================================
   VOTE HISTORY MODAL
   ============================================================ */
#voteHistoryModal .modal-content {
  background: var(--glass-modal-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-modal-border);
  border-radius: 1.6rem;
  box-shadow:
    0 16px 60px rgba(0, 0, 14, 0.70),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: #fff;
  overflow: hidden;
}

#voteHistoryModal .modal-header {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--glass-modal-border);
  padding: 18px 22px;
}

#voteHistoryModal .modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
}

#voteHistoryModal .btn-close-white {
  filter: invert(1) brightness(1.5);
  opacity: 0.85;
}

#voteHistoryModal .modal-body {
  max-height: 65vh;
  padding: 20px;
  overflow-y: auto;
}

/* Scrollbar in modal */
#voteHistoryModal .modal-body::-webkit-scrollbar {
  width: 5px;
}
#voteHistoryModal .modal-body::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}
#voteHistoryModal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 10px;
}

.vote-history-item {
  background: var(--glass-item-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-item-border);
  border-radius: 1.1rem;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 14, 0.40), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.15s;
}

.vote-history-item:last-child {
  margin-bottom: 0;
}

.vote-history-item:hover {
  transform: translateY(-2px);
}

.vote-history-song-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.vote-history-song-title {
  color: var(--gold);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 3px;
  text-shadow: 0 1px 8px rgba(255, 215, 0, 0.3);
}

.vote-history-song-author {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.vote-history-date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  margin-top: 4px;
}

.vote-history-empty {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.55);
}

.vote-history-empty i {
  font-size: 3rem;
  opacity: 0.35;
  margin-bottom: 12px;
  display: block;
}

/* ============================================================
   LOADING SPINNER — inside modal
   ============================================================ */
#vote-history-loading .spinner-border {
  color: rgba(255, 255, 255, 0.85) !important;
}

#vote-history-loading p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

/* ============================================================
   OFFLINE OVERLAY — keep on top, no change to functionality
   ============================================================ */
body.judge-page .offline-overlay {
  background: rgba(4, 4, 14, 0.88);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}

/* ============================================================
   PWA INSTALL BUTTON — below login-container
   ============================================================ */
#pwa-install-btn {
  margin-top: 20px;
  max-width: 360px;
  width: 100%;
  padding: 13px 20px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 1.2rem;

  border-radius: 1.2rem;
  background: rgba(65, 62, 158, 0.9);
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.3);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1.5px solid var(--glass-input-border);

  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  position: relative;
  z-index: 1;
}

#pwa-install-btn:hover,
#pwa-install-btn:focus {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

#pwa-install-btn:active {
  transform: scale(0.97);
}

/* ============================================================
   iOS PWA INSTRUCTIONS POPUP — full-screen overlay
   ============================================================ */
#pwa-ios-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 48px;
  background: rgba(4, 4, 20, 0.65);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.pwa-ios-popup-box {
  width: 100%;
  max-width: 360px;
  padding: 28px 24px 24px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border-color);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-outer-shadow), var(--glass-inner-shadow);
  text-align: center;
  color: #fff;
  position: relative;
}

/* Downward arrow pointing toward Safari share bar */
.pwa-ios-popup-box::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.22);
}

.pwa-ios-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.pwa-ios-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 20px;
}

.pwa-ios-body .bi-box-arrow-up {
  font-size: 1.1em;
  vertical-align: -0.1em;
}

#pwa-ios-ok {
  padding: 10px 36px;
  border-radius: 1.2rem;
  font-weight: 600;
  background: rgba(108, 99, 255, 0.55);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1.5px solid var(--glass-input-border);
  color: #fff;
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: background 0.2s, transform 0.15s;
}

#pwa-ios-ok:hover,
#pwa-ios-ok:focus {
  background: rgba(108, 99, 255, 0.75);
  outline: none;
  transform: translateY(-1px);
}
