.lobby-list-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.lobby-list-top {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: ltr;
}

.lobby-back-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(23, 23, 23, 0.80);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.lobby-back-btn:hover,
.lobby-back-btn:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(184, 14, 19, 0.55);
  outline: none;
}

.lobby-back-btn:active {
  transform: scale(0.96);
}

.lobby-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  width: min(72%, 260px);
  padding: 0 10px;
  background: rgba(23, 23, 23, 0.80);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  min-height: 38px;
}

.lobby-search-icon {
  font-size: 14px;
  line-height: 1;
  opacity: 0.75;
  flex-shrink: 0;
}

.lobby-search {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 0;
  direction: rtl;
}

.lobby-search::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.lobby-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.lobby-create-btn {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(120, 230, 160, 0.45);
  border-radius: 14px;
  background: linear-gradient(180deg, #22884a 0%, #1a6840 100%);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
  box-shadow: 0 6px 18px rgba(34, 136, 74, 0.35);
}

.lobby-create-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.lobby-create-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.lobby-create-btn.is-disabled,
.lobby-create-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lobby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lobby-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100px;
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  touch-action: manipulation;
}

.lobby-card:hover:not(.lobby-card--locked) {
  border-color: rgba(184, 14, 19, 0.55);
  background: rgba(40, 40, 42, 0.82);
}

.lobby-card:active:not(.lobby-card--locked) {
  transform: scale(0.98);
}

.lobby-card--locked {
  opacity: 0.62;
  cursor: not-allowed;
}

.lobby-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.lobby-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.82);
}

.lobby-meta-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: 12px;
  line-height: 1;
}

.lobby-meta-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-card-lock {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 14px;
  line-height: 1;
}

.lobby-empty {
  grid-column: 1 / -1;
  margin: 24px 0 8px;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.45);
  padding: 12px;
  font-size: 15px;
}

.ban-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
}

.ban-modal-card {
  background: #1C1C1E;
  border: 1px solid #2B2B2D;
  border-radius: 18px;
  padding: 20px;
  max-width: 360px;
  width: 92%;
  color: #fff;
  text-align: center;
  font-family: 'Iranian Sans', Tahoma, sans-serif;
}

.ban-modal-title {
  margin: 0 0 12px;
  color: #e0474b;
  font-size: 18px;
}

.ban-modal-message {
  margin: 0 0 20px;
  line-height: 1.7;
  font-size: 15px;
  color: #ddd;
}

.ban-modal-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #c41419 0%, #8b0c10 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.lobby-card--watch {
  cursor: pointer;
}

.lobby-card-watch-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(184, 14, 19, 0.2);
  color: #e0474b;
  border: 1px solid rgba(184, 14, 19, 0.45);
}

@media (max-width: 360px) {
  .lobby-grid {
    grid-template-columns: 1fr;
  }
}
