:root {
  --font-body: "Mulish", sans-serif;
  --font-title: "Luckiest Guy", cursive;
  --bs-body-color: #212529;
  --bg: #f3efe6;
  --card: #ffffff;
  --ink: #1e1f1c;
  --muted: #66645f;
  --accent: #c95a3d;
  --accent-dark: #8b2f19;
  --border: #d9cfc0;
  --white: #ffffff;
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.08);
  --radius-lg: 2rem;
  --radius-md: 1rem;
  --radius-sm: 0.5rem;
  --gradient-primary: linear-gradient(135deg, #1c143f 0%, #28a0fd 100%);
  --gradient-warning: linear-gradient(135deg, #ff9a3c 0%, #ff4e42 100%);
  --gradient-danger: linear-gradient(90deg, #d32f2f, #c272f3);
  --gradient-success: linear-gradient(to bottom right, #34d399, #3b82f6);
  --gradient-dark: linear-gradient(135deg, #2f3b52 0%, #151a22 100%);
  --gradient-impostor: linear-gradient(to right, #ff4e42, #ff0066);
  --gradient-toggle: linear-gradient(135deg, #34d399, #3b82f6);
  --gradient-border: linear-gradient(135deg, #34d399, #3b82f6);
  --bg-screen-setup: conic-gradient(from 315deg, #0a4a59 0deg, #0a4a59 72deg, #1068c2 calc(72deg + 0.1deg), #1068c2 144deg, #1896ff calc(144deg + 0.1deg), #1896ff 216deg, #23d1ff calc(216deg + 0.1deg), #23d1ff 288deg, #2fffff calc(288deg + 0.1deg) 360deg);
  --bg-screen-reveal: linear-gradient(90deg, #00beaf 0%, #00c2a4 25%, #34c99f 50%, #69d3a1 75%, #9de0a8 100%);
  --bg-screen-discussion: linear-gradient(135deg, #fb923c, #ef4444);
  --bg-screen-impostor: linear-gradient(135deg, #d32f2f, #6a1b9a);
  --surface-pattern:
    radial-gradient(circle at 51% 29%, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.02) 3%, transparent 3%, transparent 100%),
    radial-gradient(circle at 95% 73%, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.03) 3%, transparent 3%, transparent 100%),
    radial-gradient(circle at 66% 49%, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.02) 3%, transparent 3%, transparent 100%),
    radial-gradient(circle at 89% 3%, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.02) 3%, transparent 3%, transparent 100%),
    radial-gradient(circle at 84% 66%, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.01) 3%, transparent 3%, transparent 100%),
    radial-gradient(circle at 85% 96%, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.02) 7%, transparent 7%, transparent 100%),
    radial-gradient(circle at 26% 14%, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.01) 7%, transparent 7%, transparent 100%),
    radial-gradient(circle at 59% 13%, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.03) 7%, transparent 7%, transparent 100%),
    radial-gradient(circle at 21% 44%, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.01) 7%, transparent 7%, transparent 100%),
    radial-gradient(circle at 9% 11%, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.01) 7%, transparent 7%, transparent 100%),
    radial-gradient(circle at 70% 60%, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.01) 7%, transparent 7%, transparent 100%),
    radial-gradient(circle at 27% 19%, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.02) 7%, transparent 7%, transparent 100%),
    radial-gradient(circle at 33% 2%, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.02) 7%, transparent 7%, transparent 100%),
    radial-gradient(circle at 91% 36%, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.02) 5%, transparent 5%, transparent 100%),
    radial-gradient(circle at 100% 8%, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.01) 5%, transparent 5%, transparent 100%),
    radial-gradient(circle at 87% 65%, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.02) 5%, transparent 5%, transparent 100%),
    radial-gradient(circle at 36% 37%, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.03) 5%, transparent 5%, transparent 100%),
    radial-gradient(circle at 89% 79%, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.02) 5%, transparent 5%, transparent 100%),
    linear-gradient(90deg, hsla(245, 0%, 100%, 1), hsla(230, 0%, 100%, 1));
  --button-texture:
    linear-gradient(330deg, rgba(225, 225, 225, 0.05) 0%, rgba(225, 225, 225, 0.05) 33.333%, rgba(114, 114, 114, 0.05) 33.333%, rgba(114, 114, 114, 0.05) 66.666%, rgba(52, 52, 52, 0.05) 66.666%, rgba(52, 52, 52, 0.05) 99.999%),
    linear-gradient(66deg, rgba(181, 181, 181, 0.05) 0%, rgba(181, 181, 181, 0.05) 33.333%, rgba(27, 27, 27, 0.05) 33.333%, rgba(27, 27, 27, 0.05) 66.666%, rgba(251, 251, 251, 0.05) 66.666%, rgba(251, 251, 251, 0.05) 99.999%),
    linear-gradient(225deg, rgba(98, 98, 98, 0.05) 0%, rgba(98, 98, 98, 0.05) 33.333%, rgba(222, 222, 222, 0.05) 33.333%, rgba(222, 222, 222, 0.05) 66.666%, rgba(228, 228, 228, 0.05) 66.666%, rgba(228, 228, 228, 0.05) 99.999%);
  --bg-settings-info: repeating-linear-gradient(45deg,
      rgba(0, 0, 0, 0.04),
      rgba(0, 0, 0, 0.08),
      rgba(0, 0, 0, 0.05),
      rgba(0, 0, 0, 0.04),
      rgba(0, 0, 0, 0.01),
      rgba(0, 0, 0, 0.1),
      rgba(0, 0, 0, 0.09),
      rgba(0, 0, 0, 0.1),
      rgba(0, 0, 0, 0.03),
      transparent,
      rgba(0, 0, 0, 0.07),
      rgba(0, 0, 0, 0.03),
      rgba(0, 0, 0, 0.06) 4px),
    linear-gradient(90deg, rgba(193, 255, 253, 0.58), rgba(59, 104, 247, 0.22));
  --how-to-play-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(244, 236, 224, 0.92));
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.my-2 {
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

.me-2 {
  margin-right: 0.5rem !important;
}

.w-100 {
  width: 100% !important;
}

.text-start {
  text-align: left !important;
}

.d-block {
  display: block !important;
}

.d-flex {
  display: flex !important;
}

.align-items-center {
  align-items: center !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.gap-2 {
  gap: 0.5rem !important;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-screen-setup);
  color: var(--bs-body-color);
}

.bg-setup {
  background: var(--bg-screen-setup);
}

.bg-reveal {
  background: var(--bg-screen-reveal);
}

.bg-discussion {
  background: var(--bg-screen-discussion);
}

.bg-impostor {
  background: var(--bg-screen-impostor);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
}

.screen {
  width: 100%;
  min-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.intro-card {
  width: min(100%, 560px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
  background-image: var(--surface-pattern);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.text-center {
  text-align: center;
}

.main-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: 42px;
  color: var(--white);
}

.subtitle {
  margin: 0 0 25px;
  color: var(--white);
  font-size: 18px;
}

.intro-card {
  width: min(100%, 600px);
}

.entry-form-block {
  text-align: left;
}

.entry-form-block + .entry-form-block {
  margin-top: 16px;
}

.entry-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #212529;
}

.entry-btn {
  width: 100%;
  margin-top: 16px;
}

.entry-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 6px;
  color: var(--muted);
  font-weight: 700;
}

.entry-divider::before,
.entry-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d7dce2;
}

.entry-join-form {
  margin-top: 0;
}

.entry-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(220, 53, 69, 0.12);
  color: #9f1239;
  font-weight: 700;
  text-align: left;
}

.app-view {
  width: min(100%, 560px);
}

.lobby-screen {
  min-height: auto;
}

.lobby-card {
  position: relative;
  width: min(100%, 600px);
  max-height: 85vh;
  overflow: hidden;
  text-align: left;
}

.lobby-meta-strip {
  position: absolute;
  top: 12px;
  right: 20px;
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}

.meta-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(47, 59, 82, 0.1);
  color: #2f3b52;
  font-size: 1rem;
  line-height: 1;
}

.meta-pill strong {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.players-label {
  position: absolute;
  top: 15px;
  left: 20px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lobby-players-list {
  max-height: clamp(138px, 20vh, 220px);
  overflow-y: auto;
  padding-right: 4px;
}

.lobby-players-list::-webkit-scrollbar {
  width: 6px;
}

.lobby-players-list::-webkit-scrollbar-thumb {
  background: rgba(47, 59, 82, 0.25);
  border-radius: 999px;
}

.settings-gear-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--white);
  font-size: 2rem;
}

.settings-gear-btn:disabled {
  opacity: 0.55;
}

.settings-role-dot {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.settings-role-dot.host {
  background: #34d399;
}

.settings-role-dot.viewer {
  background: #f59e0b;
}

.settings-drawer-title {
  margin: 0;
}

.gradient-border {
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--gradient-border) border-box;
}

.gradient-border > * {
  border-radius: var(--radius-sm);
}

.gradient-border.greyed-limit {
  background:
    linear-gradient(#f1f3f5, #f1f3f5) padding-box,
    linear-gradient(#d1d5db, #d1d5db) border-box;
}

.greyed {
  opacity: 0.5;
  filter: grayscale(50%);
}

.greyed:hover {
  opacity: 0.5;
  filter: grayscale(50%);
}

.greyed-limit {
  opacity: 0.5;
  pointer-events: auto;
}

.gradient-border:disabled {
  opacity: 0.6;
}

.btn-outline-secondary {
  border: 1px solid #ced4da;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
}

.counter-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
}

.settings-action-btn {
  width: 100%;
}

.settings-leave-btn {
  margin-bottom: 12px;
}

.restart-hold {
  position: relative;
  overflow: hidden;
  color: #dc3545;
  background-color: #fff;
  border: 1px solid #dc3545;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.restart-hold::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--progress, 0%);
  height: 100%;
  background-color: #ff8b8b;
  transition: width 0.03s linear;
  z-index: 0;
}

.restart-hold span {
  position: relative;
  z-index: 1;
}

.restart-hold span::after {
  content: "Hoia 2 sekundit all";
  display: block;
  margin-top: 2px;
  color: #666;
  font-size: 0.8em;
}

.fa-gear {
  color: #ffffff;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

.status-block,
.room-panel,
.join-form {
  margin-top: 20px;
}

.status-block,
.room-panel,
.status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.status-row + .status-row {
  margin-top: 10px;
}

.room-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-panel-actions {
  display: flex;
  gap: 10px;
}

.room-meta {
  margin-top: 16px;
}

.lobby-notice {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(201, 90, 61, 0.14);
  color: var(--accent-dark);
  font-weight: 700;
}

.player-list-block {
  margin-top: 18px;
}

.lobby-card .d-grid {
  margin-top: 1rem;
}

.settings-panel {
  margin-top: 18px;
}

.settings-action-btn {
  width: 100%;
  display: block;
  box-sizing: border-box;
}

#openCategoriesBtn {
  padding: 0.375rem 0.75rem;
}

.player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
}

.player-row.empty {
  color: var(--muted);
  justify-content: center;
}

.player-main {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.players-name {
  font-weight: 700;
}

.host-badge,
.ready-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.host-badge {
  background: rgba(47, 59, 82, 0.12);
  color: #2f3b52;
}

.ready-badge.ready {
  background: rgba(60, 139, 94, 0.16);
  color: #2f7b4f;
}

.ready-badge.waiting {
  background: rgba(201, 90, 61, 0.14);
  color: var(--accent-dark);
}

.actions {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  font: inherit;
}

input.input-error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.join-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.primary-btn,
.secondary-btn,
.gradient-btn,
.gradient-btn-small,
.impostor-btn,
.new-round-btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--white);
}

.primary-btn {
  background: var(--accent);
}

.secondary-btn {
  background: #2f3b52;
}

.secondary-btn:disabled,
.gradient-btn:disabled,
.impostor-btn:disabled,
.new-round-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.gradient-btn,
.gradient-btn-small,
.impostor-btn,
.new-round-btn {
  width: 100%;
  background-image: var(--button-texture), var(--gradient-primary);
  box-shadow: var(--shadow-sm);
}

.gradient-btn-small {
  display: block;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
}

.impostor-btn {
  background-image: var(--button-texture), var(--gradient-warning);
}

.new-round-btn {
  background-image: var(--button-texture), var(--gradient-danger);
}

.phase-screen {
  margin-top: 18px;
}

.offcanvas-setting.settings-disabled {
  border-color: var(--border);
  background-color: #f1f3f5;
}

.offcanvas-setting.settings-disabled .setting-title,
.offcanvas-setting.settings-disabled .setting-subtitle,
.offcanvas-setting.settings-disabled .setting-recommended,
.offcanvas-setting.settings-disabled #impostorValue {
  color: #9ca3af;
}

.offcanvas-setting .setting-title {
  color: #212529;
  font-size: 1rem;
  font-weight: 700;
}

.offcanvas-setting .setting-subtitle,
.offcanvas-setting .setting-recommended,
#impostorValue {
  color: var(--muted);
}

.offcanvas-setting .setting-subtitle {
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.offcanvas-setting .setting-recommended {
  font-size: 0.8rem;
}

.setting-box {
  margin-bottom: 20px;
}

.impostor-counter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.counter-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.25rem;
}

#impostorValue {
  min-width: 28px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
}

.settings-readonly {
  opacity: 0.72;
}

.settings-readonly .toggle-btn,
.settings-readonly .counter-btn,
.settings-readonly .settings-action-btn,
.settings-readonly .category-btn {
  cursor: not-allowed;
}

.settings-readonly .offcanvas-setting {
  border-color: var(--border);
  background-color: #f1f3f5;
}

.settings-readonly .offcanvas-setting .setting-title,
.settings-readonly .offcanvas-setting .setting-subtitle,
.settings-readonly .offcanvas-setting .setting-recommended,
.settings-readonly .offcanvas-setting #impostorValue {
  color: #9ca3af;
}

.simple-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

#categoriesModal.show {
  display: block;
}

#categoriesModal .modal-footer .gradient-btn-small {
  width: 100%;
  display: block;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

#categoriesModal .modal-footer .gradient-border {
  width: auto;
  min-width: 0;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

#categoriesModal .text-muted {
  color: var(--muted);
}

#categoriesModal #categoriesContainer {
  display: grid;
  grid-auto-rows: min-content;
  gap: 0.5rem;
}

#categoriesModal .category-btn {
  position: relative;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid #ecedee;
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: #374151;
  text-align: left;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

#categoriesModal .category-btn:hover {
  border-color: #ecedee;
}

#categoriesModal .category-btn.selected {
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--gradient-border) border-box;
  color: #374151;
}

#categoriesModal .category-btn .check-icon {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%) scale(0);
  opacity: 0;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--gradient-border);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#categoriesModal .category-btn.selected .check-icon {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

#categoriesModal .category-btn.selected:focus,
#categoriesModal .category-btn.selected:active {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

#categoriesModal .category-btn.locked {
  opacity: 0.75;
}

#leaveRoomModal .leave-room-modal-footer {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: 0.75rem;
  justify-content: space-between;
}

#leaveRoomModal .leave-room-modal-btn {
  width: calc(50% - 0.375rem) !important;
  flex: 0 1 calc(50% - 0.375rem);
}

.simple-modal-footer .gradient-border {
  padding: 0.375rem 0.75rem;
}

.simple-modal-footer .gradient-btn-small {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-weight: 400;
}

hr {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

#cardRevealPanel .player-label {
  font-size: 18px;
}

.player-name {
  font-size: 32px;
  font-weight: 800;
}

#cardSeenBtn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

#cardSeenBtn.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#cardRevealPanel .drag-transition {
  transition: transform var(--transition-base);
}

.button-stack {
  margin-top: 18px;
}

.button-stack > * + * {
  margin-top: 12px;
}

.vote-options,
.vote-results-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.vote-option,
.vote-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
}

.vote-option {
  color: var(--ink);
  cursor: pointer;
}

.vote-option.selected {
  border-color: transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--gradient-primary) border-box;
  box-shadow: var(--shadow-sm);
}

.vote-option:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.vote-option-name,
.vote-result-name {
  font-weight: 700;
}

.vote-option-state,
.vote-result-count {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 700;
}

.discussion-icon,
.impostor-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
}

.discussion-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: var(--gradient-warning);
  box-shadow: var(--shadow-md);
  font-size: 2rem;
}

.impostor-name-content {
  margin: 0;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  word-break: break-word;
}

.result-word-list {
  color: var(--white);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  word-break: break-word;
}

.result-word-line {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}

.result-word-line + .result-word-line {
  margin-top: 6px;
}

.result-word-list-scroll {
  max-height: 132px;
  overflow-y: auto;
}

.secret-pair-results-box {
  text-align: left;
}

.secret-pair-results {
  display: grid;
  gap: 10px;
}

.secret-pair-line {
  display: grid;
  gap: 4px;
}

.secret-pair-names {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.secret-pair-words {
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
}

.phase-result-header {
  margin-bottom: 22px;
}

.result-word-section {
  margin-bottom: 12px;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.result-title-small {
  margin-bottom: 10px;
}

.debug-panel {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.debug-toggle {
  border: none;
  background: transparent;
  padding: 0;
  font-weight: 700;
  color: var(--accent-dark);
  cursor: pointer;
}

.debug-panel-body {
  max-height: 60vh;
  overflow-y: auto;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
}

.label {
  color: var(--muted);
}

.value {
  font-weight: 700;
}

@media (max-width: 600px) {
  .intro-card {
    padding: 20px;
  }

  .players-label {
    position: absolute;
    top: 15px;
    left: 20px;
    display: block;
    margin-bottom: 0;
  }

  .lobby-meta-strip {
    position: absolute;
    top: 12px;
    right: 20px;
    justify-content: flex-end;
    margin-top: 0;
  }

  .join-row {
    grid-template-columns: 1fr;
  }

  .phase-card {
    padding: 20px;
    border-radius: var(--radius-md);
  }

  .discussion-title,
  .result-title {
    font-size: 1.7rem;
  }

  .word-card-text,
  .impostor-name-box p {
    font-size: 1.35rem;
  }
}

/* Match one_device settings drawer exactly where online needs extra hooks */
.settings-drawer.offcanvas-end {
  width: 80%;
  max-width: 400px;
}

.settings-drawer .offcanvas-header,
.settings-drawer .offcanvas-body {
  background-image: var(--bg-surface-pattern);
}

.settings-drawer .offcanvas-title {
  margin: 0;
}

.settings-drawer .offcanvas-body {
  padding: 1rem;
}

.settings-drawer #openCategoriesBtn {
  display: block;
  width: 100%;
  min-height: calc(1.5em + 0.75rem + 4px);
  padding: 0.375rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

.settings-drawer .segmented-wrapper {
  margin-top: 1rem;
}

.settings-drawer .segmented-wrapper > .setting-subtitle {
  display: inline-block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 400;
  color: #374151;
}

.settings-drawer .offcanvas-setting {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 1rem !important;
  background-color: #f5f5f5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}

.settings-drawer .offcanvas-setting .setting-title {
  color: #212529;
  font-size: 1rem;
  font-weight: 700;
}

.settings-drawer .offcanvas-setting .setting-subtitle,
.settings-drawer .offcanvas-setting .setting-recommended,
.settings-drawer #impostorValue {
  color: var(--muted);
}

.settings-drawer .offcanvas-setting .setting-subtitle {
  font-size: 0.85rem;
}

.settings-drawer .offcanvas-setting .setting-recommended {
  font-size: 0.8rem;
}

.settings-drawer .impostor-counter-row {
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0;
}

.settings-drawer .offcanvas-setting button,
.settings-drawer .counter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.25rem;
  line-height: 1;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.settings-drawer #decreaseImpostor,
.settings-drawer #increaseImpostor {
  font-size: 1.25rem;
  line-height: 1;
}

.settings-drawer #impostorValue {
  display: inline-block;
  width: 2rem;
  min-width: 2rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
}

.settings-drawer .btn-outline-secondary,
.settings-drawer #restartGameBtn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

.settings-drawer #restartGameBtn {
  width: 100%;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
}
