/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }

/* Font fallback optimization to reduce CLS */
@font-face {
  font-family: 'Outfit Fallback';
  src: local('Arial');
  size-adjust: 100%;
  ascent-override: 100%;
  descent-override: 20%;
  line-gap-override: 0%;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
  /* Custom scrollbar (viewport) */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
html::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
html::-webkit-scrollbar-track {
  background: transparent;
}
html::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
  background-clip: padding-box;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh; /* full viewport on mobile (ignores browser chrome) */
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: "Outfit", "Outfit Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  background: #08080a;
  color: #f4f4f5;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.06);
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #08080a;
  background: #f4f4f5;
  border-radius: 6px;
  text-decoration: none;
  z-index: 1001;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid #81a1c1;
  outline-offset: 2px;
}

/* --- Mobile: base spacing & safe area --- */
@media (max-width: 599px) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* --- Header --- */
.header {
  flex-shrink: 0;
  padding: 4rem 1.5rem 2rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}
@media (max-width: 599px) {
  .header {
    padding: 2.5rem 1rem 1.5rem;
  }
  .header__title {
    font-size: 1.5rem;
  }
  .header__tagline {
    font-size: 0.8125rem;
  }
}
.header__title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #f4f4f5;
  background: linear-gradient(135deg, #f4f4f5 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header__tagline {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  font-weight: 300;
  color: #a1a1aa; /* 4.5:1+ on #08080a */
}

/* --- Search --- */
.search-wrap {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 1.25rem;
}
.search-icon {
  position: absolute;
  left: 1.7rem;
  /* align with input center: padding-top + half line-height (0.875rem × 1.5) */
  top: calc(0.625rem + 0.875rem * 0.75);
  transform: translateY(-50%);
  color: #a1a1aa; /* 4.5:1+ contrast */
  pointer-events: none;
}
.search-icon svg {
  display: block;
}
.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.search-input {
  width: 100%;
  max-width: 320px;
  padding: 0.625rem 0.875rem 0.625rem 3.3rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  color: #f4f4f5;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.search-input::placeholder {
  color: #a1a1aa; /* 4.5:1+ contrast */
}
.search-input:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.07);
}
.search-input:focus {
  outline: none;
  border-color: rgba(129, 161, 193, 0.5);
  box-shadow: 0 0 0 3px rgba(129, 161, 193, 0.15);
}
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
@media (max-width: 599px) {
  .search-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .search-input {
    max-width: none;
    min-height: 44px;
    padding: 0.75rem 0.875rem 0.75rem 3.4rem;
    font-size: 16px; /* prevents iOS zoom on focus */
  }
  .search-icon {
    left: 1.8rem;
    /* match input center: 0.75rem padding + half line-height (16px × 1.5) */
    top: calc(0.75rem + 1rem * 0.75);
    transform: translateY(-50%);
  }
}
.search-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #a1a1aa; /* 4.5:1+ contrast */
}
.no-results {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: #a1a1aa; /* 4.5:1+ contrast */
  text-align: center;
}
.no-results[hidden] {
  display: none !important;
}

/* --- Main & grid --- */
.main {
  flex: 1;
  padding: 0 1.5rem 4rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}
@media (max-width: 599px) {
  .main {
    padding: 0 1rem 3rem;
  }
}
.sites-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  min-height: 65vh; /* increased reserve space to reduce CLS when cards render */
  contain: layout style;
}
@media (min-width: 520px) {
  .sites-grid { grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }
}
@media (min-width: 800px) {
  .sites-grid { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
}
@media (max-width: 599px) {
  .no-results {
    padding: 1.5rem 1rem;
  }
}

/* --- Cards --- */
.site-card {
  display: block;
  width: 100%;
  min-height: 88px; /* explicit minimum height to prevent layout shift */
  padding: 1.125rem 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: cardIn 0.4s ease backwards;
  animation-delay: var(--card-delay, 0ms);
  contain: layout style paint;
}
.site-card:hover,
.site-card:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  outline: none;
}
.site-card:hover {
  transform: translateY(-2px);
}
.site-card:focus-visible {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(129, 161, 193, 0.35);
  box-shadow: 0 0 0 2px rgba(129, 161, 193, 0.2);
}
@media (max-width: 599px) {
  .site-card {
    min-height: 80px; /* explicit minimum height for mobile */
    padding: 1rem 1rem;
  }
  .site-card__name {
    font-size: 0.9375rem;
  }
}
.site-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.site-card__name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #e4e4e7;
  min-width: 0;
}
.site-card__badge {
  flex-shrink: 0;
  margin-top: 0.1em;
  padding: 0.12em 0.35em;
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(228, 228, 231, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  line-height: 1.2;
}
.site-card__url {
  display: block;
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  font-weight: 300;
  color: #a1a1aa; /* 4.5:1+ on card background */
}
.site-card__desc {
  display: block;
  margin: 0.4rem 0 0;
  font-size: 0.8125rem;
  font-weight: 300;
  color: #a1a1aa; /* 4.5:1+ on card background */
  line-height: 1.4;
}
@media (prefers-reduced-motion: reduce) {
  .site-card {
    animation: none;
  }
  .site-card:hover {
    transform: none;
  }
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Footer --- */
.footer {
  flex-shrink: 0;
  padding: 2.5rem 1.5rem 3rem;
  padding-bottom: calc(3rem + env(safe-area-inset-bottom));
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  min-height: 9rem; /* increased stable height to reduce CLS on mobile */
  contain: layout style;
}
@media (max-width: 599px) {
  .footer {
    padding: 2rem 1rem;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    gap: 1rem;
    min-height: 8rem; /* increased for mobile to prevent layout shift */
  }
}
.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.25rem;
  justify-content: center;
  color: #a1a1aa; /* 4.5:1+ contrast */
  text-decoration: none;
  transition: color 0.15s ease;
  will-change: color; /* optimize for hover transitions */
}
.footer__link:hover {
  color: #a1a1aa;
}
.footer__link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.2);
  outline-offset: 3px;
}
.footer__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
.footer__discord-handle {
  font-size: 0.8125rem;
  font-weight: 400;
}

.footer__email-btn {
  position: relative;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.footer__email-toast {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: #f4f4f5;
  background: rgba(30, 30, 34, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.footer__email-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Modal --- */
.modal {
  position: fixed;
  inset: 0;
  inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.modal[hidden] {
  display: none !important;
}
.modal.modal--open {
  opacity: 1;
  visibility: visible;
}
.modal.modal--open[hidden] {
  display: flex !important;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  background: #0c0c0e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  transform: scale(0.98);
  transition: transform 0.2s ease;
}
@media (max-width: 599px) {
  .modal {
    padding: 0;
    align-items: stretch;
  }
  .modal__panel {
    max-height: none;
    height: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .modal.modal--open .modal__panel {
    transform: none;
  }
}
@media (min-width: 600px) {
  .modal.modal--open .modal__panel {
    transform: scale(1);
  }
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
@media (max-width: 599px) {
  .modal__header {
    padding: 1rem;
    flex-wrap: wrap;
  }
  .modal__title {
    order: 3;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
  }
  .modal__actions {
    flex: 1;
    justify-content: flex-end;
    gap: 0.35rem;
  }
  .modal__btn {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
  }
  .modal__close {
    min-width: 44px;
    min-height: 44px;
  }
}
.modal__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: #a1a1aa;
}
.modal__title-host {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal__client-badge {
  flex-shrink: 0;
  padding: 0.1em 0.35em;
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(161, 161, 170, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  line-height: 1.2;
}
.modal__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.modal__btn {
  padding: 0.4rem 0.65rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.modal__btn:hover {
  color: #f4f4f5;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
.modal__btn:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.2);
  outline-offset: 2px;
}
.modal__btn--copy.modal__btn--copied {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.3);
}
.modal__open-link {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #81a1c1;
  text-decoration: none;
}
.modal__open-link:hover {
  color: #94b8d9;
}
.modal__loading {
  position: absolute;
  inset: 0 1.125rem 1.125rem 1.125rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #08080a;
  border-radius: 6px;
  z-index: 1;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.modal__loading[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.modal__spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top-color: #81a1c1;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.modal__loading-text {
  font-size: 0.8125rem;
  font-weight: 300;
  color: #a1a1aa;
}
@media (prefers-reduced-motion: reduce) {
  .modal__spinner {
    animation: none;
    border-top-color: #81a1c1;
  }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.modal__close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #a1a1aa;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.modal__close:hover {
  color: #f4f4f5;
  background: rgba(255, 255, 255, 0.06);
}
.modal__close:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.15);
  outline-offset: 2px;
}

.modal__frame-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 0 1.125rem 1.125rem;
}
.modal__frame {
  width: 100%;
  height: 60vh;
  min-height: 300px;
  border: none;
  border-radius: 6px;
  background: #08080a;
}
@media (max-width: 599px) {
  .modal__frame-wrap {
    padding: 0 0.75rem 0.75rem;
  }
  .modal__frame {
    height: 65vh;
    min-height: 240px;
    border-radius: 6px;
  }
  .modal__loading {
    inset: 0 0.75rem 0.75rem 0.75rem;
  }
}
.modal__frame.modal__frame--loaded {
  opacity: 1;
}
.modal__frame:not(.modal__frame--loaded) {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* --- Discord Profile Popup (1:1) --- */
.dc {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.dc[hidden] { display: none !important; }
.dc.dc--open { opacity: 1; visibility: visible; }
.dc.dc--open[hidden] { display: flex !important; }

.dc__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.dc__popup {
  position: relative;
  width: 340px;
  background: #232428;
  border-radius: 8px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.dc--open .dc__popup { transform: scale(1); }

.dc__banner {
  height: 60px;
  background: linear-gradient(135deg, #5865f2, #4752c4 50%, #3c45a5);
}

.dc__head {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 0 16px;
  margin-top: -38px;
  position: relative;
  z-index: 2;
  min-height: 80px;
}

.dc__avatar-ring {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 7px solid #232428;
  background: #232428;
  flex-shrink: 0;
}
.dc__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.dc__dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid #232428;
  background: #80848e;
}

/* Status bubble (like Discord) */
.dc__bubble {
  position: relative;
  background: #111214;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 12px;
  max-width: 180px;
}
.dc__bubble[hidden] { display: none; }
.dc__bubble-arrow {
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid #111214;
}
.dc__bubble-text {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #dbdee1;
  line-height: 1.3;
  word-break: break-word;
}
.dc__bubble-emoji {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}
.dc__bubble-emoji-text {
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* Inner info card */
.dc__info {
  background: #111214;
  border-radius: 8px;
  margin: 8px 16px 16px;
  padding: 12px;
}

.dc__name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f2f3f5;
  line-height: 1.3;
}

.dc__userline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2px;
  font-size: 0.8125rem;
  color: #b5bac1;
  line-height: 1.4;
}
.dc__uname { font-weight: 400; }
.dc__dot-sep {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b5bac1;
  margin: 0 6px;
  flex-shrink: 0;
  vertical-align: middle;
}
.dc__pronouns { font-weight: 400; }
.dc__clan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 1px 6px 1px 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #dbdee1;
}
.dc__clan-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}
.dc__clan-tag {
  letter-spacing: 0.01em;
}

.dc__badges {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  vertical-align: middle;
}
.dc__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.dc__badge svg {
  display: block;
}

.dc__sep {
  height: 1px;
  background: #3f4147;
  margin: 12px 0;
}

.dc__sec { margin-bottom: 0; }
.dc__sec[hidden] { display: none !important; }

.dc__label {
  margin: 0 0 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #b5bac1;
}

.dc__about {
  font-size: 0.8125rem;
  color: #dbdee1;
  line-height: 1.5;
  word-break: break-word;
}
.dc__link {
  color: #00a8fc;
  text-decoration: none;
}
.dc__link:hover {
  text-decoration: underline;
}

.dc__since {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: #dbdee1;
}
.dc__discord-icon {
  flex-shrink: 0;
}

/* Activity & Spotify rows */
.dc__act-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dc__act-img {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.dc__act-img--round { border-radius: 6px; }
.dc__act-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.dc__act-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #f2f3f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc__act-detail {
  font-size: 0.75rem;
  color: #b5bac1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc__act-time {
  font-size: 0.6875rem;
  color: #949ba4;
  margin-top: 2px;
}

/* Spotify progress bar */
.dc__sp-bar {
  width: 100%;
  height: 4px;
  background: #4e5058;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.dc__sp-fill {
  height: 100%;
  background: #1db954;
  border-radius: 2px;
}
.dc__sp-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: #949ba4;
  margin-top: 4px;
}

/* Error */
.dc__error {
  color: #f23f43;
  font-size: 0.8125rem;
}

/* Loading overlay */
.dc__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #232428;
  z-index: 10;
  border-radius: 8px;
}
.dc__loading[hidden] { display: none; }
.dc__spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #3f4147;
  border-top-color: #5865f2;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Footer discord button */
.footer__discord-btn {
  position: relative;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

/* Mobile */
@media (max-width: 599px) {
  .dc { padding: 0.5rem; }
  .dc__popup { width: 100%; max-width: 340px; }
}

/* --- Page loader (opacity-only transition = composited, avoids CLS) --- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #08080a;
  transition: opacity 0.3s ease;
  will-change: opacity;
  contain: strict;
}
.page-loader.page-loader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.loader {
  position: relative;
  width: 60px;
  height: 60px;
}
@keyframes loader_5191 {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.square {
  background: #d4d4d8;
  width: 10px;
  height: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -5px;
  margin-left: -5px;
}
#sq1 {
  margin-top: -25px;
  margin-left: -25px;
  animation: loader_5191 675ms ease-in-out 0s infinite alternate;
}
#sq2 {
  margin-top: -25px;
  animation: loader_5191 675ms ease-in-out 75ms infinite alternate;
}
#sq3 {
  margin-top: -25px;
  margin-left: 15px;
  animation: loader_5191 675ms ease-in-out 150ms infinite;
}
#sq4 {
  margin-left: -25px;
  animation: loader_5191 675ms ease-in-out 225ms infinite;
}
#sq5 {
  animation: loader_5191 675ms ease-in-out 300ms infinite;
}
#sq6 {
  margin-left: 15px;
  animation: loader_5191 675ms ease-in-out 375ms infinite;
}
#sq7 {
  margin-top: 15px;
  margin-left: -25px;
  animation: loader_5191 675ms ease-in-out 450ms infinite;
}
#sq8 {
  margin-top: 15px;
  animation: loader_5191 675ms ease-in-out 525ms infinite;
}
#sq9 {
  margin-top: 15px;
  margin-left: 15px;
  animation: loader_5191 675ms ease-in-out 600ms infinite;
}
