* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #0b0f1a; overflow: hidden; }
body {
  display: flex; align-items: center; justify-content: center;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; color: #fff;
  -webkit-user-select: none; user-select: none; touch-action: none;
}
#wrap { position: relative; width: 960px; height: 540px; box-shadow: 0 10px 60px rgba(0, 0, 0, 0.6); overflow: hidden; }
#game { display: block; width: 100%; height: 100%; image-rendering: auto; }
#ui { position: absolute; left: 0; top: 0; width: 960px; height: 540px; transform-origin: 0 0; pointer-events: none; }

.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 16px; pointer-events: auto;
}
.screen.hidden { display: none; }
.screen.overlay { background: rgba(5, 8, 16, 0.6); backdrop-filter: blur(2px); }

.logo {
  font-size: 76px; letter-spacing: 1px; line-height: 1; font-weight: 900;
  color: #ffd54f; text-shadow: 0 5px 0 #b26a00, 0 10px 24px rgba(0, 0, 0, 0.6);
  transform: rotate(-3deg);
}
.logo span { color: #fff; margin-left: 12px; text-shadow: 0 5px 0 #1565c0, 0 10px 24px rgba(0, 0, 0, 0.6); }
.tag { font-size: 18px; color: #cfd8dc; margin-bottom: 6px; }
h2 { font-size: 34px; line-height: 1.1; color: #ffd54f; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.6); text-align: center; }
h3 { color: #ffd54f; margin-bottom: 6px; }
.sub { font-size: 17px; color: #e0e6ea; text-align: center; max-width: 720px; }

button {
  font: inherit; color: inherit; cursor: pointer; border: 0; border-radius: 12px;
  transition: transform 0.08s, background 0.15s, box-shadow 0.15s;
}
button:active { transform: translateY(2px) scale(0.98); }
.primary {
  background: linear-gradient(#ffca28, #ff9800); color: #3e2000; font-weight: 800; font-size: 22px;
  padding: 12px 34px; box-shadow: 0 5px 0 #b45f00, 0 8px 20px rgba(0, 0, 0, 0.4);
}
.primary:hover { filter: brightness(1.08); }
.primary small { font-size: 13px; opacity: 0.6; font-weight: 600; }
.ghost { background: rgba(255, 255, 255, 0.12); padding: 10px 22px; font-size: 17px; font-weight: 700; border: 2px solid rgba(255, 255, 255, 0.25); }
.ghost:hover { background: rgba(255, 255, 255, 0.22); }
.row { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 6px; }
.col { display: flex; flex-direction: column; gap: 12px; align-items: stretch; min-width: 280px; }

#sport-grid { display: grid; grid-template-columns: repeat(3, 250px); gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 14px 12px;
  background: linear-gradient(160deg, rgba(40, 60, 110, 0.92), rgba(18, 26, 50, 0.92));
  border: 2px solid rgba(255, 255, 255, 0.16); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.card:hover { transform: translateY(-3px); border-color: #ffd54f; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55); }
.card.tour { background: linear-gradient(160deg, rgba(150, 100, 10, 0.95), rgba(80, 40, 0, 0.95)); }
.card .icon { font-size: 40px; line-height: 1.1; }
.card .name { font-size: 20px; font-weight: 800; }
.card .blurb { font-size: 12.5px; color: #cfd8dc; text-align: center; line-height: 1.3; min-height: 33px; }
.card .num { position: absolute; top: 8px; left: 10px; font-size: 12px; opacity: 0.5; font-weight: 700; }

.opts { display: flex; gap: 22px; }
.opt { display: flex; align-items: center; gap: 8px; }
.opt label { font-weight: 800; color: #b0bec5; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.seg { display: flex; background: rgba(0, 0, 0, 0.35); border-radius: 12px; padding: 3px; }
.seg button { padding: 7px 14px; font-size: 15px; font-weight: 700; color: #cfd8dc; background: transparent; border-radius: 9px; }
.seg button.on { background: #ffd54f; color: #3e2000; }

.pickers { display: flex; align-items: center; gap: 28px; }
.picker {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 290px; padding: 12px;
  background: rgba(10, 16, 32, 0.7); border-radius: 16px; border: 2px solid rgba(255, 255, 255, 0.12);
}
.pl-label { font-size: 13px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #90caf9; }
.picker[data-side="1"] .pl-label { color: #ffab91; }
.pick-row { display: flex; align-items: center; gap: 6px; }
.arrow { font-size: 34px; width: 42px; height: 60px; background: rgba(255, 255, 255, 0.1); font-weight: 900; }
.arrow:hover { background: rgba(255, 255, 255, 0.22); }
.pname { font-size: 22px; font-weight: 800; }
.stats { width: 200px; display: flex; flex-direction: column; gap: 3px; }
.stat { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b0bec5; }
.stat span { width: 46px; }
.stat i { display: block; height: 7px; border-radius: 4px; background: linear-gradient(90deg, #66bb6a, #ffd54f); }
.keys { font-size: 12px; color: #90a4ae; margin-top: 4px; text-align: center; }
.vs { font-size: 46px; font-weight: 900; color: #ffd54f; text-shadow: 0 4px 0 #b26a00; }

.how { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; max-width: 880px; background: rgba(10, 16, 32, 0.75); padding: 20px 24px; border-radius: 16px; }
.how p { font-size: 14.5px; line-height: 1.45; color: #e0e6ea; margin-bottom: 8px; }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; margin: 0 1px; border-radius: 5px; background: #eceff1; color: #263238; font: 700 12px/1.5 monospace; text-align: center; box-shadow: 0 2px 0 #90a4ae; }

/* touch controls */
#touch { position: absolute; inset: 0; pointer-events: none; }
#touch.hidden { display: none; }
.tpad { position: absolute; bottom: 14%; display: flex; gap: 14px; pointer-events: auto; }
.tpad.left { left: 3%; }
.tpad.right { right: 3%; }
.tpad button, #touch-pause {
  width: 78px; height: 78px; border-radius: 50%; background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.4); font-size: 22px; font-weight: 800; touch-action: none;
}
.tpad button.down { background: rgba(255, 213, 79, 0.55); }
#touch-pause { position: absolute; top: 14%; right: 2%; width: 46px; height: 46px; font-size: 14px; pointer-events: auto; }

#scr-setup { gap: 10px; }
#scr-setup .sub { font-size: 15px; margin-top: -6px; }
#scr-setup .picker { gap: 2px; padding: 10px 12px; }
#scr-setup .pname { font-size: 20px; }
