* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Arial,
    Helvetica,
    sans-serif;
  background: #111;
  color: #fff;
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

h1 {
  font-size: 46px;
  margin-top: 15px;
  margin-bottom: 5px;
}

h2 {
  margin-top: 0;
}

a {
  color: #fff;
}

.back-link {
  color: #bbb;
}

.tagline {
  color: #aaa;
  margin-bottom: 30px;
}

.card {
  background: #1d1d1d;
  padding: 24px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.standard-form {
  display: flex;
  gap: 8px;
}

input {
  width: 100%;
  min-width: 0;
  padding: 13px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

button {
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  font-size: 15px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.event-header,
.live-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.status-badge,
.live-pill {
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: bold;
}

.status-setup {
  background: #333;
}

.status-ready {
  background: #51451e;
}

.status-live,
.live-pill {
  background: #8b1d1d;
}

.status-finished {
  background: #174928;
}

.dashboard-grid {
  display: grid;
  grid-template-columns:
    repeat(3, 1fr);
  gap: 12px;
}

.stat-box {
  background: #292929;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.stat-number {
  font-size: 38px;
  font-weight: bold;
}

.participant {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  background: #292929;
  padding: 14px;
  border-radius: 9px;
  margin-bottom: 9px;
}

.participant-link {
  text-decoration: none;
}

.prizes,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.prize {
  background: #333;
  padding: 9px 13px;
  border-radius: 20px;
  font-weight: bold;
}

.muted {
  color: #aaa;
  margin-top: 7px;
}

.error,
.success-message,
.info-message,
.warning-message {
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.error {
  background: #3a1717;
  border: 1px solid #7a2c2c;
}

.success-message {
  background: #153d24;
  border: 1px solid #27663d;
}

.info-message {
  background: #242c36;
  border: 1px solid #3a4d63;
}

.warning-message {
  background: #40371c;
  border: 1px solid #695b27;
}

.primary-button {
  display: inline-block;
  background: #fff;
  color: #111;
  padding: 14px 22px;
  font-weight: bold;
}

.button-link {
  display: inline-block;
  background: #333;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
}

.danger-button {
  background: #652525;
  color: #fff;
}

.small-button {
  padding: 8px 12px;
}

.connected-status {
  font-size: 18px;
  font-weight: bold;
}

.spotify-test,
.host-message {
  margin-top: 18px;
  padding: 15px;
  background: #292929;
  border-radius: 9px;
}

.eyebrow {
  color: #aaa;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 2px;
}

/* SONG ENTRY */

.song-entry-form {
  display: grid;
  grid-template-columns:
    1fr 1fr auto;
  gap: 10px;
}

.song-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #292929;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}

.song-number {
  width: 34px;
  min-width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3a3a3a;
  border-radius: 50%;
  font-weight: bold;
}

.song-details {
  flex: 1;
}

.participant-song-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.song-count-badge {
  background: #333;
  padding: 7px 11px;
  border-radius: 15px;
  font-weight: bold;
}

.spotify-linked {
  color: #88c99a;
  font-size: 13px;
  margin-top: 6px;
}

/* SPOTIFY PLAYLIST IMPORT */

.spotify-import-card {
  border: 1px solid #313131;
}

.spotify-import-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.read-only-badge {
  white-space: nowrap;
  background: #173d25;
  border: 1px solid #2b6840;
  color: #a6d9b4;
  border-radius: 20px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: bold;
}

.playlist-help {
  background: #282828;
  color: #bbb;
  padding: 11px 13px;
  border-radius: 8px;
  margin: 15px 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.playlist-import-form {
  align-items: stretch;
}

.playlist-message {
  margin-top: 16px;
  min-height: 22px;
}

.playlist-preview-card {
  border: 1px solid #3c3c3c;
}

.playlist-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.spotify-link {
  color: #bbb;
  white-space: nowrap;
  text-decoration: none;
}

.spotify-link:hover {
  color: #fff;
}

.playlist-limit-notice {
  padding: 13px;
  border-radius: 8px;
  background: #282828;
  margin: 18px 0;
  color: #ccc;
}

.playlist-track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playlist-track-row {
  display: grid;
  grid-template-columns:
    30px 34px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #292929;
  border-radius: 9px;
  padding: 13px;
}

.playlist-track-disabled {
  opacity: 0.55;
}

.playlist-checkbox {
  display: flex;
  justify-content: center;
}

.playlist-track-number {
  color: #888;
  text-align: center;
  font-size: 14px;
}

.playlist-track-details {
  min-width: 0;
}

.playlist-track-details strong {
  display: block;
  overflow-wrap: anywhere;
}

.playlist-problem {
  color: #e2b66c;
  margin-top: 6px;
  font-size: 13px;
}

.playlist-status-symbol {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #5a3b1b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5c77c;
  font-weight: bold;
}

.spotify-track-link {
  color: #aaa;
  text-decoration: none;
  font-size: 13px;
}

.spotify-track-link:hover {
  color: #fff;
}

.playlist-import-footer {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.selected-count {
  color: #ccc;
  font-weight: bold;
}

/* LIVE COUNTDOWN */

.live-container {
  max-width: 900px;
}

.countdown-hero {
  text-align: center;
  padding: 50px 20px;
}

.remaining-number {
  font-size: 120px;
  line-height: 1;
  font-weight: bold;
}

.remaining-label {
  margin-top: 12px;
  color: #aaa;
  letter-spacing: 2px;
  font-weight: bold;
}

.countdown-complete .remaining-number {
  display: none;
}

.now-playing-card {
  text-align: center;
  padding: 42px 24px;
}

.now-playing-card h2 {
  margin-top: 12px;
  font-size: 34px;
}

.now-playing-artist {
  font-size: 20px;
  color: #ccc;
}

.match-status {
  margin-top: 16px;
}

.match-good,
.match-warning {
  display: inline-block;
  padding: 9px 13px;
  border-radius: 8px;
}

.match-good {
  background: #173d25;
  border: 1px solid #2b6840;
}

.match-warning {
  background: #493d19;
  border: 1px solid #766627;
}

.played-row {
  display: flex;
  gap: 20px;
  background: #292929;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.played-position {
  min-width: 72px;
  font-size: 28px;
  font-weight: bold;
}

.played-song-details {
  flex: 1;
}

.owner {
  margin-top: 5px;
  color: #ccc;
}

.prize-winner-row {
  border: 1px solid #786722;
  background: #302a17;
}

.winner-label {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #554817;
  font-size: 12px;
  font-weight: bold;
}

/* FINAL WINNER */

.final-winner-card {
  text-align: center;
  background: #2f2915;
  border: 2px solid #8d7524;
  border-radius: 18px;
  padding: 45px 20px;
  margin-bottom: 25px;
}

.final-winner-crown {
  font-size: 55px;
}

.final-winner-card h2 {
  font-size: 48px;
  margin: 10px 0 25px;
}

.final-winner-song {
  font-size: 36px;
  font-weight: bold;
}

.final-winner-artist {
  color: #ccc;
  font-size: 22px;
  margin-top: 8px;
}

.final-selected-by {
  margin-top: 30px;
  color: #aaa;
}

.final-winner-person {
  font-size: 32px;
  font-weight: bold;
  margin-top: 7px;
}

.hidden {
  display: none;
}

/* WINNER OVERLAY */

.winner-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    rgba(0, 0, 0, 0.94);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.winner-overlay.show {
  display: flex;
}

.winner-overlay-inner {
  width: 100%;
  max-width: 750px;
}

.winner-overlay-eyebrow {
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 4px;
  color: #d2b84b;
}

.winner-overlay-position {
  font-size: 150px;
  font-weight: bold;
  line-height: 1;
  margin: 20px 0;
}

.winner-overlay-song {
  font-size: 45px;
  font-weight: bold;
}

.winner-overlay-artist {
  font-size: 26px;
  color: #bbb;
  margin-top: 8px;
}

.winner-selected {
  color: #aaa;
  margin-top: 35px;
}

.winner-overlay-person {
  font-size: 42px;
  font-weight: bold;
  margin-top: 5px;
}

.winner-continue {
  margin-top: 40px;
}

.winner-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: transparent;
  color: #fff;
  font-size: 42px;
}

/* MOBILE */

@media (max-width: 700px) {

  .container {
    padding: 24px 16px;
  }

  h1 {
    font-size: 36px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .event-header,
  .live-title,
  .spotify-import-heading,
  .playlist-preview-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .standard-form,
  .song-entry-form {
    display: flex;
    flex-direction: column;
  }

  .participant {
    align-items: flex-start;
  }

  .playlist-track-row {
    grid-template-columns:
      28px 1fr auto;
  }

  .playlist-track-number {
    display: none;
  }

  .spotify-track-link {
    font-size: 12px;
  }

  .playlist-import-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .playlist-import-footer button {
    width: 100%;
  }

  .remaining-number {
    font-size: 86px;
  }

  .winner-overlay-position {
    font-size: 100px;
  }

  .winner-overlay-song {
    font-size: 32px;
  }

  .winner-overlay-person {
    font-size: 32px;
  }

  .final-winner-card h2 {
    font-size: 36px;
  }

  .final-winner-song {
    font-size: 29px;
  }
}
