/*
  The Discord-style "#devlog" window, shared by finalbuild2.com and muckworksgame.com (both site configs copy it to
  assets/css/devlog-feed.css). Markup: discordFeed() in shared/muckworks.mjs; messages: assets/js/devlog-feed.js.
  Colours are Discord's own dark theme and its blurple, so it reads as Discord at a glance.
*/

.dc-section {
  --dc-bg: #313338;
  --dc-head: #2b2d31;
  --dc-line: #1f2023;
  --dc-text: #dbdee1;
  --dc-muted: #949ba4;
  --dc-name: #f2f3f5;
  --dc-blurple: #5865f2;
  --dc-blurple-hover: #4752c4;
  --dc-pill: #2b2d31;
  --dc-pill-line: #3f4147;
  padding: clamp(28px, 5vw, 64px) 0;
}

.dc-window {
  max-width: 760px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--dc-line);
  border-radius: 10px;
  background: var(--dc-bg);
  color: var(--dc-text);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.35);
  font-size: 0.97rem;
  line-height: 1.45;
}

.dc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--dc-line);
  background: var(--dc-head);
}

.dc-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.65rem 0.3rem 0.5rem;
  border-radius: 6px;
  background: var(--dc-blurple);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.dc-brand:hover,
.dc-brand:focus-visible {
  background: var(--dc-blurple-hover);
}

/* Three classes: wins over the sites' blurple ".icon.icon-discord", which would vanish on the blurple pill. */
.dc-section .icon.icon-discord {
  flex: none;
  width: 1.3em;
  height: 1.3em;
  fill: #fff;
}

.dc-channel {
  margin: 0;
  color: var(--dc-name);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.dc-hash {
  margin-right: 0.3rem;
  color: var(--dc-muted);
  font-weight: 500;
}

.dc-topic {
  padding-left: 0.9rem;
  border-left: 1px solid var(--dc-pill-line);
  color: var(--dc-muted);
  font-size: 0.875rem;
}

.dc-messages {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.1rem 1rem 0.6rem;
}

.dc-msg {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0 0.9rem;
}

.dc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.dc-msg-body {
  min-width: 0;
}

.dc-msg-body p {
  margin: 0 0 0.25rem;
}

.dc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.dc-name {
  color: var(--dc-name);
  font-weight: 700;
}

.dc-time {
  color: var(--dc-muted);
  font-size: 0.75rem;
}

.dc-question {
  color: var(--dc-name);
  font-weight: 700;
}

.dc-options {
  color: var(--dc-muted);
  white-space: pre-wrap;
}

.dc-media {
  display: block;
  width: 100%;
  max-width: 520px;
  margin-top: 0.4rem;
  border-radius: 8px;
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.dc-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.dc-reaction {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--dc-pill-line);
  border-radius: 8px;
  background: var(--dc-pill);
  color: var(--dc-text);
  font-size: 0.875rem;
  text-decoration: none;
}

.dc-reaction:hover,
.dc-reaction:focus-visible {
  border-color: var(--dc-blurple);
  background: rgb(88 101 242 / 0.15);
}

.dc-count {
  font-weight: 700;
}

.dc-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.6rem 1rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--dc-blurple);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.dc-input:hover,
.dc-input:focus-visible {
  background: var(--dc-blurple-hover);
}

.dc-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.4rem 1rem 0;
  padding: 0.6rem 0.8rem;
  border: 1px dashed var(--dc-pill-line);
  border-radius: 8px;
  color: var(--dc-text);
  font-size: 0.9rem;
  text-decoration: none;
}

.dc-more:hover,
.dc-more:focus-visible {
  border-color: var(--dc-blurple);
}

.dc-more-thumb {
  width: 64px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  opacity: 0.55;
}

.dc-more-text {
  flex: 1;
  min-width: 12ch;
  font-weight: 700;
}

.dc-more-go {
  color: #a5acf9;
  font-weight: 700;
}

@media (max-width: 520px) {
  .dc-topic {
    display: none;
  }

  .dc-msg {
    grid-template-columns: 32px 1fr;
    gap: 0 0.6rem;
  }

  .dc-avatar {
    width: 32px;
    height: 32px;
  }
}

/* "My latest post": the newest social post with its video (assets/js/devlog-feed.js, /devlog-feed/social.json). */
.lp-section {
  padding: clamp(28px, 5vw, 64px) 0 0;
}

.lp-card {
  display: grid;
  gap: clamp(16px, 3vw, 36px);
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(16px, 2.5vw, 28px);
  border: 3px solid var(--hazard);
  border-radius: 10px;
  background: var(--mud);
  color: var(--mud-text);
}

@media (min-width: 620px) {
  .lp-card {
    grid-template-columns: minmax(0, 240px) 1fr;
  }
}

.lp-player {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.lp-player--vertical {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 9 / 16;
  justify-self: center;
}

.lp-play,
.lp-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.lp-play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lp-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--hazard);
  color: var(--ink);
  font-size: 1.6rem;
  transform: translate(-50%, -50%);
}

.lp-kicker {
  margin: 0 0 0.4rem;
  color: var(--hazard);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lp-title {
  margin: 0 0 1rem;
  color: var(--mud-text);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

.lp-watch {
  margin: 0 0 0.5rem;
  color: var(--mud-soft);
  font-size: 0.9rem;
}

.lp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lp-link {
  padding: 0.4em 0.8em;
  border-radius: 2px;
  background: var(--hazard);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.lp-link:hover,
.lp-link:focus-visible {
  background: var(--hazard-hover);
}

/* Discord window and MuckPaper card side by side; stacked on narrow screens. */
.community {
  padding-bottom: clamp(40px, 6vw, 80px);
}

.community-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(20px, 3vw, 40px);
}

.community-row .dc-window {
  flex: 1 1 480px;
  max-width: 760px;
  margin: 0;
}

.community-row .mp-card {
  flex: 0 1 300px;
  grid-template-columns: 1fr;
  margin: 0;
  text-align: center;
}

.community-row .mp-card .lp-links {
  justify-content: center;
}

/* The heading over the clips and screenshots. */
.shots-head {
  padding-bottom: clamp(14px, 2vw, 24px);
}

.shots-title {
  margin: 0 0 0.3rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 850;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.shots-sub {
  margin: 0;
  opacity: 0.75;
  font-size: 0.95rem;
  font-style: italic;
}
