/* RPS Arena — design tokens & base */

:root {
  --rps-viewport-width: 100vw;
  --rps-viewport-height: var(--rps-telegram-stable-height, 100dvh);
  --rps-safe-top: max(env(safe-area-inset-top, 0px), var(--rps-telegram-safe-top, 0px));
  --rps-safe-right: max(env(safe-area-inset-right, 0px), var(--rps-telegram-safe-right, 0px));
  --rps-safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--rps-telegram-safe-bottom, 0px));
  --rps-safe-left: max(env(safe-area-inset-left, 0px), var(--rps-telegram-safe-left, 0px));
  --color-bg: #0a0a0f;
  --color-bg-alt: #12121a;
  --color-surface: #1a1a26;
  --color-surface-hover: #222233;
  --color-border: #2e2e42;
  --color-text: #f0f0f8;
  --color-text-muted: #9494b0;
  --color-primary: #7c6cf0;
  --color-primary-hover: #9588ff;
  --color-success: #3dd68c;
  --color-warning: #f5b942;
  --color-danger: #f07178;
  --color-accent: #59c2ff;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --gradient-surface: linear-gradient(145deg, #1e1e2e 0%, #14141f 100%);
  --gradient-primary: linear-gradient(135deg, #7c6cf0 0%, #59c2ff 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  background-image: radial-gradient(ellipse at top, #1a1a30 0%, var(--color-bg) 60%);
  color: var(--color-text);
  min-height: var(--rps-viewport-height);
  line-height: 1.5;
  overflow-x: hidden;
}

#app {
  min-height: var(--rps-viewport-height);
  width: min(100%, var(--rps-viewport-width));
  max-width: 480px;
  margin: 0 auto;
  padding: var(--rps-safe-top) max(1rem, var(--rps-safe-right)) var(--rps-safe-bottom) max(1rem, var(--rps-safe-left));
}

a { color: var(--color-accent); }

.input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0.75rem 0;
  line-height: 1.4;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-code {
  display: block;
  word-break: break-all;
  padding: 0.75rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin: 0.5rem 0 1rem;
}

.info-row {
  font-size: 0.9375rem;
  margin: 0.25rem 0;
}

.info-grid {
  margin: 1rem 0;
}

.rules-list {
  list-style: none;
  margin: 1rem 0;
}

.rules-list__item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9375rem;
}

.rules-list__item:last-child {
  border-bottom: none;
}
