/* Teams page */

.page { padding-top: 48px; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px 24px 60px; }

/* Hero header */
.teams-header {
  text-align: center;
  padding: 28px 0 8px;
  margin-bottom: 18px;
  position: relative;
}
.teams-title {
  font-family: 'Rajdhani', 'Inter', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: 6px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #60b0ff 0%, #a060ff 55%, #ff88c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 6px;
}
.teams-sub {
  color: #6a6a84;
  font-size: .72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
}

/* Section layout: two columns on desktop (left: all teams, right: my team) */
.teams-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 900px) {
  .teams-layout { grid-template-columns: 1fr; }
}

.section { margin: 24px 0 0; }
.section:first-child { margin-top: 0; }
.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #c8c8dc;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(96, 176, 255, 0.1);
}

/* Teams grid */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.team-card {
  background: linear-gradient(145deg, rgba(24, 24, 46, 0.8), rgba(14, 14, 30, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 3px solid #60b0ff;
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  position: relative;
  overflow: hidden;
}
.team-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(96, 176, 255, 0.06), transparent 60%);
  pointer-events: none;
}
.team-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 176, 255, 0.35);
  box-shadow: 0 10px 28px -10px rgba(96, 176, 255, 0.35);
}
.tc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; position: relative; }
.tc-name { font-family: Rajdhani, sans-serif; font-size: 1.05rem; font-weight: 800; color: #eaeaf4; }
.tc-desc { font-size: .64rem; color: #8a8a9e; margin-bottom: 12px; line-height: 1.5; min-height: 1.5em; position: relative; }
.tc-meta { display: flex; justify-content: space-between; font-size: .56rem; color: #6a6a82; text-transform: uppercase; letter-spacing: .8px; position: relative; font-weight: 600; }

/* Team tag badge */
.team-tag { display: inline-block; padding: 3px 9px; border-radius: 4px; font-family: Rajdhani, sans-serif; font-size: .62rem; font-weight: 800; letter-spacing: 1px; color: #0a0a14; }
.team-tag.big { padding: 6px 14px; font-size: .9rem; }

/* Team detail panel (my team) */
.team-detail {
  background: linear-gradient(145deg, rgba(24, 24, 46, 0.8), rgba(14, 14, 30, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 3px solid #60b0ff;
  border-radius: 12px;
  padding: 20px 22px;
  position: sticky;
  top: 80px;
}
.td-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.td-name { font-family: Rajdhani, sans-serif; font-size: 1.5rem; font-weight: 800; color: #eaeaf4; }
.td-desc { font-size: .66rem; color: #9a9ab0; line-height: 1.6; margin-bottom: 16px; }
.td-members-head { font-family: Rajdhani, sans-serif; font-size: .66rem; font-weight: 700; color: #8a8a9e; text-transform: uppercase; letter-spacing: 1px; margin: 16px 0 10px; }

.members-list { display: flex; flex-direction: column; gap: 4px; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: rgba(255, 255, 255, 0.02); border-radius: 6px; font-size: .68rem; }
.m-role { font-family: Rajdhani, sans-serif; font-size: .52rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: 2px 6px; border-radius: 3px; min-width: 70px; text-align: center; }
.m-role-captain { background: rgba(255, 200, 60, 0.14); color: #ffc83c; }
.m-role-co-captain { background: rgba(160, 96, 255, 0.14); color: #a060ff; }
.m-role-member { background: rgba(96, 176, 255, 0.1); color: #60b0ff; }
.m-name { flex: 1; color: #eaeaf4; }
.m-name a { color: #60b0ff; text-decoration: none; }
.m-rank { font-size: .56rem; color: #8a8a9e; }
.m-elo { font-size: .58rem; color: #ffc83c; font-weight: 700; }

.td-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.04); }

/* Invites - pinned */
.invites-list { display: flex; flex-direction: column; gap: 8px; }
.invite-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(145deg, rgba(255, 200, 60, 0.06), rgba(24, 24, 46, 0.8)); border: 1px solid rgba(255, 200, 60, 0.22); border-left: 3px solid #ffc83c; border-radius: 10px; padding: 14px 18px; }
.invite-team { font-family: Rajdhani, sans-serif; font-size: .92rem; font-weight: 700; color: #eaeaf4; display: flex; align-items: center; gap: 8px; }
.invite-by { font-size: .56rem; color: #8a8a9e; margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }
.invite-actions { display: flex; gap: 6px; }

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger, .btn-accept, .btn-decline, .btn-kick {
  font-family: Rajdhani, sans-serif;
  font-size: .64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
}
.btn-primary { background: linear-gradient(135deg, #60b0ff, #4898e0); color: #fff; border: none; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px -6px rgba(96, 176, 255, 0.6); }
.btn-secondary { background: rgba(255, 255, 255, 0.04); color: #c0c0d0; border-color: rgba(255, 255, 255, 0.08); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }
.btn-danger { background: rgba(224, 64, 64, 0.12); color: #e04040; border-color: rgba(224, 64, 64, 0.2); }
.btn-accept { background: rgba(64, 200, 120, 0.14); color: #40c878; border-color: rgba(64, 200, 120, 0.22); }
.btn-decline { background: rgba(224, 64, 64, 0.1); color: #e04040; border-color: rgba(224, 64, 64, 0.18); }
.btn-kick { background: rgba(224, 64, 64, 0.08); color: #e04040; border-color: rgba(224, 64, 64, 0.14); padding: 4px 10px; font-size: .52rem; }

/* Empty state */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  background: linear-gradient(145deg, rgba(24, 24, 46, 0.5), rgba(14, 14, 30, 0.6));
  border: 1px dashed rgba(96, 176, 255, 0.2);
  border-radius: 12px;
}
.empty-state-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
  opacity: .55;
}
.empty-state-title {
  font-family: Rajdhani, sans-serif;
  font-size: 1.1rem;
  color: #c8c8dc;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 6px;
}
.empty-state-sub {
  color: #6a6a84;
  font-size: .68rem;
  margin: 0 0 18px;
  letter-spacing: .5px;
}

/* FAB */
.fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 100;
  background: linear-gradient(135deg, #60b0ff, #4898e0);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  font-family: Rajdhani, sans-serif;
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 10px 32px -8px rgba(96, 176, 255, 0.5);
  transition: transform .15s, box-shadow .15s;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px rgba(96, 176, 255, 0.7); }

/* Modal */
.modal-bg { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; animation: modalIn .2s ease; padding: 20px; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box { background: linear-gradient(145deg, rgba(30, 30, 58, 0.98), rgba(18, 18, 42, 0.98)); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 26px 28px; max-width: 460px; width: 100%; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; color: #8a8a9e; font-size: 1.6rem; cursor: pointer; }
.modal-box h3 { font-family: Rajdhani, sans-serif; font-weight: 800; color: #eaeaf4; margin: 0 0 16px; letter-spacing: 1px; text-transform: uppercase; font-size: 1.15rem; }
.modal-box label { display: block; font-size: .58rem; color: #8a8a9e; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; font-weight: 700; }
.modal-box input[type=text], .modal-box input:not([type=color]), .modal-box textarea { display: block; width: 100%; margin-top: 4px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 6px; padding: 10px 12px; color: #eaeaf4; font-size: .72rem; font-family: inherit; box-sizing: border-box; }
.modal-box textarea { min-height: 60px; resize: vertical; }
.modal-box input[type=color] { width: 60px; height: 32px; border: none; margin-top: 4px; cursor: pointer; background: none; }
.form-err { color: #e04040; font-size: .62rem; min-height: 1em; margin: 6px 0 10px; }

.nav-invite-badge { display: inline-block; background: #e04040; color: #fff; border-radius: 10px; padding: 1px 6px; font-size: .52rem; font-weight: 800; margin-left: 4px; vertical-align: top; }

.loading-cell { padding: 28px; text-align: center; color: #6a6a84; font-size: .68rem; letter-spacing: .5px; }

@media (max-width: 640px) {
  .container { padding: 20px 16px 60px; }
  .teams-title { font-size: 1.8rem; letter-spacing: 3px; }
  .teams-grid { grid-template-columns: 1fr; }
  .team-detail { position: static; }
  .fab { bottom: 20px; right: 20px; padding: 12px 20px; font-size: .7rem; }
  .invite-item { flex-direction: column; align-items: stretch; }
  .member-row { flex-wrap: wrap; }
}
