*,
*::before,
*::after {
  box-sizing: border-box;
}
#lastFightsModal .modal-content {
  background-color: var(--bg-body) !important;   /* dark grey box */
  color: var(--text-color);                         /* make the text readable */
}
#lastFightsModal {
  /* e.g. a dark translucent overlay */
  background-color: var(--bg-body) !important; 
}

  .chart-wrapper {
    position: relative;   /* required by Chart.js */
    width: 100%;          /* fill parent width */
    height: 400px;        /* pick the height you want */
    /* you can also use height: 50vh; or any CSS unit */
  }
#fighterRankChart {
    width: 100% !important;
    height: 100% !important;
  }


.chart-title {
  position: relative;

  color: var(--text-colorG);
  text-align: center;
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: var(--bg-body);
  overflow: hidden;
  z-index: 1;
}

/* Top (→) */
.chart-title::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background-image: repeating-linear-gradient(
    to right,
    var(--accent-color) 0 4px,
    transparent 4px 8px
  );
  animation: dashRight 2s linear infinite;
  pointer-events: none;
}

/* Bottom (←) */
.chart-title::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background-image: repeating-linear-gradient(
    to left,
    var(--accent-color) 0 4px,
    transparent 4px 8px
  );
  animation: dashLeft 2s linear infinite;
  pointer-events: none;
}

/* Left (↑) */
.chart-title .border-left {
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 100%;
  background-image: repeating-linear-gradient(
    to top,
    var(--accent-color) 0 4px,
    transparent 4px 8px
  );
  animation: dashUp 2s linear infinite;
  pointer-events: none;
}

/* Right (↓) */
.chart-title .border-right {
  position: absolute;
  top: 0; right: 0;
  width: 2px; height: 100%;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--accent-color) 0 4px,
    transparent 4px 8px
  );
  animation: dashDown 2s linear infinite;
  pointer-events: none;
}

@keyframes dashRight {
  from { background-position: 0 0; }
  to { background-position: 8px 0; }
}

@keyframes dashLeft {
  from { background-position: 0 0; }
  to { background-position: -8px 0; }
}

@keyframes dashUp {
  from { background-position: 0 0; }
  to { background-position: 0 -8px; }
}

@keyframes dashDown {
  from { background-position: 0 0; }
  to { background-position: 0 8px; }
}

 .chart-titlePrem {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text-colorG);
    text-align: center;
    margin: 1.5rem 0 0.75rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.3rem;
  }








#radarChart6 {
  display: block;
  width: 100%;
  height: 400px;

}
.eye-icon i {
  font-size: 1.1rem;
 
}

@keyframes blinkColor {
  0%   { opacity: 1; color:var(--text-color); }     /* Start solid black */
  50%  { opacity: 1; color: #E4080A; }
  100% { opacity: 1; color: var(--text-color); }     /* Back to black */
}

.blinking {
  animation: blinkColor 1s linear 5;
  animation-fill-mode: forwards;
}






.fighter-header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fighter-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 5px;
    border: 2px solid #ccc;
}
.fighter-image:hover {

 
   border: 2px solid var(--accent-color);;
     box-shadow: 0 0 20px rgba(161, 160, 160, 0.6);
}


.radar-container {
  width: 100%;
  height: 300px;
  position: relative;
  margin-bottom: 20px;
}
.radar-wrapper {
  width: 100%;
  max-width: 500px;
  height: 300px;
  position: relative;
  margin: 20px auto;
  border: 1px solid rgba(255,255,255,0.1); /* Optional visual border */
}

.radar-wrapper canvas {
  position: absolute;
  top: 0;
  left: 0;
}




        .loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #222;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

        table {
            margin-top: 10px;
            border-collapse: collapse;
            font-size:12px;
             width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed; /* Ensures even column widths */
  border-collapse: collapse;
            z-index:1;
            max-width:100%;
        } 
        @media (max-width: 768px) { 
         table {
            width: 100%;
         } }
        
        th, td {
            width:33.33%;
            padding:5px 15px 10px 5px;
            text-align: center;
            border-bottom: 1px solid #ddd;
            position: relative;
             box-sizing: border-box;
            
        }
      
        th {
            background-color: var(--bg-color);
            padding: 10px 0px 10px 0px;
}
        tr {
            border-radius:0px;
        }

@media (min-width: 769px) { /* PC screens */
   
             tr:hover {
    
    transition: background-color 0.3s ease, color 0.3s ease; 
   box-shadow:
  0 0 2px rgba(255, 215, 0, 0.2),
  0 2px 5px rgba(153,153,153,0.5);
  
}
}

.table-container.dropdown-active {
    pointer-events: none;
}
        
        #vsHeader {
            text-align: center;
     max-width:28%;
      white-space: normal;
    
  }
  
    .vs-row {
        max-width:28%;
      overflow-wrap: break-word; /* Ensures wrapping of text */
      white-space: normal;
      font-size:10px;
      opacity: 0.8; 
    font-weight: 500; 
    color:var(--text-color);
    
  }
        
        .fighter-select {
            min-width: 200px;
            margin-right: 20px;
        }
        .dropdown {
            position: relative;
            display: inline-block;
            background-color: var(--bg-content);
        }
        .dropdown-content {
            display: none;
            position: absolute;
            min-width: 200px;
            font-size: 12px;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
            z-index: 15;
            padding: 10px;
            border: 1px solid #ddd;
            background-color: var(--bg-content);
        }
        .dropdown-content label {
            display: block;
            margin: 5px 0;
        }
        .dropdown:hover .dropdown-content {
            display: block;
        }
        
        .fighter-dropdown {
            display: none;
            position: absolute;
			top:100px;
            border: 1px solid #ccc;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            z-index: 1005;
            padding: 5px;
            max-height: 200px;
            overflow-y: auto;
            pointer-events: auto;
			background-color: var(--bg-content);
        }

        .fighter-dropdown button {
            display: block;
            width: 100%;
            border: 0px solid;
            text-align: left;
            padding: 5px;
            cursor: pointer;
        }

        .fighter-dropdown button:hover {
            
           
        }

        .fighter-dropdown:hover  {
            display: block;
        }

        .fighter-search-box {
            width: 100%;
            padding: 5px;
            margin-bottom: 5px;
            border: 1px solid #ddd;
            box-sizing: border-box;
        }

        .filter-arrow {
            border: 0px solid;
        }
        
        .fighter-name {
            padding: 5px 10px 5px 10px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, opacity 0.3s ease-in-out;
     border-radius: 5px;
     width:100%;
        }
        
        .fighter-name:hover {
           background-color: rgba(153,153,153,0.5);
        }


        .progress-bar {
            width: 100%;
            background-color:var(--box-bg);
            border-radius: 3px;
            overflow: hidden;
            margin-top: 5px; 
        }
        

    .progress-bar-inner {
    position: relative; 
    height: 10px;
    background-color: rgba(4, 133, 0, 0.7);
    width: 0; /* Start with 0 width */
    border-radius: 3px;
    transition: width 1s ease-out; 
    display: flex;
    align-items: center; 
    justify-content: center; 
    color: white; 
    font-size: 8px;
}

.progress-bar-inner.reverse {
    float: right;
    border-radius: 3px;
}

 .progress-bar-inner.red {
       background-color: rgba(204, 6, 6,0.7);
   }

.progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-weight: bold;
    pointer-events: none; /* Prevent interaction blocking */
}

.highlight {
    background-color: rgba(255, 215, 0, 0.5); 
}

.divider-row { background-color: var(--divrow);
font-size:5px;
    max-height:5px;
}

.rank-label {
    
     position: absolute; 
    top: 25%; 
    left: 10%;  
    transform: translate(-50%, -50%); 
    font-size: 0.6em; 
    color: #555; 
    background-color: #f0f0f0; 
    border-radius: 4px; 
    padding: 2px 2px; 
    z-index: 10; 
    width:20px;
}

.rank-label.fighter2 {
    position: absolute; 
    top: 25%; 
    left: 100%; 
    transform: translate(-100%, -50%);
    font-size: 0.6em; 
    color: #555; 
    background-color: #f0f0f0;
    border-radius: 4px; 
    padding: 2px 2px;
    z-index: 10; 
    width: 20px; 
}

.rank-label.secondary {
    top: 75%; 
}

.rank-label.fighter2.secondary {
    top: 75%; 
    left: 95%; 
    transform: translate(-100%, -50%);
}

.rank-label.hidden {
    display: none;
}

.load-state-btn {
    
    background-color: #add8e6; 
}

.load-state-btn:hover {
    
	background-color: rgba(153,153,153,0.5);
}

 button:hover {
    
	background-color: rgba(153,153,153,0.5);
}
     .hidden {
    display: none;
}   

#savedStatesList {
    padding-left:20px;
     display: none;
    
}


#comparisonContainer {
    display: flex;
    justify-content: flex-start; 
    align-items: flex-start; 
    gap: 50px; 
    flex-wrap: nowrap; 
    width: 100%;
}

/* Ensure table and chart sections don't push each other */
#tableContainer {
    flex: 0 1 auto; /* Prevents it from stretching */
	width:100%;
}

/* Ensure charts stay compact */
#chartsContainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns per row */
    gap: 30px; /* Gap between charts */
    width: 100%; /* Use full width of the container */
    max-width: 640px; /* Adjust as needed */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
    margin: 0 auto; /* Center the container */
}

/* Fix the canvas size to avoid excessive space usage */
canvas {
  width: 100%;
  height: auto;
  max-width: 300px;
  max-height: 300px;
}

/* allow this specific chart to fill its wrapper */
#fighterRankChart {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
}
/* when a cell is “selected” */
#comparisonTable td.selected-cell {
  background-color: rgba(255, 215, 0, 0.3); /* a light gold, adjust to taste */
  transition: background-color 0.2s ease;
}
/* in assets/css/compare.css, at the bottom */
#comparisonTable td.best-stat {
  color: #27ae60;    /* green */
  font-weight: bold;
}



@media (max-width: 768px) { /* Adjust breakpoint as needed */
    #comparisonContainer {
        flex-direction: column; /* Stack table and charts vertically */
        gap: 20px; /* Reduce gap for mobile */
        
        width: 100%;
    }
	
	#tableContainer {
	width:100%;
}

    #chartsContainer {
        grid-template-columns: 1fr; /* One column per row on mobile */
        max-width: 100%; /* Allow charts to take full width */
    }

    canvas {
        max-width: 100%; /* Allow canvas to take full width on mobile */
    }
}


.modal.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgb(255, 255, 255);
    color: #222;
    padding: 20px;
    border-radius: 8px;
    z-index: 1000;
    width:700px;
    font-size:12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal_table {
    
    width:100%; 
    text-align:center; 
    font-size:10px;
    border-radius: 8px;
}

.modal_tr {
    text-align:left; 
    border-radius: 8px;
}

.modal_td {
    text-align:left; 
   
}

.modal_th {
    
     font-size:12px;
}

.modal-content {
    max-height: 80vh;
    overflow-y: auto;
}
#closeModal {
    float: right;
    padding-right:10px;
    cursor: pointer;
    font-size: 20px;
}

@media (max-width: 768px) { 
    .modal {
        width:100%;
        margin-top:12px;
    } }





