/* Shared Canada-themed design tokens for Quiplash, Eh? */
:root {
  --canada-red: #d52b1e;
  --canada-red-dark: #a31f15;
  --maple: #ff5a3c;
  --snow: #fff7f5;
  --ink: #1a1418;
  --stage-bg: #2a0d10;
  --stage-bg-2: #4a141a;
  --gold: #ffcf5c;
  --good: #3ec46d;
  --muted: #c9a9a9;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.08s ease, filter 0.15s ease;
}
button:active {
  transform: scale(0.96);
}
button:disabled {
  filter: grayscale(0.6) opacity(0.6);
  cursor: not-allowed;
}

.btn-primary {
  background: var(--canada-red);
  color: #fff;
  padding: 16px 28px;
  font-size: 1.1rem;
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes maple-spin {
  to {
    transform: rotate(360deg);
  }
}

.maple {
  display: inline-block;
}

/* Brand logo image (host lobby + player join screen). */
.logo-img {
  display: block;
  margin: 0 auto;
  max-width: min(560px, 92%);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
  animation: pop-in 0.4s ease both;
}

/* Player avatar: emoji fallback with the generated image layered on top. Sized
   from --avatar-size (default 64px) so a caller can pin pixels inline or a
   container can scale it with its text — see avatarHtml(). */
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--avatar-size, 64px);
  height: var(--avatar-size, 64px);
  font-size: calc(var(--avatar-size, 64px) * 0.6);
  border-radius: 50%;
  background: #fff;
  /* Ring scales with the avatar so it never looks like a hairline on the TV. */
  box-shadow: 0 0 0 max(3px, calc(var(--avatar-size, 64px) * 0.05)) var(--ring, var(--canada-red));
  overflow: hidden;
  flex: 0 0 auto;
  vertical-align: middle;
}
.avatar-emoji {
  font-size: 1em;
  line-height: 1;
}
.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
