:root {
  color-scheme: light;
  --pink-900: #8f245f;
  --pink-700: #c83f82;
  --pink-600: #e4579b;
  --pink-500: #f86fb0;
  --pink-300: #ffb4d6;
  --pink-100: #ffe5f1;
  --cream: #fffaf4;
  --ink: #47283a;
  --muted: #806476;
  --white: #ffffff;
  --yellow: #ffd65a;
  --shadow: 0 24px 70px rgba(104, 35, 73, 0.18);
  --soft-shadow: 0 12px 30px rgba(104, 35, 73, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.9), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(255, 226, 241, 0.9), transparent 32%),
    linear-gradient(145deg, #fff7fb, #ffeaf4 52%, #fff8ef);
  color: var(--ink);
  font-family:
    Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 4px solid rgba(255, 214, 90, 0.85);
  outline-offset: 4px;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding:
    max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
}

.game-card {
  position: relative;
  width: min(1280px, calc(100vw - 20px), calc((100dvh - 52px) * 16 / 9));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: clamp(16px, 2vw, 32px);
  background: #dff6ff;
  box-shadow: var(--shadow);
  isolation: isolate;
}

#gameCanvas {
  width: 100%;
  height: 100%;
}

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.is-hidden {
  display: none !important;
}

.project-footer {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  width: min(900px, calc(100vw - 20px));
  text-align: center;
}

.project-footer-link {
  flex: 1;
  min-height: 50px;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 9px 16px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(104, 35, 73, 0.16);
}

.project-footer-link--project {
  background: linear-gradient(180deg, #ff78b8, #db3f8d);
}

.project-footer-link--run {
  background: linear-gradient(180deg, #68dc45, #29a91f);
}

.project-footer-link strong {
  display: block;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 950;
}

.project-footer-link span {
  display: block;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 750;
  opacity: 0.95;
}

.project-footer a:hover,
.project-footer a:focus {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.mobile-project-links {
  display: none;
}


@media (orientation: portrait) and (max-width: 820px) {
  .game-card {
    width: min(420px, calc(100vw - 20px), calc((100dvh - 52px) * 9 / 16));
    aspect-ratio: 9 / 16;
  }
}

@media (max-height: 640px) and (orientation: landscape) {
  .app-shell {
    padding-top: 6px;
    padding-bottom: 6px;
    gap: 4px;
  }

  .game-card {
    width: min(1120px, calc((100dvh - 30px) * 16 / 9), calc(100vw - 12px));
  }

  .project-footer-link {
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 14px;
  }

  .project-footer-link strong {
    font-size: 11px;
  }

  .project-footer-link span {
    font-size: 9px;
  }
}


/* v0.2.1 — Modo celular em tela cheia */
:fullscreen body,
html:fullscreen,
body:fullscreen {
  width: 100%;
  height: 100%;
  background: #000;
}

:fullscreen .app-shell,
.app-shell:fullscreen {
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  gap: 0;
  background: #000;
}

:fullscreen .game-card,
.app-shell:fullscreen .game-card {
  width: min(100vw, calc(100dvh * 16 / 9));
  max-width: 100vw;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

:fullscreen .project-footer,
.app-shell:fullscreen .project-footer {
  display: none;
}

@media (max-width: 920px) {
  .project-footer {
    display: none;
  }

  .mobile-project-links {
    position: absolute;
    z-index: 45;
    left: max(8px, env(safe-area-inset-left));
    bottom: max(8px, env(safe-area-inset-bottom));
    display: flex;
    gap: 6px;
    pointer-events: auto;
  }

  .mobile-project-links a {
    padding: 7px 10px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    background: rgba(248, 111, 176, 0.94);
    color: #ffffff;
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(71, 40, 58, 0.24);
  }

  .mobile-project-links a:nth-child(2) {
    background: rgba(47, 183, 35, 0.94);
  }

  .app-shell {
    padding: 0;
    gap: 0;
    background: #000;
  }

  .game-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  .game-card {
    width: min(100vw, calc(100dvh * 16 / 9));
  }
}
