/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import url("https://fonts.googleapis.com/css2?family=Questrial&display=swap");

:root {
  color-scheme: light;
  font-family: "Questrial", "Georgia", "Times New Roman", serif;
  color: #000000;
  background-color: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  line-height: 1.5;
}

.page {
  padding: 24px;
  min-height: calc(100vh - 72px);
}

.notice,
.alert {
  margin: 0;
  padding: 12px 24px;
  background: #ffffff;
  color: #000000;
  border-bottom: 1px solid #000000;
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 30;
}

.modal.hidden {
  display: none;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: 100%;
  padding: 24px;
  border: 2px solid #000000;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.modal__title {
  margin: 0 0 8px;
  font-size: 20px;
}

.modal__message {
  margin: 0 0 20px;
  color: #3f3f3f;
}

.modal__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal__dialog .rating {
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #000000;
  padding: 10px 18px;
  background: #000000;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 2px;
}

.button--ghost {
  background: #ffffff;
  color: #000000;
}

.button--muted {
  background: #2f2f2f;
  border-color: #2f2f2f;
  color: #ffffff;
  flex-direction: column;
  gap: 4px;
  line-height: 1.1;
  pointer-events: none;
}

.upload__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #000000;
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar__logo {
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.navbar__primary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar__menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 260px;
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 80px 24px 24px;
  background: #ffffff;
  border-left: 2px solid #000000;
  box-shadow: -12px 0 24px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.navbar__menu.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.navbar__link {
  text-decoration: none;
  color: #000000;
  font-size: 15px;
}

.navbar__menu .navbar__link,
.navbar__menu .navbar__action {
  font-size: 16px;
  padding: 6px 0;
}

.navbar__action {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: #000000;
}

.navbar__divider {
  width: 100%;
  border-top: 1px solid #000000;
  margin: 4px 0;
}

.navbar__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9;
}

.navbar__overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.navbar__button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.navbar__toggle {
  display: inline-flex;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.navbar__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background-color: #000000;
}

.guest {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 24px;
}

.guest__card {
  border: 2px solid #000000;
  padding: 40px;
  text-align: center;
  max-width: 520px;
  width: 100%;
}

.guest__actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.guest__form {
  margin-top: 24px;
  display: grid;
  gap: 12px;
  text-align: left;
}

.guest__song {
  margin: 24px auto 0;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.guest__artwork {
  width: 220px;
  height: 220px;
  border: 2px solid #000000;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guest__artwork img,
.guest__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  transition: filter 0.5s ease;
}

.guest__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  color: #000000;
  font-size: 18px;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.guest__artwork:hover .guest__overlay {
  opacity: 1;
}

.guest__artwork:hover img {
  filter: blur(2px);
}

.guest__meta {
  text-align: center;
}

.guest__note {
  margin: 8px 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3f3f3f;
}

.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 24px;
}

.auth__card {
  border: 2px solid #000000;
  padding: 40px;
  text-align: center;
  max-width: 520px;
  width: 100%;
  position: relative;
}

.auth__field {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  text-align: left;
}

.auth__card h1,
.upload__card h1 {
  margin: 0 0 12px;
}

.auth__error,
.auth__errors {
  margin: 8px 0 14px;
  padding: 10px 12px;
  border: 1px solid #b00020;
  border-radius: 12px;
  color: #b00020;
  background: #fff5f6;
  text-align: left;
  list-style: none;
}

.auth__errors li + li {
  margin-top: 6px;
}

.field-error {
  color: #b00020;
  font-size: 14px;
}

.settings__danger {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #000000;
  text-align: left;
}

.auth__logo {
  position: absolute;
  top: 24px;
  left: 24px;
  text-decoration: none;
  color: #000000;
  font-weight: 600;
}

.auth__back {
  position: absolute;
  top: 16px;
  left: 16px;
  text-decoration: none;
  color: #000000;
  font-size: 14px;
}

.auth input {
  padding: 10px 12px;
  border: 1px solid #000000;
  font-size: 16px;
}

.listen {
  display: grid;
  gap: 24px;
}

.listen__artwork {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  border: 2px solid #000000;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.listen__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.5s ease;
  position: relative;
  z-index: 0;
}

.listen__artwork-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: 1;
}

.listen__artwork.is-playing .listen__image {
  filter: blur(6px);
}

.listen__artwork.is-playing .listen__artwork-overlay,
.listen__artwork-overlay.is-playing {
  opacity: 1;
}

.listen__artwork.is-playing .listen__artwork-overlay {
  opacity: 0;
}

.listen__artwork:hover .listen__image {
  filter: blur(6px);
}

.listen__artwork:hover .listen__artwork-overlay {
  opacity: 1;
}

.listen__placeholder {
  padding: 48px;
  color: #000000;
}

.listen__controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.listen__volume {
  width: 160px;
}

.listen__post {
  margin-top: 16px;
}

.listen__post-actions {
  display: flex;
  gap: 12px;
}

.listen__card {
  border: 2px solid #000000;
  padding: 28px;
  display: grid;
  gap: 16px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.listen__prompt {
  display: grid;
  gap: 12px;
}

.rating {
  border: none;
  padding: 0;
  margin: 0 0 20px;
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 8px;
}

.rating input {
  display: none;
}

.rating label {
  cursor: pointer;
  font-size: 20px;
  color: #ffffff;
  text-shadow: 1px 0 0 #000000, -1px 0 0 #000000, 0 1px 0 #000000, 0 -1px 0 #000000;
  -webkit-text-stroke: 1px #000000;
}

.rating input:checked ~ label,
.rating label:hover,
.rating label:hover ~ label {
  color: #000000;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.listen__rating form {
  display: grid;
  gap: 12px;
}

.library__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.library__sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.library__sort-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #3f3f3f;
}

.library__sort-select {
  border: 2px solid #000000;
  border-radius: 999px;
  padding: 8px 36px 8px 12px;
  background: #ffffff;
  font: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1L6 6L11 1' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.library {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.library__item {
  display: grid;
  grid-template-columns: 96px 1fr 200px auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 14px;
  position: relative;
}

.library__info {
  display: grid;
  gap: 6px;
}

.library__title {
  font-size: 18px;
  font-weight: 600;
}

.library__artist {
  font-size: 14px;
  color: #3f3f3f;
}

.library__meta,
.library__rating {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #3f3f3f;
}

.library__metric {
  font-weight: 600;
  color: #1a1a1a;
}

.library__label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  margin-right: 4px;
  color: #000000;
  -webkit-text-stroke: 0.3px currentColor;
}

.library__stats {
  display: grid;
  gap: 6px;
  justify-self: end;
  text-align: right;
}

.library__stat {
  display: grid;
  gap: 2px;
}

.library__value {
  font-weight: 700;
  font-size: 14px;
  color: #000000;
}

.library__artwork {
  width: 96px;
  height: 96px;
  border: 1px solid #000000;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.library__artwork img,
.library__placeholder {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #000000;
  transition: filter 0.5s ease;
}

.library__overlay,
.guest__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
  border: none;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.library__artwork:hover .library__overlay,
.guest__artwork:hover .guest__overlay {
  opacity: 1;
}

.library__overlay[data-playing="true"],
.guest__overlay[data-playing="true"] {
  opacity: 1;
}

.library__artwork:has(.library__overlay[data-playing="true"]) img,
.guest__artwork:has(.guest__overlay[data-playing="true"]) img {
  filter: blur(4px);
}

.library__artwork:hover img,
.guest__artwork:hover img {
  filter: blur(4px);
}

.overlay__icon {
  font-size: 20px;
}

.overlay__icon--pause {
  display: none;
}

.overlay__bars {
  display: none;
  gap: 4px;
  align-items: flex-end;
}

.overlay__bars span {
  width: 3px;
  height: 16px;
  background: #ffffff;
  animation: bar 0.9s infinite ease-in-out;
}

.overlay__bars span:nth-child(2) {
  height: 22px;
  animation-delay: 0.15s;
}

.overlay__bars span:nth-child(3) {
  height: 12px;
  animation-delay: 0.3s;
}

.library__overlay[data-playing="true"] .overlay__bars,
.guest__overlay[data-playing="true"] .overlay__bars {
  display: inline-flex;
}

.library__overlay[data-playing="true"] .overlay__icon--play,
.guest__overlay[data-playing="true"] .overlay__icon--play {
  display: none;
}

.library__overlay[data-playing="true"]:hover .overlay__bars,
.guest__overlay[data-playing="true"]:hover .overlay__bars {
  display: none;
}

.library__overlay[data-playing="true"]:hover .overlay__icon--pause,
.guest__overlay[data-playing="true"]:hover .overlay__icon--pause {
  display: inline-block;
}

@keyframes bar {
  0%,
  100% {
    transform: scaleY(0.5);
  }
  50% {
    transform: scaleY(1);
  }
}

.library__rating {
  margin-top: 2px;
}

.library__date {
  font-size: 12px;
  color: #4f4f4f;
}

.library__actions summary {
  list-style: none;
  cursor: pointer;
}

.library__actions summary::-webkit-details-marker {
  display: none;
}

.menu {
  display: grid;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #000000;
  background: #ffffff;
  position: absolute;
  right: 12px;
  margin-top: 6px;
  z-index: 5;
}

.menu__item {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.library__footer {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  position: sticky;
  bottom: 88px;
}

.player {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: grid;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 0;
}

.player__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player__artwork {
  width: 40px;
  height: 40px;
  border: 1px solid #000000;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player__controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.player__dock {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 2px solid #000000;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.player__volume-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.upload {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.upload__field,
.upload__art {
  display: grid;
  gap: 8px;
}

.upload__card {
  border: 2px solid #000000;
  padding: 56px;
  display: grid;
  gap: 24px;
  text-align: center;
}

.upload__artwork {
  width: 220px;
  height: 220px;
  border: 2px solid #000000;
  border-radius: 18px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.upload__artwork--filled {
  color: transparent;
}

.upload__artwork.is-dragging,
.upload__drop.is-dragging {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #000000;
}

.upload__artwork input[type="file"] {
  display: none;
}

.upload__drop {
  border: 2px dashed #000000;
  padding: 20px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 8px;
}

.upload__drop--filled {
  border-style: solid;
}

.upload__file-name {
  font-size: 13px;
  color: #3f3f3f;
}

.upload__drop input[type="file"] {
  display: none;
}

.upload__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}

.upload__submit--locked .button {
  opacity: 0.65;
  cursor: not-allowed;
}

.upload__timer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.upload__optional {
  display: grid;
  gap: 8px;
  text-align: left;
}

.player__scrub {
  width: 100%;
}

.player__volume {
  width: 140px;
  accent-color: #000000;
}

@media (max-width: 720px) {
  .navbar {
    flex-wrap: wrap;
  }

  .navbar__primary {
    display: none;
  }

  .page {
    padding: 16px;
  }

  .guest__card,
  .auth__card {
    padding: 28px 20px;
  }

  .listen__card {
    padding: 22px;
    gap: 14px;
  }

  .upload__card {
    padding: 28px 20px;
    gap: 16px;
  }

  .library__item {
    grid-template-columns: 64px 1fr auto;
    align-items: start;
  }

  .library__artwork {
    width: 64px;
    height: 64px;
  }

  .library__stats {
    justify-self: end;
    text-align: right;
    gap: 4px;
  }

  .player {
    display: none;
  }
}

@media (min-width: 721px) {
  .navbar__link--primary,
  .navbar__divider--primary {
    display: none;
  }
}
.navbar__dropdown {
  position: relative;
}

.navbar__dropdown summary {
  list-style: none;
  cursor: pointer;
}

.navbar__dropdown summary::-webkit-details-marker {
  display: none;
}
.player--locked .player__scrub {
  display: none;
}
.upload__input {
  padding: 14px 16px;
  border: 1px solid #000000;
  font-size: 18px;
  width: 100%;
}

.listen__timer {
  font-size: 13px;
  color: #000000;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.listen__countdown {
  font-size: 22px;
  letter-spacing: 0.08em;
  color: #ffffff;
  font-weight: 700;
  text-shadow: none;
}

.listen__countdown--guest {
  font-size: 12px;
  color: #000000;
  font-weight: 600;
  letter-spacing: 0.04em;
}
