@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap");

* {
  box-sizing: border-box;
}

body {
  font-family: Inter, sans-serif;
  background-color: #fffdf8;
  padding: 0;
  margin: 0;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: var(--white);
  border-bottom: 3px solid black;
  padding-left: calc((100% - 1000px) / 2);
  padding-right: calc((100% - 1000px) / 2);
}

#logo {
  max-width: 240px;
}

#logo img {
  width: 100%;
  height: auto;
}

.wordmark {
  display: block;
  max-width: 250px;
  width: 50%;
  margin-bottom: 20px;
}

.subheading {
  font-size: 18px;
  margin-bottom: 20px;
  text-wrap: balance;
}

/* MARQUEE */

#marquee-strip {
  border-bottom: 3px solid black;
  font-weight: 100;
  padding: 4px;
  background-color: #e0ca4b;
  color: black;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
}

.marquee-content {
  display: inline-block;
  font-size: 1rem;
  text-transform: uppercase;
  will-change: transform;
  padding-right: 20px;
  animation: scroll 50s linear infinite;
}

#marquee-strip:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* COUNTDOWN */

.countdown-container {
  background-color: black;
  color: white;
  text-align: center;
  padding: 20px;
  font-weight: 900;
  font-size: 1rem;
}

.countdown-timer {
  font-weight: 500;
  font-size: 2em;
}

/* PAGE GRID */

.content-rails {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1000px) 1fr;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.content-rails::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  border-left: 3px solid black;
  border-right: 3px solid black;
  pointer-events: none;
  z-index: 99;
}

.content-rails > section {
  grid-column: 2;
  padding: 40px;
  border-bottom: 3px solid black;
  box-sizing: border-box;
}

#logo {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
}

#menu,
#social {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

#menu {
  margin-left: auto;
}

#menu li a {
  text-decoration: none;
  color: black;
  font-weight: 700;
  text-transform: uppercase;
}

#social {
  margin-left: 40px;
}

#social svg {
  width: 24px;
  height: 24px;
  fill: black;
  transition:
    transform 0.2s ease,
    fill 0.2s ease;
}

#social a:hover svg {
  fill: #555;
  transform: scale(1.1);
}

button {
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
  color: white;
  background-color: #2885ea;
  border: none;
  border-radius: 10px;
  padding: 20px;
  font-size: 16px;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.1s;
  outline: none;
}

button:active,
button:focus-visible {
  background-color: #e0ca4b;
  transform: translate(-2px, -2px);
}

button:hover {
  transform: translate(-2px, -2px);
}

button:disabled {
  opacity: 0.7;
  background-color: #ccc;
  cursor: default;
}
button:disabled:hover {
  transform: none;
}

/* FORM */

.hp-wrapper {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 25px;
  width: 350px;
}

.form-field label {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.form-field input {
  width: 100%;
  height: 45px;
  border: 3px solid black;
  padding: 10px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  outline: none;
  background: white;
  box-sizing: border-box;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
  transition:
    transform 0.1s,
    box-shadow 0.1s;
}

.form-field input:focus {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #e0ca4b;
  background-color: #fafafa;
}

.opt-in-wrapper {
  margin: 25px 0;
}

#optin {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.opt-in-wrapper label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 14px;
  user-select: none;
}

.checkbox-box {
  height: 32px;
  width: 32px;
  background-color: #fff;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  margin-right: 15px;
  position: relative;
  flex-shrink: 0;
  transition: background-color 0.1s;
}

/* the checkmark */
.checkbox-box::after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 5px;
  width: 16px;
  height: 16px;
  background: #000;
}

#optin:checked + label .checkbox-box::after {
  display: block;
}

#optin:focus-visible + label .checkbox-box {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #e0ca4b;
  background-color: #fafafa;
}

.checkbox-text {
  letter-spacing: 0.02em;
}

/* TRACK LISTS */

.lists-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.lists-container button {
  width: 48px;
  height: 48px;
}

.column {
  flex: 1;
  width: 100%;
}

#pool {
  border: 2px solid #000;
  padding: 10px;
  background: #f9f9f9;
}

.player-embed {
  margin-bottom: 20px;
}

#selected {
  padding: 10px;
  border: 3px dashed #000;
  margin-bottom: 10px;
}

ul.list-group {
  min-height: 100px;
  width: 100%;
  list-style: none;
  padding: 0;
}

ul.list-group li {
  margin: 4px 0;
  padding: 5px;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: grab;
  border: 2px solid black;
}

ul.list-group li:active {
  cursor: grabbing;
}

@media (max-width: 768px) {
  .lists-container {
    flex-direction: column-reverse;
    gap: 30px;
  }

  #pool {
    /* max-height: 350px; */
    overflow-y: auto;
    border: 2px solid #000;
    padding: 10px;
    background: #f9f9f9;
    -webkit-overflow-scrolling: touch;
  }

  #selected {
    min-height: 100px;
    padding: 10px;
    border: 3px dashed #000;
    margin-bottom: 10px;
  }

  .column h4 {
    margin-top: 0;
    font-size: 1.1rem;
    text-align: center;
    background: #000;
    color: #fff;
    padding: 5px;
  }
}

/* SHARE PAGE */

.image-container {
  display: flex;
  margin-bottom: 25px;
  justify-content: space-around;
}

.image-wrapper {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.image-label {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 900;
  color: #140d0d;
}

.image-wrapper img {
  object-fit: contain;
  height: 300px;
  width: auto;
}

#share-image {
  width: 400px;
}

.nav-controls {
  margin: 25px 0;
  text-align: center;
  display: flex;
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: center;
  font-weight: 900;
}

.nav-controls button {
  padding: 5px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.actions {
  text-align: center;
}

#submit-form {
  display: flex;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

#submit-form input {
  flex-grow: 1;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 4px 0 0 4px;
  outline: none;
  font-size: 16px;
  height: 45px;
  box-sizing: border-box;
}

#submit-form button {
  height: 45px;
  padding: 0 20px;
  border: 1px solid #ccc;
  border-radius: 0 4px 4px 0;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}

#submit-form button:hover {
  transform: none;
}

#submit-form-error {
  margin-top: 10px;
  text-align: center;
}

.fine-print {
  font-size: 0.8rem;
}

.creator-thanks {
  display: none;
  text-align: center;
}

.embedded-player {
  margin-top: 25px;
}

/* FOOTER */

.site-footer {
  grid-column: 2;
  padding: 20px;
  background-color: #2885ea;
  color: white;
  text-align: center;
  border-bottom: 3px solid black;
  line-height: 0.9;
}

.back-to-top {
  display: block;
  font-weight: 900;
  font-size: 2.5rem;
  color: white;
  text-decoration: none;
  text-transform: lowercase;
  margin-bottom: 40px;
  letter-spacing: -1px;
}

.back-to-top:hover {
  opacity: 0.8;
}

.footer-legal p {
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: white;
}

.legal-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.legal-links li {
  font-size: 0.7rem;
  font-weight: 700;
}

.legal-links li:not(:last-child)::after {
  content: "|";
  margin-left: 0;
  opacity: 0.5;
}

.legal-links a {
  color: white;
  text-decoration: none;
}

.legal-links a:hover {
  text-decoration: none;
}

/* LEADERBOARD */

.leaderboard-item {
  margin-bottom: 15px;
  width: 100%;
}

.label-row {
  margin-bottom: 5px;
  font-weight: bold;
  font-size: 0.9rem;
}

.bar-container {
  width: 100%;
  background-color: #f0f0f0;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background-color: #e0ca4b;
  transition: width 1s ease-in-out;
  border-radius: 6px 0 0 6px;
}

/* MOBILE */

@media (max-width: 1000px) {
  header {
    padding-left: 20px;
    padding-right: 20px;
  }

  #logo {
    max-width: 25vw;
  }

  #menu {
    gap: 15px;
    font-size: 13px;
  }

  #social {
    display: none;
  }

  .countdown-container {
    font-size: 0.8rem;
    padding: 14px;
  }

  .content-rails {
    grid-template-columns: 0 1fr 0;
    border-left: 3px solid black;
    border-right: 3px solid black;
  }

  .content-rails::after {
    display: none;
  }

  .content-rails > section {
    padding: 40px 20px;
  }

  .image-container {
    flex-direction: column;
    gap: 30px;
  }

  .image-container img {
    height: auto;
    width: 100%;
  }

  #submit-form {
    flex-direction: column;
    gap: 10px;
  }

  #submit-form input {
    border-right: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
  }

  #submit-form button {
    border-radius: 4px;
    width: 100%;
  }
}
