@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --white: #eef1f6;
  --muted: #8b97a8;
  --line: #ffffff22;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #03050a;
  color: var(--white);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: radial-gradient(ellipse at 50% 15%, #111a2a 0%, #070b14 50%, #020307 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.game-shell { width: min(100%, 1100px); }

.topline {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-family: Cinzel, serif;
  letter-spacing: .26em;
  font-size: 11px;
  color: #9aa6b6;
  margin: 0 2px 14px;
}
.topline span:last-child { opacity: .55; }

.game-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #ffffff1f;
  box-shadow: 0 0 0 5px #070a10, 0 28px 80px #000c;
  background: #000;
}

.game-frame:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border: 0;
  box-shadow: none;
}

.fullscreen-button {
  position: absolute;
  z-index: 4;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #dbe9ed45;
  border-radius: 4px;
  background: #07111abb;
  color: #eaf7f6;
  font: 24px/1 system-ui, sans-serif;
  letter-spacing: 0;
  opacity: .82;
}
.fullscreen-button::before,
.fullscreen-button::after { display: none; }
.fullscreen-button:hover,
.fullscreen-button:focus-visible { opacity: 1; background: #17303aa8; border-color: #b4efe7aa; transform: none; }

canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---- Menu ---- */

.menu {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: radial-gradient(ellipse at center, #04060ab0 0%, #020306e6 70%, #000000f5 100%);
  animation: menuIn .5s ease;
}
.menu.hidden { display: none; }

@keyframes menuIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.menu-content { padding: 20px 32px; max-width: 600px; }

.fleur {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #e8edf4;
  margin: 0 auto 16px;
}
.fleur i {
  display: block;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e8edf4cc);
}
.fleur i:last-child { background: linear-gradient(90deg, #e8edf4cc, transparent); }
.fleur b { font-size: 12px; font-weight: 400; text-shadow: 0 0 14px #fff; }
.fleur.small { margin: 4px auto 0; }
.fleur.small i { width: 70px; }

.eyebrow {
  font-size: 10px;
  letter-spacing: .42em;
  color: #9aa6b6;
}

h1 {
  font-family: Cinzel, serif;
  font-weight: 500;
  letter-spacing: .14em;
  font-size: clamp(28px, 5.8vw, 66px);
  line-height: 1.12;
  margin: 16px 0 12px;
  text-shadow: 0 0 30px #ffffff33, 0 4px 25px #000;
}
h1 em { font-style: normal; color: #ffffff; }

.menu p {
  max-width: 440px;
  margin: 20px auto 26px;
  color: #b9c2cf;
  line-height: 1.75;
  font-size: 14px;
}
.menu p small { color: #7f8a9a; font-size: 12px; }
.menu p b { color: #fff; font-weight: 600; }

.menu-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

button {
  background: transparent;
  color: #f2f4f8;
  border: 1px solid transparent;
  font: 600 13px Cinzel, serif;
  letter-spacing: .24em;
  padding: 12px 26px;
  cursor: pointer;
  transition: color .2s, text-shadow .2s, border-color .2s, transform .2s;
  position: relative;
}
button::before,
button::after {
  content: '◆';
  position: absolute;
  top: 50%;
  font-size: 8px;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .2s;
}
button::before { left: 4px; }
button::after { right: 4px; }
button:hover,
button:focus-visible {
  outline: none;
  text-shadow: 0 0 16px #ffffffaa;
  border-color: #ffffff2a;
}
button:hover::before,
button:hover::after,
button:focus-visible::before,
button:focus-visible::after { opacity: 1; }
button span { margin-left: 12px; font-size: 15px; }
button.ghost { color: #8f9aab; font-size: 11px; }
button.ghost:hover { color: #fff; }
button.hidden { display: none; }

.toast {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  color: #f2f4f8;
  text-shadow: 0 2px 10px #000, 0 0 18px #ffffff66;
  font-family: Cinzel, serif;
  letter-spacing: .14em;
  font-size: clamp(11px, 1.5vw, 16px);
  width: 85%;
  transition: opacity .3s;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 19px;
  padding: 19px 0 0;
  font-size: 10px;
  letter-spacing: .09em;
  color: #6f7b8c;
}
.controls b { color: #c9d2de; font-weight: 700; margin-right: 5px; }

@media (max-width: 650px) {
  body { padding: 8px; }
  .topline { font-size: 8px; margin: 5px 3px 10px; }
  .menu-content { padding: 8px; }
  .fleur { margin-bottom: 6px; }
  .fleur i { width: 50px; }
  .eyebrow { font-size: 7px; }
  .menu p { font-size: 10px; margin: 8px auto 12px; }
  button { font-size: 10px; padding: 8px 14px; }
  .controls { font-size: 9px; gap: 9px 12px; }
  .fullscreen-button { top: 8px; right: 8px; width: 31px; height: 31px; font-size: 21px; }
}
