body.page-minigames #tab-team-status h4 {
  color: var(--highlight);
  margin-bottom: 1rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.page-minigames .team-selection {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(94, 160, 255, 0.1);
}

body.page-minigames .team-selection label {
  font-weight: 700;
  color: var(--text);
  margin-right: 0.75rem;
  font-size: 1rem;
}

body.page-minigames .team-selection select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 200px;
}

body.page-minigames .team-selection select:hover {
  border-color: var(--highlight);
}

body.page-minigames .team-selection select:focus {
  outline: none;
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgba(94, 160, 255, 0.2);
}

body.page-minigames .team-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

body.page-minigames .stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

body.page-minigames .stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--highlight), var(--brand));
}

body.page-minigames .stat-card:hover,
body.page-minigames .stat-card:focus-within {
  transform: translateY(-4px);
  border-color: var(--bingo-accent-purple);
  box-shadow:
    0 0 0 2px rgba(var(--bingo-accent-purple-rgba),0.25),
    0 8px 24px -6px rgba(0,0,0,0.55);
}

body.page-minigames .stat-card-label {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

body.page-minigames .stat-card-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--highlight);
  margin-bottom: 0.25rem;
}

body.page-minigames .stat-card-change {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

body.page-minigames .stat-card-change.positive {
  color: var(--brand-2);
}

body.page-minigames .stat-card-change.negative {
  color: #ff5050;
}

body.page-minigames .team-members-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.page-minigames .member-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: all 0.3s ease;
}

body.page-minigames .member-item:hover,
body.page-minigames .member-item:focus-within {
  background: var(--card); /* keep readable */
  border-color: var(--bingo-accent-purple);
  box-shadow:
    0 0 0 2px rgba(var(--bingo-accent-purple-rgba),0.20),
    0 6px 18px -6px rgba(0,0,0,0.5);
  transform: translateY(-2px);
}

body.page-minigames .member-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

body.page-minigames .member-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

body.page-minigames .member-level {
  font-size: 0.9rem;
  color: var(--muted);
}

body.page-minigames .member-details {
  display: flex;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

body.page-minigames .member-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.page-minigames .leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

body.page-minigames .leaderboard-table th,
body.page-minigames .leaderboard-table td {
  padding: 1rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

body.page-minigames .leaderboard-table th {
  background: var(--accent);
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

body.page-minigames .leaderboard-table tr:hover {
  background: rgba(94, 160, 255, 0.05);
}

body.page-minigames .leaderboard-rank {
  font-weight: 900;
  font-size: 1.2rem;
  width: 60px;
  text-align: center;
}

body.page-minigames .leaderboard-rank.first {
  color: var(--gold);
}

body.page-minigames .leaderboard-rank.second {
  color: var(--silver);
}

body.page-minigames .leaderboard-rank.third {
  color: var(--bronze);
}

body.page-minigames .leaderboard-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

body.page-minigames .leaderboard-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--highlight), var(--brand));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--panel);
  font-size: 0.9rem;
  text-transform: uppercase;
}

body.page-minigames .leaderboard-name {
  font-weight: 700;
  color: var(--text);
}

body.page-minigames .leaderboard-score {
  font-weight: 700;
  color: var(--highlight);
  font-size: 1.1rem;
}

body.page-minigames .leaderboard-table tr.current-user {
  background: rgba(255, 165, 0, 0.1);
  border-left: 4px solid var(--highlight);
}

body.page-minigames .leaderboard-table tr.current-user .leaderboard-name::after {
  content: ' (You)';
  color: var(--highlight);
  font-size: 0.85rem;
  font-weight: 600;
}

body.page-minigames .tile-progress {
  margin-bottom: 1.5rem;
}

body.page-minigames .tile-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

body.page-minigames .tile-progress-label {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

body.page-minigames .tile-progress-value {
  font-weight: 700;
  color: var(--brand-2);
  font-size: 0.9rem;
}

body.page-minigames .tile-progress-bar {
  width: 100%;
  height: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

body.page-minigames .tile-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-2, #2ecc71), #2fdc88);
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.75rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.page-minigames .completed-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

body.page-minigames .tile-card {
  background: linear-gradient(135deg, var(--card), rgba(94, 160, 255, 0.05));
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  min-height: 140px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.page-minigames .tile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--gold), var(--highlight));
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.page-minigames .tile-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(94, 160, 255, 0.3);
}

body.page-minigames .tile-card:hover::before {
  opacity: 1;
}

body.page-minigames .tile-card.completed {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(94, 160, 255, 0.08));
  animation: completedPulse 3s ease-in-out infinite;
}

@keyframes completedPulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(255, 215, 0, 0.4);
  }
  50% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 8px rgba(255, 215, 0, 0.2);
  }
}

body.page-minigames .tile-checkmark {
  font-size: 2rem;
  color: var(--brand-2);
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  animation: checkmarkBounce 1s ease-out;
}

@keyframes checkmarkBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

body.page-minigames .tile-title {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

body.page-minigames .tile-description {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
  font-style: italic;
}

@media (max-width: 768px) {
  body.page-minigames .completed-tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  body.page-minigames .tile-card {
    min-height: 120px;
    padding: 1.25rem;
  }

  body.page-minigames .tile-checkmark {
    font-size: 1.5rem;
  }

  body.page-minigames .tile-title {
    font-size: 0.9rem;
  }

  body.page-minigames .tile-description {
    font-size: 0.8rem;
  }
}