/* Arcade — abyssos 테마(stone/amber, Cinzel/Crimson) 적용된 게임 UI */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #0c0a09;
  font-family: 'Crimson Text', Georgia, 'Times New Roman', serif;
  color: #e7e5e4;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}

.hidden { display: none !important; }

#game-wrap {
  position: fixed; inset: 0;
  background: radial-gradient(circle at 50% 16%, #1c1407 0%, #0c0a09 70%);
}

canvas#game { display: block; width: 100%; height: 100%; touch-action: none; }

/* 상단 HUD / 버튼 */
#hud {
  position: absolute; top: max(16px, env(safe-area-inset-top)); left: 0; right: 0;
  text-align: center; pointer-events: none;
}
#score {
  font-family: 'Cinzel', serif;
  font-size: clamp(40px, 12vw, 70px); font-weight: 900;
  letter-spacing: 2px; color: #fbbf24;
  text-shadow: 0 4px 16px rgba(0,0,0,.55);
}

#back-btn, #mute-btn, #lang-btn {
  position: absolute; top: max(14px, env(safe-area-inset-top));
  height: 44px; border: 1px solid #292524; border-radius: 10px;
  background: rgba(28,25,23,.8); color: #fbbf24; cursor: pointer;
  backdrop-filter: blur(6px);
}
#back-btn { left: 14px; width: 44px; font-size: 22px; }
#mute-btn { right: 14px; width: 44px; font-size: 20px; }
#lang-btn { right: 64px; min-width: 44px; padding: 0 12px; font-size: 13px; font-weight: 700; font-family: 'Cinzel', serif; }
#back-btn:active, #mute-btn:active, #lang-btn:active { transform: scale(.94); }

/* 오버레이 공통 */
.overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; pointer-events: none;
}
#game-over { pointer-events: auto; background: rgba(8,6,5,.6); backdrop-filter: blur(3px); }

/* 메뉴(허브) */
#menu {
  pointer-events: auto; align-items: flex-start; overflow-y: auto;
  padding-top: max(48px, env(safe-area-inset-top) + 24px);
}
.menu-inner { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 18px 40px; text-align: center; }
.menu-title {
  font-family: 'Cinzel', serif; font-weight: 900; letter-spacing: 3px;
  font-size: clamp(30px, 9vw, 46px);
  background: linear-gradient(90deg, #fbbf24, #d97706);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.menu-sub { color: #a8a29e; margin: 8px 0 22px; font-size: 16px; font-style: italic; }

.game-list { display: grid; grid-template-columns: 1fr; gap: 12px; text-align: left; }
@media (min-width: 560px) { .game-list { grid-template-columns: 1fr 1fr; } }

.game-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px; cursor: pointer;
  background: #1c1917; border: 1px solid #292524; color: #e7e5e4;
  transition: transform .08s ease, border-color .2s ease;
}
.game-card:active { transform: scale(.98); border-color: #d97706; }
.gc-icon { font-size: 34px; line-height: 1; }
.gc-meta { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.gc-name { font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700; color: #fbbf24; }
.gc-desc { font-size: 14px; color: #a8a29e; }
.gc-best { font-family: 'Cinzel', serif; font-size: 12px; color: #d97706; letter-spacing: .5px; white-space: nowrap; }

/* 게임 오버 패널 */
.panel {
  background: #1c1917; border: 1px solid #44403c;
  border-radius: 18px; padding: 26px 22px;
  max-width: 360px; width: 100%; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.panel h2 { font-family: 'Cinzel', serif; font-size: 26px; font-weight: 900; letter-spacing: 2px; color: #fbbf24; margin-bottom: 14px; }
.row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 4px; border-bottom: 1px solid #292524;
  font-size: 17px; color: #d6d3d1;
}
.row b { font-family: 'Cinzel', serif; font-size: 22px; color: #fbbf24; }

.btns { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.btn {
  padding: 14px; border: 1px solid #292524; border-radius: 12px;
  font-family: 'Cinzel', serif; font-size: 16px; font-weight: 700; letter-spacing: 1px; cursor: pointer;
  background: #292524; color: #e7e5e4;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(90deg, #b45309, #d97706); border-color: #d97706; color: #1c1917; }

/* AdSense 배너(정적 페이지 하단) */
.ad-banner { position: absolute; left: 0; right: 0; bottom: 0; min-height: 60px; display: flex; align-items: center; justify-content: center; }
