/* ============================================================
   TEAM SELECTOR — Steam/Netflix style
   ============================================================ */

#teamSelectorPage {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: var(--color-gray-50);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}
#teamSelectorPage.visible { display: flex; }

/* ── Header ────────────────────────────────── */
.ts-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.ts-header .ts-logo {
  width: 56px;
  height: 56px;
  background: var(--color-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 14px rgba(59,130,246,0.3);
}
.ts-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-900);
}
.ts-header p {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-top: 0.35rem;
}

/* ── Grid ──────────────────────────────────── */
.ts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
  width: 100%;
  max-width: 760px;
  justify-items: center;
}

/* ── Team card ─────────────────────────────── */
.ts-card {
  width: 160px;
  aspect-ratio: 1 / 1;
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1rem 0.75rem;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.ts-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(99,102,241,0.05));
  opacity: 0;
  transition: opacity 0.15s;
}
.ts-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(59,130,246,0.15);
}
.ts-card:hover::before { opacity: 1; }
.ts-card:active { transform: translateY(-1px); }

/* ── Team avatar ───────────────────────────── */
.ts-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(59,130,246,0.25);
  letter-spacing: -0.03em;
}

.ts-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gray-900);
  line-height: 1.3;
  word-break: break-word;
}
.ts-card-slug {
  font-size: 0.72rem;
  color: var(--color-gray-400);
}

/* ── Loading / Empty states ────────────────── */
.ts-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-gray-400);
}
.ts-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-gray-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: ts-spin 0.7s linear infinite;
}
@keyframes ts-spin { to { transform: rotate(360deg); } }

.ts-empty {
  text-align: center;
  color: var(--color-gray-400);
  font-size: 0.875rem;
}
.ts-empty svg { margin-bottom: 0.75rem; color: var(--color-gray-300); }

/* ── Responsive ────────────────────────────── */
@media (max-width: 480px) {
  .ts-grid { grid-template-columns: repeat(2, 1fr); }
  .ts-card { width: 100%; }
}

/* ============================================================
   INFO PAGE (replaces team selector)
   ============================================================ */
#infoPage {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: linear-gradient(135deg, #f0f4ff 0%, #f8faff 100%);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}
#infoPage.visible { display: flex; }

.info-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}
.info-logo {
  width: 72px;
  height: 72px;
  background: var(--color-primary, #2563eb);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 24px rgba(37,99,235,0.25);
}
.info-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-gray-900, #111827);
  margin-bottom: 0.5rem;
}
.info-tagline {
  font-size: 1rem;
  color: var(--color-gray-500, #6b7280);
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 900px;
  width: 100%;
  margin-bottom: 2rem;
}
.info-feature-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
}
.info-feature-icon {
  width: 48px;
  height: 48px;
  background: #eff6ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: var(--color-primary, #2563eb);
}
.info-feature-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.4rem;
}
.info-feature-card p {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.5;
}

.info-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  max-width: 480px;
  color: #92400e;
}
.info-notice svg { flex-shrink: 0; margin-top: 2px; }
.info-notice strong { display: block; font-size: 0.9rem; margin-bottom: 0.2rem; }
.info-notice p { font-size: 0.8rem; margin: 0; color: #a16207; }

@media (max-width: 700px) {
  .info-cards { grid-template-columns: repeat(2, 1fr); }
  .info-hero h1 { font-size: 1.5rem; }
}
@media (max-width: 400px) {
  .info-cards { grid-template-columns: 1fr; }
}
