/* Soccer Jam '26 — player select screen (NBA Jam aesthetic) */

#selectScreen {
  position: fixed;
  inset: 0;
  z-index: 25;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: radial-gradient(circle at 50% 18%, #16205c 0%, #0a0e2a 55%, #04060f 100%);
  color: #fff;
  font-family: "Arial Black", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  padding-right: calc(12px + env(safe-area-inset-right, 0px));
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(12px + env(safe-area-inset-left, 0px));
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- header ---------- */

.sel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 10px;
  flex: 0 0 auto;
}

/* explicit display/width/margin/box-shadow: defend against global button styles */
.sel-back {
  flex: 0 0 auto;
  display: inline-block;
  width: auto;
  margin: 0;
  box-shadow: none;
  min-height: 48px;
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 900;
  font-size: 14px;
  font-style: italic;
  color: #ffd24a;
  background: #11173a;
  border: 3px solid #2a3566;
  border-radius: 10px;
  cursor: pointer;
}
.sel-back:active { transform: scale(0.95); background: #1a2250; box-shadow: none; }

.sel-titlewrap { flex: 1 1 auto; min-width: 0; text-align: center; }

.sel-team {
  font-size: 13px;
  letter-spacing: 2px;
  color: #8fa0ff;
  text-shadow: 0 2px 0 #000;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sel-title {
  font-style: italic;
  font-weight: 900;
  font-size: clamp(18px, 5.5vw, 34px);
  line-height: 1.05;
  letter-spacing: 1px;
  color: #ffd000;
  background: linear-gradient(180deg, #fff35c 0%, #ffd000 45%, #ff7a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(255, 150, 0, 0.55)) drop-shadow(0 3px 0 rgba(0, 0, 0, 0.9));
  text-transform: uppercase;
}

/* ---------- card grid ---------- */

.sel-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-content: start;
  padding-bottom: 12px;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 700px) {
  .sel-grid { grid-template-columns: repeat(3, 1fr); }
}

.sel-card {
  position: relative;
  background: linear-gradient(180deg, #141b44 0%, #0d1230 100%);
  border: 3px solid #2a3566;
  border-radius: 14px;
  padding: 10px 10px 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.08s ease, box-shadow 0.08s ease;
}
.sel-card:active { transform: scale(0.97); }

.sel-card.picked {
  border-color: #ffd24a;
  box-shadow: 0 0 14px rgba(255, 210, 74, 0.85), inset 0 0 10px rgba(255, 210, 74, 0.25);
  background: linear-gradient(180deg, #1c2354 0%, #131840 100%);
}

.sel-badge {
  position: absolute;
  top: -10px;
  right: -8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff35c, #ffb400 70%);
  border: 3px solid #0a0e2a;
  color: #3a2400;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 200, 40, 0.9);
  pointer-events: none;
}

.sel-face {
  display: block;
  margin: 0 auto 4px;
  background: radial-gradient(circle at 50% 38%, #232c66 0%, #10153a 75%);
  border-radius: 10px;
}

.sel-name {
  font-size: 15px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sel-num {
  font-size: 12px;
  color: #8fa0ff;
  margin: 1px 0 8px;
  text-shadow: 0 1px 0 #000;
}

/* ---------- stat bars ---------- */

.sel-stats { display: flex; flex-direction: column; gap: 5px; }

.sel-stat { display: flex; align-items: center; gap: 6px; }

.sel-stat-label {
  flex: 0 0 34px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #aab4e8;
  text-align: left;
}

.sel-bar-track {
  flex: 1 1 auto;
  height: 12px;
  background: #060920;
  border: 2px solid #2a3566;
  border-radius: 7px;
  overflow: hidden;
}

.sel-bar-fill {
  height: 100%;
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35) inset;
}

.sel-stat-val {
  flex: 0 0 18px;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
  text-shadow: 0 1px 0 #000;
}

/* ---------- footer ---------- */

.sel-footer {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  padding: 10px 0 4px;
  background: linear-gradient(180deg, rgba(4, 6, 15, 0) 0%, rgba(4, 6, 15, 0.92) 35%);
  display: flex;
  justify-content: center;
}

.sel-jam {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0;
  min-height: 58px;
  font-family: inherit;
  font-weight: 900;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #3a2400;
  background: linear-gradient(180deg, #fff35c 0%, #ffc400 55%, #ff7a00 100%);
  border: 4px solid #fff;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(255, 170, 0, 0.8), 0 4px 0 rgba(0, 0, 0, 0.7);
  transition: transform 0.08s ease, filter 0.08s ease;
}
.sel-jam:active:not(:disabled) {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 0 12px rgba(255, 170, 0, 0.8), 0 1px 0 rgba(0, 0, 0, 0.7);
}

.sel-jam:disabled {
  filter: grayscale(0.85) brightness(0.55);
  color: #555;
  border-color: #444;
  box-shadow: none;
  cursor: default;
}
