@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --gold: #c9a84c;
  --gold-light: #f0d080;
  --gold-dim: #8a6e2a;
  --dark: #0a0a14;
  --dark-2: #111120;
  --dark-card: #16162a;
  --dark-card-hover: #1e1e36;
  --dark-border: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --text: #f2f2f7;
  --text-muted: #8e8ea0;
  --red: #ff453a;
  --green: #30d158;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.5), 0 16px 64px rgba(0,0,0,0.4);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* Hide protected pages until JS confirms auth — prevents flash of content */
body[data-page="vote"]:not(.authed),
body[data-page="admin"]:not(.authed),
body[data-page="change-password"]:not(.authed) { visibility: hidden; }

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ── NAV ── */
nav {
  background: rgba(17,17,32,0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--dark-border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-right: auto;
}

nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

nav a:hover, nav a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── LAYOUT ── */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  color: var(--gold);
}

.page-header p {
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ── CARDS ── */
.card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.1s var(--ease),
              box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
  letter-spacing: -0.01em;
}

.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-gold {
  background: var(--gold);
  color: #0a0a14;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.btn-gold:hover:not(:disabled) {
  background: var(--gold-light);
  box-shadow: 0 2px 8px rgba(201,168,76,0.35);
}
.btn-gold:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.35);
}

.btn-outline {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--dark-border);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) {
  background: rgba(255,255,255,0.07);
  border-color: rgba(201,168,76,0.4);
  color: var(--gold);
}

.btn-danger {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
}
.btn-danger:hover:not(:disabled) { color: var(--red); border-color: rgba(255,69,58,0.4); }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; border-radius: 6px; }
.btn-lg { padding: 0.65rem 1.4rem; font-size: 0.95rem; border-radius: var(--radius-sm); }
.btn-danger-solid { background: rgba(255,69,58,0.12); border: 1px solid rgba(255,69,58,0.35); color: var(--red); }
.btn-danger-solid:hover:not(:disabled) { background: rgba(255,69,58,0.2); border-color: var(--red); }

/* ── FORMS ── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.form-group label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
select,
textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(201,168,76,0.6);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

input::placeholder { color: var(--text-muted); }

/* ── BADGE ── */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-gold { background: rgba(201,168,76,0.18); color: var(--gold); }
.badge-muted { background: rgba(255,255,255,0.07); color: var(--text-muted); }

/* ── TOAST ── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: rgba(30,30,54,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  padding: 0.8rem 1.25rem;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.25s var(--ease);
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--gold); }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── MODAL ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s var(--ease);
}

.modal {
  background: rgba(26,26,46,0.95);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: min(480px, 90vw);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s var(--ease);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h2 {
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.modal p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ── VOTING PAGE ── */
.guest-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(201,168,76,0.05);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius);
  padding: 0.875rem 1.25rem;
  margin-bottom: 2rem;
}

.guest-bar .label { color: var(--text-muted); font-size: 0.85rem; }
.guest-bar .name { font-weight: 600; color: var(--gold); }
.guest-bar .change-btn { margin-left: auto; }

.categories-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-section {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s var(--ease);
}

.category-section:focus-within {
  box-shadow: 0 0 0 1px rgba(201,168,76,0.15);
}

.category-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s var(--ease);
  gap: 0.75rem;
}

.category-header:hover { background: var(--dark-card-hover); }

.category-header h3 {
  font-size: 1rem;
  flex: 1;
}

.category-header .chevron {
  color: var(--text-muted);
  transition: transform 0.3s var(--ease);
  font-size: 1.1rem;
}

.category-section.open .chevron { transform: rotate(180deg); }

.category-body {
  display: none;
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--dark-border);
}

.category-section.open .category-body { display: block; }

.nominees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.875rem;
  margin-top: 1rem;
}

.nominee-card {
  border: 1.5px solid var(--dark-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), transform 0.2s var(--ease),
              box-shadow 0.25s var(--ease), background 0.2s var(--ease);
  background: rgba(255,255,255,0.03);
  position: relative;
}

.nominee-card:hover {
  border-color: rgba(201,168,76,0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  background: rgba(255,255,255,0.05);
}

.nominee-card.selected {
  border-color: #6B8CFF;
  box-shadow: 0 0 0 1px #6B8CFF, 0 8px 24px rgba(107,140,255,0.25);
  background: rgba(107,140,255,0.04);
}

.nominee-card .selected-badge {
  display: none;
  position: absolute;
  top: 6px; right: 6px;
  background: #6B8CFF;
  color: #fff;
  width: 24px; height: 24px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.nominee-card.selected .selected-badge { display: flex; }

.nominee-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  background: var(--dark-2);
}

.nominee-poster-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--dark-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2rem;
}

.nominee-info {
  padding: 0.6rem 0.7rem;
}

.nominee-info .title {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nominee-info .subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nominee-info .rating {
  font-size: 0.7rem;
  color: var(--gold);
  margin-top: 0.25rem;
}

/* extra space so last category isn't hidden under sticky bar */
body[data-page="vote"] .page { padding-bottom: 6rem; }

.vote-submit-bar {
  position: sticky;
  bottom: 0;
  background: rgba(17,17,32,0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--dark-border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  z-index: 50;
}

.vote-submit-bar .progress-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.vote-submit-bar .progress-text strong { color: var(--text); }

/* ── ADMIN PAGE ── */
.admin-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 700px) {
  .admin-layout { grid-template-columns: 1fr; }
  .nominees-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

.category-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s var(--ease);
  font-size: 0.875rem;
}

.category-list-item:hover { background: rgba(255,255,255,0.05); }
.category-list-item.active { background: rgba(201,168,76,0.1); color: var(--gold); }
.category-list-item.dragging { opacity: 0.4; }
.category-list-item.drag-over { outline: 2px dashed var(--gold); outline-offset: -2px; }

.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}
.drag-handle:active { cursor: grabbing; }

.cat-right-meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-shrink: 0;
}
.category-list-item .count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nominee-admin-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  margin-bottom: 0.5rem;
  transition: background 0.15s var(--ease);
}

.nominee-admin-card:hover { background: rgba(255,255,255,0.05); }

.nominee-admin-card img {
  width: 40px; height: 56px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--dark-2);
  flex-shrink: 0;
}

.nominee-admin-card .info { flex: 1; min-width: 0; }
.nominee-admin-card .info .title { font-size: 0.875rem; font-weight: 600; }
.nominee-admin-card .info .sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.1rem; }

.search-results-dropdown {
  background: rgba(22,22,42,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  margin-top: 0.25rem;
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s var(--ease);
  font-size: 0.875rem;
}

.search-result-item:hover { background: rgba(255,255,255,0.06); }

.search-result-item img {
  width: 32px; height: 44px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--dark);
  flex-shrink: 0;
}

.search-result-item .result-info .title { font-weight: 500; }
.search-result-item .result-info .year { font-size: 0.75rem; color: var(--text-muted); }

/* ── RESULTS PAGE ── */
.results-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-category {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.result-category h3 {
  font-size: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--dark-border);
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.result-category h3 .total {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 1.5rem;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  margin-bottom: 0;
  min-width: 0;
  transition: background 0.15s var(--ease);
}
.result-row:nth-child(odd)  { background: rgba(255,255,255,0.02); }
.result-row:nth-child(even) { background: rgba(255,255,255,0.045); }
.has-winner .result-row:nth-child(odd)  { background: rgba(255,255,255,0.045); }
.has-winner .result-row:nth-child(even) { background: rgba(255,255,255,0.02); }

.result-row .poster-thumb {
  width: 32px; height: 46px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.poster-thumb-empty {
  width: 32px; height: 46px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* Left text block: title + subtitle stacked */
.result-row-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.result-row-top {
  min-width: 0;
}

.result-title {
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.result-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.result-row-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right column: bar (fixed width) + votes */
.result-bar-wrap {
  flex: 0 0 180px;
  height: 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}

.result-color-dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.result-bar {
  height: 100%;
  background: var(--gold-dim);
  border-radius: 99px;
  transition: width 0.6s var(--ease);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.35rem;
  min-width: 2px;
}

.result-row.winner .result-bar,
.result-row.actual-winner .result-bar { background: var(--gold); }

.result-bar .pct {
  font-size: 0.65rem;
  font-weight: 600;
  color: #0a0a14;
  white-space: nowrap;
}

.result-row .votes-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
  min-width: 48px;
}

.winner-crown { color: var(--gold); font-size: 0.85rem; flex-shrink: 0; }

.my-pick-badge {
  display: inline-block;
  flex-shrink: 0;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 20px;
  background: rgba(107, 140, 255, 0.15);
  color: #6B8CFF;
  border: 1px solid rgba(107, 140, 255, 0.3);
  white-space: nowrap;
}

.result-bar.my-pick-bar { background: #6B8CFF; }
.result-bar.winner-bar  { background: var(--gold); }

.no-votes {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── RESULTS VIEW TOGGLE ── */

.results-view-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.results-view-toggle .view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.results-view-toggle .view-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.results-view-toggle .view-btn.active { background: rgba(201,168,76,0.12); color: var(--gold); font-weight: 600; }

/* ── PIE CHART ── */

.pie-layout {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.pie-rows {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  margin-left: -1.5rem;
}

.pie-rows .result-row {
  margin-left: 0;
  margin-right: 0;
  padding-left: 1.5rem;
  padding-right: 0.75rem;
}

.pie-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  flex-shrink: 0;
}

.pie-chart-col {
  flex-shrink: 0;
  align-self: center;
  margin-right: -1.5rem;
  padding: 0 1.5rem;
}

.pie-svg {
  width: 138px;
  height: 138px;
}

.pie-center-text {
  font-size: 13px;
  font-weight: 700;
  fill: var(--text);
  font-family: 'Inter', sans-serif;
}

.pie-center-label {
  font-size: 7px;
  fill: var(--text-muted);
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pie-no-votes .pie-rows,
.pie-no-votes .pie-divider {
  opacity: 0.35;
}

.pie-no-votes .pie-svg {
  opacity: 0.4;
}

.bar-no-votes {
  opacity: 0.35;
}

/* ── DIVIDER ── */
.divider {
  border: none;
  border-top: 1px solid var(--dark-border);
  margin: 1.25rem 0;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.9rem; }

/* ── LOADING SPINNER ── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--dark-border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  justify-content: center;
  padding: 3rem;
}

/* ── LOCKED BANNER ── */

.locked-banner {
  background: rgba(224,82,82,0.1);
  border: 1px solid rgba(224,82,82,0.3);
  color: #e07070;
  border-radius: var(--radius);
  padding: 0.875rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ── AUTH PAGES ── */

.auth-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: rgba(22,22,42,0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: min(420px, 100%);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.auth-logo {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.auth-card h1 {
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.auth-card .form-group { text-align: left; }

.auth-error {
  background: rgba(224,82,82,0.12);
  border: 1px solid rgba(224,82,82,0.3);
  color: #e07070;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.auth-footer {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.invite-badge {
  background: rgba(82,200,122,0.1);
  border: 1px solid rgba(82,200,122,0.3);
  color: #52c87a;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

/* ── TABS ── */

.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--dark-border);
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
  letter-spacing: -0.01em;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── NAV USER ── */

#nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.nav-username {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.nav-username strong { color: var(--text); }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

body.nav-dropdown-open::before {
  opacity: 1;
}

.nav-user-menu {
  position: relative;
  z-index: 110;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.nav-user-btn:hover { background: rgba(255,255,255,0.06); }

.nav-chevron {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.15s;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;
  z-index: 200;
}

.nav-dropdown-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.875rem;
  text-align: left;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background 0.12s;
}
.nav-dropdown-item:hover { background: rgba(255,255,255,0.06); }

.nav-dropdown-danger { color: #ff6b6b; }
.nav-dropdown-danger:hover { background: rgba(255,107,107,0.08); }

.nav-dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 0;
}

/* ── SECTION GUARD (edit lock) ── */

.tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tabs-lock-slot {
  display: flex;
  align-items: center;
}

.section-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
  line-height: 1;
}
.section-lock-btn:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--text);
}
.section-guard.locked .section-lock-btn {
  color: var(--gold);
  border-color: rgba(212,175,55,0.3);
}

.section-guard-content {
  transition: opacity 0.2s;
}
.section-guard.locked .section-guard-content {
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

/* ── DATA TAB ── */

.data-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.data-card-description {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.1rem;
}

.data-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.65rem;
}

.data-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: var(--dark-2);
  border: 1px solid var(--dark-border);
  border-radius: 10px;
  padding: 0.85rem 0.5rem;
  text-align: center;
  min-height: 72px;
}

.data-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.data-stat-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.data-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  border: 1.5px dashed var(--dark-border);
  border-radius: 12px;
  background: var(--dark-2);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s, background 0.18s;
  user-select: none;
}
.data-dropzone:hover {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.03);
}
.data-dropzone.drag-over {
  border-color: var(--gold);
  background: rgba(212,175,55,0.07);
}
.data-dropzone.has-file {
  border-style: solid;
  border-color: rgba(255,255,255,0.15);
}
.data-dropzone-icon {
  font-size: 1.6rem;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.18s;
}
.data-dropzone:hover .data-dropzone-icon,
.data-dropzone.drag-over .data-dropzone-icon { opacity: 0.85; }
.data-dropzone.has-file .data-dropzone-icon { opacity: 1; }
.data-dropzone-primary {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}
.data-dropzone-secondary {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.data-dropzone.drag-over .data-dropzone-primary { color: var(--gold); }

.data-file-input { display: none; }

.import-preview {
  background: var(--dark-2);
  border: 1px solid var(--dark-border);
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 1rem;
}

.import-preview-date {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.data-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.data-checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--gold);
}

.data-checkbox-row label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  cursor: pointer;
}

.data-fingerprint {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
  padding: 0.55rem 0.75rem;
  background: var(--dark-2);
  border: 1px solid var(--dark-border);
  border-radius: 8px;
}
.data-fingerprint-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.data-fingerprint-value {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

/* ── INVITE LIST ── */

.invite-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.6rem 0 0.35rem;
}
.invite-section-label:first-child { padding-top: 0; }

.invite-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.invite-row:last-child { border-bottom: none; }

.invite-row-info { flex: 1; min-width: 0; }
.invite-row-email {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.invite-row-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.invite-status-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.invite-status-pill.active {
  background: rgba(48,209,88,0.12);
  color: var(--green);
  border: 1px solid rgba(48,209,88,0.2);
}
.invite-status-pill.used {
  background: rgba(142,142,160,0.1);
  color: var(--text-muted);
  border: 1px solid rgba(142,142,160,0.15);
}
.invite-status-pill.expired {
  background: rgba(255,69,58,0.1);
  color: var(--red);
  border: 1px solid rgba(255,69,58,0.15);
}

.invite-link-box {
  background: var(--dark);
  border: 1px solid var(--dark-border);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-family: monospace;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

/* ── USER LIST ── */

.user-card {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.user-card:last-child { border-bottom: none; }

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0;
  margin-top: 0.1rem;
  object-fit: cover;
}
.user-avatar.role-admin {
  background: rgba(201,168,76,0.18);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.3);
}
.user-avatar.role-voter {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.08);
}

.user-card-body { flex: 1; min-width: 0; }
.user-card-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}
.user-card-username {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}
.user-card-display-name {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.user-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.user-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.user-card-actions-divider {
  flex: 1;
}

.badge-warn {
  background: rgba(230,160,50,0.15);
  color: #e6a032;
  border: 1px solid rgba(230,160,50,0.3);
}

/* ── MODAL ── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-box {
  background: rgba(22,22,42,0.95);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: min(420px, 92vw);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s var(--ease);
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.modal-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--dark-border);
}

.modal-header .modal-title {
  flex: 1;
  font-size: 0.9rem;
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-body {
  padding: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.modal-error {
  background: rgba(224,82,82,0.12);
  border: 1px solid rgba(224,82,82,0.3);
  color: #e07070;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

/* Danger button used as primary CTA in a modal footer */
.modal-footer .btn-danger {
  background: rgba(255,69,58,0.12);
  border: 1px solid rgba(255,69,58,0.4);
  color: var(--red);
}
.modal-footer .btn-danger:hover:not(:disabled) {
  background: rgba(255,69,58,0.2);
  border-color: var(--red);
}

@media (max-width: 700px) {
  #tab-users > div { grid-template-columns: 1fr !important; }
}

/* ── WINNER STYLES ── */

.badge-winner {
  background: rgba(201,168,76,0.2);
  color: var(--gold-light);
  border: 1px solid var(--gold-dim);
}

.nominee-card.actual-winner {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 28px rgba(201,168,76,0.4);
}

/* My pick always gets blue border, even over a winner */
.nominee-card.actual-winner.selected {
  border-color: #6B8CFF;
  box-shadow: 0 0 0 1px #6B8CFF, 0 8px 24px rgba(107,140,255,0.25);
  background: rgba(107,140,255,0.04);
}

.winner-overlay {
  display: none;  /* always in DOM now; shown only when actual-winner */
  position: absolute;
  top: 6px; right: 6px;
  background: var(--gold);
  color: #0d0d17;
  width: 28px; height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  z-index: 1;
}
.nominee-card.actual-winner .winner-overlay { display: flex; }

/* When both winner and my pick: trophy stays top-right, checkmark moves to bottom-right */
.nominee-card.actual-winner.selected .selected-badge {
  top: auto;
  bottom: 6px;
}

.nominee-admin-card.is-winner {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
}

.winner-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(201,168,76,0.04));
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 0 20px rgba(201,168,76,0.08);
}

.winner-banner img {
  width: 36px; height: 50px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.winner-banner-body { flex: 1; min-width: 0; }

.winner-banner-label {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.winner-banner-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-light);
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.winner-banner-name { cursor: pointer; }
a.winner-banner-name:hover, button.winner-banner-name:hover { text-decoration: underline; text-underline-offset: 2px; }

.winner-banner-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.winner-banner-sub { color: var(--text-muted); }
a.winner-banner-sub:hover { text-decoration: underline; text-underline-offset: 2px; color: var(--text); }

/* Bar and dot in winner banner reuse result-row classes directly */


/* ── UTILITY ── */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.ml-auto { margin-left: auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── CATEGORY TYPE PILLS ── */

.cat-type-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.type-pill-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--dark-border);
  border-radius: 8px;
  overflow: hidden;
}

.type-pill {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  text-align: center;
}

.type-pill:hover { background: var(--dark-2); color: var(--text); }
.type-pill.active { background: var(--dark-2); color: var(--gold); font-weight: 600; }

/* ── NOMINEE PANEL HEADER ── */

.np-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.np-title {
  font-size: 1.1rem;
  color: var(--gold);
  margin: 0;
}

.np-title-editing {
  outline: none;
  border-bottom: 1.5px solid rgba(212,175,55,0.6);
  cursor: text;
}

.add-area-heading {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

/* ── ADD NOMINEE AREA ── */

.add-search-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}

.add-search-wrap input,
.add-main-search,
.person-search-input,
.film-search-input,
.song-title-input,
.listen-url-input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875rem;
  box-sizing: border-box;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.add-search-wrap input:focus,
.add-main-search:focus,
.person-search-input:focus,
.film-search-input:focus,
.song-title-input:focus,
.listen-url-input:focus {
  outline: none;
  border-color: rgba(201,168,76,0.6);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
}

.add-field-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  display: block;
}

#step-film {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--dark-border);
}

.add-no-results {
  padding: 0.4rem 0;
  font-size: 0.8rem;
}

.search-mini-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--dark-border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0.5rem 0;
}

/* ── PENDING CARD ── */

.pending-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(201,168,76,0.05);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-top: 0.5rem;
  position: relative;
}

.pending-card img {
  width: 48px;
  height: 68px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

.pending-card-thumb {
  width: 48px;
  height: 68px;
  background: var(--dark-border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.pending-card-body { flex: 1; min-width: 0; }
.pending-card-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.pending-card-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.pending-card-plot { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }

.pending-clear {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}
.pending-clear:hover { color: var(--text); background: var(--dark-border); }

/* ── SELECTION CHIP ── */

.selection-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--dark-2);
  border: 1px solid var(--dark-border);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.selection-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.chip-icon { font-size: 1rem; }
.chip-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip-clear, .btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
  flex-shrink: 0;
}
.chip-clear:hover, .btn-icon:hover { color: var(--text); background: var(--dark-border); }

/* ── NOMINEE ADMIN CARD ── */

.nominee-thumb-placeholder {
  width: 40px;
  height: 56px;
  background: var(--dark-2);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.country-badge {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.film-country-wrap select {
  width: 100%;
  font-size: 0.875rem;
}

.listen-link {
  display: inline-block;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--gold);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.listen-link:hover { text-decoration: underline; }

/* Play overlay on poster art */
.listen-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: block;
}

/* Full-width variant for nominee cards on vote page */
.listen-thumb-wrap.nominee-poster-wrap {
  width: 100%;
  flex-shrink: unset;
}

.listen-thumb-wrap .poster-thumb,
.listen-thumb-wrap .poster-thumb-empty {
  display: block;
  transition: filter 0.2s var(--ease);
}

.listen-thumb-wrap:hover .poster-thumb,
.listen-thumb-wrap:hover .poster-thumb-empty {
  filter: brightness(0.55);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
  pointer-events: none;
}

.listen-thumb-wrap:hover .play-overlay {
  opacity: 1;
}

/* IMDb link on film titles and subtitles (results page) */
a.imdb-title-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.imdb-title-link:hover,
a.imdb-title-link:hover .result-title-text {
  text-decoration: underline;
  text-decoration-color: rgba(242,242,247,0.35);
  text-underline-offset: 2px;
}

/* Clickable title for songs */
.result-title-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  flex-shrink: 1;
  min-width: 0;
}
.result-title-link:hover,
.result-title-link:hover .result-title-text {
  text-decoration: underline;
  text-decoration-color: rgba(242,242,247,0.4);
  text-underline-offset: 2px;
}

/* ── Listen modal ── */
.listen-modal-box { max-width: 340px; padding: 0; }
.listen-modal-box .modal-header { padding: 1rem 1rem 0.75rem; margin: 0; }
.listen-modal-box .modal-body { padding: 0.75rem; margin: 0; }
.listen-platform-btn {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.listen-platform-btn:hover {
  background: rgba(201,168,76,0.1);
  border-color: rgba(201,168,76,0.4);
  color: var(--gold);
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover { color: var(--text); }

/* ── LEADERBOARD ─────────────────────────────────────────────────────────── */

.lb-stage {
  position: relative;
  min-height: 100vh;
  background: var(--dark);
  overflow-x: hidden;
}

/* Warm gold glow at top — sets the theater mood without clashing */
.lb-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 35% at 50% 0%, rgba(201,168,76,0.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Theater curtains */
.lb-curtain {
  position: absolute;
  top: 0;
  width: 290px;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.lb-curtain-left {
  left: 0;
  background: linear-gradient(to right, rgba(100,10,10,0.55) 0%, transparent 100%);
}
.lb-curtain-right {
  right: 0;
  background: linear-gradient(to left, rgba(100,10,10,0.55) 0%, transparent 100%);
}

/* Header proscenium */
.lb-proscenium {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 2rem 2.5rem;
}
.lb-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  opacity: 0.8;
}
.lb-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 0 60px rgba(201,168,76,0.35);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}
.lb-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Body */
.lb-body {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.lb-section {
  margin-bottom: 3rem;
}
.lb-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.lb-loading {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

/* ── Walk of Fame tiles ── */
.walk-of-fame {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.star-tile {
  position: relative;
  background: #b8896a;
  border-radius: 6px;
  padding: 1.4rem 1rem 1.1rem;
  text-align: center;
  cursor: default;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 -2px 0 rgba(0,0,0,0.25),
    0 4px 16px rgba(0,0,0,0.55);
  animation: starFadeIn 0.4s var(--ease) both;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.star-tile:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -2px 0 rgba(0,0,0,0.25),
    0 8px 28px rgba(0,0,0,0.6),
    0 0 24px rgba(201,168,76,0.12);
}

/* Terrazzo texture overlay */
.star-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.06) 1px, transparent 1px),
    radial-gradient(circle at 45% 80%, rgba(0,0,0,0.07) 1px, transparent 1px);
  pointer-events: none;
}

.star-tile-rank {
  position: absolute;
  top: 6px; right: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(26,10,10,0.45);
  letter-spacing: 0.05em;
}
.star-tile-icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.45rem;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
}
.star-tile-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a0808;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.25;
  margin-bottom: 0.3rem;
  word-break: break-word;
}
.star-tile-score {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a0808;
  line-height: 1;
}
.star-tile-score-label {
  font-size: 0.6rem;
  color: rgba(26,8,8,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

/* Top 3 special treatment */
.star-tile.rank-1 {
  background: linear-gradient(145deg, #d4a96a 0%, #b8896a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -2px 0 rgba(0,0,0,0.25),
    0 6px 24px rgba(0,0,0,0.6),
    0 0 40px rgba(201,168,76,0.25);
}
.star-tile.rank-1 .star-tile-icon::after {
  content: '';
}
.star-tile.rank-2 { background: linear-gradient(145deg, #c4c4cc 0%, #a0a0ac 100%); }
.star-tile.rank-2 .star-tile-name,
.star-tile.rank-2 .star-tile-score,
.star-tile.rank-2 .star-tile-rank { color: #111120; }
.star-tile.rank-2 .star-tile-score-label { color: rgba(17,17,32,0.5); }
.star-tile.rank-3 { background: linear-gradient(145deg, #c09070 0%, #a07050 100%); }

.star-tile.rank-no-picks {
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), 0 2px 8px rgba(0,0,0,0.3);
}
.star-tile.rank-no-picks .star-tile-name { color: var(--text-muted); }
.star-tile.rank-no-picks .star-tile-score { color: var(--text-muted); }
.star-tile.rank-no-picks .star-tile-score-label { color: rgba(142,142,160,0.5); }

@keyframes starFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Per-category rows ── */
.lb-cat-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  animation: starFadeIn 0.35s var(--ease) both;
}
.lb-cat-row:last-child { border-bottom: none; }

.lb-cat-thumb {
  width: 38px;
  height: 54px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
}
.lb-cat-thumb-empty {
  width: 38px;
  height: 54px;
  border-radius: 4px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.lb-cat-info {
  flex: 1;
  min-width: 0;
}
.lb-cat-name {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.lb-cat-winner {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-cat-winner-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  flex-shrink: 0;
  max-width: 220px;
}
.lb-picker-chip {
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 100px;
  padding: 2px 9px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gold);
  white-space: nowrap;
}
.lb-no-picks {
  font-size: 0.72rem;
  color: rgba(142,142,160,0.45);
  font-style: italic;
}

.lb-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── AUDIT LOG ── */
.audit-chain-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}
.audit-chain-valid {
  background: rgba(48,209,88,0.12);
  border: 1px solid rgba(48,209,88,0.3);
  color: var(--green);
}
.audit-chain-invalid {
  background: rgba(255,69,58,0.12);
  border: 1px solid rgba(255,69,58,0.3);
  color: var(--red);
}

/* Filters bar */
.audit-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.audit-search-input {
  flex: 1;
  min-width: 140px;
  max-width: 220px;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.audit-search-input:focus { border-color: var(--gold-dim); }
.audit-search-input::placeholder { color: var(--text-muted); }

.audit-user-filter {
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.audit-user-filter:focus { border-color: var(--gold-dim); }

.audit-type-pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.audit-type-pill {
  padding: 3px 11px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.audit-type-pill:hover { border-color: rgba(201,168,76,0.3); color: var(--text); }
.audit-type-pill.active {
  background: rgba(201,168,76,0.12);
  border-color: rgba(201,168,76,0.35);
  color: var(--gold);
}

/* #audit-list defines two shared columns. Each .audit-row spans both and
   uses subgrid so the action column is sized by the widest action name
   across the whole list — keeping the detail text vertically aligned. */
#audit-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 0.85rem;
}
/* Spinner / empty state span both columns */
#audit-list > :not(.audit-row) { grid-column: 1 / -1; }

.audit-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  row-gap: 2px;
  padding: 0.55rem 1.25rem;
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  transition: background 0.15s var(--ease);
}
.audit-row:nth-child(odd)  { background: rgba(255,255,255,0.02); }
.audit-row:nth-child(even) { background: rgba(255,255,255,0.045); }

.audit-action {
  font-size: 0.73rem;
  font-weight: 600;
  font-family: 'SF Mono', 'Menlo', monospace;
  color: var(--text-muted);
  white-space: nowrap;
}
.audit-detail {
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audit-row-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.audit-actor {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-dim);
}
.audit-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.65;
  cursor: default;
}
.audit-hash {
  font-size: 0.65rem;
  font-family: 'SF Mono', 'Menlo', monospace;
  color: rgba(142,142,160,0.3);
  letter-spacing: 0.03em;
  margin-left: auto;
}

/* Pagination */
.audit-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.audit-page-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.audit-page-btn { min-width: 80px; }
.lb-empty .icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
