* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  font: 15px/1.6 monospace;
  margin: 0;
  background: #fff;
  color: #000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-page {
  isolation: isolate;
  overflow-x: hidden;
}

.landing-dragging {
  cursor: grabbing;
  user-select: none;
}

.landing-scene {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.landing-scene canvas {
  display: block;
  height: 100%;
  width: 100%;
}

#landing-scene,
#landing-avatar {
  inset: 0;
  position: absolute;
}

#landing-avatar { outline: none; }

.landing-scene-fade {
  background:
    radial-gradient(ellipse 42% 26% at 50% 52%, rgba(255, 255, 255, .5), rgba(255, 255, 255, .12) 68%, transparent 100%),
    linear-gradient(to bottom, rgba(255, 255, 255, .3), transparent 22%, transparent 80%, rgba(255, 255, 255, .5));
  inset: 0;
  position: absolute;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.top {
  padding-top: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #000;
  padding-bottom: 14px;
  margin-bottom: 48px;
}

nav b { font-size: 15px; }
nav a { color: #000; margin-left: 18px; }

nav .signin {
  border: 1px solid #000;
  padding: 5px 12px;
  text-decoration: none;
}

nav .signin:hover { background: #eee; }

.link-button {
  appearance: none;
  background: none;
  border: 0;
  color: #000;
  cursor: pointer;
  font: inherit;
  margin: 0 0 0 12px;
  padding: 0;
  text-decoration: underline;
}

main {
  margin: auto 0;
  padding-bottom: 8vh;
}

h1 {
  font-size: 34px;
  line-height: 1.25;
  margin: 0 0 14px;
}

h2 {
  font-size: 20px;
  margin: 0 0 12px;
}

p { margin: 0; }

.account-name {
  color: #666;
  margin-left: 18px;
}

.empty-state {
  border: 1px solid #ccc;
  padding: 24px;
}

.code-label {
  display: block;
  margin-top: 20px;
}

.code-input {
  border: 1px solid #000;
  font: 20px/1 monospace;
  letter-spacing: 2px;
  margin-top: 6px;
  padding: 12px;
  text-transform: uppercase;
  width: 100%;
}

.device-actions { margin-top: 18px; }

.game-list { display: grid; gap: 12px; }

.game-row {
  border: 1px solid #ccc;
  padding: 18px;
}

.game-row h2 { margin-bottom: 4px; }
.game-row a { color: #000; }
.game-row p { color: #666; }

.btn, .provider-button {
  font: inherit;
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid #000;
  cursor: pointer;
  text-decoration: none;
}

.btn {
  background: #000;
  color: #fff;
  margin-right: 10px;
}

.btn:hover { background: #333; }

.auth-card {
  border: 1px solid #000;
  margin: 0 auto;
  padding: 24px;
  max-width: 420px;
}

.provider-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.provider-button {
  align-items: center;
  background: #fff;
  color: #000;
  display: flex;
  gap: 12px;
  text-align: left;
  width: 100%;
}

.provider-logo {
  display: block;
  flex: 0 0 18px;
  height: 18px;
  width: 18px;
}

.discord-logo { color: #5865f2; }

.provider-button:hover { background: #eee; }
.provider-button:disabled { color: #777; cursor: wait; }

.status {
  color: #666;
  margin-top: 18px;
  min-height: 24px;
}

.error { color: #a00; }

.legal-links {
  color: #666;
  font-size: 12px;
  margin-top: 8px;
}

.legal-links a { color: #666; }

.legal-page main {
  margin: 0;
  padding-bottom: 64px;
}

.legal-copy {
  max-width: 640px;
}

.legal-copy h1 { margin-bottom: 8px; }

.legal-copy h2 {
  font-size: 17px;
  margin: 32px 0 8px;
}

.legal-copy p,
.legal-copy li {
  color: #222;
}

.legal-copy p + p { margin-top: 12px; }

.legal-copy ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.legal-copy a { color: #000; }

.effective-date {
  color: #666 !important;
  font-size: 12px;
}

footer {
  margin-top: auto;
  color: #666;
  font-size: 12px;
}

footer .wrap {
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 22px;
}

footer a { color: #666; }

.yc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #f26522;
  color: #fff;
  font-size: 10px;
  vertical-align: middle;
  margin: 0 2px 2px;
}

@media (max-width: 560px) {
  nav { align-items: flex-start; }
  nav > span { text-align: right; }
  nav a { display: inline-block; margin-bottom: 8px; }
  footer .wrap { flex-direction: column; }

  .landing-scene-fade {
    background:
      radial-gradient(ellipse 80% 34% at 50% 46%, rgba(255, 255, 255, .68), rgba(255, 255, 255, .2) 68%, transparent 100%),
      linear-gradient(to bottom, rgba(255, 255, 255, .34), transparent 20%, transparent 78%, rgba(255, 255, 255, .56));
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-scene { opacity: .8; }
}
