/* --- MODERN MATCH VARS --- */
:root {
    --fpl-purple: #38003c;
    --fpl-green: #00ff85;
    --fpl-dark-overlay: rgba(56, 0, 60, 0.9);
    --card-bg: #ffffff;
    --text-main: #333;
    --pitch-width: 100%; /* Or fixed px if you prefer */
  --pitch-aspect-ratio: 3 / 4; /* Vertical shape */
  
  /* Colors */
  --grass-dark: #3aa655;
  --grass-light: #45b061;
  --line-color: rgba(255, 255, 255, 0.75);
  --line-width: 2px;
}

/* --- HERO SECTION (Header) --- */
.match-hero {
    background: linear-gradient(135deg, var(--fpl-purple) 0%, #5a0060 100%);
    color: white;
    border-radius: 16px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(56,0,60,0.2);
    text-align: center;
}
.hero-team {
    flex: 1;
    font-size: 1.4rem;
    font-weight: 800;
}
.hero-team img {
    display: block;
    margin: 0 auto 10px;
    width: 70px;
    height: 70px;
    height: 70px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}
.hero-score {
    background: var(--fpl-green);
    color: var(--fpl-purple);
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 2rem;
    font-weight: 900;
    margin: 0 20px;
    min-width: 120px;
}
.hero-meta {
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pitch-lines {
  position: absolute;
  top: -50px; left: 0; right: 0; bottom: 0;
  
  /* 1. Move the Grass Styles Here */
  background-color: #3aa655;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 40px,
    rgba(0,0,0,0.1) 40px,
    rgba(0,0,0,0.1) 80px
  );
  
  /* 2. Create the "Faux 3D" Trapezoid */
  transform: perspective(1200px) rotateX(25deg) scale(1.1);
  transform-origin: bottom center; /* Keeps the bottom wide, squeezes the top */
  
  /* 3. Style the borders/lines */
  border: 4px solid #2e8b46;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4); /* Adds depth below the board */
  border-radius: 8px;
  z-index: 1; /* Sits at the bottom */
}

/* --- Center Field --- */
.center-line {
  position: absolute;
  top: 50%;
  width: 100%;
  height: var(--line-width);
  background: var(--line-color);
  transform: translateY(-50%);
}

.center-circle {
  position: absolute;
  top: 50%; left: 50%;
  width: 80px; height: 80px;
  border: var(--line-width) solid var(--line-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.center-spot {
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  background: var(--line-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* --- Penalty Areas (Shared Styles) --- */
.box-area {
  position: absolute;
  left: 50%;
  width: 60%; 
  height: 16%;
  border: var(--line-width) solid var(--line-color);
  transform: translateX(-50%);
  background-color: transparent; /* Ensure grass shows through */
}

.six-yard-area {
  position: absolute;
  left: 50%;
  width: 40%;
  height: 40%;
  border: var(--line-width) solid var(--line-color);
  transform: translateX(-50%);
}

.goal-area {
  position: absolute;
  left: 50%;
  width: 25%;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.5);
  
  /* Nice net effect */
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.3) 0, rgba(255,255,255,0.3) 1px, transparent 0, transparent 4px),
                    repeating-linear-gradient(-45deg, rgba(255,255,255,0.3) 0, rgba(255,255,255,0.3) 1px, transparent 0, transparent 4px);
  transform: translateX(-50%);
  z-index: -1;
}

/* --- Positioning Specifics --- */
.box-area.top {
  top: 0;
  border-top: none; /* Open towards goal */
}
.box-area.top .six-yard-area {
  top: 0;
  border-top: none;
}
.box-area.top .goal-area {
  top: -20px; /* Push outside the pitch */
  border-bottom: none;
}

.box-area.bottom {
  bottom: 0;
  border-bottom: none;
}
.box-area.bottom .six-yard-area {
  bottom: 0;
  border-bottom: none;
}
.box-area.bottom .goal-area {
  bottom: -20px;
  border-top: none;
}
.pitch-wrap {
  width: 500px; /* Adjust this to resize the WHOLE pitch */
  margin: 20px auto;
  
}

.player-card {
  display: inline-block; 
  width: 100%;
}

#pitch {
    position: relative;
    width: 90%; /* Adjust as needed */
    height: 600px; /* Needs a fixed height to look right */
    margin: 0 auto;
    background-color: transparent; /* Move the green color to the lines layer */
    
    /* Ensure no global transforms interfere */
    transform: none; 
    overflow: visible; 
}
  
.formation-container {
  position: absolute;
  top: 10%;
  height: 85%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  z-index: 10;
  transform: none;
  pointer-events: none;
}

.formation-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  width: 100%;
}

.sprite {
    width: 16px; 
    height: 16px;
    display: inline-block;
}
.bpsButton {
    color: #1f68c6;
    font-weight: normal;
    font-style: italic;
    margin-left: 20px;
    cursor: row-resize;
}
.bpsList {
    margin-left: 20px;
    display: none;
}
.header-add {
    background: url('/fpl/live/images/header-sprite.png') -0 -0;
}
.header-jump {
    background: url('/fpl/live/images/header-sprite.png') -0 -16px;
}
.header-remove {
    background: url('/fpl/live/images/header-sprite.png') -0 -32px;
}
#container {
	margin-top: 4%;
	margin-bottom: 10px;
	padding: 5px;
	width: auto;
	height: 100%;
}
body {
   height: 100%;
   background-color: #eee;
   margin: 0;
   padding: 0;
}
.block {
  display: inline-block;
  border-radius: 5px;
  margin-left: -2px;
  padding: 5px !important;
  margin-bottom: 3px;
  font-weight: bold;
}
.gameStats {
	border-radius: 5px;
	padding: 5px;
	background-color: #e1e1e1;
}

.gameTable {
	background-color: #f1f1f1;
	border-radius: 5px;
	padding: 10px;
}

.playerName {
	background: none repeat scroll 0 0 #19803feb;
	display: inline-block;
	padding: 2px 4px 2px 4px;
	border-radius: 2px;
	color: white;
	font-size: 14px;
}
.playerScore {
	background: none repeat scroll 0 0 #19803f91;
	display: inline-block;
	padding: 0px 3px 0px 3px;
	color: white;
	font-size: 14px;
	border-radius: 2px;
	font-weight: bold;
}
.bonusLabel {
	background: none repeat scroll 0 0 #33CCFF;
	padding: 1px;
	color: white;
	font-size: 14px;
}
.yellowsLabel {
	background: none repeat scroll 0 0 yellow;
	padding: 1px;
	color: #000;
	font-size: 14px;
}
.yellowsTwoLabel {
	background: linear-gradient(90deg, red 99%, yellow 1%);
	padding: 1px;
	color: white;
	font-size: 14px;
}
.redsLabel {
	background: none repeat scroll 0 0 red;
	padding: 1px;
	color: white;
	font-size: 14px;
}
.goalsLabel {
	background: none repeat scroll 0 0 purple;
	padding: 1px;
	color: white;
	font-size: 14px;
}
.owngoalsLabel {
	background: none repeat scroll 0 0 lime;
	padding: 1px;
	color: black;
	font-size: 14px;
}
.assistsLabel {
	background: none repeat scroll 0 0 #fff;
	padding: 1px;
	color: black;
	font-size: 14px;
}
.missedpenLabel {
	background: none repeat scroll 0 0 #FF69B4;
	padding: 1px;
	color: black;
	font-size: 14px;
}
.defconLabel {
	background: none repeat scroll 0 0 #25e694;
	padding: 1px;
	color: black;
	font-size: 14px;
}
.sub {
	background: none repeat scroll 0 0 #e1e1e1;
	padding: 1px;
	color: black;
	font-size: 14px;
}
.bonus {
	box-shadow: 0px 0px 25px 5px #33CCFF;
}
.standard {
	box-shadow: 0px 0px 15px 1px #19803f;
}
.yellow {
	box-shadow: 0px 0px 20px 0.2px yellow;
}
.red {
	box-shadow: 0px 0px 20px 0.2px red;
}
.redsYellows {
	box-shadow: -5px -5px 20px 3px yellow, 5px 5px 25px 5px red;
}
.owngoals {
	box-shadow: 0px 0px 20px 0.2px lime;
}
.goal {
	box-shadow: 0px 0px 20px 0.2px purple;
}
.missedpen {
	box-shadow: 0px 0px 20px 0.2px #FF69B4;
}
.assist {
	box-shadow: 0px 0px 20px 3px #fff;
}
.defcon {
	box-shadow: 0px 0px 20px 3px #25e694;
}
.goalBonus {
	box-shadow: -10px 0px 20px 0.2px purple, 10px -0px 25px 5px #33CCFF;
}
.assistBonus {
	box-shadow: -5px -5px 20px 3px #fff, 5px 5px 25px 5px #33CCFF;
}
.goalAssistBonus {
	box-shadow: 10px 0px 20px 0.2px purple, -10px -10px 20px 3px #fff, 0px 10px 25px 5px #33CCFF;
}
.playerBoxes {
	width: 100%;
	padding: 0px 5px 5px;
	height: 100%;
	position: absolute;
	z-index: 999;
}
table, th, td {
  // border: 1px solid black;
}
.pitchBox {
    width: 16%;
    text-align: center;
    height: 23%;
    display: inline-block; /* Ensure this is set */
    pointer-events: auto !important; /* Critical: Makes it clickable/hoverable again */
    cursor: pointer; /* Visual feedback */
    position: relative; /* Helps anchor the tooltip if needed */
    z-index: 20; /* Ensure it sits above the grass layer */
    transition: transform 0.2s ease;
}
.pitchBox:hover {
    transform: translateY(-5px); /* Moves up 5 pixels */
    z-index: 100; /* Ensures the hovered player stays on top of neighbors */
}
.pitchBoxGK {
	width: 100%;
	text-align: center;
	height: 25%;
}
.pitchRow {
	width: 100%;
	height: 5%;
}
.playerShirt {
	height: 59px;
	margin: 0 0 2px;
	width: 44px;
	box-shadow: 0 6px 5px -4px black;
}
.mainText {
	font-family: Arial,Helvetica,freesans,sans-serif;
}
small {
	font-family: Arial,Helvetica,freesans,sans-serif;
}
.bottomGap {
	margin-bottom: 8%;
}

ul {
	margin: 5px;
	padding: 0;
	list-style-type: none;
}

#menu {
  top: 0;
  position: fixed;
  height: auto;
  width: 100%;
  background-color: white;
  padding: 5px;
  font-family: Arial,Helvetica,freesans,sans-serif;
  z-index: 99;
  border-width: 1px;
  border-bottom-width:1px;
  border-bottom-color:#345;
  border-bottom-style: solid;
}
.gameListing {
	background-color: #eee;
	border-radius: 8px;
	display:inline-block;
	padding: 5px;
	margin: 5px;
}

.bonusCell {
  font-size: 13px;
  padding: 10px;
  text-align: left;
}

.infoCell {
  padding-right: 15px;
  padding-left: 15px;
  padding-top: 5px;
}

.oddRow {
  background-color: #fff;
}

.badgeCell {
  background-color: #eee !important;
  padding: 10px;
}

.evenRow {
  background-color: #eee;
}
.matchRow {
	padding: 15px;
	margin: 5px;
}

.gameListBorderNorm {
	border: 1px solid #ddd;
}

.gameListBorderLive {
	border: 1px solid #444;
	box-shadow: 0px 0px 6px 0.2px red;
}
.numberCircle:before {
    border-radius: 50%;
    height: 14px;
    padding-left: 4px;
    padding-right: 4px;
    background: #fff;
    border: 1px solid #666;
    color: #666;
    font: 14px Arial, sans-serif;
}

.numberCircle {
    list-style-type: none;
    margin-left: 0;
    padding-bottom: 1px;
}

.circle3:before {
    content: "3";
}

.circle2:before {
    content: "2";
}

.circle1:before {
    content: "1";
}

.row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.column {
  flex: 1; /*grow*/
  padding-bottom: 30px;
}

.flexpitch {
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) { /*breakpoint*/
  .row {
    flex-direction: column;
  }
}
.fixWidth { 
	width: 70%;
	min-width:300px;
}
.commBox {
	overflow-y: scroll;
	height: 460px;
	width: 100%;
	min-width: 300px;
	font-family: Arial;
}
.centerDiv {
	margin-left:auto;
	margin-right:auto; 
}