/* ===========================
   Theme Tokens
=========================== */
:root {
  --primary-bg: #0d0d0d;
  --card-bg: #1a1a1a;
  --text-color: #f0f0f0;
  --muted: #a3a7b3;
  --accent-color: #d81b60;
  --file-picker: #b45353;
  --font: "Helvetica Neue", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --border-radius: 12px;

  /* Slots + extras */
  --reel-w: 120px;
  --reel-gap: 12px;
  --item-h: 58px;
  --accent: #e91e63;
  --bg: #0f0f12;
  --card: #17181c;
  --text: #eef2ff;
  --good: #10b981;
}

/* ===========================
   Resets / Base
=========================== */

html,
body {
  margin: 0;
  padding: 0;
  background: var(--primary-bg);
  color: var(--text-color);
  font-family: var(--font);
  line-height: 1.5;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

img {
  max-width: 100%;
  height: auto;
}

h1 {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 1rem;
}

#headline {
  font-size: 1.3rem;
  margin: 0 !important;
}

/* ===========================
   Animations
=========================== */
@keyframes flash {
  10%, 30%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
.blink { animation: flash 2s infinite; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}
.shake { animation: shake 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .blink, .shake { animation: none !important; }
}

/* ===========================
   Form Shell
=========================== */
form {
  background: var(--card-bg);
  padding: 0.1rem;
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rules {
  font-size: 0.85rem;
  background: var(--card-bg);
  padding: 0 1.1rem;
  border-radius: 10px;
  color: #eee;
  line-height: 26px;
  max-width: 100%;
}

.rules h2 { font-size: 1.5rem; }
.rules h2.raffle {
  font-size: 1.4rem;
  line-height: 1.5rem;
}

.rules ol {
  list-style: decimal inside;
  padding-left: 0;
  margin-top: 1rem;
  font-size: 1.1rem;
  line-height: 1.5rem;
}
.rules li {
  margin: 0 0 2rem 0;
  line-height: 1.2rem;
}
.rules ol > li:last-child { margin-bottom: 0; }

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  padding-top: 5px;
}
.input-label {
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-color);
}

input[type="text"],
input[type="file"],
input[type="email"] {
  background: #7c7c7c;
  color: var(--text-color);
  border: 1px solid #444;
  padding: 0.75rem;
  margin-top: 0.5rem;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

input[type="text"]::placeholder {
  color: #aaa;
  opacity: 0.7;
}


.file-picked {
  font-size: 0.5rem;
  color: #aaa;
}
.file-picked:empty { display: none; }

/* ===========================
   Buttons
=========================== */
button,
.follow-btn-fb,
.follow-btn-ig,
.btn-compact {
  background-color: var(--accent-color);
  color: #fff;
  font-weight: bold;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-size: 17px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

button:hover,
button:focus,
button:active,
.follow-btn-fb:hover,
.follow-btn-fb:focus,
.follow-btn-fb:active,
.follow-btn-ig:hover,
.follow-btn-ig:focus,
.follow-btn-ig:active,
.btn-compact:hover,
.btn-compact:focus,
.btn-compact:active {
  background-color: var(--accent-color);
  outline: none;
}

button:disabled {
  background: #555 !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  pointer-events: none;
}

/* Social-specific colors */
.follow-btn-fb,
.follow-btn-fb:hover,
.follow-btn-fb:focus,
.follow-btn-fb:active {
  background: #1877f2;
}

.follow-btn-ig,
.follow-btn-ig:hover,
.follow-btn-ig:focus,
.follow-btn-ig:active {
  background: #c13584;
}

/* Compact vote button */
.btn-compact {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  width: auto;
}
.btn-compact[disabled] {
  background: #2b2f36;
  color: #9aa0ac;
  cursor: not-allowed;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ===========================
   Social follow links / counters
=========================== */
#follow-gate { padding-top: 7px; }
.logo-wrap { display: flex; justify-content: center; }
.follow-links { display: flex; justify-content: center; gap: 1rem; }

.followers-wrapper {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin: 2.5rem 0;
}
.follower-block {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 1rem;
}

/* ===========================
   Progress + Messages
=========================== */
progress {
  height: 10px;
  border-radius: 5px;
  width: 100%;
}
.message {
  text-align: center;
  font-size: 1rem;
  color: green;
}

/* ===========================
   CTA (locked/unlocked)
=========================== */
.cta-state { width: 100%; }
.cta-message {
  display: none;
  text-align: center;
  margin: 0 auto;
}
.cta-message.show {
  display: block;
  min-height: 1.25rem;
  color: orange;
}
.cta-guard { cursor: pointer; position: relative; }
.cta-guard:hover button[disabled] { filter: brightness(0.95); }
.cta-guard:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 4px;
}
#upload-cta {
  margin: 0 auto;
  padding: 0 16px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
#cta-locked, #cta-unlocked {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
#cta-guard { width: 100%; display: flex; justify-content: center; }
#upload-btn, #upload-btn-disabled {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 1.05rem;
  box-sizing: border-box;
}
#upload-btn:active, #upload-btn-disabled:active { transform: none; }

/* ===========================
   Section Titles
=========================== */
.raffle-title,
.section-title {
  text-align: center;
  color: #ff5900;
  padding-top: 10px;
}
.gallery-title {
  margin: 1rem 0;
  font-size: 1.6rem;
  font-weight: bold;
  text-align: center;
  background-color: #4aeaff;
  padding-bottom: 0;
  color: #212121;
}
.scroll-cta {
  text-align: center;
  line-height: 1.5rem;
  font-size: 1.5rem;
  color: #9edfff;
}

/* ===========================
   Image Modal
=========================== */
#imageModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  box-sizing: border-box;
}
#imageModal.hidden { display: none; }
#imageModal img {
  max-width: 90vw;
  max-height: 90vh;
  border: 4px solid #fff;
  border-radius: 10px;
}

/* ===========================
   Winner Modal
=========================== */
.winner-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 2rem;
}
.winner-title { font-size: 3rem; margin: 0; }
.winner-name { font-size: 2rem; margin-top: 1rem; }
.btn-modal-close {
  margin-top: 2rem;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  background: var(--accent-color);
  border: none;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}

/* ===========================
   Gallery (mobile-first)
=========================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 1rem;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 380px) {
  .gallery { grid-template-columns: 1fr; }
}

.card {
  background: #121318;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.card img,
.card video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* Footer layout for cards */
.card .info {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 6px 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.card .info > span {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.vote-info {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  justify-self: end;
  font-weight: 600;
  color: #cfd3df;
}
.vote-row {
  grid-column: 1 / -1;
  grid-row: 2 / 3;
  display: flex;
  justify-content: flex-end;
}

/* ===========================
   Slot Machine
=========================== */
.slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.slot-title { font-weight: 800; letter-spacing: 0.2px; }

.slot-machine {
  display: flex;
  justify-content: center;
  gap: var(--reel-gap);
  background: #153b47;
  border: 5px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  position: relative;
}

.slot-window {
  width: var(--reel-w);
  height: var(--item-h);
  overflow: hidden;
  border-radius: 10px;
  background: #0a0b0f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}
.slot-window::before,
.slot-window::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 10px;
  pointer-events: none;
}
.slot-window::before {
  top: 0;
  background: linear-gradient(#0a0b0f, transparent);
}
.slot-window::after {
  bottom: 0;
  background: linear-gradient(transparent, #0a0b0f);
}

.slot-reel {
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.slot-cell {
  height: var(--item-h);
  box-sizing: border-box;
  display: grid;
  place-items: center;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.2px;
  padding: 0 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  text-align: center;
  box-shadow: inset 0 -1px rgba(255, 255, 255, 0.06);
}
.slot-cell:last-child { box-shadow: none; }

.slot-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.slot-spin {
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(233, 30, 99, 0.35);
}
.slot-spin[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.slot-left {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}
.slot-result {
  margin-top: 12px;
  text-align: center;
  font-weight: 900;
  color: var(--good);
  min-height: 1.6em;
}
.slot-result.good { color: #10b981; }
.slot-result.bad { color: #ff7272; }

/* Entry stats card */
.entry-stats-card {
  display: flex;                  
  width: fit-content;           
  margin: 50px auto;          
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.1);
  color: #eef2ff;
  gap: 12px;
}

.entry-stat {
  display: grid;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.entry-stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
  letter-spacing: 0.2px;
}
.entry-stat-value {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.1;
}

/* little bump animation when numbers go up */
.entry-bump { animation: entry-bump 0.35s ease-out; }
@keyframes entry-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.countdown {
  font-size: 25px;
  font-weight: bold;
  color: rgb(255, 245, 103);
  text-align: center;
  padding-bottom: 30px;
  line-height: 19px;
}

/* ========== JACKPOT MODAL ========== */
#jackpot-modal.hidden { display: none; }
#jackpot-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#jackpot-modal .modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
}
#jackpot-modal .modal-card {
  position: relative;
  width: min(92vw, 520px);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  transform: scale(0.96);
  opacity: 0;
  animation: jackpotModalIn 0.18s ease-out forwards;
  background: #111;
  color: #fff;
}
@keyframes jackpotModalIn {
  to { transform: scale(1); opacity: 1; }
}
#jackpot-modal .modal-title {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.2px;
}
#jackpot-modal .jackpot-prize {
  margin: 6px 0 8px;
  font-size: 20px;
  font-weight: 800;
}
#jackpot-modal .jackpot-message {
  margin: 0;
  opacity: 0.95;
  font-size: 16px;
  line-height: 1.45;
}
#jackpot-modal .modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}
#jackpot-modal .btn-modal-close {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  background: #fff;
  color: #111;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 18px rgba(0, 0, 0, 0.25);
}
#jackpot-modal .btn-modal-close:hover { filter: brightness(0.96); }
#jackpot-modal .btn-modal-close:active { transform: translateY(1px); }
html.modal-open, body.modal-open { overflow: hidden; }

@media (max-width: 360px) {
  #jackpot-modal .modal-card { width: 94vw; padding: 20px 16px; }
  #jackpot-modal .modal-title { font-size: 22px; }
  #jackpot-modal .jackpot-prize { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #jackpot-modal .modal-card { animation: none; opacity: 1; transform: none; }
}

.arrows { text-align: center; }
.arrow-icon { font-size: 40px; color: #ff5900; }

body.winner-locked #app-main { display: none !important; }

/* ===== SONG POLL ===== */
#song-poll {
  margin: 16px 0;
  padding: 14px 0px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.1);
}
#song-poll .section-title { margin: 0 0 8px 0; }

.poll-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 6px 0 8px 0;
}
.poll-tab {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  color: var(--text-color);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.poll-tab.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}
.poll-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px 0;
  display: grid;
  gap: 8px;
}
.poll-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #121318;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
}
.poll-row input[type="radio"],
.poll-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--accent-color);
  cursor: pointer;
}
.poll-row label {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.1;
  cursor: pointer;
  font-weight: 700;
  color: #e8edf8;
}
.poll-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
    .poll-status{ display:block; text-align:center; margin-top:8px; font-size:20px; min-height:20px; color: darkorange; }
/* ===== /SONG POLL ===== */

/* ===========================
   Stronger section styling
=========================== */
.section {
  position: relative;
  margin: 24px 0;
  padding: 16px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

/* Big, obvious tints + a colored left rail */
.section--poll {
  background:
    linear-gradient(180deg, rgba(124,77,255,0.22), rgba(124,77,255,0.06)),
    var(--card-bg);
  border-color: rgba(124,77,255,0.40);
  box-shadow: 0 16px 30px rgba(124,77,255,0.16);
}
.section--poll::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #7c4dff, rgba(124,77,255,0.6));
}

.section--slots {
  background:
    linear-gradient(180deg, rgba(16,185,129,0.22), rgba(16,185,129,0.06)),
    var(--card-bg);
  border-color: rgba(16,185,129,0.40);
  box-shadow: 0 16px 30px rgba(16,185,129,0.16);
}
.section--slots::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #10b981, rgba(16,185,129,0.6));
}

/* Slightly theme the section titles for extra contrast */
.section--poll .section-title { color: #cbb6ff; }
.section--slots .section-title { color: #86f3c6; }

/* Divider is thicker and spaced out */
.section-break {
  position: relative;
  height: 2px;
  margin: 18px 0 20px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}
.section-break__label {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-bg);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Poll button (purple) */
#open-poll-modal {
  background: #7c4dff;          /* primary */
  border: 1px solid rgba(255,255,255,0.14);
}
#open-poll-modal:hover,
#open-poll-modal:focus,
#open-poll-modal:active {
  background: #6a3df2;          /* hover/active */
  box-shadow: 0 6px 16px rgba(124, 77, 255, 0.35);
}

/* Slots button (green) */
#open-slots-modal {
  background: #10b981;          /* primary */
  border: 1px solid rgba(255,255,255,0.14);
}
#open-slots-modal:hover,
#open-slots-modal:focus,
#open-slots-modal:active {
  background: #0ea271;          /* hover/active */
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

/* (Optional) keep disabled consistent */
#open-poll-modal:disabled,
#open-slots-modal:disabled {
  background: #555 !important;
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* Poll leaderboard */
#poll-leaderboard .leaders{ 
  list-style:none; margin:8px 0 6px; padding:0; display:grid; gap:6px;
}
#poll-leaderboard .leader-row{
  display:grid; grid-template-columns:auto 1fr auto; align-items:center;
  gap:10px; padding:8px 10px; border:1px solid rgba(255,255,255,.08);
  border-radius:10px; background:#121318;
}
#poll-leaderboard .idx{
  font-weight:800; width:22px; text-align:center; opacity:.85;
}
#poll-leaderboard .song{
  font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
#poll-leaderboard .votes{
  display:flex; gap:8px; align-items:baseline; font-weight:800;
}
#poll-leaderboard .votes .pct{
  font-weight:600; opacity:.8; font-size:.95em;
}
#poll-leaderboard .leaders-meta{ margin-top:6px; text-align:center; }


/* Winner modal look */
.modal-card--winner {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255,255,255,0.12), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, rgba(255,215,0,0.15), rgba(124,77,255,0.10)),
    #0b1222;
  border: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}
.modal-card--winner .modal-title {
  font-size: 22px;
}
.winner-line {
  font-size: 20px;
  font-weight: 900;
  margin: 10px 0 6px;
}
.winner-sub {
  opacity: .95;
  margin: 0 0 4px;
}

/* Simple confetti */
.winner-modal .confetti {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}
.winner-modal .confetti-piece {
  position: absolute;
  top: -6vh;
  width: 8px;
  height: 4px;
  border-radius: 2px;
  opacity: .95;
  animation: confetti-fall var(--dur, 2.4s) linear forwards;
  transform: rotate(var(--rot, 0deg));
}
@keyframes confetti-fall {
  to {
    top: 110vh;
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.email-consent{
  display:flex;
  align-items:flex-start;
  gap:18px;
  font-size:13px;
  line-height:1.35;
  opacity:.95;
  margin-top:38px;
}
.email-consent input[type="checkbox"]{ margin-top:3px; }


#song-poll.voted .section-header { display: none !important; }

.sublogo { text-align:center; font-size:18px; font-weight:900; margin:6px 0 20px; color: yellow; }