:root {
  --navy: #0a1628;
  --gold: #c8a84b;
  --gold-lt: #e8c97a;
  --cream: #f5f0e8;
  --slate: #1e2d45;
  --white: #ffffff;
  --shadow: 0 8px 40px rgba(10, 22, 40, .18);
  --bg: #0a1628;
  --bg2: #1e2d45;
  --fg: #ffffff;
  --fg2: rgba(255, 255, 255, .55);
  --border-col: rgba(200, 168, 75, .25);
  --card-bg: linear-gradient(145deg, #1e2d45 0%, #0a1628 100%);
  --grid-line: rgba(255, 255, 255, .03);
  --modal-bg: #1e2d45;
  --action-bg: rgba(0, 0, 0, .25);
  --action-border: rgba(255, 255, 255, .05);
  --search-bg: rgba(255, 255, 255, .06);
  --chip-color: rgba(255, 255, 255, .45);
  --radial: rgba(200, 168, 75, .15);
}

.light {
  --bg: #f5f0e8;
  --bg2: #ffffff;
  --fg: #0a1628;
  --fg2: rgba(10, 22, 40, .55);
  --border-col: rgba(200, 168, 75, .4);
  --card-bg: linear-gradient(145deg, #ffffff 0%, #f5f0e8 100%);
  --grid-line: rgba(10, 22, 40, .04);
  --modal-bg: #ffffff;
  --action-bg: rgba(200, 168, 75, .06);
  --action-border: rgba(10, 22, 40, .08);
  --search-bg: rgba(255, 255, 255, .9);
  --chip-color: rgba(10, 22, 40, .5);
  --radial: rgba(200, 168, 75, .2);
  --shadow: 0 8px 40px rgba(10, 22, 40, .10);
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  padding: 48px 24px 120px;
  transition: background .3s, color .3s;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--radial) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 59px, var(--grid-line) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, var(--grid-line) 60px);
}

.w-100 {
  width: 100% !important;
}

/* ── Theme Toggle ── */
.theme-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--border-col);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  margin-bottom: 20px;
  transition: background .3s, border-color .3s;
}

.light .theme-pill {
  background: rgba(10, 22, 40, .06);
}

.theme-pill button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--fg2);
  font-size: 14px;
  transition: all .25s;
}

.theme-pill button.active {
  background: var(--gold);
  color: #0a1628;
  box-shadow: 0 2px 8px rgba(200, 168, 75, .35);
}

/* ── Page Header ── */
.page-header {
  text-align: center;
  margin-bottom: 56px;
}

.page-header .badge {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 5px 18px;
  border-radius: 2px;
  margin-bottom: 18px;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--fg);
  line-height: 1.1;
  letter-spacing: -.02em;
}

.page-header h1 span {
  color: var(--gold);
}

.page-header p {
  color: var(--fg2);
  margin-top: 12px;
  font-size: 14px;
  letter-spacing: .04em;
}

/* ── Search Bar ── */
.search-section {
  max-width: 680px;
  margin: 0 auto 40px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--search-bg);
  border: 1px solid var(--border-col);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}

.search-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 168, 75, .12);
}

.search-icon {
  flex-shrink: 0;
  padding: 0 16px 0 20px;
  color: rgba(200, 168, 75, .6);
  display: flex;
  align-items: center;
}

.search-icon svg {
  width: 18px;
  height: 18px;
}

#searchInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  padding: 15px 0;
  caret-color: var(--gold);
}

#searchInput::placeholder {
  color: var(--fg2);
}

.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 10px;
  background: rgba(255, 255, 255, .08);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--fg2);
  font-size: 15px;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}

.search-clear:hover {
  background: rgba(255, 255, 255, .15);
  color: var(--fg);
}

.search-clear.visible {
  display: flex;
}

/* Filter chips */
.filter-chips {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border-col);
  background: transparent;
  color: var(--chip-color);
  transition: all .2s;
  font-family: 'DM Sans', sans-serif;
}

.chip:hover {
  border-color: var(--gold);
  color: var(--gold-lt);
}

.chip.active {
  background: rgba(200, 168, 75, .18);
  border-color: var(--gold);
  color: var(--gold);
}

.chip svg {
  width: 11px;
  height: 11px;
}

/* Result count */
.result-meta {
  max-width: 1100px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-count {
  font-size: 12px;
  color: var(--fg2);
  letter-spacing: .06em;
}

.result-count strong {
  color: var(--gold);
}

.result-divider {
  flex: 1;
  height: 1px;
  background: var(--border-col);
}

/* Empty state */
.empty-state {
  display: none;
  text-align: center;
  padding: 80px 20px;
  max-width: 400px;
  margin: 0 auto;
}

.empty-state.visible {
  display: block;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: .4;
}

.empty-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--fg2);
  margin-bottom: 10px;
}

.empty-sub {
  font-size: 13px;
  color: var(--fg2);
  opacity: .5;
  line-height: 1.6;
}

.highlight {
  background: rgba(200, 168, 75, .25);
  color: var(--gold-lt);
  border-radius: 3px;
  padding: 0 2px;
}

/* ── Grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 36px;
  max-width: 1100px;
  margin: 0 auto;
}

@media(max-width:600px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  body {
    padding: 24px 14px 100px;
  }
}

/* ── Card ── */
.voter-card {
  background: var(--card-bg);
  border: 1px solid var(--border-col);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
}

.light .voter-card {
  box-shadow: var(--shadow);
}

/* .voter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
} */

.voter-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow), 0 16px 60px rgba(200, 168, 75, .12);
}

/* Card inner (printable area) */
.card-face {
  padding: 28px 28px 20px;
}

/* Header row */
.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-col);
  margin-bottom: 22px;
}

.logo-mark {
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

.logo-mark img {
  height: 40px;
}

.campaign-info {
  flex: 1;
}

.campaign-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--gold);
  line-height: 1.2;
}

.campaign-sub {
  font-size: 10px;
  color: var(--fg2);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.official-stamp {
  font-size: 9px;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .7;
}

/* Body */
.card-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.voter-info {
  flex: 1;
}

.info-row {
  margin-bottom: 14px;
}

.info-label {
  font-size: 9px;
  color: var(--fg2);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.info-value {
  font-size: 1.05rem;
  color: var(--fg);
  font-weight: 500;
}

.voter-id-value {
  font-family: 'DM Sans', monospace;
  font-size: .95rem;
  color: var(--gold-lt);
  letter-spacing: .1em;
}

.light .voter-id-value {
  color: #8b6914;
}

/* QR */
.qr-wrap {
  background: var(--white);
  border-radius: 10px;
  padding: 8px;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-wrap canvas,
.qr-wrap img {
  width: 74px !important;
  height: 74px !important;
}

/* Divider */
.card-divider {
  margin: 5px 0 5px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-col), transparent);
}

/* Footer */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px 22px;
}

.card-serial {
  font-size: 9px;
  color: var(--fg2);
  opacity: .5;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.validity {
  font-size: 9px;
  color: rgba(200, 168, 75, .55);
  letter-spacing: .08em;
}

/* ── Action Buttons ── */
.card-actions {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  background: var(--action-bg);
  border-top: 1px solid var(--action-border);
}

.btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 0;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: all .2s;
}

.btn-view {
  background: rgba(255, 255, 255, .07);
  color: var(--fg2);
}

.light .btn-view {
  background: rgba(10, 22, 40, .07);
}

.btn-print {
  background: rgba(200, 168, 75, .15);
  color: var(--gold);
  border: 1px solid rgba(200, 168, 75, .3);
}

.btn-dl {
  background: var(--gold);
  color: var(--navy);
}

.btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn svg {
  width: 13px;
  height: 13px;
}


/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, .88);
  backdrop-filter: blur(6px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  animation: fadeIn .2s ease;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--modal-bg);
  border: 1px solid var(--border-col);
  border-radius: 20px;
  padding: 40px;
  max-width: 420px;
  width: 90%;
  position: relative;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .5);
  animation: slideUp .25s ease;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, .07);
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--fg);
  font-size: 18px;
  line-height: 32px;
  text-align: center;
  transition: background .2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, .15);
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 20px;
}

.modal-field {
  margin-bottom: 16px;
}

.modal-label {
  font-size: 10px;
  color: var(--fg2);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.modal-val {
  font-size: 1rem;
  color: var(--fg);
  font-weight: 500;
}

.modal-id {
  font-family: monospace;
  color: var(--gold-lt);
  letter-spacing: .1em;
  font-size: 1rem;
}

.modal-qr {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.modal-qr-wrap {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
}

.modal-qr-wrap canvas,
.modal-qr-wrap img {
  width: 140px !important;
  height: 140px !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ── Print Styles ── */
@media print {
  body {
    background: #fff;
    padding: 0;
  }

  .page-header,
  .card-actions,
  .modal-overlay,
  .fab-btn,
  .cand-overlay {
    display: none !important;
  }

  .cards-grid {
    display: block;
  }

  .voter-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 30px;
    background: #fff !important;
    border: 2px solid #c8a84b;
    color: #000 !important;
    box-shadow: none !important;
  }

  .voter-card:hover {
    transform: none;
  }

  .campaign-name,
  .info-value,
  .modal-title {
    color: #0a1628 !important;
  }

  .info-label,
  .campaign-sub,
  .validity,
  .card-serial {
    color: #555 !important;
  }

  .voter-id-value {
    color: #8b6914 !important;
  }

  .card-divider {
    background: #c8a84b !important;
  }

  .logo-mark {
    background: #c8a84b !important;
  }

  .card-footer {
    padding-bottom: 10px;
  }
}

/* ══════════════════════════════════════
 FLOATING CANDIDATE BUTTON
══════════════════════════════════════ */
.fab-btn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-lt) 100%);
  border: none;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(200, 168, 75, .5);
  max-width: 56px;
  transition: max-width .38s cubic-bezier(.4, 0, .2, 1), box-shadow .25s, transform .2s;
  animation: fabIn .55s .9s both;
}

@keyframes fabIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(.8)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.fab-btn:hover,
.fab-btn.peek {
  max-width: 230px;
  box-shadow: 0 10px 40px rgba(200, 168, 75, .6);
  transform: translateY(-2px);
}

.fab-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  animation: fabRing 2.8s infinite;
  pointer-events: none;
}

@keyframes fabRing {
  0% {
    box-shadow: 0 0 0 0 rgba(200, 168, 75, .55);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(200, 168, 75, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(200, 168, 75, 0);
  }
}

.fab-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a5f, #0a1628);
  border: 2px solid rgba(255, 255, 255, .25);
  font-size: 26px;
  position: relative;
  z-index: 1;
}

.fab-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    position: absolute;
    top: 5px;
}

.fab-label {
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #0a1628;
  letter-spacing: .03em;
  padding-right: 18px;
  overflow: hidden;
  opacity: 0;
  max-width: 0;
  padding-left: 10px;
  transition: opacity .2s .15s, max-width .38s cubic-bezier(.4, 0, .2, 1);
}

.fab-btn:hover .fab-label,
.fab-btn.peek .fab-label {
  opacity: 1;
  max-width: 180px;
}

/* ══════════════════════════════════════
 CANDIDATE POPUP
══════════════════════════════════════ */
.cand-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(5, 10, 20, .7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.cand-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media(min-width:540px) {
  .cand-overlay {
    align-items: center;
  }
}

.cand-popup {
  width: 650px;
  max-width: 80%;
  background: linear-gradient(160deg, #1e2d45 0%, #0a1628 100%);
  border: 1px solid rgba(200, 168, 75, .3);
  border-radius: 28px 28px 0 0;
  overflow: hidden;
  box-shadow: 0 -12px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(200, 168, 75, .08) inset;
  transform: translateY(50px);
  transition: transform .38s cubic-bezier(.34, 1.25, .64, 1);
  position: relative;
  margin: auto;
}

.cand-overlay.open .cand-popup {
  transform: translateY(0);
}

@media(min-width:540px) {
  .cand-popup {
    border-radius: 24px;
    transform: scale(.9) translateY(24px);
    max-height: 92vh;
    overflow-y: auto;
  }

  .cand-overlay.open .cand-popup {
    transform: scale(1) translateY(0);
  }
}

/* Gold top bar */
.cand-popup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Pull handle (mobile only) */
.cand-handle {
  display: flex;
  justify-content: center;
  padding: 14px 0 4px;
}

.cand-handle span {
  width: 38px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .15);
}

@media(min-width:540px) {
  .cand-handle {
    display: none;
  }
}

.cand-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgb(245 41 41 / 35%);
  border: 1px solid rgba(200, 168, 75, .2);
  border: 1px solid rgba(200, 168, 75, .2);
  color: rgb(226 55 55 / 79%);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}

.cand-close:hover {
  background: rgba(200, 168, 75, .2);
  color: var(--gold);
}

/* Photo + name row */
.cand-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px 18px;
}

.cand-photo-wrap {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a5f, #0a1628);
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 4px rgba(200, 168, 75, .15);
}

.cand-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cand-verified {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid #0a1628;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.cand-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(200, 168, 75, .12);
  border: 1px solid rgba(200, 168, 75, .3);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: 7px;
}

.cand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

.cand-role {
  font-size: 12px;
  color: rgba(200, 168, 75, .8);
  font-weight: 600;
  margin-top: 3px;
}

.cand-hr {
  height: 1px;
  background: rgba(200, 168, 75, .15);
  margin: 0 24px;
}

.cand-desc {
  padding: 16px 24px;
  font-size: 2rem;
  line-height: 1.75;
  color: rgb(255 255 255);
  text-align: center;
}

.cand-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(200, 168, 75, .12);
  border-top: 1px solid rgba(200, 168, 75, .12);
  border-bottom: 1px solid rgba(200, 168, 75, .12);
}

.cand-stat {
  background: rgba(10, 22, 40, .6);
  padding: 14px 10px;
  text-align: center;
}

.cand-stat-val {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold);
}

.cand-stat-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .35);
  margin-top: 3px;
}

.cand-cta {
  padding: 20px 24px 28px;
}

.cand-vote-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-lt) 100%);
  color: #0a1628;
  border: none;
  border-radius: 14px;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: .03em;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(200, 168, 75, .4);
  transition: transform .2s, box-shadow .2s;
}

.cand-vote-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(200, 168, 75, .55);
}

.cand-arrow {
  transition: transform .2s;
  display: inline-block;
}

.cand-vote-btn:hover .cand-arrow {
  transform: translateX(4px);
}

.voter-id-value.voter-id-large {
  font-size: 2rem;
  font-weight: bolder;
  letter-spacing: 0.5rem;
}

.campaign-banner {
  background: linear-gradient(135deg, var(--gold), var(--gold-lt));
  color: var(--navy);
  text-align: center;
  padding: 20px 10px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(200, 168, 75, 0.3);
}

.campaign-banner h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.campaign-banner p {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.relative {
    position: relative;
}

img.candidate-side-img {
    position: absolute;
    top: 0px;
    right: 120px;
    height: 400px;
}

/* Floating Button */
.yt-float-btn {
    position: absolute;
    bottom: 136px;
    left: 25%;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgb(255 30 0 / 48%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 10px 25px;
    animation: 1.8s ease 0s infinite normal none running pulse;
    z-index: 1000;
}

  .yt-float-btn::before {
    content: "";
    width: 0;
    height: 0;
    border-left: 18px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
  }

  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
  }

  /* Overlay */
  .yt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
  }

  .yt-box {
    width: 80%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    position: relative;
  }

  .yt-box iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
  }

  /* Close Button */
  .close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
  }

  @media screen and (max-width: 600px) {
    .yt-box {
      width: 95%;
    }

    .yt-float-btn {
      display: none;
    }
    .svg-play {
        width: 100%;
        padding-top: 30px;
    }

    img.candidate-side-img {
        position: fixed;
        top: 0;
        height: 350px;
        opacity: 0.6;
        z-index: -1;
        right: 10%;
    }
    .page-header{
        padding-top: 180px;
    }

    .voter-card * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        image-rendering: -webkit-optimize-contrast; /* ✅ sharper images on Chrome */
        image-rendering: crisp-edges;
      }
      
      .qr-wrap img, .logo-mark img {
        image-rendering: pixelated; /* ✅ prevents QR code blur */
      }
    
}