:root {
  --field-green: #1a5e37; /* Grama vintage */
}

/* =========================================
   ARENA STYLES
   ========================================= */

/* Pitch Container */
.arena-pitch {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 400px;
  background: var(--field-green); /* Grass green */
  border: 4px solid #fff;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
  /* Optional: simple grass pattern */
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 40px,
    transparent 40px,
    transparent 80px
  );
}

/* Pitch Markings */
.pitch-lines {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pitch-center-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
}

.pitch-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  border: 4px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pitch-penalty-area {
  position: absolute;
  top: 50%;
  width: 120px;
  height: 200px;
  border: 4px solid #fff;
  transform: translateY(-50%);
  pointer-events: none;
}

.pitch-penalty-area.left {
  left: -4px;
}

.pitch-penalty-area.right {
  right: -4px;
}

.pitch-goal {
  position: absolute;
  top: 50%;
  width: 25px;
  height: 90px;
  border: 3px solid #fff;
  transform: translateY(-50%);
  pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 4px, transparent 4px, transparent 8px);
  z-index: 1;
}

.pitch-goal.left {
  left: 0;
  border-left: none;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.pitch-goal.right {
  right: 0;
  border-right: none;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.arena-pieces-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Buttons (Futebol de Botão pieces) */
.arena-piece {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 4px 6px rgba(0,0,0,0.6);
  border: 3px solid rgba(255,255,255,0.7);
  transition: all 0.5s ease-in-out;
  z-index: 5;
  /* Start centered */
  top: 50%;
  left: 50%;
  margin-top: -20px;
  margin-left: -20px;
}

.piece-p1 {
  background: var(--dark-accent, #001f3f);
  transform: translate(-100px, 0); /* Left side initially */
}

.piece-p2 {
  background: var(--retro-red, #d9534f);
  transform: translate(100px, 0); /* Right side initially */
}

.arena-ball {
  position: absolute;
  width: 20px;
  height: 20px;
  font-size: 18px;
  line-height: 20px;
  text-align: center;
  transition: all 0.4s ease-out;
  z-index: 10;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Animations */
@keyframes piece-bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.bump-anim {
  animation: piece-bump 0.3s ease;
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 600px) {
  .arena-pitch {
    height: 60vw;
    max-height: 400px;
  }
  .pitch-center-circle {
    width: 60px;
    height: 60px;
  }
  .pitch-penalty-area {
    width: 60px;
    height: 120px;
  }
  .arena-piece {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
    margin-top: -12.5px;
    margin-left: -12.5px;
    border-width: 2px;
  }
  .arena-ball {
    width: 15px;
    height: 15px;
    font-size: 14px;
    line-height: 15px;
    margin-top: -7.5px;
    margin-left: -7.5px;
  }
}

/* Arena Lobby Options Hover (Universal) */
.lobby-option {
  transition: all 0.2s ease-in-out;
}
.lobby-option:hover {
  transform: translate(-3px, -3px);
}

/* Bracket styling */
.bracket-container {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  overflow-x: auto;
  padding: 10px 0;
}
.bracket-round {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

/* Slot rows formatting */
.lobby-slot-row {
  transition: all 0.2s ease-in-out;
  border: 3px solid var(--dark-accent) !important;
  box-shadow: 4px 4px 0 var(--dark-accent);
}
.lobby-slot-row:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--dark-accent);
}

/* Sessional Tactical Pitch Custom Styles */
.tactical-pitch {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  height: auto !important; /* Allow it to scale dynamically! */
  border: 3px solid var(--dark-accent) !important;
  box-shadow: 4px 4px 0 var(--dark-accent) !important;
  background-color: var(--field-green) !important;
  position: relative;
}

/* Scaled player nodes on the setup tactical pitch to avoid overlap */
.tactical-pitch .player-node {
  width: 38px !important;
  height: 38px !important;
  border-width: 2.2px !important;
  box-shadow: 2px 2px 0 var(--dark-accent) !important;
  font-size: 0.85rem !important;
}

.tactical-pitch .player-number {
  font-size: 0.8rem !important;
  line-height: 1.2 !important;
}

.tactical-pitch .player-name-tag {
  font-size: 0.6rem !important;
  bottom: -18px !important;
  padding: 2px 5px !important;
  width: auto !important;
  max-width: 78px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  border-width: 1px !important;
  background: var(--dark-accent) !important;
  color: var(--off-white) !important;
}

.tactical-pitch .player-ovr-tag {
  width: 16px !important;
  height: 16px !important;
  font-size: 0.58rem !important;
  top: -8px !important;
  right: -8px !important;
  border-width: 1.2px !important;
}
