:root {
  color-scheme: dark;
  --bg: #101317;
  --panel: #181d23;
  --panel-2: #202730;
  --text: #f6f7f2;
  --muted: #a7b0b7;
  --line: rgba(255, 255, 255, 0.14);
  --teal: #14d8d2;
  --coral: #ff5b4f;
  --gold: #ffc947;
  --violet: #8b67ff;
  --lime: #9ee45d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(16, 19, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--gold));
  color: #11161a;
  font-size: 0.88rem;
  box-shadow: 0 0 28px rgba(20, 216, 210, 0.36);
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 116px clamp(20px, 5vw, 72px) 82px;
  isolation: isolate;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  z-index: -3;
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(16, 19, 23, 0.93), rgba(16, 19, 23, 0.44) 48%, rgba(16, 19, 23, 0.82)),
    linear-gradient(0deg, var(--bg), rgba(16, 19, 23, 0.08) 36%);
}

.hero-content {
  width: min(680px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3.6rem, 11vw, 8.6rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 580px;
  margin-bottom: 28px;
  color: #dce6e8;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions,
.form-actions,
.card-actions,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.icon-button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--gold);
  color: #17130a;
}

.secondary {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.section-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: -38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
}

.stats-row div {
  min-width: 0;
  padding: 22px;
  background: rgba(24, 29, 35, 0.96);
}

.stats-row span {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
}

.stats-row p {
  margin-bottom: 0;
  color: var(--muted);
}

.games-section,
.add-section {
  padding: 78px 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 900;
}

.icon-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.games-status {
  min-height: 24px;
  margin: -8px 0 18px;
  color: var(--muted);
}

.game-card {
  display: grid;
  min-height: 275px;
  align-content: space-between;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), transparent 72%), transparent 42%),
    var(--panel);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

.game-card h3 {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  font-size: 1.35rem;
}

.game-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid color-mix(in srgb, var(--accent), white 22%);
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.launch {
  flex: 1 1 132px;
}

.danger {
  border: 1px solid rgba(255, 91, 79, 0.48);
  background: rgba(255, 91, 79, 0.1);
  color: #ffd2ce;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.game-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

label {
  display: grid;
  gap: 8px;
  color: #dbe2e5;
  font-weight: 750;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1115;
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 216, 210, 0.14);
}

.wide {
  grid-column: 1 / -1;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 36px));
  margin: 72px auto 0;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

[data-color="teal"] {
  --accent: var(--teal);
}

[data-color="coral"] {
  --accent: var(--coral);
}

[data-color="gold"] {
  --accent: var(--gold);
}

[data-color="violet"] {
  --accent: var(--violet);
}

[data-color="lime"] {
  --accent: var(--lime);
}

@media (max-width: 720px) {
  .site-header,
  .site-footer,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    position: absolute;
  }

  .hero {
    min-height: 88vh;
    padding-top: 146px;
  }

  .stats-row,
  .game-form {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }
}
