:root {
  color-scheme: dark;
  --bg: #0b0e10;
  --panel: #151a1d;
  --line: #343c40;
  --text: #f3f5f4;
  --muted: #aab2b5;
  --dayz: #c7d66a;
  --pal: #52d6e7;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.home-header,
.home-footer {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-header {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.home-brand img {
  border: 1px solid var(--line);
  border-radius: 4px;
}

.home-brand strong { font-size: 18px; }
.home-header nav { display: flex; gap: 24px; }

.home-header nav a,
.home-footer a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.home-header nav a:hover,
.home-footer a:hover { color: var(--text); }

.home-main {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 42px;
}

.home-intro { margin-bottom: 24px; }

.home-intro p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.home-intro h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1;
  letter-spacing: 0;
}

.game-grid {
  min-height: min(640px, 67vh);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.game-card {
  min-width: 0;
  min-height: 440px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 50px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: var(--panel);
  background-position: center;
  background-size: cover;
  text-decoration: none;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(5, 8, 9, 0.58);
  transition: background-color 180ms ease;
}

.game-card:hover::before { background: rgba(5, 8, 9, 0.43); }
.game-dayz { background-image: url("/assets/dayz-hero.png"); }
.game-palworld { background-image: url("/assets/palworld/hero.jpg"); }

.game-state {
  width: max-content;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  background: rgba(8, 12, 13, 0.72);
  font-size: 11px;
  font-weight: 850;
}

.game-card h2 {
  margin: 0;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.9;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.game-card p {
  max-width: 520px;
  margin: 18px 0 12px;
  color: #e0e5e3;
  font-size: 17px;
  line-height: 1.5;
}

.game-card code { color: var(--muted); }

.game-card > strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.game-dayz > strong { color: var(--dayz); }
.game-palworld > strong { color: var(--pal); }

.home-footer {
  min-height: 62px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .home-header,
  .home-footer,
  .home-main { width: min(100% - 24px, 1380px); }

  .home-header { min-height: 68px; }
  .home-brand strong { font-size: 15px; }
  .home-header nav { gap: 14px; }
  .home-header nav a { font-size: 12px; }
  .home-main { padding: 34px 0 28px; }
  .game-grid { min-height: 0; grid-template-columns: 1fr; }
  .game-card { min-height: 390px; }
  .game-card h2 { font-size: clamp(42px, 16vw, 68px); }
}

@media (max-width: 430px) {
  .home-header nav { gap: 10px; }
  .home-header nav a:first-child { display: none; }
  .game-card { min-height: 350px; padding: 22px; }
  .game-card h2 { font-size: clamp(40px, 13vw, 54px); }
  .game-card p { font-size: 15px; }
  .home-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; }
}
