/* /discord/ page. Everything is prefixed with dc- so it can't clash with pukestyle.css. */

.dc-page {
  --dc-card: rgba(18, 20, 28, 0.86);
  --dc-card-edge: rgba(255, 255, 255, 0.08);
  --dc-text: #f2f3f5;
  --dc-muted: #a3a9b5;
  --dc-blurple: #5865f2;
  --dc-blurple-hover: #4752c4;
  --dc-orange: #ff6600;
  --dc-online: #23a55a;

  box-sizing: border-box;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--dc-text);
  text-align: left;
}
.dc-page *, .dc-page *::before, .dc-page *::after { box-sizing: border-box; }

/* Header */
.dc-hero {
  text-align: center;
  margin: 6px auto 30px;
  max-width: 640px;
}
.dc-hero-logo {
  width: 54px;
  height: 41px;
  color: var(--dc-blurple);
  filter: drop-shadow(0 4px 14px rgba(88, 101, 242, 0.55));
}
.dc-hero h1 {
  margin: 10px 0 6px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 3px 2px 3px #333;
}
.dc-hero p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--dc-muted);
}
.dc-hero strong { color: #fff; }

/* Grid of cards */
.dc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.dc-card {
  display: flex;
  flex-direction: column;
  background: var(--dc-card);
  border: 1px solid var(--dc-card-edge);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.dc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 102, 0, 0.55);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

/* Cover image (invite splash / banner, or a blurred icon) */
.dc-cover {
  position: relative;
  height: 120px;
  overflow: hidden;
  background: linear-gradient(135deg, #3b2a6b, #5865f2 55%, #ff6600);
}
.dc-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dc-cover--blur img {
  transform: scale(1.6);
  filter: blur(22px) saturate(1.4) brightness(0.8);
}
.dc-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(18, 20, 28, 0.7));
}

.dc-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 20px 20px;
}

.dc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  margin-top: -43px;
  margin-bottom: 10px;
  border-radius: 24px;
  border: 5px solid #12141c;
  background: #2b2d31;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.dc-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-icon span { font-size: 26px; font-weight: 700; color: #fff; }

.dc-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}
.dc-name a:link, .dc-name a:visited { color: #fff; }
.dc-name a:hover { color: var(--dc-orange); }

.dc-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--dc-orange);
  color: #fff;
}
.dc-tag--warn { background: #da373c; }

.dc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--dc-muted);
  margin-bottom: 12px;
}
.dc-stats span { display: inline-flex; align-items: center; gap: 6px; }
.dc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #80848e;
  display: inline-block;
}
.dc-dot--online { background: var(--dc-online); box-shadow: 0 0 6px rgba(35, 165, 90, 0.8); }

.dc-desc {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: #dbdee1;
  flex: 1;
}
.dc-desc code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Buttons */
.dc-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
.dc-join:link, .dc-join:visited {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--dc-blurple);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: background-color 0.15s ease;
}
.dc-join:hover { background: var(--dc-blurple-hover); color: #fff; }

.dc-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 55%;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--dc-muted);
  font: 600 12px "Segoe UI", Tahoma, sans-serif;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.dc-copy svg { width: 15px; height: 15px; flex: none; }
.dc-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-copy:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.dc-copy.is-copied { color: #fff; border-color: var(--dc-online); background: rgba(35, 165, 90, 0.2); }

/* Crew-only card for invites that stopped working */
.dc-card--broken {
  background: rgba(60, 12, 14, 0.85);
  border: 1px dashed #da373c;
}
.dc-card--broken .dc-body { padding-top: 20px; }
.dc-card--broken .dc-desc { color: #f0c4c5; }

/* ---- Crew (rank 2+) controls ---- */

.dc-card { position: relative; }

.dc-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font: 700 22px/32px Arial, sans-serif;
  text-align: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.dc-remove:hover, .dc-remove:focus-visible { background: #da373c; transform: scale(1.1); }

/* Drag handle (top left) */
.dc-handle {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: grab;
  touch-action: none; /* let a finger drag the card instead of scrolling the page */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: background-color 0.15s ease;
}
.dc-handle svg { width: 20px; height: 20px; display: block; }
.dc-handle:hover, .dc-handle:focus-visible { background: var(--dc-orange); }
.dc-handle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* The card's spot in the grid while it is being dragged */
.dc-card.is-dragging {
  opacity: 0.25;
  border: 2px dashed var(--dc-orange);
  box-shadow: none;
  transform: none;
}
/* The copy that follows the pointer */
.dc-ghost {
  position: fixed;
  z-index: 1000;
  margin: 0;
  pointer-events: none;
  transform: rotate(2deg) scale(1.03);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.75);
  border-color: var(--dc-orange);
  opacity: 0.95;
}
.dc-ghost .dc-handle { background: var(--dc-orange); cursor: grabbing; }
body.dc-sorting, body.dc-sorting * { cursor: grabbing !important; user-select: none; }
body.dc-sorting .dc-card:hover { transform: none; }

#dc-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1001;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: 8px;
  background: #23a55a;
  color: #fff;
  font: 600 14px "Segoe UI", Tahoma, sans-serif;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
#dc-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
#dc-toast.is-error { background: #da373c; }

.dc-add {
  min-height: 300px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.22);
  background: rgba(18, 20, 28, 0.55);
  color: var(--dc-muted);
  font-family: inherit;
  cursor: pointer;
}
.dc-add:hover, .dc-add:focus-visible { border-color: var(--dc-orange); color: #fff; }
.dc-add-plus {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 102, 0, 0.15);
  color: var(--dc-orange);
  font: 300 56px/72px Arial, sans-serif;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.dc-add:hover .dc-add-plus { background: var(--dc-orange); color: #fff; }
.dc-add-text { font-size: 17px; font-weight: 700; }
.dc-add-note { font-size: 12px; opacity: 0.7; }

.dc-flash {
  max-width: 700px;
  margin: 0 auto 22px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
}
.dc-flash--ok { background: rgba(35, 165, 90, 0.18); border: 1px solid #23a55a; }
.dc-flash--error { background: rgba(218, 55, 60, 0.2); border: 1px solid #da373c; }

/* Contents of the jquery.dialogBox popups */
.dialog-box .dc-dialog-text { white-space: normal; line-height: 1.5; }
.dialog-box .dc-dialog-form {
  white-space: normal;
  font: 14px Arial, sans-serif;
  color: #222;
  text-align: left;
}
.dc-dialog-form label { display: block; margin-bottom: 12px; font-weight: 700; line-height: 1.4; }
.dc-dialog-form small { font-weight: 400; color: #777; }
.dc-dialog-form input[type=text],
.dc-dialog-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 7px 9px;
  border: 1px solid #bbb;
  border-radius: 4px;
  font: 14px Arial, sans-serif;
  color: #000;
  background: #fff;
}
.dc-dialog-form textarea { resize: vertical; min-height: 80px; }
.dc-dialog-form input:focus, .dc-dialog-form textarea:focus { outline: 2px solid #ff8433; border-color: #ff8433; }
.dc-dialog-error {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 4px;
  background: #fdecec;
  border: 1px solid #e0868a;
  color: #a1161c;
  font-size: 13px;
  line-height: 1.4;
}
/* The page is dark already, so the default 50% mask barely shows. */
body #dialog-box-mask { opacity: 0.7; }
.dc-dialog-hint { font-size: 12px; color: #666; margin: 0 0 14px; line-height: 1.4; }
.dc-dialog-form .dialog-btn { padding: 0; }
.dc-dialog-form button.dialog-btn-confirm {
  width: 120px;
  height: 34px;
  line-height: 34px;
  margin: 0 10px;
  border: 0;
  border-radius: 3px;
  font: 14px Arial, sans-serif;
  cursor: pointer;
}
.dc-dialog-form button.dialog-btn-confirm:disabled { background: #a6a6a6; cursor: wait; }

.dc-empty {
  text-align: center;
  color: var(--dc-muted);
  font-size: 15px;
}

@media (max-width: 480px) {
  .dc-grid { grid-template-columns: 1fr; }
  .dc-hero h1 { font-size: 28px; }
  .dc-actions { flex-direction: column; }
  .dc-copy { max-width: none; justify-content: center; padding: 9px 12px; }
}
