/* --- General & Utility Styles --- */
body { font-family: "DM Sans", sans-serif; line-height: 1.5; color: #333; margin: 0; padding: 10px; padding-bottom: 100px; background-color: #f4f7f6; } /* Added padding, removed margin */
hr { margin: 20px 0; border: 0; border-top: 1px solid #eee; }
#loading-indicator { display: flex; justify-content: center; height:100%; width:100%; background-image: linear-gradient(to right, rgba(0, 255, 135, 0.3), rgba(2, 239, 255, 0.3)); top: 0; left: 0; z-index: 1000; position: absolute; opacity: 0.5;}
#loading-indicator img { display: block;
  margin: auto;
  width: 20%; }
.error-message { color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 10px 15px; border-radius: 4px; margin: 10px 0; }
h2 { margin-top: 20px; margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 5px; color: #333; }

/* --- Button/Toggle Styles --- */
#refresh-data-btn { font-family: "DM Sans", sans-serif; font-weight: 900; border-radius: 10px; font-size: 0.9em; margin-bottom: 10px; height:100%; border: none; border-bottom: 2px solid #9753a5; background-color: rgb(55, 0, 60); padding: 10px; color: #fff;}
#refresh-data-btn:hover { opacity:0.6; }
#refresh-data-btn:disabled { cursor: not-allowed; opacity: 0.6; }
#score-toggles { 
  width: 100%;
  padding: 15px;
  height: 70px;
  background-color:#f0f0f0; 
  border-top: 1px solid #ddd; 
  border-radius: 5px; 
  font-size: 0.9em; 
  position:fixed;
  left: 0;
  bottom: 0;
  box-sizing: border-box;
}
#score-toggles label { margin-right: 0px; }
#score-toggles input[type="checkbox"] { vertical-align: middle; position: relative; top: -1px; margin-right: 3px;}
#bonus-status { font-size: 0.9em; color: #666; margin-left: 10px; }

/* --- Desktop Layout Containers (Side-by-Side) --- */
.content-container::after { content: ""; display: table; clear: both; } /* Clearfix for floats */
#league-table,
#gw-fixtures {
  width: 48%;
  margin: 1%;
/*  background: #fff;*/
  float: left;
/*  border: 1px solid #ddd;*/
  border-radius: 15px;
  box-sizing: border-box;
    min-height: 300px;
/*    box-shadow: 0 3px 8px rgba(0,0,0,0.08);*/
}
.content-tabs { display: none; } /* Hide tabs on desktop */
.tab-content { display: block; } /* Ensure content is visible on desktop */

.transfer-playing {
    /* Inherit pulse animation from previous step if desired */
    color: #fff;
    animation: pulsePlaying 1.5s infinite ease-in-out;
    /* border: 1px solid #ff005a; */ /* FPL pink border */
    background: linear-gradient(30deg, rgb(150, 60, 255), rgb(199, 16, 230) 5%, rgb(233, 0, 202), rgb(255, 0, 173), rgb(255, 0, 144), rgb(255, 0, 117), rgb(255, 0, 90), rgb(255, 46, 65), rgb(255, 80, 40), rgb(255, 105, 0) 87.5%);
}


/* --- Fixture Styling (Unchanged) --- */
.fixture { padding: 10px 12px; border: 1px solid #e0e0e0; border-radius: 6px; margin-bottom: 10px; background-color: #fdfdfd; box-shadow: 0 1px 2px rgba(0,0,0,0.05); transition: border-color 0.2s ease, background-color 0.2s ease; }
.fixture:hover { border-color: #bbb; background-color: #f7f7f7; }
.fixture .main-info { display: flex; align-items: center; justify-content: space-between; }
.fixture .main-info .home, .fixture .main-info .away { flex: 1; font-size: 0.95rem; font-weight: bold; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fixture .main-info .home { text-align: right; margin-right: 8px; }
.fixture .main-info .away { text-align: left; margin-left: 8px; }
.fixture .main-info .badge img { width: 25px; height: 25px; vertical-align: middle; display: block; margin:0 10px; }
.fixture .main-info .score { font-size: 1.1em; font-weight: bold; padding: 2px 10px; border-radius: 4px; border: 1px solid #ccc; min-width: 65px; text-align: center; line-height: 1.4; background-color: #e9e9e9; color: #333; }
.fixture .main-info .score.finished { background-color: rgba(55, 0, 60); border-color: #cce; color: #fff; }
.fixture .main-info .score.upcoming-time { font-size: 0.8rem; font-weight: normal; background-color: #f0f0f0; border-color: #ddd; color: #555; padding: 3px 8px;}


/* --- Fixture Details Styling (Improved Readability) --- */

.fixture .fixture-details {
  margin-top: 10px;
  padding: 12px 15px; /* More internal padding */
  font-size: 0.88em; /* Slightly larger base font */
  color: #333;
  line-height: 1.7; /* Increase line height slightly */
  background-color: #fff; /* Slightly off-white background */
  border-radius: 8px; /* Match parent fixture rounding */
}

/* Style each detail row (Goals, Assists, Bonus) */
.fixture .fixture-details .goalscorers,
.fixture .fixture-details .assists,
.fixture .fixture-details .bonus-points,
.fixture .fixture-details .dc-points {
  display: flex; /* Use flex for label/content alignment */
  align-items: flex-start; /* Align items to the top */
  margin-bottom: 8px; /* Consistent spacing */
  padding-bottom: 8px; /* Space below line */
  border-bottom: 2px solid #ccc; /* Subtle dotted separator */
  border-radius: 8px;
  background-color: #eee;
}
/* Remove bottom border from the last detail item */


/* Style the Labels (Goals:, Assists:, Bonus Points:) */
.fixture .fixture-details strong {
  flex: 0 0 90px; /* Fixed width for labels */
  font-weight: bold;
  color: #111;
  margin-right: 8px;
  position: relative;
  top: 1px; /* Fine-tune vertical alignment */
}

/* Styling for the content part containing player names/lists */
.fixture .fixture-details .goalscorers span, /* Targets the container span if used */
.fixture .fixture-details .assists span {
/*   color: #444;*/
/*   margin-left: 0; */
}

/* Bonus Points List Styling */
.fixture .fixture-details .bonus-points ol {
  flex: 1; /* Take remaining space */
  list-style: none; /* Remove default bullets */
  padding-left: 0;
  margin: 0;
  /* OL is block by default */
}
.fixture .fixture-details .bonus-points li {
  /* LI is block by default */
  margin-bottom: 4px; /* Space between bonus players */
  color: #444;
}
.fixture .fixture-details .bonus-points li:last-child {
  margin-bottom: 0;
}

.fixture .fixture-details .dc-points ol {
  flex: 1; /* Take remaining space */
  list-style: none; /* Remove default bullets */
  padding-left: 0;
  margin: 0;
  /* OL is block by default */
}
.fixture .fixture-details .dc-points li {
  /* LI is block by default */
  margin-bottom: 4px; /* Space between dc players */
  color: #444;
}
.fixture .fixture-details .dc-points li:last-child {
  margin-bottom: 0;
}

/* Specific styling for player names within goal/assist/bonus lists */
.fixture .fixture-details .player-name-hover {
     color: #0056b3; /* Make player names blue */
     font-weight: 500; /* Slightly bolder */
     margin-left: 0; /* Reset margin */
     /* Keep hover styles from below */
     padding: 1px 3px; /* Add slight padding for hover background */
     margin: 0 1px;
     border-radius: 3px;
     /* font-style: normal; */ /* Removed italics */
}


/* Keep hover effect for player names (slightly enhanced) */
.player-name-hover {
  cursor: pointer;
  text-decoration: none; /* Remove default underline */
  border-bottom: 1px dotted #0056b3; /* Use dotted border instead */
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
.player-name-hover:hover {
  background-color: #e2e6ea; /* Lighter grey highlight */
  color: #000; /* Darken text on hover */
  border-bottom-color: transparent; /* Hide border on hover */
}

/* Ensure the generic span rule doesn't override player names in lists */
.fixture .fixture-details .goalscorers span.player-name-hover,
.fixture .fixture-details .assists span.player-name-hover,
.fixture .fixture-details .bonus-points li span.player-name-hover {
    margin-left: 0; /* Override general span margin */
    font-style: normal; /* Override general span italics */
}

.fixture .fixture-details .dc-points li span.player-name-hover {
    margin-left: 0; /* Override general span margin */
    font-style: normal; /* Override general span italics */
}


/* --- Standings Table Styling (Using Divs + Flexbox) --- */
.league-table-divs { width: 100%; font-size: 0.95em; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid #ccc; border-radius: 15px; overflow: hidden; color: #fff; /* Ensure background for rows */ }
.table-row { display: flex; width: 100%; border-bottom: 1px solid #eee; align-items: center; }
.league-table-divs > .table-row:last-of-type { border-bottom: none; }
.table-row.headers { background-color: rgb(55, 0, 60); font-weight: bold; border-bottom: 2px solid #ccc; position: sticky; top: 0; z-index: 10; }
.table-row .table-cell { padding: 11px 10px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid #eee; min-width: 0; box-sizing: border-box; }
.table-row .table-cell:first-child { border-left: none; }
.table-cell.header-cell { font-weight: bold; color: #eee; padding: 10px 10px; }
/* Header Cell Alignment */
.table-cell.header-cell.player_name { flex: 2.8 1 150px; text-align: left; } .table-cell.header-cell.rpf { flex: 1 1 65px; text-align: center; } .table-cell.header-cell.pot { flex: 1 1 65px; text-align: center; } .table-cell.header-cell.pog { flex: 1 1 65px; text-align: center; } .table-cell.header-cell.transfers { flex: 1 1 75px; text-align: center; } .table-cell.header-cell.curr_points { flex: 1 1 70px; text-align: center; font-weight:600; font-size:1em } .table-cell.header-cell.total_points { flex: 1 1 80px; text-align: center; }
/* Data Cell Alignment & Styling */
.table-cell.cell-player-name { flex: 2.8 1 150px; white-space: normal; font-weight: bold; font-size: 1.05em; text-align: left; position: relative;}
.table-cell.cell-rpf { flex: 1 1 65px; text-align: center; font-size: 0.9em; } .table-cell.cell-pot { flex: 1 1 65px; text-align: center; font-size: 0.9em; } .table-cell.cell-pog { flex: 1 1 65px; text-align: center; font-size: 0.9em; } .table-cell.cell-transfers { flex: 1 1 75px; text-align: center; font-size: 0.9em; } .table-cell.cell-curr-points { flex: 1 1 70px; text-align: center; font-weight: 1000; color: #fff; font-size: 1.3em; } .table-cell.cell-total-points { flex: 1 1 80px; text-align: center; font-weight: bold; font-size: 1em; }
/* Entry Row Styling */
.table-row.entry { background-image: linear-gradient(to right, rgb(0, 255, 135), rgb(2, 239, 255)); color: #333; cursor: pointer; transition: background-color 0.15s ease-in-out; }
.table-row.entry:nth-child(even) { background-color: #f8f8f8; }
.table-row.entry:hover { background-color: #eef4ff; filter: opacity(80%); }
.table-row.entry .table-cell { color: inherit; }
/* First and Last Row Styling */
.league-table-divs > .table-row.entry.rank-first { background-image: linear-gradient(93deg, rgba(255,215,0,1) 0%, rgba(253,187,45,1) 100%); color: #333; font-weight: bold; border-top: none; border-bottom: 1px solid #e0c84a; }
.league-table-divs > .table-row.entry.rank-last { background-image: linear-gradient(93deg, rgba(255,0,0,1) 0%, rgba(222,101,101,1) 100%); color: #fff; border-bottom: none; }
/* Rank Indicator */
.rank-indicator { vertical-align: middle; margin: -10px; position: relative; top: -1px; }
.rank-indicator.up { filter: invert(59%) sepia(58%) saturate(683%) hue-rotate(75deg) brightness(96%) contrast(93%); } .rank-indicator.down { filter: invert(40%) sepia(48%) saturate(5880%) hue-rotate(338deg) brightness(94%) contrast(90%); } .rank-indicator.same, .rank-indicator.new { opacity: 0.5; }
/* Chip Indicators */
.chip-indicators { display: inline-block; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.chip-icon { display: inline-block; width: 17px; height: 17px; border-radius: 50%; font-size: 8px; font-weight: bold; line-height: 17px; text-align: center; margin-right: 2px; color: white; cursor: default; box-shadow: 0 1px 1px rgba(0,0,0,0.2); border: 1px solid rgba(0,0,0,0.2); }
.chip-icon.status-available { background-color: #28a745; border-color: #1c7430; } .chip-icon.status-active { background-color: #ffc107; border-color: #d39e00; color: #333; } .chip-icon.status-used { background-color: #6c757d; border-color: #5a6268; opacity: 0.6; }
/* Gimp Zone Div */
.gimp_zone { background-color: rgb(55, 0, 60); text-align: left; font-weight: bold; color: #fff; font-size: 0.8em; padding: 4px; }
/* Team Details Div (Hidden by default) */
.team-details { border-bottom: 1px solid #ccc; padding: 0px 0; background-color: #fff; overflow: visible; display: none; position: relative;}

/* --- Formation Layout within Team Details --- */
.player-list.formation-view { display: flex;
 flex-direction: column;
 gap: 6px;
 background-color: #6EB963;
 background-image: repeating-linear-gradient( to right, rgba(0,0,0,0.04) 0px, rgba(0,0,0,0.04) 10%, transparent 10%, transparent 20% );
 padding: 15px 10px;
 border: 1px solid #5a9a5a;
 font-size: 11px;
 width: 100%;
 max-width: none;
 margin: 0;
 box-sizing: border-box;
 height: auto;
 max-height: none;
 overflow: visible;
 }

.formation-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  width: 90%;
  padding: 10px;
  gap: 15px;
  min-height: auto;
  border: 1px solid rgba(13, 147, 86, 1);
  background-image: linear-gradient(to right bottom, rgba(13, 147, 86, 0.5), rgba(16, 199, 115, 0.5));
  border-radius: 4px;
  margin: 5px auto;
  box-sizing: border-box;
  border-radius: 10px;
}
.formation-line.gk-line { justify-content: center; }

.formation-line.bench-line { 
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 10px;
  gap: 15px;
  border-top: 1px dashed rgba(13, 147, 86, 1);
  background-image: linear-gradient(to right bottom, rgba(13, 67, 86, 0.5), rgba(16, 67, 70, 0.5));
  border-radius: 10px;
}

.formation-line .player, .bench-line .player.type5 {
  opacity: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 10px;
  justify-content: space-between;
  text-align: center;
  background-color: #fff;
  background-image: linear-gradient(to right, rgba(0, 255, 135, 0.5), rgba(2, 239, 255, 0.5));
  color: #222;
  flex-basis: 65px;
  flex-grow: 1;
  flex-shrink: 1;
  max-width: 15%;
  height: auto;
  min-height: 40px;
  font-size: 1em;
  box-shadow: 10px rgba(0,0,0,0.5);
  box-sizing: border-box;
  position: relative;
  margin-bottom: 3px;
  overflow: hidden;
}
.formation-line .player .player-name {
  font-weight: bold;
  width: 110%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-all;
  line-height: 1.5;
  font-size: 1.1em;
  padding: 3px;
  background: #fff;
  color: rgb(55, 0, 60);
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 15px;
}

.player-name span {
  width:80%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin: 0 auto;
  padding: 0 10%;
  display: block;
}

.formation-line .player .player-score {font-size: 1.8em;
  color: #111;
font-weight: 1000;
margin-top: auto;
padding: 5px;
}

.formation-line .player .player-pic-container {height: 70px;
 overflow: hidden;
 border-bottom: 2px solid #fff;
 }
.formation-line .player .player-pic-container img {height: 120px;
 overflow: hidden;
}
.bench-line .bench-label { width: 100%;
 text-align: center;
 margin-bottom: 5px;
 font-weight: bold;
 font-size: 0.9em;
 color: #444;
 align-self: center;
 }
.bench-line .player { background: #c2c2c2;

border-color: #bbb;
 min-height: 35px;
 font-size: 0.9em;
 opacity: 0.9;
 }

.bench-line .player.finished { opacity:0.5 }
.bench-line .player.finished.type5 { opacity:1 }
/* Player Status Styling (Applied to .player div in Formation) */
.formation-line .player.active { background-color: #fff;
 border-color: #bbb;
 }
.formation-line .player.subbed_in { background-color: #fff;
/* border: 2px dashed #28a745;*/
 }
.formation-line .player.captain, .formation-line .player.vice_became_captain {  }
.formation-line .player.captain::after, .formation-line .player.vice_became_captain::after {
    content: "C";
    position: absolute;
    bottom: 0px;
    font-size: 1.2em;
    font-weight: 800;
    color: #37003c;
    background-color: #f0e442;
    line-height: 1;
    width: 100%;
}
.formation-line .player.vice::after {
    content: "V";
    position: absolute;
    bottom: 0px;
    font-size: 1.2em;
    font-weight: 800;
    color: #37003c;
    background-color: #f0e442;
    line-height: 1;
    width: 100%;
}

.dc_shield_icon {
  position: absolute;
  height: 25%;
  left: 5px;
  top: 37px;
  opacity: 0.9;
}

.player.vice .player-score span, .player.captain .player-score span { margin-top:-10px; display:block; }
.formation-line .player.captain *, .formation-line .player.vice_became_captain * {  }
.formation-line .player.finished {background: rgb(55, 0, 60);
  color: #fff;
/* border: 2px solid rgba(55, 0, 60, 0.1);
 */}
.formation-line .player.finished .player-score { color: #fff }
.formation-line .player.subbed_out { background-color: #ffe0e0 !important;
 border-color: #f88 !important;
 color: #a00 !important;
 opacity: 0.7;
}
.formation-line .player.subbed_out .player-name { text-decoration: line-through;
 color: #a00 !important;
 }
.formation-line .player.subbed_out .player-score { color: #a00 !important;
 }

 .formation-line .player.subbed_in { background-color: #0a0 !important;
 border-color: #f88 !important;
 color: #a00 !important;
 opacity: 1;
}
.formation-line .player.subbed_in .player-name { 
 color: #0a0 !important;
 }
.formation-line .player.subbed_in .player-score { color: #fff !important;
 }
.formation-line .player.active_no_play { background-color: #fff8e0 !important;
 border-color: #eed !important;
 color: #888 !important;
 opacity: 0.7;
 }
.formation-line .player.active_no_play *, .formation-line .player.active_no_play * { color: #888 !important;
 }
.formation-line .player.captain_no_play { background-color: #5d007a;
 border-color: #4a0061;
 color: white !important;
 text-decoration: line-through;
 opacity: 0.6;
}
.formation-line .player.captain_no_play *, .formation-line .player.captain_no_play * { color: white !important;
 }
/*.formation-line .player.captain_no_play::after { content: "C";
 /* Style as above */ }*/
.formation-line .player.sub_unused, .formation-line .player.sub_did_not_play { background-color: #e0e0e0 !important;
 border-color: #ccc !important;
 color: #666 !important;
 opacity: 0.9;
 }
.formation-line .player.sub_unused *, .formation-line .player.sub_did_not_play * { color: #666 !important; }

/* --- Effects --- */
.league-table-divs .table-row.entry, .league-table-divs .team-details { transition: opacity 0.2s ease-in-out; }
.league-table-divs .table-row.entry.fade-out, .league-table-divs .team-details.fade-out { opacity: 0.25; }
.league-table-divs .table-row.entry.animate-row-position,  .league-table-divs .table-row.gimp_zone.animate-row-position { transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

/* --- Fixture Details Styling Enhancements (including split view) --- */

/* Main details container */
.fixture-details {
    padding: 8px 0; /* Adjusted padding */
    background-color: #f8f8f8;
    line-height: 1.5;
    font-size: 0.9em; /* Base font size for details */
}

span.fixture-minutes {
  width: 30px;
  text-align: center;
}

span.fixture-minutes .live {

}

.rocker-toggle {
            width: 220px; 
            height: 100%;
            border-radius: 8px;
            background-color: #e5e7eb;
            display: flex;
            align-items: center;
            position: relative;
            cursor: none;
            border-bottom: 2px solid #ccc;
            font-family: 'DM Sans', sans-serif; 
        }
        
        .rocker-option {
            flex: 1;
            text-align: center;
            font-weight: 600;
            z-index: 10;
            transition: color 0.3s ease;
        }
        
        .rocker-thumb {
            position: absolute;
            top: 4px;
            left: 4px;
            width: calc(50% - 4px);
            height: calc(100% - 8px);
            background-color: rgb(55, 0, 60); 
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            transition: transform 0.3s ease-in-out, width 0.1s ease, left 0.1s ease;
        }
        
        .rocker-option-total { color: white; } 
        .rocker-option-gameweek { color: #4b5563; }

        
        /* When the hidden checkbox is checked... */
        .rocker-switch:checked + .rocker-toggle .rocker-option-total { 
            color: #4b5563; 
        }
        .rocker-switch:checked + .rocker-toggle .rocker-option-gameweek { 
            color: white;
        }
        
        .rocker-switch:checked + .rocker-toggle .rocker-thumb {
            transform: translateX(100%); 
        }

        /* :active state makes the thumb "squash" */
        .rocker-toggle:active .rocker-thumb {
            width: calc(50% - 12px); 
            left: 8px; 
        }
        
        .rocker-switch:checked + .rocker-toggle:active .rocker-thumb {
            transform: translateX(100%);
            left: 4px; 
        }

#mobile-owner-wrapper {
  position: fixed;
  z-index: 1000;
  width: 90%;
  height: 80%;
  margin: auto;
  right: 0;
  left: 0;
  top:0;
  bottom: 0;
  background-color: #fff;
  padding: 0;
  display: none;
  border-radius: 15px;
  border-bottom: 2px solid #ccc;
}

#mobile-owner-wrapper span{
  clear: left;
/*width: 100%;*/
display: block;
padding: 5px;
margin: 3px 0;
border-top: 1px solid #ccc;
/*border-bottom: 1px solid #ccc;*/

}

#mobile-owner-wrapper h1 {
  background-image: linear-gradient(to right, rgb(0, 255, 135), rgb(2, 239, 255));
color: #333;
margin: 0;
padding: 10px;
border-radius: 15px;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}

#mobile-owner-list {
  height: 90%;
  padding: 20px;
  overflow-y: scroll;
  overflow-x: hidden;
  box-sizing: border-box;
}

#mobile-blur {
  backdrop-filter: blur(10px);
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  z-index: 900;
background: linear-gradient(145deg,rgba(0, 255, 135, 0.5) 0%, rgba(2, 239, 255, 0.5) 28%, rgba(255, 80, 40, 0.5) 53%, rgba(199, 16, 230, 0.5) 69%, rgba(150, 60, 255, 0.5) 100%);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
            0% {
                background-position: 50% 0%;
            }
            25% {
                background-position: 50% 50%;
            }
            50% {
                background-position: 100% 50%;
            }
            75% {
                background-position: 50% 50%;
            }
            100% {
                background-position: 50% 0%;
            }
        }

#mobile-owner-wrapper-close {
    position: absolute;
    bottom: 15px;
    right: 15px;
    color: #fff;
    background: rgb(55, 0, 60);
    padding: 20px;
    width: 5px;
    height: 5px;
    text-align: center;
    border-radius: 100px;
    font-weight: 100;
    line-height: 0.5;
    cursor: pointer;
}

#mobile-owner-wrapper img {
  position: absolute;
  top: -80px;
  right: 0;
  height: 150px;
}


/* Container for the two columns */
.fixture-details .split-stats {
    display: flex;
    background-color: #eee;
    justify-content: space-between; /* Pushes columns apart */
    padding: 10px; /* Add padding to the sides */
    margin-bottom: 10px; /* Space before bonus points */
    border-bottom: 2px solid #ccc; /* Subtle dotted separator */
    border-radius: 8px;
}

/* Styling for each column */
.fixture-details .home-stats,
.fixture-details .away-stats {
    flex-basis: 48%; /* Each column takes slightly less than half */
    /* Or use width: 48%; */
}

/* Styling for stat groups (e.g., Goals, Cards) within columns */
.fixture-details .stat-group {
    margin-bottom: 8px; /* Space between stat groups */
}

.fixture-details .stat-group strong {
    display: block; /* Make label appear on its own line */
    color: #555;
    margin-bottom: 3px;
    font-size: 0.95em;
}

/* Player name tags (inherited from previous styles, slight adjustments) */
.fixture-details .player-name-hover {
    display: inline-block;
    background-color: #e8e8e8;
    color: #222;
    padding: 2px 6px; /* Slightly smaller padding */
    border-radius: 4px; /* Less rounded */
    margin-right: 5px;
    margin-bottom: 4px;
    font-size: 0.95em; /* Slightly larger than base details font */
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    /* box-shadow: 0 1px 2px rgba(0,0,0,0.05); */ /* Optional: Remove shadow? */
}

.fixture-details .player-name-hover:hover {
    background-color: #00ff85;
    color: #000;
}

/* --- Optional: Specific styling for different stat types --- */
.fixture-details .stat-yellow_cards { background-color: #fff0b3; } /* Pale Yellow */
.fixture-details .stat-red_cards { background-color: #ffcccc; color: #900; font-weight: bold; } /* Pale Red */
.fixture-details .stat-own_goals { background-color: #ffd1b3; } /* Pale Orange */
.fixture-details .stat-penalties_saved, .fixture-details .stat-saves { background-color: #cceeff; } /* Pale Blue */
.fixture-details .stat-penalties_missed { background-color: #f0f0f0; text-decoration: line-through;} /* Greyed out with strikethrough? */
/* (Adjust colors and styles as desired) */


/* Bonus points section (Full Width) */
.fixture-details .bonus-points {
    padding: 8px 12px 0 12px; /* Padding */
    margin-top: 8px;
}

.fixture-details .bonus-points strong {
    display: inline-block; /* Keep label inline */
    margin-bottom: 0;
}

.fixture-details .bonus-points ol {
    margin: 2px 0 0 0;
    padding-left: 20px; /* Indent list */
    list-style: decimal;
}

.fixture-details .bonus-points li {
    margin-bottom: 3px;
}

/* Styling for player names within the bonus list */
.fixture-details .dc-points li .player-name-hover {
     background-color: transparent; /* No background in list */
     padding: 0 2px;
     margin: 0;
     box-shadow: none;
     border-radius: 3px;
     font-size: 1em; /* Match surrounding text */
}
.fixture-details .dc-points li .player-name-hover:hover {
    background-color: #00ff85;
    color: #000;
}

/* Bonus points section (Full Width) */
.fixture-details .dc-points {
    border-top: 1px dashed #ddd; /* Separator line */
    padding: 8px 12px 0 12px; /* Padding */
    margin-top: 8px;
}

.fixture-details .dc-points strong {
    display: inline-block; /* Keep label inline */
    margin-bottom: 0;
}

.fixture-details .dc-points ol {
    margin: 2px 0 0 0;
    padding-left: 20px; /* Indent list */
    list-style: decimal;
}

.fixture-details .dc-points li {
    margin-bottom: 3px;
}

/* Styling for player names within the bonus list */
.fixture-details .dc-points li .player-name-hover {
     background-color: transparent; /* No background in list */
     padding: 0 2px;
     margin: 0;
     box-shadow: none;
     border-radius: 3px;
     font-size: 1em; /* Match surrounding text */
}
.fixture-details .dc-points li .player-name-hover:hover {
    background-color: #00ff85;
    color: #000;
}

/* --- Player Detail Panel --- */

/* Optional Overlay */
#panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998; /* Below panel */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
#panel-overlay.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}


/* The Panel Itself */
.slide-panel {
    position: fixed;
    top: 0;
    right: -350px; /* Start off-screen (adjust width as needed) */
    width: 330px; /* Panel width */
    max-width: 90%; /* Max width on smaller screens */
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 999; /* Above overlay */
    transition: transform 0.3s ease-in-out;
    transform: translateX(0); /* Baseline transform */
    overflow-y: auto; /* Allow scrolling if content overflows */
}

.team-is-live {
    top: 50%;
    right: 10px;
    position: absolute;
    border-radius: 100px;
    width: 6px;
    height: 6px;
    display: block;
    color: #fff;
    animation: pulsePlaying 1.5s infinite ease-in-out;
    border: 1px solid #ff005a;
    background: linear-gradient(30deg, rgb(150, 60, 255), rgb(199, 16, 230) 5%, rgb(233, 0, 202), rgb(255, 0, 173), rgb(255, 0, 144), rgb(255, 0, 117), rgb(255, 0, 90), rgb(255, 46, 65), rgb(255, 80, 40), rgb(255, 105, 0) 87.5%);
}

.rank-last .team-is-live {
    top: 50%;
    right: 10px;
    position: absolute;
    border-radius: 100px;
    width: 6px;
    height: 6px;
    display: block;
    color: #fff;
    animation: pulsePlayingWhite 1.5s infinite ease-in-out;
    border: 1px solid #fff;
    background: #fff;
}

.slide-panel.active {
    transform: translateX(-350px); /* Slide in */
}

/* Panel Close Button */
.slide-panel .close-panel-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.slide-panel .close-panel-btn:hover {
    color: #333;
}

/* Panel Content Area */
.slide-panel .panel-content {
    padding: 20px;
}

/* Panel Header (Photo + Basic Info) */
.slide-panel .panel-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.slide-panel .panel-player-photo {
    flex-shrink: 0;
    margin-right: 15px;
    width: 80px; /* Adjust size */
    height: 100px; /* Adjust size */
    overflow: hidden;
}

.slide-panel .panel-player-photo img {
    display: block;
    width: 100%;
    height: auto;
}

.slide-panel .panel-player-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.4em;
    color: #333;
}

.slide-panel .panel-player-info p {
    margin: 2px 0;
    font-size: 0.9em;
    color: #555;
}
.slide-panel .panel-player-info p span {
    color: #111;
    font-weight: bold;
}


/* Panel Stats Section */
.slide-panel .panel-stats h4 {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
}

.slide-panel .panel-stats p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #666;
}
.slide-panel .panel-stats p span {
    float: right; /* Align values to the right */
    font-weight: bold;
    color: #333;
    min-width: 40px; /* Give space for alignment */
    text-align: right;
}

/* --- Styling for new formation elements --- */

/* Class for player divs when currently playing */
.player.status-playing {
   /* background-color: #ffe0e0; */ /* Example: subtle pink background */
   /* border: 1px solid red; */
   animation: pulsePlaying 1.5s infinite ease-in-out; /* Example pulse animation */
}

@keyframes pulsePlaying {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 133, 0.4); } /* FPL Pinkish */
    70% { box-shadow: 0 0 0 6px rgba(255, 0, 133, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 133, 0); }
}

@keyframes pulsePlayingWhite {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); } /* FPL Pinkish */
    70% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}


/* Class for the score div when showing upcoming fixtures */
.player-score.score-upcoming-fixture {
    font-size: 0.85em; /* Smaller font for fixture text */
    color: #777;       /* Greyed out text */
    font-style: italic;
}
.player-score .upcoming-fixture-text {
    /* Any specific styling for the text itself if needed */
}

/* --- Player Status Styling in Formation View --- */

/* Player Currently Playing */
.player.playing {
    /* Inherit pulse animation from previous step if desired */
    color: #fff;
    animation: pulsePlaying 1.5s infinite ease-in-out;
    /* border: 1px solid #ff005a; */ /* FPL pink border */
    background: linear-gradient(30deg, rgb(150, 60, 255), rgb(199, 16, 230) 5%, rgb(233, 0, 202), rgb(255, 0, 173), rgb(255, 0, 144), rgb(255, 0, 117), rgb(255, 0, 90), rgb(255, 46, 65), rgb(255, 80, 40), rgb(255, 105, 0) 87.5%);
}

.fixture-minutes.live {
    /* Inherit pulse animation from previous step if desired */
    border-radius: 4px;
    color: #fff;
        font-weight: 800;
     animation: pulsePlaying 1.5s infinite ease-in-out; 
    border: 1px solid #ff005a; /* FPL pink border */
    background: linear-gradient(30deg, rgb(150, 60, 255), rgb(199, 16, 230) 5%, rgb(233, 0, 202), rgb(255, 0, 173), rgb(255, 0, 144), rgb(255, 0, 117), rgb(255, 0, 90), rgb(255, 46, 65), rgb(255, 80, 40), rgb(255, 105, 0) 87.5%);
}

.fixture-minutes.finished {
    /* Inherit pulse animation from previous step if desired */
    border-radius: 4px;
    color: #fff;
    font-weight: 800;
    background: rgb(55, 0, 60);
}

.fixture-short-name {display: none;}


.fixture .main-info .score.live { /* Inherit pulse animation from previous step if desired */
    color: #fff;
     animation: pulsePlaying 1.5s infinite ease-in-out; 
    border: 1px solid #ff005a; /* FPL pink border */
    background: linear-gradient(30deg, rgb(150, 60, 255), rgb(199, 16, 230) 5%, rgb(233, 0, 202), rgb(255, 0, 173), rgb(255, 0, 144), rgb(255, 0, 117), rgb(255, 0, 90), rgb(255, 46, 65), rgb(255, 80, 40), rgb(255, 105, 0) 87.5%);
}

/* Style the score specifically when playing */
.player.playing .player-score {
    font-weight: 1000;
    color: #fff; /* FPL pink text for live score */
}


/* Player Has Finished All GW Fixtures */
.player.finished {
    opacity: 0.85; /* Slightly fade players who are done */
}
.player.finished .player-score {
   /* Style for final score if needed */
}

/* Player Has Upcoming Fixtures (and hasn't played) */
.player.upcoming {
    background-color: #c2c2c2; /* Light grey background */
    opacity: 0.9;
}
/* Styling for the fixture text within the score div */
.player.upcoming .player-score .upcoming-fixture-text {
    font-size: 0.6em; /* Smaller text for fixtures */
    color: #000;       /* Dimmer text color */
    /* font-style: italic; */
    line-height: 1.1;
    display: block; /* Allow wrapping */
    white-space: normal; /* Allow wrapping */
    font-weight: 500;
}
/* Override specific score alignment if needed */
.player.upcoming .player-score, .player.finished .player-score, .player.playing .player-score, .player.dnp .player-score {
    text-align: center;
     min-height: 1.5em; /* Ensure space for text */
     display: flex;
     align-items: center;
     justify-content: center;
}

.player-score .player_bonus { opacity:0.8; font-size: 1em;  }


/* Player Did Not Play (0 mins, all fixtures finished) */
.player.dnp,
.player.subbed_out.dnp, /* Combine with subbed_out status */
.player.sub_did_not_play.dnp { /* Combine with sub status */
    opacity: 0.6; /* Fade out more */
    background: #c2c2c2;
    /* background: linear-gradient(90deg,rgba(194, 194, 194, 1) 5%, rgba(140, 140, 140, 1) 62%); */
    /* text-decoration: line-through; */ /* Optional: Strikethrough name? */
}
.player.dnp .player-score,
.player.subbed_out.dnp .player-score,
.player.sub_did_not_play.dnp .player-score {
    color: #000; /* Grey out the '0' score */
}


/* --- Adjustments for specific base statuses if needed --- */
.player.captain.playing {
    border-width: 2px; /* Make playing captain border thicker */
}

/* Styling for upcoming fixture text in 'partial' state */
.player.partial .player-score .partial-upcoming-fixture {
    font-size: 0.8em;
    color: #666;
    margin-left: 4px;
    font-style: italic;
    white-space: normal; /* Allow wrapping if needed */
}

.formation-line .player.cop_75 .player-name {
      background-color: #f0e442;
    }

    .formation-line .player.cop_25 .player-name {
      color: white;
      background-color: #ffab1b;
    }

    .formation-line .player.cop_50 .player-name {
      background-color: #ffab1b;
    }

  .formation-line .player.cop_0 .player-name {
      color: white;
      background-color: #cc2d2d;
    }

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    /* --- Tab Layout --- */
    .content-tabs {
        display: flex; /* Show tabs on mobile */
        margin-bottom: 10px;
    }
    .tab-link {
      font-family: "DM Sans", sans-serif;
        padding: 10px 15px;
        border: none;
        border-bottom: 2px solid #ccc;
        background-color: #eee;
        margin-right: 5px;
        border-radius: 8px;
        font-weight: bold;
        color: #555;
        flex-grow: 1; /* Make tabs share width */
        text-align: center;
        transition: all 0.3s;
    }

    .tab-link.active {
        border-bottom: 2px solid #9753a5;
        color: #fff;
        background-color: rgb(55, 0, 60);
    }
    .tab-content {
        display: none; /* Hide content by default */
    }
    .tab-content.active {
        display: block; /* Show active content */
    }

    /* --- Container Layout --- */
    #league-table,
    #gw-fixtures {
        width: 100%; /* Full width */
        margin: 0 0 15px 0; /* Stack vertically */
        float: none; /* Remove float */
        padding: 0; /* Adjust padding for smaller screens */
        border-radius: 15px; /* Smaller radius */
    }

    /* --- Hide Table Columns --- */
    .table-row .header-cell.pot, .table-row .cell-pot,
    .table-row .header-cell.pog, .table-row .cell-pog,
    .table-row .header-cell.transfers, .table-cell.cell-transfers {
        display: none; /* Hide PoT, PoG, Transfers columns */
    }


    /* --- Adjust visible column spacing --- */
    .table-cell.header-cell.player_name, .table-cell.cell-player-name { flex: 2.5 1 120px; } /* Give name slightly less space */
    .table-cell.header-cell.rpf, .table-cell.cell-rpf { flex: 1 1 45px; }
    .table-cell.header-cell.curr_points, .table-cell.cell-curr-points { flex: 1 1 60px; }
    .table-cell.header-cell.total_points, .table-cell.cell-total-points { flex: 1 1 65px; }


    /* --- Adjust Formation View --- */
    .player-list.formation-view {
        font-size: 10px; /* Slightly smaller font on mobile */
        padding: 10px 5px;
        min-height: 200px; /* Reduce min height */
        gap: 4px;
    }
    .formation-line {
        gap: 10px; /* Smaller gap */
    }
    .formation-line .player {
        flex-basis: 55px; /* Smaller base */
        min-height: 65px; /* Smaller min */
        font-size: 0.9em; /* Relative font size */
        max-width: 20%;
    }
    .bench-line .player {
        flex-basis: 50px;
        min-height: 32px;
    }
    .formation-line .player .player-name {font-size: 1.1em;line-height: 1.1;padding: 8px;}
    .formation-line .player .player-score {font-size: 1.7em;}

    .player-score span { margin-top:-5px; }

    .player.vice .player-score span, .player.captain .player-score span { margin-top:-15px; }

    .fixture-short-name {display: block;}
    .fixture-long-name {display: none;}


} /* End Media Query */

@media (max-width: 394px) {
    .formation-line .player {
      min-width: 25%;
    }

    .formation-line { width:100%; }

    .formation-line .player .player-name {line-height: 1.1em;padding: 8px;}

}

