* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0b0d; color: #e8e2d0; font-family: "Segoe UI", system-ui, sans-serif; overflow: hidden; }
.hidden { display: none !important; }

.screen { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px;
  background: radial-gradient(ellipse at center, #1b1b20 0%, #0b0b0d 70%); }
h1 { font-size: clamp(42px, 10vw, 88px); letter-spacing: .12em; margin: 0; color: #f2c200; text-shadow: 0 0 24px rgba(242, 194, 0, .35); }
.sub { margin: 0; color: #9c968a; }
.col { display: flex; flex-direction: column; gap: 12px; align-items: stretch; width: min(320px, 100%); margin-top: 14px; }
.row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

button { font: inherit; font-weight: 700; font-size: 18px; padding: 14px 22px; border-radius: 8px; border: 0; cursor: pointer; }
button.yellow { background: #f2c200; color: #121212; box-shadow: 0 4px 0 #9a7b00; }
button.yellow:hover:not(:disabled) { background: #ffd21f; }
button.yellow:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #9a7b00; }
button:disabled { opacity: .35; cursor: default; }
button.ghost { background: transparent; color: #9c968a; border: 1px solid #3a3a40; }

input { font: inherit; font-size: 40px; text-align: center; letter-spacing: .3em; padding: 10px; border-radius: 8px;
  border: 2px solid #f2c200; background: #141418; color: #f2c200; }
.code { font-size: 84px; font-weight: 800; letter-spacing: .2em; color: #f2c200; }
.count { font-size: 28px; font-weight: 700; }
.opp-rank { margin: 0; font-size: 20px; min-height: 1.3em; }

/* профиль и лидеры */
.screen.scroll { justify-content: flex-start; overflow-y: auto; padding-top: 32px; padding-bottom: 32px; }
h2 { margin: 0; color: #f2c200; font-size: 30px; letter-spacing: .05em; }
.nick { font-size: 20px; font-weight: 800; color: #f2c200; }
.row.two { flex-wrap: nowrap; }
.row.two button { flex: 1; padding: 12px 8px; font-size: 16px; }
input.text { font-size: 20px; letter-spacing: normal; padding: 10px 12px; min-width: 0; }
button.mini { font-size: 14px; padding: 8px 12px; }
.panel { width: min(420px, 100%); padding: 14px 16px; border: 1px solid #2c2c32; border-radius: 10px; background: #121216;
  display: flex; flex-direction: column; gap: 10px; }
.pf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stats b { display: block; font-size: 24px; color: #e8e2d0; }
.stats span { font-size: 12px; color: #9c968a; }
table { border-collapse: collapse; width: 100%; }
.vs td { padding: 4px 2px; border-top: 1px solid #222228; font-size: 14px; }
.vs td:last-child { text-align: right; color: #9c968a; }
.transfer { flex: 1; font-size: 24px; font-weight: 800; letter-spacing: .12em; color: #f2c200; font-family: Consolas, monospace; }
.lb { width: min(520px, 100%); }
.lb th { text-align: left; font-size: 13px; color: #9c968a; padding: 6px 8px; border-bottom: 1px solid #2c2c32; }
.lb td { padding: 9px 8px; border-bottom: 1px solid #1e1e24; }
.lb td:first-child, .lb th:first-child { width: 2.5em; color: #9c968a; }
.lb td:nth-child(4), .lb td:nth-child(5), .lb th:nth-child(4), .lb th:nth-child(5) { text-align: right; }
.lb tr.me td { background: #2a2410; }
.lb tr.gap td { text-align: center; color: #55555c; padding: 2px; border: 0; }
.error { color: #ff5a4a; min-height: 1.2em; margin: 0; }

#game { position: fixed; inset: 0; display: flex; flex-direction: column; background: #0b0b0d; }
#stage { flex: 1; position: relative; min-height: 0; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hud { padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; background: linear-gradient(#0b0b0d00, #0b0b0d 30%); }
#status { font-size: 18px; min-height: 1.4em; text-align: center; }
#hud button { min-width: 230px; }
#hud button.mini { min-width: 0; }

.profile { width: min(320px, 100%); padding: 12px 14px; border: 1px solid #2c2c32; border-radius: 10px; background: #121216; display: flex; flex-direction: column; gap: 8px; }
.profile-top { font-size: 17px; }
.bar { height: 8px; border-radius: 4px; background: #26262c; overflow: hidden; }
#rank-bar { height: 100%; width: 0; background: #f2c200; transition: width .4s; }
.small { font-size: 13px; }
#over-rating { font-size: 20px; text-align: center; min-height: 1.3em; }
#over-rating .up { color: #f2c200; font-weight: 800; display: block; margin-top: 6px; font-size: 24px; }

#over {position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(5, 5, 6, .82); gap: 8px; }
#over-title { font-size: clamp(48px, 12vw, 96px); font-weight: 900; letter-spacing: .1em; }
