:root {
  --navy-900: #060f2c;
  --navy-800: #0a1a4a;
  --navy-700: #0f2360;
  --navy-600: #16307a;
  --gold-400: #d4b06a;
  --gold-500: #c8a14a;
  --gold-300: #e7c98a;
  --gold-200: #f0ddb0;
  --ivory:    #f6f1e3;
  --text:     #eef2ff;
  --muted:    #9fb0d8;
  --danger:   #ff7a8a;
  --ok:       #7ee0a8;
  --warn:     #ffc164;
  --glass:    rgba(10,26,74,0.45);
  --glass-border: rgba(212,176,106,0.22);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: linear-gradient(175deg, #0a1640 0%, #04081d 50%, #060f2c 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ═══ BACKGROUND ═══ */
.bg-lines { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(ellipse 90% 50% at 20% 80%, transparent 55%, rgba(212,176,106,0.12) 55.5%, transparent 56%),
    radial-gradient(ellipse 90% 50% at 80% 80%, transparent 58%, rgba(212,176,106,0.10) 58.5%, transparent 59%),
    radial-gradient(800px 400px at 50% 0%, rgba(22,48,122,0.5) 0%, transparent 70%);
}
.particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.particle { position: absolute; width: 3px; height: 3px; background: var(--gold-300); border-radius: 50%; opacity: 0;
  animation: floatUp var(--dur, 8s) var(--delay, 0s) infinite; }
@keyframes floatUp {
  0%  { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: var(--op, 0.4); }
  90% { opacity: var(--op, 0.4); }
  100%{ transform: translateY(-20vh) scale(1); opacity: 0; }
}

/* ═══ HERO ═══ */
.hero { position: relative; text-align: center; padding: 40px 24px 10px; z-index: 1; }
.burst { position: relative; width: 280px; max-width: 60vw; height: 80px; margin: 0 auto; }
.burst span { position: absolute; left: 50%; top: 100%; width: 1px; height: 70px;
  background: linear-gradient(180deg, rgba(231,201,138,0.5), transparent);
  transform-origin: 50% 0%; transform: translateX(-50%) rotate(calc((var(--i)/var(--n) - .5)*180deg)); opacity: .6; }
.title { font-family: 'Cormorant Garamond', serif; font-weight: 700;
  font-size: clamp(28px, 6vw, 64px); letter-spacing: .1em; color: #fffdf6;
  text-shadow: 0 2px 24px rgba(212,176,106,0.2); }
.subtitle { color: var(--gold-300); letter-spacing: .3em; text-transform: uppercase; font-size: 11px; font-weight: 500; margin-top: 6px; }

/* ═══ CONTAINER ═══ */
.container { position: relative; z-index: 1; max-width: 960px; margin: 12px auto 60px; padding: 0 16px; }
.step { display: none; animation: fadeUp .4s ease both; }
.step.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; } }

/* ═══ HERO PHOTOS CAROUSEL ═══ */
.hero-photos { display: flex; justify-content: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.hero-photo { width: 90px; height: 90px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(212,176,106,0.3); box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: heroPop .5s ease both; opacity: 0; }
.hero-photo:nth-child(1) { animation-delay: .1s; }
.hero-photo:nth-child(2) { animation-delay: .2s; }
.hero-photo:nth-child(3) { animation-delay: .3s; }
.hero-photo:nth-child(4) { animation-delay: .4s; }
.hero-photo:nth-child(5) { animation-delay: .5s; }
.hero-photo:nth-child(6) { animation-delay: .6s; }
@keyframes heroPop { from { opacity:0; transform: scale(.7); } to { opacity:1; transform: scale(1); } }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ═══ GLASS CARD ═══ */
.glass-card { position: relative; background: linear-gradient(165deg, rgba(22,48,122,0.5), rgba(10,26,74,0.6));
  border: 1px solid var(--glass-border); border-radius: 24px; backdrop-filter: blur(12px); overflow: hidden; }
.card-glow { position: absolute; top: -50%; left: -20%; width: 140%; height: 100%;
  background: radial-gradient(ellipse at 50% 80%, rgba(212,176,106,0.06), transparent 60%); pointer-events: none; }

/* ═══ EMAIL CARD ═══ */
.email-card { padding: 40px 36px; text-align: center; max-width: 520px; margin: 0 auto; }
.email-card h2 { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 26px; color: #fffdf6; }
.email-desc { color: var(--muted); font-size: 13px; margin: 8px 0 24px; line-height: 1.7; }
.email-desc strong { color: var(--gold-300); }
.input-group { display: flex; gap: 10px; position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); opacity: .5; pointer-events: none; display: flex; }
.input-group input { flex: 1; padding: 14px 16px 14px 40px; border: 1px solid rgba(212,176,106,0.25); border-radius: 12px;
  background: rgba(6,15,44,0.6); color: #fff; font-size: 14px; font-family: inherit; outline: none; transition: border-color .2s, box-shadow .2s; }
.input-group input:focus { border-color: var(--gold-400); box-shadow: 0 0 0 3px rgba(212,176,106,0.12); }
.input-group input::placeholder { color: rgba(159,176,216,0.4); }
.field-error { color: var(--danger); font-size: 12px; margin-top: 8px; min-height: 18px; }

/* ═══ BUTTONS ═══ */
.btn-gold { border: 0; cursor: pointer; padding: 14px 24px; border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-200), var(--gold-400), var(--gold-500)); background-size: 200% 200%;
  color: var(--navy-900); font: 600 13px/1 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase;
  transition: transform .15s, box-shadow .15s, opacity .2s; box-shadow: 0 4px 16px rgba(212,176,106,0.3);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(212,176,106,0.4); }
.btn-gold:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-gold.loading { position: relative; color: transparent !important; }
.btn-gold.loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  border: 2px solid rgba(6,15,44,0.25); border-top-color: var(--navy-900); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ RESULTS SECTION ═══ */
.results-section { margin-top: 36px; }
.results-heading { font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 28px;
  color: var(--gold-200); text-align: center; margin-bottom: 20px; letter-spacing: .06em; }
.loading-text { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.result-card { background: rgba(10,26,74,0.5); border: 1px solid rgba(212,176,106,0.12); border-radius: 16px; padding: 18px 20px; }
.result-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.result-cat { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: .04em; }
.result-total { font-size: 11px; color: var(--muted); }
.result-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.result-rank { width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.result-rank.r1 { background: linear-gradient(135deg, #ffd700, #c8a14a); color: var(--navy-900); }
.result-rank.r2 { background: rgba(192,192,192,0.3); border: 1px solid rgba(192,192,192,0.5); color: #ddd; }
.result-rank.r3 { background: rgba(205,127,50,0.25); border: 1px solid rgba(205,127,50,0.4); color: #d4a06a; }
.result-info { flex: 1; min-width: 0; }
.result-name { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-bar-wrap { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.result-bar { height: 100%; border-radius: 3px; transition: width .8s ease; min-width: 2px; }
.r1 + .result-info .result-bar { background: linear-gradient(90deg, #ffd700, #c8a14a); }
.r2 + .result-info .result-bar { background: rgba(192,192,192,0.5); }
.r3 + .result-info .result-bar { background: rgba(205,127,50,0.5); }
.result-pct { font-size: 12px; font-weight: 700; color: var(--gold-300); min-width: 42px; text-align: right; }
.result-empty { color: var(--muted); font-size: 12px; font-style: italic; padding: 8px 0; }

/* ═══ VOTER BAR ═══ */
.glass-bar { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 14px; backdrop-filter: blur(10px); }
.voter-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; margin-bottom: 24px; flex-wrap: wrap; gap: 8px; }
.voter-info { display: flex; align-items: center; gap: 8px; color: var(--gold-300); font-size: 13px; font-weight: 500; }
.progress-pill { position: relative; width: 110px; height: 28px; background: rgba(6,15,44,0.5); border-radius: 999px; border: 1px solid rgba(212,176,106,0.15); overflow: hidden; }
.progress-bar-inner { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(212,176,106,0.3), rgba(212,176,106,0.5));
  border-radius: 999px; width: 0%; transition: width .4s ease; }
.progress-text { position: relative; display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--gold-300); font-size: 11px; font-weight: 600; letter-spacing: .1em; }

/* ═══ AWARD GROUP ═══ */
.award-group { margin-bottom: 32px; padding: 22px 20px 16px; background: rgba(10,26,74,0.25);
  border: 1px solid rgba(212,176,106,0.1); border-radius: 20px; }
.group-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(212,176,106,0.15); }
.group-icon { width: 38px; height: 38px; flex-shrink: 0; color: var(--gold-300);
  background: rgba(212,176,106,0.1); border: 1px solid rgba(212,176,106,0.2); border-radius: 12px;
  padding: 8px; display: flex; align-items: center; justify-content: center; }
.group-title { font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 24px;
  letter-spacing: .05em; color: var(--gold-200); }

/* ═══ CATEGORY BLOCK ═══ */
.category-block { margin-bottom: 24px; }
.category-block:last-child { margin-bottom: 6px; }
.cat-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cat-title { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.cat-status { padding: 4px 12px; border-radius: 999px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(6,15,44,0.5); border: 1px solid rgba(212,176,106,0.15); color: var(--muted); transition: all .3s; white-space: nowrap; }
.cat-status.voted { background: rgba(126,224,168,0.12); border-color: rgba(126,224,168,0.3); color: var(--ok); }
.cat-status.locked { background: rgba(255,122,138,0.1); border-color: rgba(255,122,138,0.3); color: var(--danger); }

/* ═══ COUNTDOWN ═══ */
.countdown-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 16px;
  margin-bottom: 10px; background: rgba(255,193,100,0.06); border: 1px solid rgba(255,193,100,0.15);
  border-radius: 10px; }
.cd-label { font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.cd-timer { font-family: 'Inter', monospace; font-size: 15px; font-weight: 700; color: var(--warn); letter-spacing: .08em; }

/* ═══ NOMINEE CARDS ═══ */
.nominees-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.nominees-grid.has-photos { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.nominee-card { position: relative; border: 1px solid rgba(212,176,106,0.15);
  background: linear-gradient(170deg, rgba(22,48,122,0.35), rgba(10,26,74,0.45));
  border-radius: 14px; padding: 16px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: all .25s; color: var(--text); font-family: inherit; font-size: inherit; outline: none; }
.nominee-card:hover { border-color: rgba(212,176,106,0.45); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
.nominee-card.selected { border-color: var(--gold-400);
  background: linear-gradient(170deg, rgba(212,176,106,0.12), rgba(22,48,122,0.5));
  box-shadow: 0 0 0 2px var(--gold-400), 0 8px 24px rgba(212,176,106,0.15); }
.nominee-card.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* Avatar (no photo) */
.nominee-avatar { width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  border: 2px solid rgba(212,176,106,0.2); display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 700; color: var(--gold-300); transition: all .3s; }
.nominee-card.selected .nominee-avatar { background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900); border-color: var(--gold-300); }

/* Photo */
.nominee-photo { width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(212,176,106,0.2); transition: all .3s; }
.nominee-photo img { width: 100%; height: 100%; object-fit: cover; }
.nominee-card.selected .nominee-photo { border-color: var(--gold-400); box-shadow: 0 4px 12px rgba(212,176,106,0.3); }

.nominee-name { font-size: 11px; font-weight: 500; text-align: center; letter-spacing: .02em; line-height: 1.3; }
.check-mark { position: absolute; top: 5px; right: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold-400); color: var(--navy-900); display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.4); transition: all .25s cubic-bezier(.34,1.56,.64,1); }
.nominee-card.selected .check-mark { opacity: 1; transform: scale(1); }

/* ═══ FOOTER ═══ */
.foot { position: relative; z-index: 1; text-align: center; color: rgba(159,176,216,0.4);
  padding: 24px; font-size: 11px; letter-spacing: .06em; border-top: 1px solid rgba(212,176,106,0.08); }

/* ═══ TOAST ═══ */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: rgba(10,26,74,0.96); border: 1px solid rgba(212,176,106,0.35); color: #fff;
  padding: 12px 20px; border-radius: 12px; font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s; z-index: 100; max-width: 90vw; box-shadow: 0 12px 40px rgba(0,0,0,0.5); backdrop-filter: blur(12px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.err  { border-color: rgba(255,122,138,0.5); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
  .hero { padding: 28px 16px 8px; }
  .email-card { padding: 28px 20px; }
  .input-group { flex-direction: column; }
  .input-icon { top: 15px; transform: none; }
  .nominees-grid, .nominees-grid.has-photos { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
  .nominee-card { padding: 12px 8px 10px; }
  .nominee-photo { width: 56px; height: 56px; }
  .nominee-avatar { width: 40px; height: 40px; font-size: 16px; }
  .award-group { padding: 16px 14px 10px; }
  .group-title { font-size: 20px; }
  .voter-bar { flex-direction: column; text-align: center; }
  .results-grid { grid-template-columns: 1fr; }
  .hero-photo { width: 64px; height: 64px; }
}
