@import url('https://fonts.googleapis.com/css2?family=Courier+Prime&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #1a1a1a;
  color: #cccccc;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1000px);
  justify-items: center;
  justify-content: center;
}

pre {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.3;
  white-space: pre;
  color: #cccccc;
  overflow-x: auto;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}

.title {
  font-size: 13px;
  padding: 2rem 0 1rem;
  line-height: 1.2;
  margin-bottom: 0;
  width: 100%;
  font-weight: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0;
  text-align: center;
}

.hero-sub {
  text-align: center;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  color: #999999;
  line-height: 1.5;
  margin: 0 auto 2.5rem;
  max-width: 720px;
  letter-spacing: 0.02em;
}

.divider {
  color: #666666;
  margin: 2rem 0;
  text-align: center;
  font-size: 13px;
  width: 100%;
}

.game-card {
  border: 2px solid #cccccc;
  padding: 2rem;
  margin: 1rem 0;
  background: #1a1a1a;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre;
  overflow-x: auto;
  position: relative;
  width: 100%;
  max-width: 900px;
  /* Module rule: card is centered on the page (via grid), but content
     inside the card reads left-aligned. */
  text-align: left;
  cursor: pointer;
  /* Color-bloom variables — JS sets bloom-x/bloom-y on mouseenter;
     :hover swaps bloom-r to 0 to reveal full color from cursor outward. */
  --bloom-x: 50%;
  --bloom-y: 50%;
  --bloom-r: 150%;
  --game-color: #ffffff;
  color: var(--game-color);
  transition: border-color 0.25s ease;
}

/* Per-game accents — match the in-game vibrant 256-color palette
   (engine setup_colors: cyan 51, red 196, green 46, yellow 226,
   magenta 201). claudturismo doubles up on cyan with ctype; that's
   intentional, ctype is row 0 and turismo is row 4 in the launcher. */
.game-card[data-game="ctype"]         { --game-color: #00ffff; }
.game-card[data-game="claudtra"]      { --game-color: #00ff66; }
.game-card[data-game="fight"]         { --game-color: #ff4444; }
.game-card[data-game="superclaudio"]  { --game-color: #ffd700; }
.game-card[data-game="claudturismo"]  { --game-color: #00d0ff; }
.game-card[data-game="claudemon"]     { --game-color: #88ff00; }
.game-card[data-game="finalclaudesy"] { --game-color: #ff00ff; }

/* Title — at rest the text is filled with a horizontal blue→cyan→
   magenta→pink gradient (Claudecade palette). On hover the gradient's
   background-position slides 100% across the title text over 1.8s,
   so the colors visibly rush from one end of the marquee to the other.
   No animations at rest; just the rollover. */
.title {
  position: relative;
  background: linear-gradient(
    90deg,
    #4488ff   0%,
    #00d0ff  25%,
    #ff44ff  50%,
    #ff00ff  75%,
    #4488ff 100%
  );
  background-size: 200% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: background-position 1.8s ease-out;
}

.title:hover {
  background-position: -100% 50%;
}

/* Skip the gray-desat overlay on the title -- it has its own gradient. */
.title::before { display: none; }

/* Desaturating overlay — sits above the text/background and uses
   mix-blend-mode: color (which takes the OVERLAY's hue+saturation
   and applies it to the layer BELOW's luminance). A mid-gray top
   with 0 saturation produces grayscale of whatever's underneath.
   On hover the clip-path shrinks the overlay to nothing at the
   cursor entry point — color blooms outward from that pixel. */
.title::before,
.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #888;
  mix-blend-mode: color;
  pointer-events: none;
  clip-path: circle(var(--bloom-r) at var(--bloom-x) var(--bloom-y));
  transition: clip-path 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.title:hover,
.game-card:hover {
  --bloom-r: 0%;
}

.game-card:hover {
  border-color: var(--game-color);
}

/* Click-to-expand inline detail panel. Each .game-card is paired with
   a sibling .game-detail in the HTML; the adjacent-sibling selector
   reveals it when the card has .expanded. */
/* Detail panel sits flush against the bottom of its card; the card's
   bottom border goes transparent on expand so the seam reads as a
   single continuous frame. Internal layout is a 2-col grid: title +
   summary span both columns, CONTROLS lives in col 1, TIPS in col 2. */
.game-detail {
  display: none;
  font-size: 11px;
  line-height: 1.4;
  color: #bbbbbb;
  margin: -2px auto 1rem;     /* sit on top of card's transparent bottom border */
  padding: 0.5rem 1.5rem 0.85rem;
  max-width: 900px;
  width: 100%;
  background: #111;
  border: 2px solid #444;
  border-top: 0;
}

.game-card.expanded {
  margin-bottom: 0;
  border-bottom-color: transparent;
  /* Unfurled cards keep their accent color -- shrink the desat overlay
     to 0 so the card stops reading grayscale once it's been clicked open. */
  --bloom-r: 0%;
  border-color: var(--game-color);
}

.game-card.expanded + .game-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2rem;
  row-gap: 0.25rem;
  border-color: var(--detail-color, #444);
}

.game-detail .gd-summary {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0.35rem;
  color: #cccccc;
}

.game-detail .gd-col > :first-child {
  margin-top: 0;
}

/* Detail panel borders inherit the matching game's accent. */
.game-detail[data-for="ctype"]         { --detail-color: #00ffff; }
.game-detail[data-for="claudtra"]      { --detail-color: #00ff66; }
.game-detail[data-for="fight"]         { --detail-color: #ff4444; }
.game-detail[data-for="superclaudio"]  { --detail-color: #ffd700; }
.game-detail[data-for="claudturismo"]  { --detail-color: #00d0ff; }
.game-detail[data-for="claudemon"]     { --detail-color: #88ff00; }
.game-detail[data-for="finalclaudesy"] { --detail-color: #ff00ff; }

.game-detail .gd-title {
  grid-column: 1 / -1;
  font-weight: bold;
  letter-spacing: 0.15em;
  margin: 0 0 0.25rem;
  font-size: 11px;
  color: var(--detail-color, #ffffff);
}

.game-detail .gd-section {
  margin-top: 0.5rem;
  margin-bottom: 0.15rem;
  color: #777;
  letter-spacing: 0.12em;
  font-size: 10px;
}

.game-detail ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.game-detail li {
  padding: 0;
  font-size: 10.5px;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .game-card.expanded + .game-detail {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
}

#lb-live {
  text-align: center;
  font-size: 13px;
}

.section-head {
  text-align: center;
  font-size: 11px;        /* smaller than page title (13px), bigger feel  */
  line-height: 1.15;
  margin: 1rem 0 0.5rem;
  color: #ffffff;
  font-weight: normal;
  -webkit-font-smoothing: antialiased;
}

.install-section,
.docs {
  text-align: center;
  font-size: 13px;
  line-height: 1.3;
  margin: 1rem 0;
  color: #cccccc;
}

/* Install block: shrink-to-fit + centered as a unit, but content inside
   stays left-aligned. Otherwise the parent's text-align:center centers
   every line individually and shatters multi-line code (JSON, curl, etc).
   Width:auto overrides the base `pre { width: 100% }` rule. */
.docs.install-block {
  text-align: left;
  display: table;
  width: auto;
  margin: 1rem auto;
}

.docs:first-of-type {
  margin-top: 1.5rem;
}

.install-section a,
.docs a {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid #555;
}

.install-section a:hover,
.docs a:hover {
  border-bottom-color: #ffffff;
  background: transparent;
}

a {
  color: #cccccc;
  text-decoration: underline;
}

a:hover {
  background: #cccccc;
  color: #1a1a1a;
}

@media (max-width: 768px) {
  body {
    font-size: 12px;
    padding: 1rem 0.5rem;
    grid-template-columns: 1fr;
  }

  pre {
    font-size: 11px;
  }

  .game-card {
    font-size: 11px;
    padding: 1.5rem;
  }

  .title {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 11px;
    padding: 0.5rem;
    grid-template-columns: 1fr;
  }

  pre {
    font-size: 10px;
  }

  .game-card {
    font-size: 10px;
    padding: 1rem;
    max-width: 100%;
  }

  .title {
    font-size: 8px;
  }
}
