/* Gece Gunduz: js13k-2018 styles.css'inden, baslik/kontrol/editor kisimlari cikarilip telefona uyarlandi. */
:root { --accent: #333; --secondary: #fff; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body {
  position: fixed; inset: 0;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  display: flex; align-items: center; justify-content: center;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  font-family: system-ui, -apple-system, sans-serif;
}
body.on { background: var(--secondary); }
body.off { background: var(--accent); }
/* Ekran tuslari oyun alaninin ustune binmez: yatayda iki yan sutun (iki tus 64+12+64 + 16 px + guvenli alan),
   dikeyde alt bant (64 px tus + 16 px + guvenli alan + 16 px bosluk) disarida kalir. */
@media (orientation: landscape) {
  body {
    padding-left: calc(env(safe-area-inset-left, 0px) + 172px);
    padding-right: calc(env(safe-area-inset-right, 0px) + 172px);
  }
}
@media (orientation: portrait) {
  body { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }
}
svg { width: 100%; height: 100%; overflow: visible; shape-rendering: crispEdges; vertical-align: middle; }

#hud { opacity: 0.55; }

/*  Guy  */
#inner-guy { transform-origin: 13px; }
.left #inner-guy { transform: scaleX(-1); }
.walk #left_foot, .walk #right_foot { animation: walk 0.2s infinite; }
.walk #right_foot { animation-delay: 0.1s; }
.walk #head { animation: walk 0.4s infinite; position: relative; z-index: 5; }
.on #guy .accent, .off #face { fill: var(--accent); }
.on #face, .off #guy .accent { fill: var(--secondary); }

/*  Death Animation  */
#death rect { display: none; }
.dying #death rect { animation: death 0.8s infinite; display: initial; opacity: 0; }
@keyframes death {
  0% { opacity: 1; transform: rotate(45deg); }
  50% { opacity: 0; transform: rotate(0); }
}

/*  Goal  */
#inner-goal { animation: pulse 2s infinite; shape-rendering: auto; transform-origin: 12px 12px; }
.finish #inner-goal { animation: none; }
#inner-goal-finish { transition: transform 0.5s; transform-origin: 12px 12px; }
.finish #inner-goal-finish { transform: scale(150); }
.azalt #inner-goal { animation: none; }
.azalt .walk #left_foot, .azalt .walk #right_foot, .azalt .walk #head { animation: none; }
.azalt .dying #death rect { animation: none; opacity: 1; }
.azalt #inner-goal-finish { transition: none; }

/*  Swap Foreground/Background  */
.on > svg { color: var(--accent); fill: var(--accent); }
.off > svg { color: var(--secondary); fill: var(--secondary); }
.on .dark, .off .light { opacity: 0.1; }

@keyframes walk { 50% { transform: translateY(-2px); } }
@keyframes pulse { 50% { transform: scale(0.7); } }

[hidden] { display: none !important; }
