/* Play hub — list of multiplayer/endless games */

.play-hub {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.play-hub__hero {
  text-align: center;
  margin-bottom: 24px;
}
.play-hub__hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 900;
  margin: 0 0 8px;
  color: #0a0a0a;
  letter-spacing: -0.5px;
}
.play-hub__hero p {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.play-hub__games {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.play-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #0a0a0a;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.play-card:hover {
  border-color: #16a34a;
  transform: translateX(2px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.15);
  text-decoration: none;
}

.play-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #16a34a 0%, #0d6b0b 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  flex-shrink: 0;
}

.play-card__body { flex: 1; min-width: 0; }
.play-card__body h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: #0a0a0a;
}
.play-card__body p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}
.play-card__modes { display: flex; flex-wrap: wrap; gap: 4px; }
.play-card__mode {
  background: #f0fdf4;
  color: #16a34a;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.play-card__cta {
  background: #16a34a;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.5px;
  padding: 10px 16px;
  border-radius: 8px;
  flex-shrink: 0;
  align-self: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .play-hub { padding: 16px 12px 40px; }
  .play-hub__hero h1 { font-size: 28px; }
  .play-hub__hero p { font-size: 14px; }
  .play-card { padding: 12px; gap: 10px; }
  .play-card__icon { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
  .play-card__body h3 { font-size: 15px; }
  .play-card__body p { font-size: 12px; }
  .play-card__cta { padding: 8px 12px; font-size: 11px; }
}

/* ---------- TTT Settings + League side-by-side row ---------- */
.ttt-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  max-width: 920px;
  margin: 0 auto;
}
.ttt-settings-row .ttt-settings {
  margin: 0;
  max-width: none;
}
.ttt-leagues-panel {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
@media (max-width: 760px) {
  .ttt-settings-row { grid-template-columns: 1fr; }
}
/* Start button spans the full width of the row container */
.ttt-settings-section .ttt-start-btn,
#ttt-settings-section .ttt-start-btn {
  display: block;
  width: 100%;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 16px;
}

.ttt-leagues-sub {
  font-size: 12px;
  color: #6b7280;
  margin: -4px 0 12px;
}
.ttt-leagues-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.ttt-league {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
  text-align: center;
  position: relative;
}
.ttt-league:hover {
  border-color: #16a34a;
  background: #f0fdf4;
}
.ttt-league.active {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.15);
}
.ttt-league input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ttt-league__flag {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
}
.ttt-league__flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ttt-league__name {
  font-size: 11px;
  font-weight: 700;
  color: #0a0a0a;
  line-height: 1.2;
}
.ttt-league__check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: all 0.15s;
  opacity: 0;
}
.ttt-league.active .ttt-league__check {
  opacity: 1;
  background: #16a34a;
  border-color: #16a34a;
}
.ttt-league.active .ttt-league__check::after {
  content: "✓";
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 480px) {
  .ttt-leagues-list { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
  .ttt-league { padding: 8px 4px; }
  .ttt-league__flag { width: 32px; height: 32px; }
  .ttt-league__name { font-size: 10px; }
}

/* ---------- Inline grid-builder picker ---------- */
.ttt-inline-picker {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 720px;
  overflow: hidden;
}
.ttt-inline-picker__head {
  padding: 10px 12px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.ttt-pill-tabs {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ttt-pill-tabs::-webkit-scrollbar { display: none; }
.ttt-pill-tab {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #0a0a0a;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.ttt-pill-tab:hover {
  border-color: #16a34a;
  color: #16a34a;
}
.ttt-pill-tab.active {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}
.ttt-cancel-btn {
  background: #f3f4f6;
  color: #6b7280;
  border-color: transparent;
}
.ttt-cancel-btn:hover {
  background: #e5e7eb;
  color: #0a0a0a;
  border-color: transparent;
}

.ttt-inline-picker__body {
  padding: 10px;
}
.ttt-inline-picker__items {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.ttt-inline-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  font-family: inherit;
  min-height: 80px;
  justify-content: center;
}
.ttt-inline-item:hover {
  border-color: #16a34a;
  background: #f0fdf4;
}
.ttt-inline-item__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.ttt-inline-item__icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.ttt-inline-item__placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
}
.ttt-inline-item__label {
  font-size: 11px;
  font-weight: 800;
  color: #0a0a0a;
  text-align: center;
  letter-spacing: 0.3px;
  line-height: 1.1;
  word-break: break-word;
}
.ttt-inline-item--random {
  background: #f0fdf4;
  border-color: #16a34a;
}
.ttt-inline-item--random .ttt-inline-item__label {
  color: #16a34a;
}

.ttt-inline-picker__foot {
  padding: 8px 12px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

.ttt-inline-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #6b7280;
  padding: 30px 20px;
  font-size: 14px;
}

@media (max-width: 600px) {
  .ttt-inline-picker__items { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .ttt-inline-item { min-height: 72px; }
  .ttt-inline-item__icon { width: 32px; height: 32px; font-size: 18px; }
  .ttt-inline-item__placeholder { width: 32px; height: 32px; font-size: 10px; }
  .ttt-inline-item__label { font-size: 10px; }
}
@media (max-width: 380px) {
  .ttt-inline-picker__items { grid-template-columns: repeat(3, 1fr); }
}
