body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--duck-blue);
  color: var(--duck-charcoal);
}

.trophy-header {
  width: min(100%, 81rem);
  margin: 2.5rem auto 1.8rem;
  padding: 2.4rem 2.6rem;
  text-align: center;
  box-sizing: border-box;
  background: var(--duck-white);
  border-radius: 2.7rem;
  border: 0.15rem solid rgba(var(--duck-white-rgb), 0.55);
  outline: 0.15rem solid rgba(var(--duck-charcoal-rgb), 0.07);
  outline-offset: -0.8rem;
  box-shadow:
    0 0.8rem 1.8rem rgba(var(--duck-charcoal-rgb), 0.18),
    0 0.25rem 0.6rem rgba(var(--duck-charcoal-rgb), 0.12);
}

.trophy-title {
  margin: 0;
  font-family: var(--title-font);
  font-size: 4.4rem;
  font-weight: 700;
  color: var(--duck-charcoal);
}

.trophy-subtitle {
  margin: 1rem 0 0;
  font-family: var(--title-font);
  font-size: 2rem;
  color: var(--duck-charcoal);
}

.trophy-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.trophy-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.trophy-filter {
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-main);
  font-size: 1.5rem;
  cursor: pointer;
  background: var(--duck-white);
  color: var(--duck-charcoal);
  box-shadow: 0 0.15rem 0.4rem rgba(0, 0, 0, 0.08);
}

.trophy-filter.is-active {
  background: var(--duck-pink);
  color: var(--duck-white);
}

.trophy-grid-wrapper {
  display: flex;
  justify-content: center;
}

.trophy-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1rem;
  width: 80%;
  max-width: none;
}


.trophy-card {
  background: var(--duck-white);
  border-radius: 1.8rem;
  box-shadow:
    0 0.25rem 0.5rem rgba(44, 62, 80, 0.06),
    0 0.05rem 0.15rem rgba(44, 62, 80, 0.12);
  padding: 0.6rem 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.trophy-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0.4rem 0.7rem rgba(44, 62, 80, 0.12),
    0 0.1rem 0.25rem rgba(44, 62, 80, 0.16);
}

.trophy-card:focus-visible {
  outline: 0.25rem solid var(--duck-charcoal);
  outline-offset: 0.15rem;
}

/* ============================================================ */
/* ASSET FADE IN */
/* ============================================================ */

.trophy-card-image-wrap {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1 / 1;
  border-radius: 0.9rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.16) 34%, transparent 36%),
    linear-gradient(145deg, var(--duck-white) 0%, var(--duck-disabled) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  box-shadow:
    0 0.2rem 0.35rem rgba(44, 62, 80, 0.1),
    0 0.15rem 0.4rem rgba(44, 62, 80, 0.12);
}

.trophy-card-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 58%),
    radial-gradient(circle at 65% 75%, rgba(255, 255, 255, 0.24), transparent 42%);
  opacity: 1;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.trophy-card-image-wrap.is-ready::after {
  opacity: 0;
}

.trophy-card-img-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 220ms ease, transform 220ms ease;
}

.trophy-card-image-wrap.is-ready .trophy-card-img-el {
  opacity: 1;
  transform: scale(1);
}


.trophy-card-placeholder {
  font-size: 1.8rem;
  color: var(--duck-white);
}

.trophy-card-title {
  margin: 0;
  font-size: 1.2rem;
  text-align: center;
}

.trophy-card-meta {
  margin: 0;
  font-size: 1.2rem;
  color: var(--duck-gray);
  display: none;
}

.trophy-card-status {
  margin: 0.2rem 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.trophy-card-status.locked {
  color: var(--duck-gray);
}

.trophy-card-status.unlocked {
  color: var(--correct-green);
}


.trophy-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100100;
}

.trophy-modal.hidden {
  display: none;
}

.trophy-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 62, 80, 0.6);
}

.trophy-modal-dialog {
  position: relative;
  z-index: 1;
  background: var(--duck-white);
  border-radius: 1.5rem;
  box-shadow:
    0 0.5rem 1.4rem rgba(44, 62, 80, 0.32),
    0 0.2rem 0.5rem rgba(44, 62, 80, 0.18);
  width: min(480px, 90vw);
  max-height: 90vh;
  padding: 1.25rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  gap: 1rem;
  overflow-y: auto;
}

.trophy-modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  width: auto;
  height: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  color: var(--duck-charcoal);
  transition: transform 120ms ease;
}

.trophy-modal-close:hover,
.trophy-modal-close:focus-visible {
  background: transparent;
  transform: scale(1.04);
}

.trophy-modal-image-wrap {
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--duck-white);
}

.trophy-modal-image-wrap::after {
  display: none;
}

.trophy-modal-image-wrap.is-ready::after {
  opacity: 0;
}

.trophy-modal-image {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  border-radius: 1rem;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 220ms ease, transform 220ms ease;
}

.trophy-modal-image-wrap.is-ready .trophy-modal-image {
  opacity: 1;
  transform: scale(1);
}


.trophy-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.trophy-detail-title {
  margin: 0 0 0.1rem;
  font-size: 2rem;
}

.trophy-detail-meta {
  margin: 0;
  font-size: 1.5rem;
  color: var(--duck-gray);
  display: none;
}

.trophy-detail-status {
  margin: 0.1rem 0 0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  /* padding: 0.25rem 0.8rem; */
  border-radius: 999px;
  font-size: 1.5rem;
  font-weight: 500;
  border: none;
  align-self: flex-start;
  width: 15rem;
  height: 4rem;
}

.trophy-detail-status.locked {
  color: var(--duck-charcoal);
  background: var(--duck-disabled);
}

.trophy-detail-status.unlocked {
  color: var(--duck-white);
  background: var(--correct-green);
}

.trophy-detail-listen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.6rem;
  /* padding: 0.5rem 0.95rem; */
  border: none;
  border-radius: 999px;
  background: var(--duck-charcoal);
  color: var(--duck-white);
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
  transition: transform 120ms ease, background 120ms ease;
  width: 15rem;
  height: 4rem;
}

.trophy-detail-listen[hidden] {
  display: none;
}

.trophy-detail-listen:hover,
.trophy-detail-listen:focus-visible {
  background: var(--duck-pink);
  transform: scale(1.03);
}

.trophy-detail-listen i {
  font-size: 1rem;
}

.trophy-detail-fact,
.trophy-detail-description {
  width: auto;
  box-sizing: border-box;
  border-radius: 0;
  padding: 0;
}

.trophy-detail-fact {
  margin: 1rem 0 0;
  font-size: 1.5rem;
  line-height: 1.45;
}

.trophy-detail-fact:empty {
  display: none;
}

.trophy-detail-description {
  margin-top: 1rem;
  font-size: 1.5rem;
  line-height: 1.4;
  white-space: pre-line;
}

.trophy-detail-description-label {
  font-weight: 800;
}

@media (max-width: 640px) {
  .trophy-header {
    margin: 1.5rem auto 1.2rem;
    padding: 2rem 1.6rem;
    outline-offset: -0.5rem;
  }

  .trophy-modal-dialog {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .trophy-modal-image-wrap {
    max-height: 220px;
  }

  .trophy-modal-image {
    max-height: 220px;
  }

  .trophy-detail-title {
    font-size: 2rem;
  }
}

@media (max-width: 900px) {
  .trophy-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 700px) {
  .trophy-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 500px) {
  .trophy-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 1.2rem;
  }

  .trophy-card-image-wrap {
    max-width: 140px;
  }

  .trophy-card-title {
    font-size: 1.3rem;
  }
}
