/* =============================================
   FUT CARD DESIGN - FIFA Ultimate Team Style
   Totomondiale 2026
   ============================================= */

/* ===== CARD CONTAINER ===== */
.fut-card {
  position: relative;
  width: 180px;
  height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  clip-path: polygon(10% 0%, 90% 0%, 100% 8%, 100% 92%, 90% 100%, 10% 100%, 0% 92%, 0% 8%);
  padding: 14px 12px 10px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  overflow: hidden;
  user-select: none;
}

.fut-card::before {
  content: '';
  position: absolute;
  inset: 2px;
  clip-path: polygon(10% 0%, 90% 0%, 100% 8%, 100% 92%, 90% 100%, 10% 100%, 0% 92%, 0% 8%);
  z-index: -1;
  opacity: 0.15;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.4), transparent 60%);
}

.fut-card:hover {
  transform: translateY(-6px) scale(1.03);
  filter: brightness(1.1);
}

.fut-card.selected {
  outline: 3px solid var(--gold, #ffd700);
  outline-offset: -2px;
  filter: brightness(1.15);
}

/* ===== RATING TIER THEMES ===== */

/* Gold Special (85+) - Dark metallic gold */
.fut-card-gold-special {
  background: linear-gradient(160deg, #3d2e0a 0%, #6b4c12 25%, #a37b1e 50%, #6b4c12 75%, #3d2e0a 100%);
  color: #fef4d0;
}
.fut-card-gold-special .fut-card-rating,
.fut-card-gold-special .fut-card-position,
.fut-card-gold-special .fut-card-name {
  color: #fef4d0;
}
.fut-card-gold-special .fut-card-stats {
  border-top-color: rgba(254, 244, 208, 0.25);
}
.fut-card-gold-special .fut-card-stat-label {
  color: rgba(254, 244, 208, 0.6);
}
.fut-card-gold-special .fut-card-stat-value {
  color: #fef4d0;
}
.fut-card-gold-special .fut-card-photo {
  border-color: rgba(254, 244, 208, 0.35);
  background: rgba(254, 244, 208, 0.08);
}
.fut-card-gold-special .fut-card-photo-initials {
  color: rgba(254, 244, 208, 0.7);
}
.fut-card-gold-special:hover {
  box-shadow: 0 8px 40px rgba(163, 123, 30, 0.5), 0 0 20px rgba(254, 244, 208, 0.15);
}

/* Gold (75-84) - Standard gold */
.fut-card-gold {
  background: linear-gradient(160deg, #5c4a1e 0%, #8b7028 25%, #c9a730 50%, #8b7028 75%, #5c4a1e 100%);
  color: #fff8e1;
}
.fut-card-gold .fut-card-rating,
.fut-card-gold .fut-card-position,
.fut-card-gold .fut-card-name {
  color: #fff8e1;
}
.fut-card-gold .fut-card-stats {
  border-top-color: rgba(255, 248, 225, 0.25);
}
.fut-card-gold .fut-card-stat-label {
  color: rgba(255, 248, 225, 0.55);
}
.fut-card-gold .fut-card-stat-value {
  color: #fff8e1;
}
.fut-card-gold .fut-card-photo {
  border-color: rgba(255, 248, 225, 0.3);
  background: rgba(255, 248, 225, 0.08);
}
.fut-card-gold .fut-card-photo-initials {
  color: rgba(255, 248, 225, 0.65);
}
.fut-card-gold:hover {
  box-shadow: 0 8px 40px rgba(201, 167, 48, 0.45), 0 0 20px rgba(255, 248, 225, 0.12);
}

/* Silver (65-74) - Silver/gray metallic */
.fut-card-silver {
  background: linear-gradient(160deg, #3a3d4a 0%, #5c6070 25%, #8a8fa0 50%, #5c6070 75%, #3a3d4a 100%);
  color: #e8eaf0;
}
.fut-card-silver .fut-card-rating,
.fut-card-silver .fut-card-position,
.fut-card-silver .fut-card-name {
  color: #e8eaf0;
}
.fut-card-silver .fut-card-stats {
  border-top-color: rgba(232, 234, 240, 0.2);
}
.fut-card-silver .fut-card-stat-label {
  color: rgba(232, 234, 240, 0.5);
}
.fut-card-silver .fut-card-stat-value {
  color: #e8eaf0;
}
.fut-card-silver .fut-card-photo {
  border-color: rgba(232, 234, 240, 0.25);
  background: rgba(232, 234, 240, 0.06);
}
.fut-card-silver .fut-card-photo-initials {
  color: rgba(232, 234, 240, 0.6);
}
.fut-card-silver:hover {
  box-shadow: 0 8px 40px rgba(138, 143, 160, 0.4), 0 0 20px rgba(232, 234, 240, 0.1);
}

/* Bronze (below 65) - Copper/brown */
.fut-card-bronze {
  background: linear-gradient(160deg, #3b2a1a 0%, #5c3e22 25%, #8b5e30 50%, #5c3e22 75%, #3b2a1a 100%);
  color: #f0d8b8;
}
.fut-card-bronze .fut-card-rating,
.fut-card-bronze .fut-card-position,
.fut-card-bronze .fut-card-name {
  color: #f0d8b8;
}
.fut-card-bronze .fut-card-stats {
  border-top-color: rgba(240, 216, 184, 0.2);
}
.fut-card-bronze .fut-card-stat-label {
  color: rgba(240, 216, 184, 0.5);
}
.fut-card-bronze .fut-card-stat-value {
  color: #f0d8b8;
}
.fut-card-bronze .fut-card-photo {
  border-color: rgba(240, 216, 184, 0.25);
  background: rgba(240, 216, 184, 0.06);
}
.fut-card-bronze .fut-card-photo-initials {
  color: rgba(240, 216, 184, 0.6);
}
.fut-card-bronze:hover {
  box-shadow: 0 8px 40px rgba(139, 94, 48, 0.4), 0 0 20px rgba(240, 216, 184, 0.1);
}

/* ===== CARD HEADER (Rating + Position + Flag) ===== */
.fut-card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  line-height: 1;
}

.fut-card-rating {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.fut-card-position {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
  opacity: 0.85;
}

.fut-card-flag {
  margin-top: 6px;
}
.fut-card-flag img {
  width: 20px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ===== PLAYER PHOTO ===== */
.fut-card-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
}

.fut-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.fut-card-photo-initials {
  font-size: 26px;
  font-weight: 800;
  color: rgba(255,255,255,0.5);
  line-height: 1;
  text-transform: uppercase;
}

/* ===== PLAYER NAME ===== */
.fut-card-name {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 8px;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
  line-height: 1.3;
}

/* ===== STATS ROW ===== */
.fut-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.fut-card-stat {
  text-align: center;
  padding: 2px 0;
}

.fut-card-stat-value {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.fut-card-stat-label {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.65;
  line-height: 1.3;
}

/* ===== SMALL CARD VARIANT ===== */
.fut-card-sm {
  width: 170px;
  height: 260px;
  padding: 10px 8px 8px;
}

.fut-card-sm .fut-card-header {
  top: 10px;
  left: 12px;
}

.fut-card-sm .fut-card-rating {
  font-size: 22px;
}

.fut-card-sm .fut-card-position {
  font-size: 8px;
}

.fut-card-sm .fut-card-flag {
  margin-top: 4px;
}
.fut-card-sm .fut-card-flag img {
  width: 16px;
}

.fut-card-sm .fut-card-photo {
  width: 100px;
  height: 100px;
  margin-top: 50px;
  border: 2.5px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  align-self: center;
}

.fut-card-sm .fut-card-photo-initials {
  font-size: 20px;
}

.fut-card-sm .fut-card-name {
  font-size: 11px;
  margin-top: 8px;
  letter-spacing: 0.5px;
}

.fut-card-sm .fut-card-stats {
  padding-top: 6px;
}

.fut-card-sm .fut-card-stat-value {
  font-size: 12px;
}

.fut-card-sm .fut-card-stat-label {
  font-size: 7px;
}

/* ===== COACH VARIANT (Premium FUT Card) ===== */
.fut-card-coach {
  width: 200px;
  height: 310px;
  padding: 0;
  justify-content: flex-start;
  overflow: hidden;
  position: relative;
  clip-path: polygon(8% 0%, 92% 0%, 100% 5%, 100% 95%, 92% 100%, 8% 100%, 0% 95%, 0% 5%);
}

/* Inner golden border */
.fut-card-coach::after {
  content: '';
  position: absolute;
  inset: 3px;
  clip-path: polygon(8% 0%, 92% 0%, 100% 5%, 100% 95%, 92% 100%, 8% 100%, 0% 95%, 0% 5%);
  border: 1.5px solid rgba(255, 215, 0, 0.35);
  z-index: 2;
  pointer-events: none;
  border-radius: 2px;
}

/* Subtle stadium/sparkle overlay */
.fut-card-coach::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(255,215,0,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 85%, rgba(255,215,0,0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 85%, rgba(255,215,0,0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(255,215,0,0.15) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0.9;
}

.fut-card-coach .fut-card-header {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.fut-card-coach .fut-card-rating {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}

.fut-card-coach .fut-card-position {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
  opacity: 0.9;
}

.fut-card-coach .fut-card-flag {
  margin-top: 6px;
}

.fut-card-coach .fut-card-flag img {
  width: 24px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Photo circle with golden ring */
.fut-card-coach .fut-card-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3.5px solid rgba(255, 215, 0, 0.55);
  background: rgba(0,0,0,0.25);
  margin: 0;
  z-index: 3;
  box-shadow:
    0 0 25px rgba(255, 215, 0, 0.2),
    0 0 50px rgba(255, 215, 0, 0.1),
    inset 0 0 20px rgba(0,0,0,0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fut-card-coach .fut-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.fut-card-coach .fut-card-photo-initials {
  font-size: 32px;
  font-weight: 800;
  opacity: 0.6;
}

/* Footer area with name + team + button */
.fut-card-coach .fut-card-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  text-align: center;
  padding: 0 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.fut-card-coach .fut-card-name {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  margin: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.fut-card-coach .fut-card-coach-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  opacity: 0.65;
  margin-top: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* "Vedi Profilo" button */
.fut-card-coach .fut-card-profile-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 18px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: inherit;
  opacity: 0.7;
  border: 1.5px solid currentColor;
  border-radius: 0;
  clip-path: polygon(8% 0%, 92% 0%, 100% 50%, 92% 100%, 8% 100%, 0% 50%);
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.fut-card-coach .fut-card-profile-btn:hover {
  opacity: 1;
  background: rgba(255,215,0,0.15);
}

/* Admin actions overlay */
.fut-card-coach .fut-card-admin-actions {
  clip-path: none;
  border-radius: 0;
  padding: 8px;
  background: rgba(0,0,0,0.85);
}

/* ===== COACH CARD RESPONSIVE ===== */
@media (max-width: 768px) {
  .fut-card-coach {
    width: 170px;
    height: 265px;
  }
  .fut-card-coach .fut-card-header {
    top: 12px;
    left: 14px;
  }
  .fut-card-coach .fut-card-rating {
    font-size: 28px;
  }
  .fut-card-coach .fut-card-position {
    font-size: 9px;
  }
  .fut-card-coach .fut-card-flag img {
    width: 20px;
  }
  .fut-card-coach .fut-card-photo {
    width: 115px;
    height: 115px;
  }
  .fut-card-coach .fut-card-name {
    font-size: 11px;
  }
  .fut-card-coach .fut-card-coach-label {
    font-size: 8px;
  }
  .fut-card-coach .fut-card-profile-btn {
    font-size: 8px;
    padding: 4px 14px;
  }
  .fut-card-coach .fut-card-footer {
    padding-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .fut-card-coach {
    width: 145px;
    height: 230px;
  }
  .fut-card-coach .fut-card-header {
    top: 10px;
    left: 10px;
  }
  .fut-card-coach .fut-card-rating {
    font-size: 24px;
  }
  .fut-card-coach .fut-card-position {
    font-size: 8px;
  }
  .fut-card-coach .fut-card-photo {
    width: 95px;
    height: 95px;
  }
  .fut-card-coach .fut-card-photo-initials {
    font-size: 24px;
  }
  .fut-card-coach .fut-card-name {
    font-size: 10px;
  }
  .fut-card-coach .fut-card-coach-label {
    font-size: 7px;
  }
  .fut-card-coach .fut-card-profile-btn {
    font-size: 7px;
    padding: 3px 12px;
  }
  .fut-card-coach .fut-card-footer {
    padding-bottom: 8px;
  }
}

/* ===== CARD GRID LAYOUTS ===== */
.fut-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
}

.fut-cards-grid-center {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ===== SELECTABLE CARD (for pick page) ===== */
.fut-card-selectable {
  position: relative;
}

.fut-card-selectable input[type="checkbox"] {
  display: none;
}

.fut-card-selectable .fut-card-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  transition: all 0.2s;
  z-index: 3;
}

.fut-card-selectable.selected .fut-card-check {
  border-color: var(--gold, #ffd700);
  background: var(--gold, #ffd700);
  color: #1a1a2e;
}

/* ===== ADMIN CARD OVERLAY (edit/delete buttons) ===== */
.fut-card-admin-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  justify-content: center;
  padding: 6px;
  background: rgba(0,0,0,0.7);
  clip-path: polygon(10% 0%, 90% 0%, 100% 30%, 100% 100%, 0% 100%, 0% 30%);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 5;
}

.fut-card:hover .fut-card-admin-actions {
  opacity: 1;
}

.fut-card-admin-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text, #e8e8f0);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.fut-card-admin-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
}

.fut-card-admin-btn-danger {
  color: var(--red, #ff5252);
  border-color: rgba(255, 82, 82, 0.3);
}

.fut-card-admin-btn-danger:hover {
  background: rgba(255, 82, 82, 0.2);
  border-color: rgba(255, 82, 82, 0.5);
}

/* ===== POINTS BADGE (for fantasy team view) ===== */
.fut-card-points {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.5);
  color: var(--gold, #ffd700);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 10px;
  z-index: 3;
  white-space: nowrap;
}

/* ===== CREDIT COST BADGE ===== */
.fut-card-cost {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: linear-gradient(135deg, #FFD700, #B8860B);
  color: #111;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 2px;
  z-index: 3;
  line-height: 1.3;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .fut-card {
    width: 140px;
    height: 205px;
    padding: 10px 8px 8px;
  }
  .fut-card .fut-card-header {
    top: 10px;
    left: 12px;
  }
  .fut-card .fut-card-rating {
    font-size: 22px;
  }
  .fut-card .fut-card-position {
    font-size: 8px;
  }
  .fut-card .fut-card-flag img {
    width: 16px;
  }
  .fut-card .fut-card-photo {
    width: 56px;
    height: 56px;
    margin-top: 14px;
  }
  .fut-card .fut-card-photo-initials {
    font-size: 20px;
  }
  .fut-card .fut-card-name {
    font-size: 10px;
    margin-top: 6px;
  }
  .fut-card .fut-card-stat-value {
    font-size: 12px;
  }
  .fut-card .fut-card-stat-label {
    font-size: 7px;
  }

  .fut-card-sm {
    width: 145px;
    height: 220px;
    padding: 8px 6px 6px;
  }
  .fut-card-sm .fut-card-header {
    top: 8px;
    left: 8px;
  }
  .fut-card-sm .fut-card-rating {
    font-size: 18px;
  }
  .fut-card-sm .fut-card-photo {
    width: 68px;
    height: 68px;
    margin-top: 18px;
  }
  .fut-card-sm .fut-card-photo-initials {
    font-size: 16px;
  }
  .fut-card-sm .fut-card-name {
    font-size: 9px;
  }
  .fut-card-sm .fut-card-stat-value {
    font-size: 10px;
  }

  .fut-cards-grid,
  .fut-cards-grid-center {
    gap: 8px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .fut-card {
    width: 120px;
    height: 178px;
    padding: 8px 6px 6px;
  }
  .fut-card .fut-card-header {
    top: 8px;
    left: 8px;
  }
  .fut-card .fut-card-rating {
    font-size: 18px;
  }
  .fut-card .fut-card-position {
    font-size: 7px;
  }
  .fut-card .fut-card-photo {
    width: 44px;
    height: 44px;
    margin-top: 10px;
  }
  .fut-card .fut-card-photo-initials {
    font-size: 16px;
  }
  .fut-card .fut-card-name {
    font-size: 9px;
    letter-spacing: 0.3px;
  }
  .fut-card .fut-card-stat-value {
    font-size: 10px;
  }
  .fut-card .fut-card-stat-label {
    font-size: 6px;
  }

  .fut-card-sm {
    width: 120px;
    height: 185px;
  }
  .fut-card-sm .fut-card-rating {
    font-size: 16px;
  }
  .fut-card-sm .fut-card-photo {
    width: 50px;
    height: 50px;
    margin-top: 14px;
  }
  .fut-card-sm .fut-card-name {
    font-size: 8px;
  }
}

/* ===== SECTION TITLE FOR POSITION GROUPS ===== */
.fut-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim, #8888aa);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--glass-border, rgba(255,255,255,0.1));
}

.fut-section-title:first-child {
  margin-top: 0;
}

/* =============================================
   FOOTBALL PITCH FORMATION VIEW
   ============================================= */

/* ===== PITCH CONTAINER ===== */
.pitch-container {
  max-width: 800px;
  margin: 0 auto 32px;
  padding: 0 8px;
}

.pitch-container-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim, #8888aa);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--glass-border, rgba(255,255,255,0.1));
}

/* ===== FOOTBALL PITCH ===== */
.pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 1.5 / 1;
  background: linear-gradient(180deg, #1a5c2a 0%, #237a38 25%, #2d8a4e 50%, #237a38 75%, #1a5c2a 100%);
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 80px rgba(0, 0, 0, 0.15);
}

/* Pitch grass stripes */
.pitch::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 40px,
    rgba(255, 255, 255, 0.03) 40px,
    rgba(255, 255, 255, 0.03) 80px
  );
  pointer-events: none;
  z-index: 0;
}

/* ===== PITCH MARKINGS (via SVG background on a pseudo-element) ===== */
.pitch::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    /* Center line */
    linear-gradient(0deg, rgba(255,255,255,0.5) 0, rgba(255,255,255,0.5) 2px, transparent 2px),
    /* Left penalty area */
    linear-gradient(0deg, transparent 0, transparent 0),
    /* Right penalty area */
    linear-gradient(0deg, transparent 0, transparent 0);
  background-size: 100% 2px;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Pitch markings overlay using box-shadow trick on an inner element */
.pitch-markings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Center line */
.pitch-markings::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.45);
}

/* Center circle */
.pitch-markings::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}

/* Penalty areas */
.pitch-marking-penalty-top,
.pitch-marking-penalty-bottom,
.pitch-marking-goal-top,
.pitch-marking-goal-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 1;
}

.pitch-marking-penalty-top {
  top: -1px;
  width: 55%;
  height: 18%;
  border-top: none;
}

.pitch-marking-penalty-bottom {
  bottom: -1px;
  width: 55%;
  height: 18%;
  border-bottom: none;
}

.pitch-marking-goal-top {
  top: -1px;
  width: 22%;
  height: 7%;
  border-top: none;
}

.pitch-marking-goal-bottom {
  bottom: -1px;
  width: 22%;
  height: 7%;
  border-bottom: none;
}

/* Corner arcs */
.pitch-corner-tl,
.pitch-corner-tr,
.pitch-corner-bl,
.pitch-corner-br {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 1;
}
.pitch-corner-tl {
  top: -10px;
  left: -10px;
  border-radius: 50%;
}
.pitch-corner-tr {
  top: -10px;
  right: -10px;
  border-radius: 50%;
}
.pitch-corner-bl {
  bottom: -10px;
  left: -10px;
  border-radius: 50%;
}
.pitch-corner-br {
  bottom: -10px;
  right: -10px;
  border-radius: 50%;
}

/* ===== PITCH ROWS (formation layout) ===== */
.pitch-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
}

.pitch-row-fwd { padding: 0 15%; }
.pitch-row-mid { padding: 0 12%; }
.pitch-row-def { padding: 0 5%; }
.pitch-row-gk  { padding: 0 38%; }

/* ===== PITCH PLAYER MINI CARD ===== */
.pitch-player-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  text-align: center;
  opacity: 0;
  animation: pitchPlayerFadeIn 0.5s ease forwards;
}

/* Staggered fade-in for each player */
.pitch-player-card:nth-child(1) { animation-delay: 0.05s; }
.pitch-player-card:nth-child(2) { animation-delay: 0.15s; }
.pitch-player-card:nth-child(3) { animation-delay: 0.25s; }
.pitch-player-card:nth-child(4) { animation-delay: 0.35s; }

.pitch-row-fwd .pitch-player-card:nth-child(1) { animation-delay: 0.1s; }
.pitch-row-fwd .pitch-player-card:nth-child(2) { animation-delay: 0.2s; }
.pitch-row-fwd .pitch-player-card:nth-child(3) { animation-delay: 0.3s; }

.pitch-row-mid .pitch-player-card:nth-child(1) { animation-delay: 0.4s; }
.pitch-row-mid .pitch-player-card:nth-child(2) { animation-delay: 0.5s; }
.pitch-row-mid .pitch-player-card:nth-child(3) { animation-delay: 0.6s; }

.pitch-row-def .pitch-player-card:nth-child(1) { animation-delay: 0.7s; }
.pitch-row-def .pitch-player-card:nth-child(2) { animation-delay: 0.8s; }
.pitch-row-def .pitch-player-card:nth-child(3) { animation-delay: 0.9s; }
.pitch-row-def .pitch-player-card:nth-child(4) { animation-delay: 1.0s; }

.pitch-row-gk .pitch-player-card:nth-child(1) { animation-delay: 1.1s; }

@keyframes pitchPlayerFadeIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Player photo circle */
.pitch-player-photo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  position: relative;
}

.pitch-player-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.pitch-player-photo-initials {
  font-size: 16px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  line-height: 1;
}

/* Rating badge (positioned on photo) */
.pitch-player-rating {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.pitch-player-rating-gold-special {
  background: linear-gradient(135deg, #a37b1e, #d4a82a);
  color: #fff;
}

.pitch-player-rating-gold {
  background: linear-gradient(135deg, #8b7028, #c9a730);
  color: #fff;
}

.pitch-player-rating-silver {
  background: linear-gradient(135deg, #5c6070, #8a8fa0);
  color: #fff;
}

.pitch-player-rating-bronze {
  background: linear-gradient(135deg, #5c3e22, #8b5e30);
  color: #fff;
}

/* Player name */
.pitch-player-name {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.4);
  line-height: 1.3;
}

/* Position label */
.pitch-player-position {
  font-size: 8px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ===== COACH BELOW PITCH ===== */
.pitch-coach-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--glass, rgba(255,255,255,0.04));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
  border-radius: 8px;
  opacity: 0;
  animation: pitchPlayerFadeIn 0.5s ease 1.3s forwards;
}

.pitch-coach-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gold, #ffd700);
  background: rgba(255, 215, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.pitch-coach-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.pitch-coach-photo-initials {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold, #ffd700);
  text-transform: uppercase;
}

.pitch-coach-info {
  display: flex;
  flex-direction: column;
}

.pitch-coach-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #e8e8f0);
}

.pitch-coach-label {
  font-size: 10px;
  color: var(--text-dim, #8888aa);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pitch-coach-rating-badge {
  font-size: 16px;
  font-weight: 900;
  color: var(--gold, #ffd700);
  margin-left: auto;
  line-height: 1;
}

/* ===== PITCH RESPONSIVE ===== */
@media (max-width: 768px) {
  .pitch {
    padding: 14px 6px;
  }

  .pitch-player-card {
    width: 64px;
  }

  .pitch-player-photo {
    width: 40px;
    height: 40px;
  }

  .pitch-player-photo-initials {
    font-size: 13px;
  }

  .pitch-player-rating {
    width: 20px;
    height: 20px;
    font-size: 8px;
    bottom: -3px;
    right: -3px;
  }

  .pitch-player-name {
    font-size: 8px;
    max-width: 64px;
  }

  .pitch-player-position {
    font-size: 7px;
  }

  .pitch-markings::after {
    width: 80px;
    height: 80px;
  }

  .pitch-row-fwd { padding: 0 8%; }
  .pitch-row-mid { padding: 0 6%; }
  .pitch-row-def { padding: 0 2%; }
  .pitch-row-gk  { padding: 0 35%; }
}

@media (max-width: 480px) {
  .pitch {
    padding: 10px 4px;
  }

  .pitch-player-card {
    width: 52px;
  }

  .pitch-player-photo {
    width: 34px;
    height: 34px;
  }

  .pitch-player-photo-initials {
    font-size: 11px;
  }

  .pitch-player-rating {
    width: 18px;
    height: 18px;
    font-size: 7px;
    bottom: -2px;
    right: -2px;
    border-width: 1.5px;
  }

  .pitch-player-name {
    font-size: 7px;
    max-width: 52px;
  }

  .pitch-player-position {
    font-size: 6px;
  }

  .pitch-markings::after {
    width: 60px;
    height: 60px;
  }

  .pitch-row-fwd { padding: 0 4%; }
  .pitch-row-mid { padding: 0 3%; }
  .pitch-row-def { padding: 0 1%; }
  .pitch-row-gk  { padding: 0 30%; }

  .pitch-coach-bar {
    padding: 8px 12px;
    gap: 8px;
  }

  .pitch-coach-photo {
    width: 32px;
    height: 32px;
  }

  .pitch-coach-name {
    font-size: 11px;
  }
}
