/* markham.love /games — Cyber card grid, matched to luos.fyi /46. */

:root {
  --bg: #070e1a;
  --card0: #0e1826;
  --card1: #0d1623;
  --card2: #0b1320;
  --ink: #ffffff;
  --sub: #94a3b8;
  --cyan: #38bdf8;
  --gold: #fde047;
  --gold-deep: #eab308;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
}

html { min-height: 100svh; }

body {
  min-height: 100svh;
  font-family: "Segoe UI", ui-sans-serif, system-ui, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(56, 189, 248, 0.14), transparent 60%),
    radial-gradient(700px 400px at 100% 100%, rgba(168, 85, 247, 0.08), transparent 55%),
    var(--bg);
}

.wrap {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: max(56px, env(safe-area-inset-top, 0px) + 44px)
           max(20px, env(safe-area-inset-right, 0px) + 8px)
           max(28px, env(safe-area-inset-bottom, 0px) + 18px)
           max(20px, env(safe-area-inset-left, 0px) + 8px);
}

.head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0 22px;
  padding-right: 48px;
}

.badge {
  position: relative;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, #1e3a5f, #070e1a 70%);
  box-shadow: 0 0 0 1.5px #2c4c70, 0 0 16px rgba(56, 189, 248, 0.35);
  overflow: hidden;
}

.badge .ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.badge .ring-out {
  inset: 3px;
  border: 1.4px dashed transparent;
  border-top-color: #67e8f9;
  border-right-color: #fde047;
  border-bottom-color: rgba(56, 189, 248, 0.2);
  animation: spin 16s linear infinite;
}
.badge .ring-in {
  inset: 9px;
  border: 1.3px dashed rgba(253, 224, 71, 0.7);
  border-left-color: transparent;
  animation: spin 12s linear infinite reverse;
}
.badge svg { position: relative; z-index: 1; }

.titles { min-width: 0; flex: 1; }

h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.snd {
  position: fixed;
  z-index: 40;
  top: max(16px, env(safe-area-inset-top, 0px) + 8px);
  right: max(16px, env(safe-area-inset-right, 0px));
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(103, 232, 249, 0.84);
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (max-width: 860px) {
  .snd {
    top: calc(max(10px, env(safe-area-inset-top, 0px)) + 6px);
    right: max(10px, env(safe-area-inset-right, 0px));
  }
}
.snd:hover, .snd:focus-visible {
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.16);
  outline: 0;
}
.snd.is-muted { color: #64748b; }
.snd.is-muted:hover, .snd.is-muted:focus-visible { color: #94a3b8; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: min(100%, 460px);
  margin-inline: auto;
  justify-content: center;
}

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 260px;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(35deg, #0e1826 0%, #0d1623 58%, #0b1320 100%);
  color: inherit;
  box-shadow: 0 0 0 1.6px rgba(56, 189, 248, 0.42);
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: box-shadow 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 3.5px;
  border-radius: 14.5px;
  box-shadow: inset 0 0 0 1px rgba(56, 78, 104, 0.24);
  pointer-events: none;
}

.card.is-on {
  border: 2px solid transparent;
  padding: 12px;
  background:
    linear-gradient(35deg, #0d1629 0%, #09101f 58%, #15141c 100%) padding-box,
    linear-gradient(90deg, #d9f99d 0%, #facc15 35%, #f97316 74%, #ec4899 100%) border-box;
  box-shadow:
    0 0 18px rgba(234, 179, 8, 0.45),
    0 0 28px rgba(249, 115, 22, 0.22);
}
.card.is-on::after { box-shadow: none; }

.flare {
  display: none;
  position: absolute;
  left: 50%;
  top: 8px;
  width: 82px;
  height: 2.5px;
  margin-left: -41px;
  border-radius: 1.25px;
  background: linear-gradient(90deg, #22d3ee, #facc15 55%, #f97316);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.7);
  pointer-events: none;
  z-index: 3;
}
.card.is-on .flare { display: block; }

.thumb {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 120px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 40%, #16293d, #0a1220 75%);
  box-shadow: 0 0 0 1.8px rgba(100, 130, 160, 0.5);
  overflow: hidden;
}
.card.is-on .thumb {
  box-shadow:
    0 0 0 1.8px rgba(168, 85, 247, 0.72),
    0 0 16px rgba(168, 85, 247, 0.45);
}
.thumb svg { width: 100%; height: 100%; display: block; }
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.play { cursor: pointer; }
a.play { color: inherit; }

.meta {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
}
.name {
  margin: 0 0 4px;
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.sub {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--sub);
  line-height: 1.35;
}

.play {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.play:not(.is-disabled) {
  border: 1.5px solid #fde047;
  background:
    repeating-linear-gradient(to bottom, rgba(18, 14, 3, 0.34) 0 2px, rgba(253, 224, 71, 0.12) 2px 4px),
    linear-gradient(90deg, #9a7b1c 0%, #eab308 25%, #fef08a 50%, #eab308 75%, #9a7b1c 100%);
  color: #0a0d14;
  box-shadow:
    0 0 12px rgba(234, 179, 8, 0.35),
    inset 0 0 0 2px rgba(254, 240, 138, 0.35);
}
.play.is-disabled {
  border: 1px solid rgba(100, 116, 139, 0.55);
  background: rgba(15, 23, 42, 0.7);
  color: #94a3b8;
  font-style: normal;
  font-weight: 650;
  cursor: default;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .head { gap: 12px; margin-bottom: 20px; }
  h1 { font-size: 1.25rem; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .badge .ring, .flare { animation: none; }
}

body {
  display: flex;
  flex-direction: column;
}
.wrap {
  flex: 1 0 auto;
}
.site-copy {
  flex: none;
  margin: 0 auto;
  width: min(100%, 1080px);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: rgba(148, 163, 184, 0.62);
  padding: 8px 16px max(18px, env(safe-area-inset-bottom, 0px) + 6px);
  pointer-events: none;
  user-select: none;
}
