/*
 * 게임 목록 페이지 스타일.
 *
 * 페이지는 다크 테마다. 머리 띠만 클라이언트 타이틀 화면(scenes/title/title.gd)을
 * 따른다. 바탕 #3d3d77, 글자 #ffff00, Anton, 밑줄, 옅은 빛 번짐. Anton 은
 * 'noizze games' 글자만 담은 서브셋이라 로고에만 쓰고 나머지 글은 시스템 글꼴로 쓴다.
 */

@font-face {
  font-family: 'Anton Title';
  src: url('/fonts/Anton-Title.woff2') format('woff2');
  font-display: block;
}

:root {
  --band: #3d3d77;
  --logo: #ffff00;
  --ground: #131318;
  --panel: #1c1c24;
  --line: #34343f;
  --ink: #e9e8f0;
  --ink-dim: #9e9cad;
  --measure: 40rem;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.7 system-ui, -apple-system, 'Segoe UI', 'Noto Sans KR',
    'Malgun Gothic', sans-serif;
  /* 한국어를 어절 단위로 줄바꿈한다 */
  word-break: keep-all;
}

/*
 * 머리 띠. 로고는 가운데. 언어 버튼은 넓은 화면에서 띠 오른쪽에 겹쳐 두고,
 * 좁은 화면에서는 로고와 겹치지 않게 로고 위 한 줄로 둔다.
 */
.masthead {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem 0.8rem;
  background: var(--band);
}

.masthead .langs {
  align-self: flex-end;
}

@media (min-width: 40rem) {
  .masthead {
    padding: 0.9rem 1rem 1.1rem;
  }

  .masthead .langs {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
  }
}

.langs button {
  background: transparent;
  border: 1px solid #5a5a96;
  color: #c9c8ea;
  padding: 0.15rem 0.6rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
}

.langs button[aria-pressed='true'] {
  border-color: var(--logo);
  color: var(--logo);
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.75rem 1rem 3rem;
}

/*
 * 'noizze games' 로고. 타이틀 화면처럼 세로로만 1.2 배 늘리고, 'g' 꼬리 둘레는
 * 밑줄을 비운다(skip-ink). 빛 번짐은 같은 색을 옅게 겹친 그림자로 낸다.
 */
.wordmark {
  margin: 0.2rem 0 0;
  text-align: center;
  font: 400 clamp(1.6rem, 7.2vw, 2.4rem) / 1.1 'Anton Title', Impact, sans-serif;
  white-space: nowrap;
  color: var(--logo);
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.1em;
  text-decoration-skip-ink: auto;
  text-shadow:
    0 0 0.04em rgba(255, 255, 0, 0.35),
    0 0 0.12em rgba(255, 255, 0, 0.2);
  transform: scaleY(1.2);
}

.game {
  border: 1px solid var(--line);
  background: var(--panel);
}

.game-link {
  display: block;
  padding: 1.1rem 1.25rem;
  color: inherit;
  text-decoration: none;
}

.game:hover,
.game:focus-within {
  border-color: var(--logo);
}

.game-name {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--logo);
}

.game-summary {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.game-host {
  color: var(--logo);
  font-size: 0.9rem;
}

.bottom {
  padding: 1rem;
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.85rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
