* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body {
  background: #1a0b45; background: linear-gradient(160deg, #1a0b45 0%, #0b1d4d 100%);
  background-attachment: fixed;
  color: #fff; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 18px;
}
.hidden { display: none !important; }
.screen { max-width: 480px; margin: 0 auto; padding: 24px 20px 40px; }
.center { text-align: center; padding-top: 30vh; }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 10; background: #c62828; text-align: center; padding: 8px; }
.logo { font-size: 48px; font-weight: 800; letter-spacing: 3px; }
.logo span { color: #ffd600; }
.logo.small { font-size: 32px; text-align: center; margin-bottom: 12px; }
.muted { color: #b8b5d6; }
.welcome { text-align: center; font-size: 20px; margin: 6px 0 10px; }

label { display: block; margin: 18px 0 8px; color: #b8b5d6; font-size: 16px; }
input {
  width: 100%; font-size: 22px; padding: 14px 16px; border-radius: 14px; border: 2px solid #3d3380;
  background: #0e0730; color: #fff; outline: none;
}
input:focus { border-color: #ffd600; }
.code-input { text-transform: uppercase; letter-spacing: 12px; text-align: center; font-size: 34px; font-weight: bold; font-family: "Courier New", monospace; }

.emojis { display: flex; flex-wrap: wrap; justify-content: space-between; }
.emojis button {
  width: 15%; aspect-ratio: 1; font-size: 30px; margin-bottom: 8px; border-radius: 12px;
  border: 2px solid transparent; background: rgba(255,255,255,0.08); color: #fff;
}
.emojis button.sel { border-color: #ffd600; background: rgba(255,214,0,0.2); }

.colors { display: flex; justify-content: space-between; }
.colors button { width: 11%; aspect-ratio: 1; border-radius: 50%; border: 3px solid transparent; }
.colors button.sel { border-color: #fff; transform: scale(1.15); }
.colors button.taken { opacity: 0.2; }

.btn {
  display: block; width: 100%; margin-top: 18px; padding: 16px; border: 0; border-radius: 16px;
  font-size: 20px; font-weight: bold; color: #fff; background: #3d3380;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; }
.btn-big { background: #1e88e5; font-size: 24px; padding: 20px; margin-top: 26px; }
.btn-gold { background: #ffd600; color: #1a0b45; }
.btn-ghost { background: transparent; border: 2px solid #3d3380; color: #b8b5d6; margin-top: 40px; }
.error { color: #ff8a80; margin-top: 14px; text-align: center; }
.device { text-align: center; margin-top: 16px; font-size: 14px; }

.me {
  width: 160px; height: 160px; margin: 30px auto 16px; border-radius: 50%; border: 8px solid #888;
  font-size: 90px; line-height: 144px; text-align: center; background: rgba(255,255,255,0.08);
}
#s-lobby { text-align: center; }
#s-lobby h2 { font-size: 34px; }
.host-box { margin-top: 26px; padding: 16px; border-radius: 16px; background: rgba(255,214,0,0.1); }
#lobby-info { margin-top: 20px; }
.link { color: #ffd600; }

/* Wybór roli urządzenia (strona główna) – działa też pilotem na TV */
#s-choose { text-align: center; max-width: 900px; padding-top: 6vh; }
.choose-q { font-size: 22px; margin: 18px 0 22px; }
.choose { display: flex; flex-direction: column; }
.choice {
  display: block; width: 100%; margin-bottom: 16px; padding: 26px 16px; border-radius: 20px;
  border: 3px solid #3d3380; background: rgba(255,255,255,0.07); color: #fff; cursor: pointer;
}
.choice:focus, .choice:hover { border-color: #ffd600; background: rgba(255,214,0,0.12); outline: none; }
.choice-icon { display: block; font-size: 56px; }
.choice-title { display: block; font-size: 28px; font-weight: bold; margin-top: 6px; }
.choice-sub { display: block; font-size: 16px; color: #b8b5d6; margin-top: 4px; }
.choose-note { margin-top: 10px; font-size: 14px; }
@media (min-width: 700px) and (orientation: landscape) {
  .choose { flex-direction: row; justify-content: space-between; }
  .choice { width: 48%; padding: 40px 20px; }
  .choice-icon { font-size: 80px; }
  .choice-title { font-size: 36px; }
  .choice-sub { font-size: 20px; }
}
@media (min-width: 1400px) and (orientation: landscape) {
  #s-choose { max-width: 1500px; padding-top: 14vh; }
  #s-choose .logo { font-size: 110px; }
  .choose-q { font-size: 42px; margin: 30px 0 50px; }
  .choice { padding: 60px 30px; border-width: 5px; border-radius: 32px; }
  .choice-icon { font-size: 130px; }
  .choice-title { font-size: 60px; }
  .choice-sub { font-size: 32px; }
  .choose-note { font-size: 28px; margin-top: 30px; }
}
