:root {
  --page: #1b1c21;
  --tile: #26272e;
  --tile-hover: #2e2f37;
  --ink: #f1f1f4;
  --muted: rgba(241, 241, 244, 0.6);
  --blue: #4da3ff;
  --label: #e8590c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.hub-header {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  display: block;
  width: 36px;
  height: 36px;
}

.logo-text {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 3px;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px 64px;
}

.intro {
  padding: 32px 0 8px;
}

.intro h1 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 800;
}

.intro p {
  margin: 0;
  color: var(--muted);
}

.promises {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.promises li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--tile);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.promises strong {
  color: #51cf66;
  font-size: 20px;
  font-weight: 900;
}

.shelf {
  margin-top: 28px;
}

.shelf-title {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 26px;
  font-weight: 800;
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature,
.game.wide {
  grid-column: span 2;
}

.game {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: var(--tile);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

a.game:hover {
  background: var(--tile-hover);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
}

a.game:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.feature {
  grid-row: span 2;
}

.label {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  padding: 5px 12px;
  border-radius: 14px 0 12px 0;
  background: var(--label);
  font-size: 13px;
  font-weight: 700;
}

.game-art {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 130px;
}

.felt {
  background: radial-gradient(circle at 50% 60%, #1f7a50, #0b3a25 90%);
}

.felt-dark {
  background: radial-gradient(circle at 50% 60%, #3a1d4f, #160b22 90%);
}

.sky {
  background: radial-gradient(circle at 50% 60%, #2f6fb5, #12304f 90%);
}

.game-body {
  position: relative;
  padding: 12px 16px 14px;
}

.play-cta {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--blue);
  color: #0d1b2a;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.feature .play-cta {
  right: 22px;
  bottom: 20px;
}

a.game:hover .play-cta,
a.game:focus-visible .play-cta {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .play-cta {
    opacity: 1;
    transform: none;
  }
}

.feature .game-body {
  padding: 18px 22px 20px;
}

.game h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.feature h3 {
  font-size: 22px;
}

.game p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.game-meta {
  color: var(--muted);
  font-size: 13px;
}

.fan {
  position: relative;
  width: 1px;
  height: 150px;
  transform: translateY(18px);
}

.fan-card {
  --spread: 0;
  position: absolute;
  bottom: 0;
  left: -48px;
  display: flex;
  flex-direction: column;
  width: 96px;
  height: 134px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: linear-gradient(170deg, #ffffff, #efece3);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  color: #1d1d27;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  transform-origin: 50% 140%;
  transform: rotate(calc(var(--spread) * 12deg));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fan-card small {
  font-size: 18px;
}

.fan-card.red,
.mini-card.red {
  color: #c8262e;
}

.fan-card:nth-child(1) {
  --spread: -2;
}

.fan-card:nth-child(2) {
  --spread: -1;
}

.fan-card:nth-child(4) {
  --spread: 1;
}

.fan-card:nth-child(5) {
  --spread: 2;
}

.feature:hover .fan-card {
  transform: rotate(calc(var(--spread) * 17deg)) translateY(-6px);
}

.game-icon {
  position: absolute;
  top: 40px;
  right: 18px;
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.mini-cards {
  display: flex;
}

.mini-card {
  display: grid;
  place-items: center;
  width: 46px;
  height: 64px;
  margin-left: -10px;
  border-radius: 7px;
  background: linear-gradient(170deg, #ffffff, #efece3);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  color: #1d1d27;
  font-size: 26px;
  transition: transform 0.25s ease;
}

.mini-card:first-child {
  margin-left: 0;
}

.mini-card:nth-child(odd) {
  transform: rotate(-6deg);
}

.mini-card:nth-child(even) {
  transform: rotate(6deg) translateY(4px);
}

a.game:hover .mini-card {
  transform: translateY(-4px);
}

.calendar {
  display: flex;
  flex-direction: column;
  width: 74px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.calendar-month {
  padding: 4px 0;
  background: #e03131;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.calendar-day {
  padding: 6px 0 8px;
  color: #1d1d27;
  font-size: 30px;
  line-height: 1;
}

.casino {
  background: radial-gradient(circle at 50% 60%, #a8323e, #3d0d14 90%);
}

.mini-card.face {
  flex-direction: column;
  gap: 2px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.mini-card.face small {
  font-size: 16px;
}

.chip-21 {
  position: absolute;
  right: 22%;
  bottom: 16%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 3px dashed rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: #1c7ed6;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-weight: 900;
}

.minefield {
  background: radial-gradient(circle at 50% 60%, #3b3f52, #15161c 90%);
}

.mine-grid {
  display: grid;
  grid-template-columns: repeat(4, 26px);
  grid-auto-rows: 26px;
  gap: 3px;
  transform: rotate(-4deg);
  transition: transform 0.25s ease;
}

.mine-grid span {
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: linear-gradient(160deg, #4a4d5c, #33353f);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-weight: 800;
}

.mine-grid .open {
  background: #1d1e24;
  box-shadow: none;
}

.mine-grid .n1 {
  color: #6cb6ff;
}

.mine-grid .n2 {
  color: #69db7c;
}

.mine-grid .flag {
  color: #ff6b6b;
}

a.game:hover .mine-grid {
  transform: rotate(0deg) scale(1.06);
}

.section-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
}

.section-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.continue {
  margin-top: 28px;
}

.continue .section-title {
  margin-bottom: 12px;
}

.continue-list,
.daily-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 12px;
}

.continue-card,
.daily-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: var(--tile);
  text-decoration: none;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.continue-card:hover,
.daily-card:hover {
  background: var(--tile-hover);
  transform: translateY(-2px);
}

.continue-card:focus-visible,
.daily-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.continue-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: center / 70% no-repeat;
}

.continue-card.spider .continue-icon {
  background-color: #1f7a50;
  background-image: url("spider-solitaire/assets/icons/spider-512.png");
}

.continue-card.minesweeper .continue-icon {
  background-color: #3b3f52;
  background-image: url("minesweeper/assets/icon.svg");
}

.continue-text,
.daily-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.continue-text small,
.daily-text small {
  color: var(--muted);
  font-size: 13px;
}

.continue-bar {
  height: 4px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.continue-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #51cf66;
}

.continue-go {
  flex: none;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--blue);
  color: #0d1b2a;
  font-size: 13px;
  font-weight: 800;
}

.daily {
  margin-top: 36px;
}

.daily-date {
  display: flex;
  flex: none;
  flex-direction: column;
  width: 48px;
  overflow: hidden;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.daily-month {
  padding: 2px 0;
  background: #e03131;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.daily-day {
  padding: 3px 0 5px;
  color: #1d1d27;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.daily-card.done .daily-status {
  color: #51cf66;
  font-weight: 700;
}

.hub-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(241, 241, 244, 0.4);
  font-size: 12px;
}

.hub-footer a {
  color: rgba(241, 241, 244, 0.6);
  text-decoration: none;
}

.hub-footer a:hover {
  color: var(--ink);
}

.policy {
  max-width: 720px;
  padding-top: 40px;
  line-height: 1.6;
}

.policy a {
  color: var(--blue);
}

@media (max-width: 760px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature {
    grid-column: span 2;
    grid-row: auto;
  }

  .game.wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  main {
    padding: 0 18px 48px;
  }

  .hub-footer {
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .hub-footer > * {
    white-space: nowrap;
  }

  .hub-footer > span[aria-hidden="true"] {
    display: none;
  }

  .promises {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .promises li {
    gap: 4px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 12px;
  }

  .promises strong {
    font-size: 16px;
  }

  .bento {
    grid-template-columns: 1fr;
  }

  .feature {
    grid-column: auto;
  }

  .feature .game-art {
    min-height: 210px;
  }

  .fan {
    transform: translateY(10px) scale(0.85);
  }

  .game-icon {
    top: 14px;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game,
  .fan-card,
  .mini-card,
  .play-cta,
  .continue-card,
  .daily-card {
    transition: none;
  }
}

.feedback-link {
  padding: 2px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.not-found-cards {
  display: flex;
  margin-bottom: 28px;
}

.not-found-cards .mini-card {
  width: 64px;
  height: 90px;
  font-size: 36px;
  font-weight: 800;
}

.not-found h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.not-found p {
  margin: 0 0 28px;
  color: var(--muted);
}

.not-found-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.not-found-link {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--tile);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.not-found-link:hover {
  background: var(--tile-hover);
}

.not-found-link.primary {
  background: var(--blue);
  color: #0d1a2b;
}


.about {
  max-width: 760px;
  margin-top: 48px;
  color: var(--muted);
  line-height: 1.65;
}

.about h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 22px;
}

.about h3 {
  margin: 22px 0 4px;
  color: var(--ink);
  font-size: 16px;
}

.about p {
  margin: 0 0 10px;
}

.about a {
  color: var(--blue);
}

.felt-blue {
  background: radial-gradient(circle at 50% 60%, #1f6a7a, #0b2b38 90%);
}

.felt-teal {
  background: radial-gradient(circle at 50% 60%, #2a7d6c, #0c302a 90%);
}

.dusk {
  background: radial-gradient(circle at 50% 60%, #6b4fa8, #221640 90%);
}

.free-cells {
  display: grid;
  grid-template-columns: repeat(4, 40px);
  gap: 6px;
  transition: transform 0.25s ease;
}

.game:hover .free-cells {
  transform: scale(1.06);
}

.free-cell {
  display: grid;
  place-items: center;
  height: 56px;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  color: #1d1d27;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.free-cell small {
  display: block;
  font-size: 14px;
}

.free-cell.filled {
  border: 0;
  background: linear-gradient(170deg, #ffffff, #efece3);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.free-cell.filled:nth-child(2) {
  color: #c8262e;
}

.sudoku-grid {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  gap: 2px;
  padding: 4px;
  border-radius: 8px;
  background: #1b1c21;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  transform: rotate(-5deg);
  transition: transform 0.25s ease;
}

.game:hover .sudoku-grid {
  transform: rotate(0deg) scale(1.06);
}

.sudoku-grid span {
  display: grid;
  place-items: center;
  height: 28px;
  border-radius: 4px;
  background: #f1f1f4;
  color: #1d1d27;
  font-size: 16px;
  font-weight: 800;
}

.sudoku-grid .pick {
  background: #4da3ff;
  color: #0d1a2b;
}

.merge-grid {
  display: grid;
  grid-template-columns: repeat(2, 40px);
  gap: 5px;
  transform: rotate(-6deg);
  transition: transform 0.25s ease;
}

.game:hover .merge-grid {
  transform: rotate(0deg) scale(1.06);
}

.merge-tile {
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

.merge-tile.t2 {
  background: #4dabf7;
}

.merge-tile.t4 {
  background: #845ef7;
}

.merge-tile.t8 {
  background: #f06595;
}

.merge-tile.t16 {
  background: #ff922b;
}

.calendar-digit {
  font-weight: 800;
}

.game-icon.game-icon-center {
  position: static;
  width: 72px;
  height: 72px;
  transition: transform 0.25s ease;
}

.game:hover .game-icon-center {
  transform: scale(1.08) rotate(-6deg);
}
