/* ======================================================
   CREDITS BUTTON
====================================================== */

#credits-btn {
background: none;
  border: none;
  box-shadow: none;
  border: none;
  
  color: #ff6a7f;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.5rem;
}

#credits-btn:hover {
  color: rgba(255,255,255,0.8);
}

.credits-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
}

.map-control-tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(17, 23, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

#credits-btn:hover .map-control-tooltip,
#credits-btn:focus-visible .map-control-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-2px);
}

/* ======================================================
   CREDITS MODAL
====================================================== */

.credits-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

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

.credits-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at left center, rgba(31, 108, 213, 0.18), transparent 36%),
    radial-gradient(circle at right center, rgba(255, 89, 89, 0.10), transparent 34%),
    rgba(4, 8, 14, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.credits-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(9, 15, 27, 0.98), rgba(5, 10, 20, 0.98));
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 32px 32px 24px;
  transform: translateY(10px) scale(0.985);
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
}

.credits-modal-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;

  background:
    radial-gradient(
      circle at top left,
      rgba(150,120,255,0.18),
      transparent 40%
    ),
    radial-gradient(
      circle at top right,
      rgba(255,90,130,0.12),
      transparent 45%
    );

  pointer-events: none;
  z-index: 0;
}

.credits-modal.is-open .credits-modal-dialog {
  transform: translateY(0) scale(1);
}

.credits-modal-dialog::-webkit-scrollbar {
  width: 8px;
}

.credits-modal-dialog::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.credits-modal-dialog::-webkit-scrollbar-track {
  background: transparent;
}

.credits-modal-dialog::-webkit-scrollbar-corner {
  background: transparent;
}

.credits-modal-dialog {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

/* ======================================================
   CLOSE BUTTON
====================================================== */

.credits-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;

  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 15px;

  background: linear-gradient(
    180deg,
    rgba(26, 31, 45, 0.96),
    rgba(16, 20, 31, 0.94)
  );

  color: rgba(255, 255, 255, 0.84);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 8px 20px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.06);

  transition:
    background 0.18s ease,
    transform 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.credits-modal-close:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  transform: scale(1.04);
}

/* ======================================================
   CONTENT
====================================================== */

.credits-modal-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: rgba(255, 255, 255, 0.92);

  max-height: calc(min(88vh, 900px) - 56px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;

  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.credits-modal-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 680px;
}

.credits-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 60px;
}

.credits-heart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;
  border-radius: 999px;

  background: rgba(255,79,114,0.15);
  color: #ff6a86;

  transition: transform .2s ease, box-shadow .2s ease;
}

.credits-heart-badge:hover {
  transform: scale(1.12);
  box-shadow: 0 0 14px rgba(255,90,120,0.35);
}

.credits-community-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(130, 87, 255, 0.16);
  border: 1px solid rgba(150, 120, 255, 0.18);
  color: #d98cff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.credits-community-link:hover {
  background: rgba(130, 87, 255, 0.24);
  color: #efc8ff;
  transform: translateY(-1px);
}

.credits-community-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.credits-modal-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

#credits-modal-title {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #ffffff;
}

.credits-modal-intro {
  margin: 0;
  max-width: none;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

/* ======================================================
   FEATURED GRID
====================================================== */

.credits-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.credits-featured-card {
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.025));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.credits-featured-card {
  position: relative;
  transition: 
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}

.credits-featured-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.12);

  box-shadow:
    0 8px 28px rgba(0,0,0,0.35),
    0 0 0 1px rgba(255,255,255,0.04) inset;
}

.credits-featured-card:hover {
  box-shadow:
    0 10px 32px rgba(0,0,0,0.45),
    0 0 24px rgba(150,120,255,0.12);
}

.credits-featured-card a {
  color: #d98cff;
  text-decoration: none;
  font-weight: 600;
}

.credits-featured-card a:hover {
  text-decoration: underline;
}

.credits-featured-card h3 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}

.credits-featured-card p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.80);
}

/* ======================================================
   CONTRIBUTORS
====================================================== */

.credits-contributors {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.credits-contributors h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.credits-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.credits-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);

  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);

  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}

.credits-tag:hover {
  transform: translateY(-1px);

  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);

  box-shadow:
    0 6px 20px rgba(0,0,0,0.35),
    0 0 14px rgba(150,120,255,0.12);
}

/* ======================================================
   FOOTER
====================================================== */

.credits-modal-footer {
  margin-top: -2px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.42);
}

body.credits-modal-open {
  overflow: hidden;
}

/* ======================================================
   MOBILE
====================================================== */

@media (max-width: 760px) {
  .credits-modal {
    padding: 16px;
  }

  .credits-modal-dialog {
    padding: 24px 18px 18px;
    border-radius: 22px;
    width: 100%;
  }

  .credits-top-row {
    padding-right: 50px;
    flex-wrap: wrap;
  }

  #credits-modal-title {
    font-size: 2.35rem;
    line-height: 1;
  }

  .credits-modal-intro {
    max-width: 100%;
    font-size: 0.98rem;
  }

  .credits-featured-grid {
    grid-template-columns: 1fr;
  }

  .credits-featured-card h3 {
    font-size: 1.3rem;
  }

  .credits-contributors h3 {
    font-size: 1.7rem;
  }

  .credits-tag {
    min-height: 34px;
    font-size: 0.9rem;
  }

  .credits-top-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .credits-heart-badge {
    flex: 0 0 auto;
  }

  .credits-community-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
    font-size: 10px;
    padding: 8px 10px;
  }

  .credits-community-link span {
    min-width: 0;
    white-space: normal;
    line-height: 1.3;
  }
}