@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg-top: #3a1766;
  --bg-bottom: #12081f;
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.72);
  --gold: #ffc93c;
  --gold-deep: #f0a800;
  --gold-text: #2a1600;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --ok: #5fdc8a;
  --error: #ff7a7a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-top) 0%, #22104a 45%, var(--bg-bottom) 100%) fixed;
  background-color: var(--bg-bottom);
  color: var(--text);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 460px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.hero {
  text-align: center;
  margin-bottom: 22px;
}

.logo {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  box-shadow: 0 10px 40px rgba(255, 201, 60, 0.18);
}

h1 {
  margin: 14px 0 2px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.tagline,
.sub {
  margin: 0;
  color: var(--text-soft);
}

.card {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

button {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform 80ms ease, opacity 120ms ease;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.gold {
  border: 0;
  color: var(--gold-text);
  background: linear-gradient(180deg, #ffd96b 0%, var(--gold-deep) 100%);
  box-shadow: 0 6px 18px rgba(240, 168, 0, 0.3);
}

.outline {
  margin-top: 16px;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  background: transparent;
}

.hint {
  margin: 0 0 14px;
  color: var(--gold);
  text-align: center;
}

.small {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--text-soft);
  text-align: center;
}

.message {
  margin: 12px 0 0;
  min-height: 0;
  text-align: center;
  color: var(--text-soft);
}

.message:empty {
  display: none;
}

.message.ok {
  color: var(--ok);
}

.message.error {
  color: var(--error);
}

.player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--gold-text);
  background: linear-gradient(180deg, #ffd96b 0%, var(--gold-deep) 100%);
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.who {
  flex: 1;
  min-width: 0;
}

.name {
  font-weight: 600;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level {
  color: var(--text-soft);
  font-size: 13px;
}

.coins {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  font-weight: 600;
}

.coin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe8a3 0%, var(--gold) 45%, var(--gold-deep) 100%);
  box-shadow: inset 0 0 0 1.5px rgba(120, 70, 0, 0.45);
}

.games-section h2 {
  margin-bottom: 2px;
}

.games {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 10px;
}

.games li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-soft);
}

.games img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.footer {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}
