:root {
  --bg: #ffffff;
  --bg-soft: #fdfbff;
  --ink: #33304a;
  --ink-soft: #6f6b8a;
  --accent: #7c4dff;
  --accent-dark: #5e35d8;
  --accent-soft: #efe6ff;
  --gold: #ffb300;
  --green: #2ecc8f;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(80, 60, 150, 0.14);
  --radius: 22px;

  /* Tęczowa paleta */
  --red: #ff5d73;
  --orange: #ff9f43;
  --yellow: #ffd32a;
  --green-bright: #2ecc8f;
  --blue: #4aa8ff;
  --violet: #a55eea;
  --pink: #ff6fb5;
}

/* Tęczowa paleta jest używana jako pojedyncze akcenty kolorów */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(255, 111, 181, .45) 0%, transparent 55%),
    radial-gradient(800px 550px at -10% 10%, rgba(74, 168, 255, .40) 0%, transparent 55%),
    radial-gradient(1000px 650px at 50% 115%, rgba(46, 204, 143, .40) 0%, transparent 55%),
    radial-gradient(700px 450px at 110% 45%, rgba(255, 211, 42, .38) 0%, transparent 50%),
    radial-gradient(700px 500px at -5% 60%, rgba(165, 94, 234, .34) 0%, transparent 55%),
    linear-gradient(160deg, #fff4f8 0%, #f2f6ff 40%, #f0fff8 100%);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 680px;
  padding: 24px 18px 40px;
  position: relative;
  z-index: 2;
}

.screen { display: none; }
.screen.active { display: block; animation: fadeUp .45s ease backwards; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Tęczowe dekoracje tła ---------- */
.rainbow-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.decor-item {
  position: absolute;
  opacity: .22;
  animation: floaty 8s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

/* Pozycje i rozmiary dekoracji */
.decor-heart1 { font-size: 2.6rem; top: 9%;  right: 9%;  animation-delay: .4s; }
.decor-heart2 { font-size: 1.9rem; bottom: 30%; left: 20%; animation-delay: 1.8s; }
.decor-heart3 { font-size: 2.2rem; top: 58%; right: 12%; animation-delay: 2.6s; }
.decor-bubble1 { font-size: 2.8rem; top: 46%; left: 4%; animation-delay: .9s; }
.decor-bubble2 { font-size: 2rem; bottom: 5%; left: 38%; animation-delay: 2.2s; }
.decor-sparkle1 { font-size: 2rem; top: 5%; left: 50%; animation-delay: .6s; }
.decor-sparkle2 { font-size: 1.7rem; bottom: 36%; left: 55%; animation-delay: 1.5s; }
.decor-star    { font-size: 2.3rem; top: 26%; right: 31%; animation-delay: 2.9s; }

/* Rysowane znaki zapytania */
.decor-qdraw {
  position: absolute;
  opacity: .22;
  animation: floaty 7s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.decor-qdraw .qmark {
  font-style: normal;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -2px;
}
.decor-qdraw .qtail {
  display: block;
  width: 40%;
  height: 0;
  border: 3px solid var(--accent);
  border-top: 0;
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 0 0 50% 50%;
  margin-top: -2px;
}
.decor-qdraw1 { top: 6%;   left: 14%; transform: rotate(-8deg);  animation-delay: .5s; }
.decor-qdraw2 { top: 36%;  right: 4%; transform: rotate(10deg);  animation-delay: 1.6s; }
.decor-qdraw3 { bottom: 12%; left: 9%; transform: rotate(6deg);  animation-delay: 2.4s; }
.decor-qdraw1 .qmark { font-size: 4.5rem; }
.decor-qdraw2 .qmark { font-size: 3.2rem; }
.decor-qdraw3 .qmark { font-size: 3.8rem; }

/* Zapewnij, że dekoracje nie zasłaniają treści */
.screen { position: relative; z-index: 2; }

/* ---------- Hero ---------- */
.hero { text-align: center; margin: 34px 0 26px; }

.logo {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0;
  background: linear-gradient(90deg,
    var(--red), var(--orange), var(--yellow),
    var(--green-bright), var(--blue), var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo span {
  -webkit-text-fill-color: initial;
  color: var(--accent);
}
.logo-sm { font-size: 1.4rem; }

.tagline {
  background: linear-gradient(90deg,
    var(--red), var(--orange), var(--yellow),
    var(--green-bright), var(--blue), var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 8px 0 0;
  font-size: 1.05rem;
}

/* ---------- Zakładki (tabs) ---------- */
.tabs {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 36px);
  max-width: calc(680px - 36px);
  display: flex;
  background: #f3f0fb;
  border-radius: 999px;
  padding: 4px;
  margin: 0;
  gap: 4px;
  z-index: 30;
  box-shadow: 0 10px 26px rgba(80, 60, 150, .18);
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 10px 8px;
  font: inherit;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tab.active {
  background: var(--card);
  color: var(--accent-dark);
  box-shadow: 0 3px 10px rgba(80, 60, 150, .1);
}

#screen-start { padding-bottom: 96px; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .35s ease both; }

/* ---------- Karty ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  border: 2px solid var(--accent-soft);
}

.setup-card h2 {
  margin: 0 0 18px;
  font-size: 1.35rem;
}

.field { margin-bottom: 20px; }
.field > label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}
.field small { color: var(--ink-soft); font-weight: 400; }

textarea, input[type="text"], input[type="number"], input[type="email"], input[type="password"], select {
  width: 100%;
  border: 2px solid #e4ddf2;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  resize: vertical;
  background: #fff;
}
textarea:focus, input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="password"]:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

.hidden { display: none !important; }
.mt { margin-top: 12px; }

.hint {
  color: var(--ink-soft);
  font-size: .92rem;
  margin: 0 0 16px;
}

/* ---------- Pola imion graczy ---------- */
.count-row input {
  max-width: 110px;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

.player-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.player-name-input {
  width: 100%;
  border: 2px solid #e4ddf2;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.player-name-input:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 520px) {
  .player-names { grid-template-columns: 1fr; }
}

/* ---------- Twoje pytania (custom) ---------- */
.custom-card { margin-top: 0; }
.custom-card h2 { margin: 0 0 8px; font-size: 1.35rem; }

.custom-list { margin-top: 20px; display: grid; gap: 8px; }

.custom-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #faf8ff;
  border: 1px solid #e8e2f7;
  border-radius: 14px;
  padding: 10px 14px;
}
.custom-item-text { flex: 1; line-height: 1.4; }
.custom-item-cat {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 2px;
}
.custom-item-del {
  flex-shrink: 0;
  border: none;
  background: #ddd2f5;
  color: var(--accent-dark);
  width: 28px; height: 28px;
  border-radius: 50%;
  font-weight: 800;
  cursor: pointer;
  transition: background .12s ease, transform .12s ease;
}
.custom-item-del:hover { background: var(--accent); color: #fff; }
.custom-item-del:active { transform: scale(.92); }

/* ---------- Ustawienia ---------- */
.settings-card h2 { margin: 0 0 8px; font-size: 1.35rem; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #faf8ff;
  border: 1px solid #e8e2f7;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.setting-info { display: flex; flex-direction: column; gap: 2px; }
.setting-title { font-weight: 700; }
.setting-info small { color: var(--ink-soft); }

/* Przełącznik (switch) */
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d9d2ea;
  border-radius: 999px;
  transition: background .2s ease;
}
.switch-slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::before { transform: translateX(22px); }

.btn-danger {
  background: #ffe9ec;
  color: #d6455b;
}
.btn-danger:hover { background: #ffd9df; }

/* ---------- Grupy (w ustawieniach) ---------- */
.groups-card { margin-top: 20px; }
.groups-card h2 { margin: 0 0 8px; font-size: 1.35rem; }

.groups-list { margin-top: 16px; display: grid; gap: 10px; }

.group-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #faf8ff;
  border: 1px solid #e8e2f7;
  border-radius: 16px;
  padding: 12px 14px;
}
.group-info { flex: 1; min-width: 0; }
.group-name { font-weight: 700; }
.group-members-count { color: var(--ink-soft); font-size: .82rem; display: block; }
.group-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.group-badge {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: .75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}
.group-actions { display: flex; gap: 6px; flex-shrink: 0; }
.group-actions .friend-action { width: 32px; height: 32px; font-size: .85rem; }

/* Modal edycji grupy */
.group-modal-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.group-modal-actions .btn { flex: 1; padding: 10px 14px; }

.group-members-list { margin-top: 14px; display: grid; gap: 8px; }
.group-member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e8e2f7;
  border-radius: 12px;
  padding: 8px 12px;
}
.group-member-item .friend-avatar { width: 30px; height: 30px; font-size: .8rem; }
.group-member-item .friend-info { flex: 1; }
.group-member-item .friend-action { width: 26px; height: 26px; }

/* ---------- Tryb solo (Poznaj siebie) ---------- */
#screen-solo .question-card { min-height: 180px; }
.solo-hint {
  color: var(--ink-soft);
  font-size: .95rem;
  max-width: 440px;
  margin: 20px auto 0;
  line-height: 1.5;
}

/* ---------- Przyciski ---------- */
.btn {
  font: inherit;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: scale(.97); }

.btn:disabled,
.btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn:disabled:hover,
.btn[disabled]:hover {
  box-shadow: none;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(124, 77, 255, .35);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 14px 26px rgba(124, 77, 255, .5); }

.btn-blue {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(74, 168, 255, .35);
}
.btn-blue:hover { background: #2f8de8; box-shadow: 0 14px 26px rgba(74, 168, 255, .5); }

.btn-pink {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 111, 181, .35);
}
.btn-pink:hover { background: #ef5aa4; box-shadow: 0 14px 26px rgba(255, 111, 181, .5); }

.btn-ghost {
  background: #f3f0fb;
  color: var(--ink);
}
.btn-ghost:hover { background: #e8e2f7; }

.btn-big {
  width: 100%;
  font-size: 1.15rem;
  padding: 16px 24px;
  margin-top: 6px;
}

/* ---------- Kategorie (checkboxy) ---------- */
.category-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cat-option {
  position: relative;
  border: 2px solid #e8e2f2;
  border-radius: 14px;
  padding: 12px 12px 12px 42px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  user-select: none;
}
.cat-option:hover { border-color: #c9b8f2; }
.cat-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cat-option input {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  display: grid;
  place-items: center;
  border: 2px solid #cfc4ea;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.cat-option input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.cat-option input::before {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0;
  transition: opacity .12s ease;
}
.cat-option input:checked::before {
  opacity: 1;
}
.cat-option .cat-name { display: block; font-weight: 700; }
.cat-option .cat-emoji { margin-right: 4px; }
.cat-option .cat-count { color: var(--ink-soft); font-size: .85rem; }

/* Kategoria 18+ */
.cat-option.cat-adult { border-color: #f3b8c4; background: #fff5f7; }
.cat-option.cat-adult:has(input:checked) {
  border-color: var(--red);
  background: #ffe9ee;
}
.cat-badge-adult {
  display: inline-block;
  margin-left: 6px;
  background: var(--red);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 8px;
  vertical-align: middle;
  letter-spacing: .04em;
}

/* ---------- Ekran gry ---------- */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.game-title { display: flex; flex-direction: column; gap: 2px; }
.round-counter {
  color: var(--ink-soft);
  font-size: .9rem;
}

.stage { text-align: center; }

.category-pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 18px;
}

.question-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 46px 30px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-text {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}

.turn-banner {
  margin: 26px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.turn-label { color: var(--ink-soft); font-size: .95rem; }
.turn-player {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.actions .btn-big { flex: 1; }

/* ---------- Wynik ---------- */
.game-footer { margin-top: 34px; }
.scoreboard { display: grid; gap: 10px; }
.scoreboard h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 6px 18px rgba(80, 60, 150, .07);
}
.player-row .avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.player-row .p-name { font-weight: 700; flex: 1; text-align: left; }
.player-row .p-points {
  font-weight: 800;
  color: var(--accent-dark);
}

/* ---------- Panel głosowania ---------- */
.vote-panel {
  margin: 18px 0 0;
  background: #faf8ff;
  border: 2px solid #e8e2f7;
  border-radius: 18px;
  padding: 18px;
  animation: fadeUp .35s ease both;
}
.vote-panel.hidden { display: none; }

.vote-question {
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--ink);
}

.vote-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.vote-giver {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: #fff;
  border: 2px solid #eee7fb;
  border-radius: 14px;
  padding: 8px 12px;
}
.vote-giver-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  min-width: 96px;
}

.vote-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #e4ddf2;
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.vote-btn:hover { border-color: var(--accent); }
.vote-btn:active { transform: scale(.96); }
.vote-btn.voted {
  border-color: var(--green);
  background: #e6f6ef;
  cursor: default;
}
.vote-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.vote-btn:disabled:hover { border-color: #e4ddf2; }
.vote-btn.voted::after {
  content: " ✓";
  color: var(--green);
  font-weight: 800;
}

.vote-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
}

.vote-summary {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: .9rem;
  min-height: 1.2em;
}
.points-badge {
  background: var(--gold);
  color: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: .8rem;
  font-weight: 800;
}

@media (max-width: 520px) {
  .logo { font-size: 2.3rem; }
  .question-text { font-size: 1.3rem; }
  .category-list { grid-template-columns: 1fr; }
}

/* ---------- Landing page ---------- */
.landing {
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 20px 0;
}

.landing-hero { margin-bottom: 34px; }

.landing-logo {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0;
  background: linear-gradient(90deg,
    var(--red), var(--orange), var(--yellow),
    var(--green-bright), var(--blue), var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-logo span {
  -webkit-text-fill-color: initial;
  color: var(--accent);
}

.landing-tagline {
  background: linear-gradient(90deg,
    var(--red), var(--orange), var(--yellow),
    var(--green-bright), var(--blue), var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.15rem;
  margin: 12px 0 24px;
}

.landing-features {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 340px;
  text-align: left;
  display: grid;
  gap: 10px;
}
.landing-features li {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(80, 60, 150, .08);
  border: 1px solid #efe6ff;
}

.landing-actions {
  display: grid;
  gap: 12px;
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
}
.btn-link {
  background: none;
  color: var(--accent-dark);
  text-decoration: underline;
  padding: 8px;
}
.btn-link:hover { color: var(--accent); }

.btn-sm { padding: 8px 16px; font-size: .9rem; }

/* ---------- Pasek użytkownika ---------- */
.auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  min-height: 40px;
}
.auth-user { font-weight: 700; color: var(--ink); }

.auth-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Modal logowania ---------- */
.auth-modal { max-width: 400px; }

.auth-tabs {
  display: flex;
  background: #f3f0fb;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 10px;
  font: inherit;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.auth-tab.active {
  background: var(--card);
  color: var(--accent-dark);
  box-shadow: 0 3px 10px rgba(80, 60, 150, .1);
}

.auth-form { text-align: left; }

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  border-radius: 999px;
}

.auth-error {
  background: #fde2e6;
  color: var(--accent-dark);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: .9rem;
  font-weight: 600;
  margin: 0 0 14px;
}
.auth-error.hidden { display: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: .85rem;
  margin: 16px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4ddf2;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: var(--ink);
  border: 2px solid #e4ddf2;
  box-shadow: none;
  margin-bottom: 12px;
}
.btn-google:hover { border-color: #d8c9cf; background: #faf7f8; }

/* ---------- Znajomi ---------- */
.friends-card { margin-top: 0; }
.friends-card h2 { margin: 0 0 8px; font-size: 1.35rem; }

.friend-add-row {
  display: flex;
  gap: 10px;
}
.friend-add-row input { flex: 1; }

.friends-list { margin-top: 16px; display: grid; gap: 10px; }

.friend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #faf8ff;
  border: 1px solid #e8e2f7;
  border-radius: 16px;
  padding: 10px 14px;
}
.friend-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.friend-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.friend-name { font-weight: 700; }
.friend-code { color: var(--ink-soft); font-size: .8rem; }

.friend-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.friend-playing-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.friend-playing-toggle input {
  accent-color: var(--green);
  width: 18px; height: 18px;
  cursor: pointer;
}

.friend-action {
  border: none;
  background: #ddd2f5;
  color: var(--accent-dark);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .12s ease, transform .12s ease;
}
.friend-action:hover { background: var(--accent); color: #fff; }
.friend-action:active { transform: scale(.9); }
.friend-action.friend-del { background: #fde2e6; }
.friend-action.friend-del:hover { background: var(--accent-dark); }

/* ---------- Modal udostępniania ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(59, 47, 53, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: fadeUp .3s ease both;
}
.modal h2 { margin: 0 0 6px; font-size: 1.4rem; }
.modal-sub { color: var(--ink-soft); margin: 0 0 16px; }

.share-url-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.share-url-row input {
  flex: 1;
  border: 2px solid #e4ddf2;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #faf5f7;
}
.share-url-row input:focus { outline: none; border-color: var(--accent); }

.qr-box {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.qr-box canvas {
  border: 2px solid #e4ddf2;
  border-radius: 14px;
  padding: 8px;
  background: #fff;
}
