*,
*::before,
*::after {
  box-sizing: border-box;
}
.chart-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 300px;
  margin: 0;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-container .info-btn,
.scatter-container .info-btn {
  position: absolute;
  right: 4px;
  top: 2px;
  cursor: pointer;
  z-index: 5;

  /* remove default button look */
  background: none;
  border: none;
  padding: 0;
}
.chart-container .info-btn svg,
.scatter-container .info-btn svg {
  width: 30px;   /* or bigger if you want */
  height: 30px;
  stroke: #fff;  /* make it visible on dark bg */
}

.chart-container .info-btn:hover svg,
.scatter-container .info-btn:hover svg {
  stroke: gold;                /* change color */
  transform: scale(1.2);       /* grow a little */
  filter: drop-shadow(0 0 4px rgba(0,170,255,0.6));
}



/* ✅ Modal overlay always on top */
/* Modal Overlay */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65); /* dim background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.modal.hidden {
  display: none !important;
}

/* Modal Card */
.modal-content {
 background-color: rgba(26, 26, 26, 1);
  color: #f5f5f5;
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 700px;
  width: 90%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
  position: relative;
  font-family: "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  animation: fadeInUp 0.25s ease-out;

  /* 🔹 Mobile fixes */
  max-height: 80vh;      /* keep it within viewport height */
  overflow-y: auto;      /* scroll inside if too tall */
}

/* Optional: style the scrollbar (modern browsers) */
.modal-content::-webkit-scrollbar {
  width: 6px;
}
.modal-content::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
  background: #666;
}
/* Heading */
.modal-content h4 {
  font-size: 18px;
  margin: 0 0 15px 0;
  font-weight: 600;
  color: #ffd700; /* gold accent */
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
}

/* Close Button */
.modal-content .close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 18px;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s ease;
}
.modal-content .close-btn:hover {
  color: #fff;
}

/* Text */
#infoText {
  font-size: 14px;
  color: #ddd;
}
#infoText strong {
  color: #fff;
}
#infoText em {
  color: #bbb;
}

/* Small animation */
@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}









.scatter-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 300px;   /* fixed chart height */
  margin: 0;
}

.scatter-container canvas {
  width: 100% !important;
  height: 100% !important;
}




#chartsContainer1 {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* Two columns per row */
    gap: 10px; /* Gap between charts */
    width: 100%; /* Use full width of the container */
    max-width: 1000px; /* Adjust as needed */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
   
    border: 1px solid silver;
    border-radius: 12px;
    min-height: 250px;
    max-height:350px;  
    padding: 6px 8px;
    margin-bottom: 20px!important;
}

#chartsContainer2 h3 {
  margin-top: 0;
  margin-bottom: 4px;  /* shrink it down */
}


#chartsContainer2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Two columns per row */
  gap: 4px;              /* 🔹 smaller gap */
  width: 100%;
  max-width: 1000px;
  box-sizing: border-box;
 
  border: 1px solid silver;
  border-radius: 12px;
  min-height: 300px;
  margin-bottom: 5px !important;
  padding: 5px;
}
/* 🔹 Heatmap / Strikes Received Layout */
/* Layout for heatmap container */
#chartsContainer3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* fighter1 | labels | fighter2 */
  gap: 20px;
  align-items: start;
  text-align: center;
  margin: 20px auto;
}

/* Fighter cards */
#chartsContainer3 .fighter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#chartsContainer3 .fighter-card object {
  width: 140px;
  max-height: 250px;
  display: block;    /* ✅ force block so it doesn’t overlap text */
  pointer-events: none; /* optional: stop capturing clicks */
}





/* Label column */
#chartsContainer3 .labels {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  height: 250px; /* match SVG height */
  font-size: 13px;
  font-weight: bold;
  color: var(--text-color, #fff);
}

#chartsContainer4 {
 display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns per row */
    gap: 10px; /* Gap between charts */
    width: 100%; /* Use full width of the container */
    max-width: 1000px; /* Adjust as needed */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
  
    border: 1px solid silver;
    border-radius: 12px;
    min-height:300px;
    max-height: 700px;
    margin-botttom: 0px !important;
    padding:10px;
}
#chartsContainer5 {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* Two columns per row */
    gap: 10px; /* Gap between charts */
    width: 100%; /* Use full width of the container */
    max-width: 1000px; /* Adjust as needed */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
   
    border: 1px solid silver;
    border-radius: 12px;
    min-height: 250px;
    max-height:400px;  
    
   
    padding: 6px 8px;
   
   margin-top: 10px!important;
}






#toggleRankLabels {
  display: none !important;
}

.fighters-title {
  font-size: 1.6rem;
}

.compare-table .rank {
  display: none !important;
}

/* Default hidden */
.rank-label {
  display: none;
  margin-left: 4px;
  font-size: 0.8em;
  color: #ccc;
}

/* Shown when toggled */
.rank-label.visible {
  display: inline-block;
}

#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: rgba(0, 0, 0, 0.3) !important;
}
/* Totals row scoreboard style */
#comparisonTable tfoot .totals-row {
  background:var(--bg-body) !important;  /* dark MMA style */
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  
}

#comparisonTable tfoot .totals-cell {
  padding: 10px;
  font-size: 18px;
  color: #FFD700; /* gold numbers */
}

#comparisonTable tfoot .totals-cell.left {
  text-align: center;
  border-right: 2px solid #333;
}

#comparisonTable tfoot .totals-cell.right {
  text-align: center;
  border-left: 2px solid #333;
}

#comparisonTable tfoot .totals-vs {
  font-size: 14px;
  color: #aaa;
  letter-spacing: 2px;
}
.table-title {
  text-align: center;
  font-size: 15px;
  color: silver;
  text-transform: uppercase;
  margin: 6px 0;  /* small spacing */
  padding: 4px 0;
}
 
 #last5CompareTable {
  width: 100%;
  border: none;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0;
}

/* Custom title row */
#last5CompareTable .title-row {
  background: transparent !important; /* remove gray fill */
  color: silver;
  text-align: center;
  font-size: 15px;
  text-transform: uppercase;
  padding: 6px;
  border: none !important;
}

/* Fighter header row */
#last5CompareTable thead tr {
  background: transparent !important;
}

#last5CompareTable thead th {
  border: none !important;
  color: silver;
  font-weight: bold;
  text-transform: uppercase;
  padding: 6px 8px;
  text-align: center;
}

/* Table body */
#last5CompareTable td {
  padding: 6px 8px;
  text-align: center;
border-top:1px solid rgba(255,215,0,.25)

}

/* Remove bottom border on last row */
#last5CompareTable tbody tr:last-child td {
  border-bottom: none;
}
 
 
 
 
 
 
  .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;
  }
#OffenseOnlyChart,
#DefenseOnlyChart {
  min-height: 300px;
  display: block;
}


/* Default chart title */
.chart-title {
  position: relative;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffcc00;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 2px 0 2px;
  overflow: hidden;
}

/* Underline */
.chart-title::after {
  content: "";
  display: block;
  margin: 10px auto 0;
  width: 200px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ffcc00, transparent);
  background-size: 200% auto;
  border-radius: 3px;
}

/* Shimmer animation */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ✨ Apply shimmer only when .shimmer class is set (not logged in) */
.chart-title.shimmer {
  background: linear-gradient(90deg, #ffcc00, #fff, #ffcc00);
  background-size: 200% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
 animation: shimmer 3s linear infinite;
}

.chart-title.shimmer::after {
  animation: shimmer 2s linear infinite;
}

 .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;
  }


#radarChart8 {
  display: block;
  width: 100%;
  height: 400px;

}

#radarChart7 {
  display: block;
  width: 100%;
  height: 400px;

}



#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;
}



/* UFC-Style Page Loader */
/* 🥇 UFC Dual-Ring Loader */
.loader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0.95), rgba(0,0,0,1));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Rings container */
.loader-rings {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 15px;
}

/* Outer ring */
.loader-rings .ring.outer {
  position: absolute;
  inset: 0;
  border: 5px solid rgba(255, 215, 0, 0.15);
  border-top-color: #FFD700;
  border-radius: 50%;
  animation: spin 1.4s linear infinite, pulse 2s ease-in-out infinite;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
}

/* Inner ring (smaller, rotates opposite) */
.loader-rings .ring.inner {
  position: absolute;
  inset: 15px;
  border: 4px solid rgba(255, 215, 0, 0.2);
  border-bottom-color: #FFD700;
  border-radius: 50%;
  animation: spinReverse 1.4s linear infinite, pulseInner 2s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Shimmer text */
.loader-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #FFD700, #fff, #FFD700);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes spinReverse {
  to { transform: rotate(-360deg); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.5); }
  50% { box-shadow: 0 0 45px rgba(255, 215, 0, 1); }
}

@keyframes pulseInner {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 35px rgba(255, 215, 0, 0.8); }
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}


        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%;
              border-bottom:1px solid rgba(255,215,0,.25)
        } 
        @media (max-width: 768px) { 
         table {
            width: 100%;
         } }
        
        th, td {
            width:33.33%;
            padding:5px 15px 10px 5px;
            text-align: center;
            border-top:1px solid rgba(255,215,0,.25)
            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 !important;
}
.rank-label.visible {
    display:  inline-block !important;
}

.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;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Table side */
#tableContainer {
  flex: 0 0 35%;   /* lock table ~35% */
  max-width: 400px;
}

/* Charts side */
#chartsContainer {
  flex: 1;         /* charts take the rest */
  min-width: 0;    /* allows shrinking properly */
}


/* Ensure charts stay compact */
#chartsContainer {
  
 
    gap: 30px; /* Gap between charts */
    min-height: 250px;
    max-width: 1000px; /* Adjust as needed */
 
  
}

/* 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;

}
#comparisonTable td{
  border-bottom:1px solid rgba(255,215,0,.25)
}
/* in assets/css/compare.css, at the bottom */
#comparisonTable td.best-stat {
  color: #27ae60;    /* green */
  font-weight: bold;
}

/* Fighter names under heatmap */
//* Names under heatmap figures */
.heatmap-fighter-name {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
}

/* Fighter 1 name (green) */
.heatmap-fighter-name.fighter1-name {
  color: limegreen;
}

/* Fighter 2 name (gold) */
.heatmap-fighter-name.fighter2-name {
  color: gold;
}




@media (max-width: 768px) { /* Adjust breakpoint as needed */
    #comparisonContainer {
         flex-direction: column; /* Stack table and charts vertically */
        gap: 20px; /* Reduce gap for mobile */
        min-width: 200px;
     
        width: 100%;
    }
	
	#tableContainer {
	width:100%;
}

    /* ✅ Force all chart containers to stack */
  #chartsContainer,
  #chartsContainer2,
  #chartsContainer4{
    display: flex;
    flex-direction: column; /* stack charts vertically */
    align-items: stretch;    /* center them */
    max-width: 100%;        /* let them fill */
     height: auto; 
     margin-bottom:5px;
  }
  
  
  #chartsContainer1{
    display: flex;
    flex-direction: column; /* stack charts vertically */
    align-items: stretch;    /* center them */
    max-width: 100%;        /* let them fill */
    max-height:400px;
     margin-bottom:40px !important;
  }


    canvas {
        max-width: 100%; /* Allow canvas to take full width on mobile */
    }




@media (max-width: 768px) { 
    .modal {
        width:100%;
        margin-top:12px;
    }
    .chart-title {

 font-size:1.0rem;

}
   @media (max-width: 480px) {
  .modal-content {
    padding: 16px 18px;
    font-size: 14px;
  }
} 
    
    }
@media (max-width: 400px) {
  #chartsContainer3 {
    gap: 5px;
  }

  #chartsContainer3 object {
    width: 100px; /* smaller SVG */
    max-height: 180px;
  }

  #chartsContainer3 .labels {
    font-size: 12px;
    gap: 10px;
  }
}

#loading, .loading-spinner { display:none !important; }




