:root {
  --app-bg: #f6efe7;
  --app-brown: #6f4e37;
  --app-brown-dark: #4e3424;
  --app-accent: #c28b52;
  --app-card: #ffffff;
  --app-muted: #7b6f66;
}

body {
  background: linear-gradient(135deg, #f8f1e9 0%, #efe0d0 100%);
  min-height: 100vh;
  color: #2d2620;
}

.app-navbar {
  background: var(--app-brown);
  color: #fff;
  box-shadow: 0 8px 20px rgba(78, 52, 36, 0.18);
}

.app-navbar .navbar-brand {
  color: #fff;
}

.app-navbar .navbar-brand:hover {
  color: #fff3e3;
}

.btn-primary {
  --bs-btn-bg: var(--app-brown);
  --bs-btn-border-color: var(--app-brown);
  --bs-btn-hover-bg: var(--app-brown-dark);
  --bs-btn-hover-border-color: var(--app-brown-dark);
  --bs-btn-active-bg: var(--app-brown-dark);
  --bs-btn-active-border-color: var(--app-brown-dark);
}

.hero-card {
  background:
    radial-gradient(
      circle at top right,
      rgba(194, 139, 82, 0.25),
      transparent 35%
    ),
    #fff;
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 18px 45px rgba(78, 52, 36, 0.13);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.hero-card h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.25rem;
}

.hero-card p {
  color: var(--app-muted);
  font-size: 1.1rem;
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--app-accent);
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.card {
  border: 0;
  border-radius: 20px;
  overflow: hidden;
}

.card-header {
  border-bottom: 1px solid rgba(111, 78, 55, 0.1);
  padding: 1rem 1.25rem;
}

.game-card {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(78, 52, 36, 0.14);
}

.meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--app-muted);
  font-size: 0.95rem;
}

.empty-state {
  background: #fff;
  border-radius: 28px;
  padding: 48px 24px;
  text-align: center;
  box-shadow: 0 18px 45px rgba(78, 52, 36, 0.13);
}

.empty-state i {
  font-size: 4rem;
  color: var(--app-accent);
}

.rank-badge {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f0dfcc;
  color: var(--app-brown-dark);
  font-weight: 800;
}

.table > :not(caption) > * > * {
  padding: 0.95rem 0.9rem;
}

.round-card {
  border: 2px solid rgba(111, 78, 55, 0.12);
}

.form-control:focus,
.form-check-input:focus {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 0.25rem rgba(194, 139, 82, 0.22);
}

.form-check-input:checked {
  background-color: var(--app-brown);
  border-color: var(--app-brown);
}

.accordion-button:not(.collapsed) {
  background: #f4e7d9;
  color: var(--app-brown-dark);
}

.app-footer {
  color: var(--app-muted);
}

.phase-player-card {
  border: 1px solid rgba(111, 78, 55, 0.16);
  border-radius: 18px;
  padding: 16px;
  background: #fffaf4;
}

.table-card {
  overflow: visible;
}

.pile-card {
  border: 1px dashed rgba(111, 78, 55, 0.25);
  border-radius: 18px;
  padding: 16px;
  background: #fffaf4;
  text-align: center;
}

.deck-visual {
  width: 86px;
  height: 122px;
  border-radius: 14px;
  margin: 8px auto;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
    45deg,
    var(--app-brown),
    var(--app-brown) 8px,
    var(--app-brown-dark) 8px,
    var(--app-brown-dark) 16px
  );
  color: #fff;
  font-size: 34px;
  box-shadow: 0 10px 20px rgba(78, 52, 36, 0.18);
}

.hand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 10px;
}

.selectable-card {
  cursor: pointer;
  margin: 0;
  position: relative;
}

.selectable-card input {
  display: none;
}

.selectable-card input:checked + .game-card-face {
  transform: translateY(-8px);
  outline: 4px solid rgba(194, 139, 82, 0.45);
  box-shadow: 0 16px 26px rgba(78, 52, 36, 0.24);
}

.game-card-face {
  min-height: 122px;
  border-radius: 14px;
  padding: 12px 8px;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 10px 18px rgba(78, 52, 36, 0.12);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
  border-width: 2px;
}

.game-card-face strong {
  font-size: 34px;
  line-height: 1;
}

.game-card-face span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.game-card-face.mini {
  min-height: 78px;
  width: 58px;
  padding: 6px 4px;
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(78, 52, 36, 0.12);
}

.game-card-face.mini strong {
  font-size: 22px;
}

.game-card-face.mini span {
  font-size: 8px;
}

.color-red {
  color: #b42318;
  border-color: #ef9a9a;
  background: linear-gradient(135deg, #fff7f7 0%, #ffe4e4 100%);
}

.color-blue {
  color: #175cd3;
  border-color: #93c5fd;
  background: linear-gradient(135deg, #f7fbff 0%, #dbeafe 100%);
}

.color-green {
  color: #027a48;
  border-color: #8fd0b7;
  background: linear-gradient(135deg, #f6fffb 0%, #d9f6ea 100%);
}

.color-yellow {
  color: #b77900;
  border-color: #facc15;
  background: linear-gradient(135deg, #fffde8 0%, #fff0a6 100%);
}

.type-wild {
  color: #6f2dbd;
  border-color: #c4a1ff;
  background: linear-gradient(135deg, #fffaff 0%, #efe2ff 100%);
}

.type-skip {
  color: #344054;
  border-color: #b8c0cc;
  background: linear-gradient(135deg, #ffffff 0%, #e8edf4 100%);
}

.action-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(111, 78, 55, 0.12);
}

.hit-group {
  max-width: 360px;
}

.player-turn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(111, 78, 55, 0.1);
}

.player-turn-row.active {
  background: #fff3df;
}

.mini-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.played-area {
  border-bottom: 1px dashed rgba(111, 78, 55, 0.18);
  padding-bottom: 12px;
}

.played-area:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(111, 78, 55, 0.06);
  border: 1px solid rgba(111, 78, 55, 0.1);
}

.activity-item small {
  color: #6c757d;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #087f5b;
}

.live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #12b886;
  box-shadow: 0 0 0 5px rgba(18, 184, 134, 0.12);
}

.uno-refresh-notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 3000;
  padding: 14px 18px;
  border-radius: 16px;
  background: #7a4f35;
  color: #fff;
  text-align: center;
  max-width: min(92vw, 360px);
}

.game-card-face::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.game-card-face strong,
.game-card-face span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.played-group {
  padding: 8px 0 10px;
  border-top: 1px dashed rgba(111, 78, 55, 0.16);
}

.played-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.played-group-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--app-brown-dark);
  background: #f4e7d9;
  border: 1px solid rgba(111, 78, 55, 0.14);
  border-radius: 999px;
  padding: 4px 9px;
  margin-bottom: 7px;
}

.activity-ticker {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(111, 78, 55, 0.12);
}

.activity-ticker-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #dff8ee;
  color: #087f5b;
  border-right: 1px solid rgba(111, 78, 55, 0.1);
}

.activity-ticker-track {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.activity-ticker-item {
  flex: 0 0 auto;
  max-width: min(640px, 48vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fffaf4;
  border: 1px solid rgba(111, 78, 55, 0.12);
  color: #2d2620;
  font-size: 0.94rem;
}

.activity-ticker-item small {
  margin-left: 8px;
  color: #7b6f66;
}

.played-card-panel {
  position: sticky;
  top: 16px;
  z-index: 2;
}

.played-card-panel .card-body {
  overflow: visible;
}

.uno-restoring-scroll {
  opacity: 1 !important;
}

.current-phase-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(111, 78, 55, 0.12);
  border-radius: 16px;
  padding: 12px 16px;
}

.current-phase-kicker {
  color: #6f4e37;
  font-weight: 800;
}

.current-phase-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 1.05rem;
}

.current-phase-main strong {
  font-size: 1.2rem;
  color: #2d2620;
}

.selectable-card.newly-drawn .game-card-face {
  box-shadow:
    0 0 0 4px rgba(255, 193, 7, 0.28),
    0 16px 34px rgba(255, 193, 7, 0.22);
  transform: translateY(-3px);
}

.selectable-card.newly-drawn::after {
  content: "neu";
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ffc107;
  color: #2d2620;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.inline-players-panel {
  border: 1px dashed rgba(111, 78, 55, 0.25);
  border-radius: 18px;
  padding: 14px;
  background: #fffaf4;
  overflow: visible;
}

.inline-players-title {
  font-weight: 800;
  color: #2d2620;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-turn-row.compact {
  padding: 14px 16px !important;
  border-radius: 18px !important;
  border-bottom: 1px solid rgba(111, 78, 55, 0.1);
  display: block !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px !important;
  border: 1px solid rgba(111, 78, 55, 0.1);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  min-width: 0;
}

.player-turn-row.compact:last-child {
  border-bottom: 1px solid rgba(111, 78, 55, 0.1);
  margin-bottom: 0;
}

.player-turn-row.compact.active {
  background: linear-gradient(135deg, #fff6dc, #fffef9) !important;
  position: relative;
  border: 1px solid rgba(255, 193, 7, 0.6);
  box-shadow: 0 10px 24px rgba(45, 38, 32, 0.08) !important;
  animation: none !important;
  border-left: 6px solid #ffc107 !important;
  padding-left: 14px !important;
}

.player-turn-row.compact small {
  white-space: nowrap;
}

.uno-toast-container {
  z-index: 5000;
  width: min(94vw, 980px) !important;
  max-width: 980px !important;
}

.uno-toast {
  border-radius: 22px !important;
  box-shadow: 0 22px 55px rgba(45, 38, 32, 0.28) !important;
  overflow: hidden;
  width: 100%;
  min-height: 86px;
  display: flex;
  align-items: center;
  font-size: 1.12rem;
}

.turn-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(111, 78, 55, 0.12);
}

.turn-banner.my-turn {
  background: linear-gradient(135deg, #e7f8ef, #ffffff);
  border-color: rgba(25, 135, 84, 0.3);
}

.turn-banner.waiting-turn {
  background: linear-gradient(135deg, #fff7df, #ffffff);
  border-color: rgba(255, 193, 7, 0.38);
}

.turn-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 1.25rem;
  color: #fff;
  background: #198754;
  box-shadow: 0 0 0 6px rgba(25, 135, 84, 0.12);
}

.turn-banner.waiting-turn .turn-banner-icon {
  background: #b77900;
  box-shadow: 0 0 0 6px rgba(255, 193, 7, 0.16);
}

.turn-banner-label {
  font-weight: 900;
  font-size: 1.05rem;
}

.active-turn-badge {
  color: #2d2620 !important;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.player-info-main {
  min-width: 0;
}

.player-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.02rem;
  line-height: 1.2;
  color: #111827;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.player-meta-line {
  margin-top: 0 !important;
  color: #6b5a4c;
  font-size: 0.9rem;
  white-space: normal !important;
  min-width: 0;
  flex: 1 1 auto;
}

.player-status-stack {
  display: none !important;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: 0 0 auto;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.badge-you {
  background: #0d6efd;
  color: #fff;
}

.badge-turn {
  background: #ffc107 !important;
  color: #2d2620 !important;
  font-size: 0.74rem !important;
  padding: 5px 10px !important;
}

.badge-laid {
  background: #198754;
  color: #fff;
}

.badge-open {
  background: #6c757d;
  color: #fff;
}

.player-card-top,
.player-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.player-card-bottom {
  margin-top: 8px;
}

.player-card-top .mini-badge,
.player-card-bottom .mini-badge {
  position: static !important;
  flex: 0 0 auto;
  transform: none !important;
  margin: 0 !important;
}

.badge-open,
.badge-laid {
  font-size: 0.72rem !important;
  padding: 5px 10px !important;
}

.uno-toast .toast-body {
  padding: 24px 28px !important;
}

.footer-ticker-items {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.footer-ticker-items > span {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(111, 78, 55, 0.1);
  font-size: 0.9rem;
}

.footer-ticker-items small {
  color: #7b6f66;
  margin-left: 6px;
}

.uno-mobile-context {
  display: none;
  border: 1px solid rgba(25, 135, 84, 0.25);
  background: rgba(25, 135, 84, 0.07);
  border-radius: 1rem;
  padding: 0.8rem 1rem;
}

.game-mode-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(111, 78, 55, 0.12);
  box-shadow: 0 10px 28px rgba(45, 38, 32, 0.07);
}

.game-mode-header-main {
  min-width: 0;
}

.back-mode-btn {
  border: 1px solid rgba(111, 78, 55, 0.14);
  border-radius: 999px;
  color: var(--app-brown-dark);
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(45, 38, 32, 0.05);
}

.back-mode-btn i {
  font-size: 1.1rem;
  vertical-align: -2px;
}

.game-title-kicker {
  color: #7b6f66;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 2px;
}

.game-mode-header h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1;
}

.game-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.game-meta-pills span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fffaf4;
  border: 1px solid rgba(111, 78, 55, 0.12);
  color: #5f5147;
  font-weight: 800;
  font-size: 0.92rem;
}

.game-meta-pills span.is-active {
  background: #e7f8ef;
  border-color: rgba(25, 135, 84, 0.25);
  color: #087f5b;
}

.game-meta-pills .bi-circle-fill {
  font-size: 0.55rem;
}

.game-mode-header-actions {
  flex: 0 0 auto;
  padding-top: 6px;
}

.uno-header {
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 193, 7, 0.22),
      transparent 32%
    ),
    rgba(255, 255, 255, 0.8);
}

.uno-deck {
  background: repeating-linear-gradient(
    45deg,
    #d92d20,
    #d92d20 8px,
    #175cd3 8px,
    #175cd3 16px,
    #027a48 16px,
    #027a48 24px,
    #facc15 24px,
    #facc15 32px
  );
}

.uno-card-form {
  position: relative;
  margin: 0;
}

.uno-card-form .game-card-face {
  width: 100%;
  border: 0;
}

.uno-card-form.is-disabled {
  opacity: 0.45;
  filter: grayscale(0.35);
}

.uno-card-form.is-disabled .game-card-face {
  cursor: not-allowed;
}

.uno-card-face {
  min-height: 128px;
  cursor: pointer;
}

.uno-card-face strong {
  font-size: 36px;
}

.uno-color-select {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 7px;
  z-index: 4;
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.uno-hand-grid {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
}

.uno-badge {
  background: #d92d20;
  color: #fff;
}

.new-card-glow {
  outline: 4px solid rgba(255, 193, 7, 0.7);
  box-shadow:
    0 0 0 8px rgba(255, 193, 7, 0.18),
    0 18px 34px rgba(45, 38, 32, 0.2) !important;
}

.uno-pile-discard {
  width: 116px;
  min-height: 168px;
  border-radius: 18px;
}

.uno-pile-discard strong {
  font-size: 44px;
}

.uno-activity-panel .activity-list-horizontal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.uno-activity-panel .activity-item {
  margin: 0;
  min-height: 74px;
}

.badge-bot {
  background: #eef4ff;
  color: #315c9b;
  border: 1px solid rgba(49, 92, 155, 0.18);
}

@keyframes unoActivePulse {
  0%,
  100% {
    box-shadow: 0 8px 18px rgba(255, 193, 7, 0.14);
  }
  50% {
    box-shadow: 0 8px 26px rgba(255, 193, 7, 0.34);
  }
}

@media (max-width: 768px) {
  .hero-card {
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
  }

  .hero-card .btn {
    width: 100%;
  }

  .table {
    font-size: 0.92rem;
  }
}

@media (max-width: 768px) {
  .hand-grid {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  }

  .game-card-face {
    min-height: 104px;
  }

  .game-card-face strong {
    font-size: 28px;
  }

  .action-panel .btn,
  .hit-group {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 1199px) {
  .played-card-panel {
    position: static;
  }

  .played-card-panel .card-body {
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .activity-ticker {
    display: block;
  }

  .activity-ticker-label {
    border-right: 0;
    border-bottom: 1px solid rgba(111, 78, 55, 0.1);
  }

  .activity-ticker-track {
    padding: 8px;
  }
}

@media (max-width: 768px) {
  .current-phase-strip {
    display: block;
  }

  .current-phase-main {
    margin-top: 4px;
  }

  .activity-ticker-item {
    max-width: 82vw;
  }
}

@media (max-width: 768px) {
  .inline-players-panel {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-turn-row.compact.active {
    animation: none;
  }
}

@media (max-width: 768px) {
  .turn-banner {
    align-items: flex-start;
    padding: 12px 14px;
  }
}

@media (max-width: 768px) {
  .player-turn-row.compact {
    align-items: flex-start;
  }

  .player-status-stack {
    align-items: flex-end;
  }
}

@media (max-width: 520px) {
  .player-card-top,
  .player-card-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 992px) {
  .footer-ticker-items {
    display: block;
  }

  .footer-ticker-items > span {
    display: block;
    margin-top: 5px;
  }

  .footer-ticker-items > span:nth-child(n + 2) {
    display: none;
  }

  .uno-mobile-context {
    display: block;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(111, 78, 55, 0.12);
    border-radius: 16px;
    padding: 10px 12px;
  }
}

@media (max-width: 768px) {
  .game-mode-header {
    display: block;
    padding: 18px;
    border-radius: 22px;
  }

  .game-mode-header-actions {
    padding-top: 14px;
  }

  .game-mode-header-actions .btn,
  .game-mode-header-actions form {
    width: 100%;
  }

  .game-meta-pills span {
    font-size: 0.86rem;
    padding: 6px 9px;
  }

  .uno-toast {
    min-height: 74px;
    font-size: 1rem;
    border-radius: 18px !important;
  }
}

@media (max-width: 768px) {
  .uno-hand-grid {
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  }

  .uno-card-face {
    min-height: 110px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .uno-card-face strong {
    font-size: 30px;
  }

  .uno-color-select {
    position: static;
    margin-bottom: 6px;
    border-radius: 10px;
  }
}

@media (max-width: 768px) {
  .uno-pile-discard {
    width: 104px;
    min-height: 150px;
  }
}

@media (max-width: 900px) {
  .uno-mobile-context {
    display: block;
  }
}

/* UNO Sticky-Footer final */
body:has(.uno-game-footer) {
  padding-bottom: 118px !important;
}

.uno-game-footer {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: 14px !important;
  transform: translateX(-50%) !important;
  z-index: 3000 !important;
  width: min(96vw, 1320px) !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr) minmax(
      240px,
      1fr
    ) !important;
  gap: 10px !important;
  padding: 10px !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(111, 78, 55, 0.16) !important;
  box-shadow: 0 18px 45px rgba(61, 38, 23, 0.18) !important;
  backdrop-filter: blur(10px);
}

.uno-game-footer-section {
  min-width: 0 !important;
  border-radius: 16px !important;
  padding: 10px 13px !important;
  background: #fffaf4 !important;
  border: 1px solid rgba(111, 78, 55, 0.1) !important;
}

.uno-game-footer .footer-label {
  font-size: 0.76rem !important;
  color: #7b6f66 !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 3px !important;
}

.uno-game-footer .footer-main {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.uno-game-footer .footer-main strong {
  white-space: nowrap !important;
}

.uno-game-footer .footer-main span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.uno-game-footer .footer-player.is-me {
  background: linear-gradient(135deg, #e7f8ef, #fffaf4) !important;
  border-color: rgba(25, 135, 84, 0.28) !important;
}

.uno-game-footer .footer-player.is-me .footer-main i,
.uno-game-footer .footer-player.is-me .footer-main strong {
  color: #087f5b !important;
}

.uno-game-footer .footer-ticker-items {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.uno-game-footer .footer-ticker-items > span {
  min-width: 0 !important;
  flex: 1 1 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  padding: 5px 9px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  border: 1px solid rgba(111, 78, 55, 0.1) !important;
  font-size: 0.9rem !important;
}

@media (max-width: 992px) {
  body:has(.uno-game-footer) {
    padding-bottom: 168px !important;
  }

  .uno-game-footer {
    bottom: 8px !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    padding: 8px !important;
    border-radius: 18px !important;
  }

  .uno-game-footer-section {
    padding: 8px 10px !important;
  }
}

:root {
  --app-bg: #f6efe7;
  --app-brown: #6f4e37;
  --app-brown-dark: #4e3424;
  --app-accent: #c28b52;
  --app-card: #ffffff;
  --app-muted: #7b6f66;
}

body {
  background: linear-gradient(135deg, #f8f1e9 0%, #efe0d0 100%);
  min-height: 100vh;
  color: #2d2620;
}

.app-navbar {
  background: var(--app-brown);
  color: #fff;
  box-shadow: 0 8px 20px rgba(78, 52, 36, 0.18);
}

.app-navbar .navbar-brand {
  color: #fff;
}

.app-navbar .navbar-brand:hover {
  color: #fff3e3;
}

.btn-primary {
  --bs-btn-bg: var(--app-brown);
  --bs-btn-border-color: var(--app-brown);
  --bs-btn-hover-bg: var(--app-brown-dark);
  --bs-btn-hover-border-color: var(--app-brown-dark);
  --bs-btn-active-bg: var(--app-brown-dark);
  --bs-btn-active-border-color: var(--app-brown-dark);
}

.hero-card {
  background:
    radial-gradient(
      circle at top right,
      rgba(194, 139, 82, 0.25),
      transparent 35%
    ),
    #fff;
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 18px 45px rgba(78, 52, 36, 0.13);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.hero-card h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.25rem;
}

.hero-card p {
  color: var(--app-muted);
  font-size: 1.1rem;
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--app-accent);
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.card {
  border: 0;
  border-radius: 20px;
  overflow: hidden;
}

.card-header {
  border-bottom: 1px solid rgba(111, 78, 55, 0.1);
  padding: 1rem 1.25rem;
}

.game-card {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(78, 52, 36, 0.14);
}

.meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--app-muted);
  font-size: 0.95rem;
}

.empty-state {
  background: #fff;
  border-radius: 28px;
  padding: 48px 24px;
  text-align: center;
  box-shadow: 0 18px 45px rgba(78, 52, 36, 0.13);
}

.empty-state i {
  font-size: 4rem;
  color: var(--app-accent);
}

.rank-badge {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f0dfcc;
  color: var(--app-brown-dark);
  font-weight: 800;
}

.table > :not(caption) > * > * {
  padding: 0.95rem 0.9rem;
}

.round-card {
  border: 2px solid rgba(111, 78, 55, 0.12);
}

.form-control:focus,
.form-check-input:focus {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 0.25rem rgba(194, 139, 82, 0.22);
}

.form-check-input:checked {
  background-color: var(--app-brown);
  border-color: var(--app-brown);
}

.accordion-button:not(.collapsed) {
  background: #f4e7d9;
  color: var(--app-brown-dark);
}

.app-footer {
  color: var(--app-muted);
}

.phase-player-card {
  border: 1px solid rgba(111, 78, 55, 0.16);
  border-radius: 18px;
  padding: 16px;
  background: #fffaf4;
}

.table-card {
  overflow: visible;
}

.pile-card {
  border: 1px dashed rgba(111, 78, 55, 0.25);
  border-radius: 18px;
  padding: 16px;
  background: #fffaf4;
  text-align: center;
}

.deck-visual {
  width: 86px;
  height: 122px;
  border-radius: 14px;
  margin: 8px auto;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
    45deg,
    var(--app-brown),
    var(--app-brown) 8px,
    var(--app-brown-dark) 8px,
    var(--app-brown-dark) 16px
  );
  color: #fff;
  font-size: 34px;
  box-shadow: 0 10px 20px rgba(78, 52, 36, 0.18);
}

.hand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 10px;
}

.selectable-card {
  cursor: pointer;
  margin: 0;
  position: relative;
}

.selectable-card input {
  display: none;
}

.selectable-card input:checked + .game-card-face {
  transform: translateY(-8px);
  outline: 4px solid rgba(194, 139, 82, 0.45);
  box-shadow: 0 16px 26px rgba(78, 52, 36, 0.24);
}

.game-card-face {
  min-height: 122px;
  border-radius: 14px;
  padding: 12px 8px;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 10px 18px rgba(78, 52, 36, 0.12);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
  border-width: 2px;
}

.game-card-face strong {
  font-size: 34px;
  line-height: 1;
}

.game-card-face span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.game-card-face.mini {
  min-height: 78px;
  width: 58px;
  padding: 6px 4px;
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(78, 52, 36, 0.12);
}

.game-card-face.mini strong {
  font-size: 22px;
}

.game-card-face.mini span {
  font-size: 8px;
}

.color-red {
  color: #b42318;
  border-color: #ef9a9a;
  background: linear-gradient(135deg, #fff7f7 0%, #ffe4e4 100%);
}

.color-blue {
  color: #175cd3;
  border-color: #93c5fd;
  background: linear-gradient(135deg, #f7fbff 0%, #dbeafe 100%);
}

.color-green {
  color: #027a48;
  border-color: #8fd0b7;
  background: linear-gradient(135deg, #f6fffb 0%, #d9f6ea 100%);
}

.color-yellow {
  color: #b77900;
  border-color: #facc15;
  background: linear-gradient(135deg, #fffde8 0%, #fff0a6 100%);
}

.type-wild {
  color: #6f2dbd;
  border-color: #c4a1ff;
  background: linear-gradient(135deg, #fffaff 0%, #efe2ff 100%);
}

.type-skip {
  color: #344054;
  border-color: #b8c0cc;
  background: linear-gradient(135deg, #ffffff 0%, #e8edf4 100%);
}

.action-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(111, 78, 55, 0.12);
}

.hit-group {
  max-width: 360px;
}

.player-turn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(111, 78, 55, 0.1);
}

.player-turn-row.active {
  background: #fff3df;
}

.mini-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.played-area {
  border-bottom: 1px dashed rgba(111, 78, 55, 0.18);
  padding-bottom: 12px;
}

.played-area:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(111, 78, 55, 0.06);
  border: 1px solid rgba(111, 78, 55, 0.1);
}

.activity-item small {
  color: #6c757d;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #087f5b;
}

.live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #12b886;
  box-shadow: 0 0 0 5px rgba(18, 184, 134, 0.12);
}

.uno-refresh-notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 3000;
  padding: 14px 18px;
  border-radius: 16px;
  background: #7a4f35;
  color: #fff;
  text-align: center;
  max-width: min(92vw, 360px);
}

.game-card-face::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.game-card-face strong,
.game-card-face span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.played-group {
  padding: 8px 0 10px;
  border-top: 1px dashed rgba(111, 78, 55, 0.16);
}

.played-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.played-group-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--app-brown-dark);
  background: #f4e7d9;
  border: 1px solid rgba(111, 78, 55, 0.14);
  border-radius: 999px;
  padding: 4px 9px;
  margin-bottom: 7px;
}

.activity-ticker {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(111, 78, 55, 0.12);
}

.activity-ticker-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #dff8ee;
  color: #087f5b;
  border-right: 1px solid rgba(111, 78, 55, 0.1);
}

.activity-ticker-track {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.activity-ticker-item {
  flex: 0 0 auto;
  max-width: min(640px, 48vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fffaf4;
  border: 1px solid rgba(111, 78, 55, 0.12);
  color: #2d2620;
  font-size: 0.94rem;
}

.activity-ticker-item small {
  margin-left: 8px;
  color: #7b6f66;
}

.played-card-panel {
  position: sticky;
  top: 16px;
  z-index: 2;
}

.played-card-panel .card-body {
  overflow: visible;
}

.uno-restoring-scroll {
  opacity: 1 !important;
}

.current-phase-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(111, 78, 55, 0.12);
  border-radius: 16px;
  padding: 12px 16px;
}

.current-phase-kicker {
  color: #6f4e37;
  font-weight: 800;
}

.current-phase-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 1.05rem;
}

.current-phase-main strong {
  font-size: 1.2rem;
  color: #2d2620;
}

.selectable-card.newly-drawn .game-card-face {
  box-shadow:
    0 0 0 4px rgba(255, 193, 7, 0.28),
    0 16px 34px rgba(255, 193, 7, 0.22);
  transform: translateY(-3px);
}

.selectable-card.newly-drawn::after {
  content: "neu";
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ffc107;
  color: #2d2620;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.inline-players-panel {
  border: 1px dashed rgba(111, 78, 55, 0.25);
  border-radius: 18px;
  padding: 14px;
  background: #fffaf4;
  overflow: visible;
}

.inline-players-title {
  font-weight: 800;
  color: #2d2620;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-turn-row.compact {
  padding: 14px 16px !important;
  border-radius: 18px !important;
  border-bottom: 1px solid rgba(111, 78, 55, 0.1);
  display: block !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px !important;
  border: 1px solid rgba(111, 78, 55, 0.1);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  min-width: 0;
}

.player-turn-row.compact:last-child {
  border-bottom: 1px solid rgba(111, 78, 55, 0.1);
  margin-bottom: 0;
}

.player-turn-row.compact.active {
  background: linear-gradient(135deg, #fff6dc, #fffef9) !important;
  position: relative;
  border: 1px solid rgba(255, 193, 7, 0.6);
  box-shadow: 0 10px 24px rgba(45, 38, 32, 0.08) !important;
  animation: none !important;
  border-left: 6px solid #ffc107 !important;
  padding-left: 14px !important;
}

.player-turn-row.compact small {
  white-space: nowrap;
}

.uno-toast-container {
  z-index: 5000;
  width: min(94vw, 980px) !important;
  max-width: 980px !important;
}

.uno-toast {
  border-radius: 22px !important;
  box-shadow: 0 22px 55px rgba(45, 38, 32, 0.28) !important;
  overflow: hidden;
  width: 100%;
  min-height: 86px;
  display: flex;
  align-items: center;
  font-size: 1.12rem;
}

.turn-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(111, 78, 55, 0.12);
}

.turn-banner.my-turn {
  background: linear-gradient(135deg, #e7f8ef, #ffffff);
  border-color: rgba(25, 135, 84, 0.3);
}

.turn-banner.waiting-turn {
  background: linear-gradient(135deg, #fff7df, #ffffff);
  border-color: rgba(255, 193, 7, 0.38);
}

.turn-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 1.25rem;
  color: #fff;
  background: #198754;
  box-shadow: 0 0 0 6px rgba(25, 135, 84, 0.12);
}

.turn-banner.waiting-turn .turn-banner-icon {
  background: #b77900;
  box-shadow: 0 0 0 6px rgba(255, 193, 7, 0.16);
}

.turn-banner-label {
  font-weight: 900;
  font-size: 1.05rem;
}

.active-turn-badge {
  color: #2d2620 !important;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.player-info-main {
  min-width: 0;
}

.player-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.02rem;
  line-height: 1.2;
  color: #111827;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.player-meta-line {
  margin-top: 0 !important;
  color: #6b5a4c;
  font-size: 0.9rem;
  white-space: normal !important;
  min-width: 0;
  flex: 1 1 auto;
}

.player-status-stack {
  display: none !important;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: 0 0 auto;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.badge-you {
  background: #0d6efd;
  color: #fff;
}

.badge-turn {
  background: #ffc107 !important;
  color: #2d2620 !important;
  font-size: 0.74rem !important;
  padding: 5px 10px !important;
}

.badge-laid {
  background: #198754;
  color: #fff;
}

.badge-open {
  background: #6c757d;
  color: #fff;
}

.player-card-top,
.player-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.player-card-bottom {
  margin-top: 8px;
}

.player-card-top .mini-badge,
.player-card-bottom .mini-badge {
  position: static !important;
  flex: 0 0 auto;
  transform: none !important;
  margin: 0 !important;
}

.badge-open,
.badge-laid {
  font-size: 0.72rem !important;
  padding: 5px 10px !important;
}

.uno-toast .toast-body {
  padding: 24px 28px !important;
}

.footer-ticker-items {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.footer-ticker-items > span {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(111, 78, 55, 0.1);
  font-size: 0.9rem;
}

.footer-ticker-items small {
  color: #7b6f66;
  margin-left: 6px;
}

.uno-mobile-context {
  display: none;
  border: 1px solid rgba(25, 135, 84, 0.25);
  background: rgba(25, 135, 84, 0.07);
  border-radius: 1rem;
  padding: 0.8rem 1rem;
}

.game-mode-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(111, 78, 55, 0.12);
  box-shadow: 0 10px 28px rgba(45, 38, 32, 0.07);
}

.game-mode-header-main {
  min-width: 0;
}

.back-mode-btn {
  border: 1px solid rgba(111, 78, 55, 0.14);
  border-radius: 999px;
  color: var(--app-brown-dark);
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(45, 38, 32, 0.05);
}

.back-mode-btn i {
  font-size: 1.1rem;
  vertical-align: -2px;
}

.game-title-kicker {
  color: #7b6f66;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 2px;
}

.game-mode-header h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1;
}

.game-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.game-meta-pills span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fffaf4;
  border: 1px solid rgba(111, 78, 55, 0.12);
  color: #5f5147;
  font-weight: 800;
  font-size: 0.92rem;
}

.game-meta-pills span.is-active {
  background: #e7f8ef;
  border-color: rgba(25, 135, 84, 0.25);
  color: #087f5b;
}

.game-meta-pills .bi-circle-fill {
  font-size: 0.55rem;
}

.game-mode-header-actions {
  flex: 0 0 auto;
  padding-top: 6px;
}

.uno-header {
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 193, 7, 0.22),
      transparent 32%
    ),
    rgba(255, 255, 255, 0.8);
}

.uno-deck {
  background: repeating-linear-gradient(
    45deg,
    #d92d20,
    #d92d20 8px,
    #175cd3 8px,
    #175cd3 16px,
    #027a48 16px,
    #027a48 24px,
    #facc15 24px,
    #facc15 32px
  );
}

.uno-card-form {
  position: relative;
  margin: 0;
}

.uno-card-form .game-card-face {
  width: 100%;
  border: 0;
}

.uno-card-form.is-disabled {
  opacity: 0.45;
  filter: grayscale(0.35);
}

.uno-card-form.is-disabled .game-card-face {
  cursor: not-allowed;
}

.uno-card-face {
  min-height: 128px;
  cursor: pointer;
}

.uno-card-face strong {
  font-size: 36px;
}

.uno-color-select {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 7px;
  z-index: 4;
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.uno-hand-grid {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
}

.uno-badge {
  background: #d92d20;
  color: #fff;
}

.new-card-glow {
  outline: 4px solid rgba(255, 193, 7, 0.7);
  box-shadow:
    0 0 0 8px rgba(255, 193, 7, 0.18),
    0 18px 34px rgba(45, 38, 32, 0.2) !important;
}

.uno-pile-discard {
  width: 116px;
  min-height: 168px;
  border-radius: 18px;
}

.uno-pile-discard strong {
  font-size: 44px;
}

.uno-activity-panel .activity-list-horizontal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.uno-activity-panel .activity-item {
  margin: 0;
  min-height: 74px;
}

.badge-bot {
  background: #eef4ff;
  color: #315c9b;
  border: 1px solid rgba(49, 92, 155, 0.18);
}

@keyframes unoActivePulse {
  0%,
  100% {
    box-shadow: 0 8px 18px rgba(255, 193, 7, 0.14);
  }
  50% {
    box-shadow: 0 8px 26px rgba(255, 193, 7, 0.34);
  }
}

@media (max-width: 768px) {
  .hero-card {
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
  }

  .hero-card .btn {
    width: 100%;
  }

  .table {
    font-size: 0.92rem;
  }
}

@media (max-width: 768px) {
  .hand-grid {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  }

  .game-card-face {
    min-height: 104px;
  }

  .game-card-face strong {
    font-size: 28px;
  }

  .action-panel .btn,
  .hit-group {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 1199px) {
  .played-card-panel {
    position: static;
  }

  .played-card-panel .card-body {
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .activity-ticker {
    display: block;
  }

  .activity-ticker-label {
    border-right: 0;
    border-bottom: 1px solid rgba(111, 78, 55, 0.1);
  }

  .activity-ticker-track {
    padding: 8px;
  }
}

@media (max-width: 768px) {
  .current-phase-strip {
    display: block;
  }

  .current-phase-main {
    margin-top: 4px;
  }

  .activity-ticker-item {
    max-width: 82vw;
  }
}

@media (max-width: 768px) {
  .inline-players-panel {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-turn-row.compact.active {
    animation: none;
  }
}

@media (max-width: 768px) {
  .turn-banner {
    align-items: flex-start;
    padding: 12px 14px;
  }
}

@media (max-width: 768px) {
  .player-turn-row.compact {
    align-items: flex-start;
  }

  .player-status-stack {
    align-items: flex-end;
  }
}

@media (max-width: 520px) {
  .player-card-top,
  .player-card-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 992px) {
  .footer-ticker-items {
    display: block;
  }

  .footer-ticker-items > span {
    display: block;
    margin-top: 5px;
  }

  .footer-ticker-items > span:nth-child(n + 2) {
    display: none;
  }

  .uno-mobile-context {
    display: block;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(111, 78, 55, 0.12);
    border-radius: 16px;
    padding: 10px 12px;
  }
}

@media (max-width: 768px) {
  .game-mode-header {
    display: block;
    padding: 18px;
    border-radius: 22px;
  }

  .game-mode-header-actions {
    padding-top: 14px;
  }

  .game-mode-header-actions .btn,
  .game-mode-header-actions form {
    width: 100%;
  }

  .game-meta-pills span {
    font-size: 0.86rem;
    padding: 6px 9px;
  }

  .uno-toast {
    min-height: 74px;
    font-size: 1rem;
    border-radius: 18px !important;
  }
}

@media (max-width: 768px) {
  .uno-hand-grid {
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  }

  .uno-card-face {
    min-height: 110px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .uno-card-face strong {
    font-size: 30px;
  }

  .uno-color-select {
    position: static;
    margin-bottom: 6px;
    border-radius: 10px;
  }
}

@media (max-width: 768px) {
  .uno-pile-discard {
    width: 104px;
    min-height: 150px;
  }
}

@media (max-width: 900px) {
  .uno-mobile-context {
    display: block;
  }
}

/* UNO Sticky-Footer final */
body:has(.uno-game-footer) {
  padding-bottom: 118px !important;
}

.uno-game-footer {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: 14px !important;
  transform: translateX(-50%) !important;
  z-index: 3000 !important;
  width: min(96vw, 1320px) !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr) minmax(
      240px,
      1fr
    ) !important;
  gap: 10px !important;
  padding: 10px !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(111, 78, 55, 0.16) !important;
  box-shadow: 0 18px 45px rgba(61, 38, 23, 0.18) !important;
  backdrop-filter: blur(10px);
}

.uno-game-footer-section {
  min-width: 0 !important;
  border-radius: 16px !important;
  padding: 10px 13px !important;
  background: #fffaf4 !important;
  border: 1px solid rgba(111, 78, 55, 0.1) !important;
}

.uno-game-footer .footer-label {
  font-size: 0.76rem !important;
  color: #7b6f66 !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 3px !important;
}

.uno-game-footer .footer-main {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.uno-game-footer .footer-main strong {
  white-space: nowrap !important;
}

.uno-game-footer .footer-main span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.uno-game-footer .footer-player.is-me {
  background: linear-gradient(135deg, #e7f8ef, #fffaf4) !important;
  border-color: rgba(25, 135, 84, 0.28) !important;
}

.uno-game-footer .footer-player.is-me .footer-main i,
.uno-game-footer .footer-player.is-me .footer-main strong {
  color: #087f5b !important;
}

.uno-game-footer .footer-ticker-items {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.uno-game-footer .footer-ticker-items > span {
  min-width: 0 !important;
  flex: 1 1 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  padding: 5px 9px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  border: 1px solid rgba(111, 78, 55, 0.1) !important;
  font-size: 0.9rem !important;
}

@media (max-width: 992px) {
  body:has(.uno-game-footer) {
    padding-bottom: 168px !important;
  }

  .uno-game-footer {
    bottom: 8px !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    padding: 8px !important;
    border-radius: 18px !important;
  }

  .uno-game-footer-section {
    padding: 8px 10px !important;
  }
}

/* UNO Optik final: Header-Aktionen */
.uno-hero-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.uno-hero-actions form {
  margin: 0;
}

.uno-main-action-btn,
.uno-secondary-action-btn,
.uno-round-abort-btn {
  min-height: 54px;
  border-radius: 14px;
  padding: 0.8rem 1.25rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.uno-main-action-btn {
  background: var(--app-brown);
  border: 1px solid var(--app-brown);
  color: #fff;
  box-shadow: 0 10px 22px rgba(111, 78, 55, 0.18);
}

.uno-main-action-btn:hover {
  background: var(--app-brown-dark);
  border-color: var(--app-brown-dark);
  color: #fff;
}

.uno-secondary-action-btn {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(111, 78, 55, 0.28);
  color: #6f4e37;
}

.uno-secondary-action-btn:hover {
  background: #fffaf4;
  border-color: rgba(111, 78, 55, 0.45);
  color: #4e3424;
}

.uno-round-abort-btn {
  background: rgba(220, 53, 69, 0.07);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #dc3545;
}

.uno-round-abort-btn:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

/* UNO Pills final */
.uno-equal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.uno-equal-pills span {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.92);
  border: 1px solid rgba(111, 78, 55, 0.14);
  color: #5f5147;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
}

.uno-equal-pills span i {
  font-size: 1rem;
  line-height: 1;
}

.uno-equal-pills span.is-active {
  background: #e7f8ef;
  border-color: rgba(25, 135, 84, 0.25);
  color: #087f5b;
}

.uno-equal-pills .bi-circle-fill {
  font-size: 0.58rem;
}

/* UNO Computer hinzufügen professionell */
.uno-solo-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background:
    radial-gradient(
      circle at top right,
      rgba(13, 110, 253, 0.08),
      transparent 45%
    ),
    #fffaf4;
  border: 1px solid rgba(111, 78, 55, 0.14);
}

.uno-solo-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #eef4ff;
  color: #315c9b;
  border: 1px solid rgba(49, 92, 155, 0.18);
  font-size: 1.35rem;
}

.uno-solo-content {
  min-width: 0;
  flex: 1;
}

.uno-solo-title {
  font-weight: 900;
  font-size: 1.05rem;
  color: #2d2620;
}

.uno-solo-text {
  color: #6b5a4c;
  line-height: 1.4;
  margin-top: 0.15rem;
}

.uno-bot-add-btn {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(49, 92, 155, 0.28);
  color: #315c9b;
  border-radius: 12px;
  font-weight: 800;
  padding: 0.65rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.uno-bot-add-btn:hover {
  background: #eef4ff;
  border-color: rgba(49, 92, 155, 0.5);
  color: #254878;
}

.uno-solo-note {
  margin-top: 0.8rem;
  color: #087f5b;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 768px) {
  .uno-hero-actions {
    width: 100%;
    justify-content: stretch;
  }

  .uno-hero-actions form {
    flex: 1;
  }

  .uno-main-action-btn,
  .uno-secondary-action-btn {
    width: 100%;
    min-height: 50px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .uno-solo-card {
    align-items: flex-start;
  }
}

/* UNO Zurück/Punkte-Modus Chip */
.uno-back-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.94);
  border: 1px solid rgba(111, 78, 55, 0.14);
  color: #4e3424;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(45, 38, 32, 0.06);
}

.uno-back-chip:hover {
  background: #fff;
  border-color: rgba(111, 78, 55, 0.28);
  color: #2d2620;
  transform: translateY(-1px);
}

.uno-back-chip i {
  font-size: 1.1rem;
  line-height: 1;
}

.invite-code-big {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: #fffaf4;
  border: 1px dashed rgba(111, 78, 55, 0.25);
  border-radius: 18px;
  text-align: center;
  padding: 0.8rem;
}

.btn-pass-turn {
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #7b5438, #a7754f);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(123, 84, 56, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.btn-pass-turn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(123, 84, 56, 0.38);
  filter: brightness(1.04);
}

.btn-pass-turn:active {
  transform: translateY(0);
  box-shadow: 0 7px 16px rgba(123, 84, 56, 0.25);
}

.btn-pass-turn .pass-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.btn-pass-turn strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.1;
}

.btn-pass-turn small {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.9;
}

@keyframes passPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(123, 84, 56, 0.38);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(123, 84, 56, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(123, 84, 56, 0);
  }
}

.btn-pass-turn {
  animation: passPulse 2.2s infinite;
}

.slf-watermark {
  position: relative;
}
.slf-watermark::before {
  content: attr(data-watermark);
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-size: clamp(4rem, 12vw, 11rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  color: rgba(111, 78, 55, 0.055);
  pointer-events: none;
  user-select: none;
  z-index: -1;
  white-space: nowrap;
}

.slf-lock-icon {
  width: 72px;
  height: 72px;
  background: #fff3cd;
  color: #9b6900;
  border: 1px solid rgba(155,105,0,.18);
  font-size: 2rem;
}

.slf-spin-card,
.slf-score-card {
  border: 1px solid rgba(111, 78, 55, 0.12);
}

.letter-spinner {
  width: min(240px, 70vw);
  height: min(240px, 70vw);
  border-radius: 38px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top left, rgba(255,255,255,.95), rgba(244,231,217,.98));
  color: var(--app-brown-dark);
  border: 5px solid rgba(111, 78, 55, 0.18);
  box-shadow: 0 24px 70px rgba(78, 52, 36, 0.22);
  font-size: clamp(5rem, 22vw, 10rem);
  font-weight: 900;
  line-height: 1;
}

.letter-spinner.is-final {
  animation: slfPop .45s ease-out;
  background: radial-gradient(circle at top left, #fff, #f0dfcc);
  border-color: rgba(111, 78, 55, 0.35);
}

@keyframes slfPop {
  0% { transform: scale(.86); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.slf-round-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.slf-letter {
  display: inline-flex;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  align-items: center;
  justify-content: center;
  background: #f0dfcc;
  color: var(--app-brown-dark);
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(111, 78, 55, 0.12);
}

.slf-timer {
  min-width: 135px;
  text-align: center;
  border-radius: 18px;
  background: var(--app-brown);
  color: #fff;
  padding: 12px 16px;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(78,52,36,.2);
}

.slf-timer.is-warning {
  background: #b7791f;
}

.slf-timer.is-danger {
  background: #b02a37;
  animation: slfPulse 1s infinite;
}

@keyframes slfPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.slf-score-table th,
.slf-score-table td {
  min-width: 170px;
  vertical-align: top;
}

@media (max-width: 768px) {
  .slf-round-top {
    align-items: stretch;
  }
  .slf-timer {
    width: 100%;
  }
  .game-mode-header {
    display: block;
  }
  .uno-hero-actions {
    margin-top: 1rem;
  }
}
