/* Game Lounge 공통 스타일 — 모든 게임 페이지가 이 파일을 먼저 로드한다 */
:root {
  --bg: #0f1220;
  --surface: #1a1f35;
  --surface-2: #242b47;
  --border: #2e3759;
  --text: #eef1fb;
  --text-dim: #9aa3c7;
  --accent: #ffcc4d;
  --accent-2: #6c8cff;
  --good: #4ade80;
  --bad: #f87171;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
}

button { font: inherit; color: inherit; }

/* 상단 바: 라운지로 돌아가기 + 페이지 제목 */
.gl-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  max-width: 560px;
  margin: 0 auto;
}
.gl-topbar a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.gl-topbar a:hover { color: var(--text); }
.gl-topbar h1 { font-size: 18px; font-weight: 700; }

/* 본문 컨테이너 */
.gl-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 18px 48px;
}

/* 카드 */
.gl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

/* 버튼 */
.gl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: transform .06s ease, filter .15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.gl-btn:hover { filter: brightness(1.15); }
.gl-btn:active { transform: scale(.97); }
.gl-btn-primary { background: var(--accent); border-color: var(--accent); color: #1a1500; }
.gl-btn-accent2 { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

/* 수치 표시 (라벨 + 값) */
.gl-stat { text-align: center; }
.gl-stat .label { font-size: 12px; color: var(--text-dim); }
.gl-stat .value { font-size: 20px; font-weight: 800; }

/* 토스트 — GL.share.toast()가 사용 */
.gl-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(16px);
  background: rgba(0, 0, 0, .8);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 1000;
  white-space: nowrap;
}
.gl-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 결과 오버레이 */
.gl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 24, .8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.gl-overlay .gl-card { width: 100%; max-width: 380px; text-align: center; }

.gl-hidden { display: none !important; }
