
        :root {
            --primary-color: #3498db;
            --secondary-color: #2ecc71;
            --background-color: #f5f7fa;
            --container-bg: #ffffff;
            --text-color: #333333;
            --border-color: #e0e0e0;
            --hover-color: #f0f0f0;
            --button-color: #3498db;
            --button-text: #ffffff;
            --header-bg: #ffffff;
            --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .dark-mode {
            --primary-color: #3498db;
            --secondary-color: #2ecc71;
            --background-color: #0e0f0f;
            --container-bg: #1a1a1a;
            --text-color: #e0e0e0;
            --border-color: #333333;
            --hover-color: #252525;
            --button-color: #2980b9;
            --button-text: #ffffff;
            --header-bg: #0e0f0f;
            --shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--background-color);
            color: var(--text-color);
            line-height: 1.6;
            transition: background-color 0.3s, color 0.3s;
        }

 
        .container {
            max-width: 1200px;
            margin: 30px auto;
            padding: 0 20px;
            box-sizing: border-box;
        }

        /* Replace plot-container with a simpler structure */
        .chart-wrapper {
            background-color: var(--container-bg);
            border-radius: 10px;
            box-shadow: var(--shadow);
            padding: 30px;
            margin-bottom: 30px;
            position: relative;
            width: 100%;
        }

        .legend {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 15px;
            margin-top: 20px;
            padding: 10px;
            border-top: 1px solid var(--border-color);
            width: 100%;
        }

        .legend-item {
            display: flex;
            align-items: center;
            font-size: 12px;
        }

        .legend-color {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            margin-right: 5px;
            border: 1px solid rgba(0, 0, 0, 0.2);
        }

        .controls {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 20px;
            justify-content: center;
            align-items: center;
        }

        select, input {
            padding: 8px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background-color: var(--container-bg);
            color: var(--text-color);
            font-family: 'Inter', sans-serif;
            font-size: 14px;
            transition: border-color 0.2s;
            height: 36px;
            box-sizing: border-box;
        }

        select:focus, input:focus {
            outline: none;
            border-color: var(--primary-color);
        }

        /* Ensure consistent height for controls in the same row */
        select, input, .btn:not(.btn-icon), .custom-select-trigger, .metric-select-trigger {
            height: 36px;
            box-sizing: border-box;
        }

        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 6px;
            background-color: var(--button-color);
            color: var(--button-text);
            font-family: 'Inter', sans-serif;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s;
            height: 36px;
            box-sizing: border-box;
        }

        .btn:hover {
            background-color: #2980b9;
        }

        .btn-outline {
            background-color: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-color);
        }

        .btn-outline:hover {
            background-color: var(--hover-color);
        }

        .btn-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            padding: 0;
            border-radius: 6px;
        }

        #search-bar, #select-league {
            width: 178px;
        }

        #select-x, #select-y {
            width: 190px;
        }

        /* Add tooltip for icon buttons */
        .btn-icon .icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
        }

        .btn-icon i {
            font-size: 18px;
        }


        .chart-container {
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            margin-top: 30px; /* Consistent spacing from controls */
        }

        #scatter-plot {
            width: 100%;
            height: auto; /* Height will be set dynamically */
            display: block;
            margin: 0 auto;
            max-width: 1082px;
        }

        .tooltip {
            position: absolute;
            background-color: var(--container-bg);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 10px;
            font-size: 12px;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.2s;
            box-shadow: var(--shadow);
            z-index: 1000;
        }

        /* Custom button tooltips */
        .btn-tooltip {
            position: relative;
            display: inline-block;
        }

        .btn-tooltip .btn-tooltip-text {
            visibility: hidden;
            width: 120px;
            background-color: var(--container-bg);
            color: var(--text-color);
            text-align: center;
            border-radius: 6px;
            padding: 5px;
            position: absolute;
            z-index: 1001;
            bottom: 125%;
            left: 50%;
            margin-left: -60px;
            opacity: 0;
            transition: opacity 0.3s;
            font-size: 12px;
            font-weight: normal;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            pointer-events: none;
        }

        /* Hide button tooltips on mobile */
        @media (max-width: 768px) {
            .btn-tooltip .btn-tooltip-text {
                display: none;
            }
        }

        .btn-tooltip .btn-tooltip-text::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: var(--border-color) transparent transparent transparent;
        }

        .btn-tooltip:hover .btn-tooltip-text {
            visibility: visible;
            opacity: 1;
        }

        .player-name {
            font-size: 12px;
            font-weight: 500;
        }

        circle {
            cursor: pointer;
            transition: r 0.2s, fill 0.2s;
        }



        /* Add new styles for better search highlighting */
        circle.search-match {
            fill: #ff3366 !important; /* Bright pink fill */
            stroke: #ffffff;
            stroke-width: 2px;
            filter: drop-shadow(0 0 5px rgba(255, 51, 102, 0.7));
            animation: circlePulse 1.5s infinite ease-in-out;
        }

        .dark-mode circle.search-match {
            stroke: #000000;
        }

        @keyframes circlePulse {
            0% { r: 6; }
            50% { r: 9; }
            100% { r: 6; }
        }

        .team-label.search-match {
            font-weight: 700 !important;
            fill: #ff3366 !important;
            filter: drop-shadow(0 0 2px rgba(255, 255, 255, 1));
            opacity: 1 !important;
            animation: labelPulse 1.5s infinite ease-in-out;
        }

        @keyframes labelPulse {
            0% { font-size: 12px; }
            50% { font-size: 14px; }
            100% { font-size: 12px; }
        }

        .dark-mode .team-label.search-match {
            filter: drop-shadow(0 0 2px rgba(0, 0, 0, 1));
        }

        .team-label.search-dimmed {
            opacity: 0 !important;
        }

        .team-label {
            pointer-events: none;
            text-shadow: 0px 0px 2px white, 0px 0px 2px white, 0px 0px 2px white, 0px 0px 2px white;
        }

        .dark-mode .team-label {
            fill: #f5f5f5 !important;
            text-shadow: 0px 0px 2px #1a1a1a, 0px 0px 2px #1a1a1a, 0px 0px 2px #1a1a1a, 0px 0px 2px #1a1a1a;
        }

        .dark-mode-toggle {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--container-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: var(--shadow);
            z-index: 100;
            transition: background-color 0.3s;
        }

        .toggle-icon::before {
            font-family: "Ionicons";
            content: "\f467";
            font-size: 30px;
            color: var(--text-color);
        }

        .dark-mode .toggle-icon::before {
            content: "\f3b0";
            font-size: 20px;
        }

        @media (max-width: 768px) {
  
            
  .chart-wrapper {
      padding: 15px;
  }
  
  
  /* Remove fixed height for scatter plot - now handled by updateChartDimensions */
  #scatter-plot {
      min-height: 500px; /* Minimum height for mobile */
  }
  
  select, input {
      width: 100%;
  }
  
  
  /* Make text elements more readable on mobile */
  .x-label, .y-label {
      font-size: 12px;
  }
  
  /* Adjust tooltip position for mobile */
  .tooltip {
      max-width: 80%;
  }
}

        /* Styles for the diagonal reference line */
        .dark-mode .xy-line {
            stroke: #3cb371; /* Slightly different green for dark mode */
        }






  

/* Styles for flag icons in select dropdown */
#select-league option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
}

#select-league iconify-icon {
    display: inline-flex;
    vertical-align: middle;
}

/* Styles for custom league selector dropdown */
.custom-select-container {
    position: relative;
    width: 172px;
}

.metric-select-container {
    position: relative;
    width: 192px;
}

.custom-select-option, .metric-select-option {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text-color);
    background-color: var(--container-bg);
}

.custom-select-option iconify-icon, .metric-select-option iconify-icon {
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


.custom-select-trigger, .metric-select-trigger {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--container-bg);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    position: relative;
    line-height: 1;
}

.custom-select-trigger span, .metric-select-trigger span {
    display: inline-block;
    transform: translateY(1px);
    white-space: nowrap;
    overflow: hidden;
    max-width: calc(100% - 20px); /* Account for the icon width and margin */
    line-height: normal; /* Ensure consistent line height */
}

/* Make the league selector span 30px smaller */
#league-select-trigger span {
    max-width: calc(100% - 45px); /* 20px + 30px reduction */
}

.custom-select-trigger::after, .metric-select-trigger::after {
    content: '';
    width: 6px;
    height: 6px;
    margin-left: auto;
    border-right: 1.5px solid var(--text-color);
    border-bottom: 1.5px solid var(--text-color);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.3s;
    opacity: 0.7;
    margin-right: 2px;
}

.custom-select-trigger.open::after, .metric-select-trigger.open::after {
    transform: rotate(-135deg) translateY(1px);
}

.custom-select-options, .metric-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    font-size: 13px;
    display: none;
    box-shadow: var(--shadow);
}



.custom-select-option:hover, .metric-select-option:hover {
    background-color: var(--hover-color);
}



.custom-select-option.selected {
    background-color: var(--primary-color);
    color: white;
}

.metric-select-option.selected {
    background-color: var(--primary-color);
    color: white;
}


.dark-mode .custom-select-option:hover {
    background-color: var(--hover-color);
}

.dark-mode .custom-select-option.selected {
    background-color: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    .custom-select-option {
        padding: 6px 12px;
    }
}


/* Dark mode styles for custom dropdown */
.dark-mode .custom-select-trigger,
.dark-mode .custom-select-options,
.dark-mode .metric-select-trigger,
.dark-mode .metric-select-options {
    border-color: var(--border-color);
    background-color: var(--container-bg);
    color: var(--text-color);
}

.dark-mode .custom-select-option:hover,
.dark-mode .metric-select-option:hover {
    background-color: var(--hover-color);
}

.dark-mode .custom-select-option.selected,
.dark-mode .metric-select-option.selected {
    background-color: rgba(52, 152, 219, 0.2);
}


/* Adjust flag icon alignment in the trigger */
#league-select-trigger iconify-icon {
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-1px);
}
        /* Enhanced Dark Mode Styles */
        .dark-mode .chart-wrapper {
            background-color: var(--container-bg);
            border: 1px solid #333;
        }

        .dark-mode .btn {
            background-color: var(--button-color);
        }

        .dark-mode .btn-outline {
            background-color: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-color);
        }

        .dark-mode .btn-outline:hover {
            background-color: var(--hover-color);
            border-color: #444;
        }


        .dark-mode input, 
        .dark-mode select {
            background-color: #1a1a1a;
            color: var(--text-color);
            border-color: #333;
        }

        .dark-mode input::placeholder {
            color: #777;
        }

        .dark-mode input:focus, 
        .dark-mode select:focus {
            border-color: var(--primary-color);
            outline: none;
        }

        .dark-mode .tooltip {
            background-color: #1a1a1a;
            border-color: #333;
            color: var(--text-color);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .dark-mode .legend {
            border-top-color: #333;
        }

        .dark-mode .legend-item {
            color: #ccc;
        }

        .dark-mode .btn-tooltip .btn-tooltip-text {
            background-color: #1a1a1a;
            border-color: #333;
            color: #e0e0e0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .dark-mode .btn-tooltip .btn-tooltip-text::after {
            border-color: #333 transparent transparent transparent;
        }

        .dark-mode .team-label {
            fill: #e0e0e0 !important;
            text-shadow: 0px 0px 3px #0e0f0f, 0px 0px 3px #0e0f0f, 0px 0px 3px #0e0f0f, 0px 0px 3px #0e0f0f;
        }

        .dark-mode .x-axis path,
        .dark-mode .y-axis path,
        .dark-mode .x-axis line,
        .dark-mode .y-axis line {
            stroke: #444;
        }

        .dark-mode .x-axis text,
        .dark-mode .y-axis text {
            fill: #aaa;
        }

        .dark-mode .x-label,
        .dark-mode .y-label {
            fill: #ccc;
        }

        .dark-mode .median-line {
            stroke: rgba(255, 255, 255, 0.2) !important;
        }

        .dark-mode .xy-line {
            stroke: #2ecc71;
            opacity: 0.8;
        }

        .dark-mode .dark-mode-toggle {
            background-color: #1a1a1a;
            border: 1px solid #333;
        }

        .dark-mode .toggle-icon::before {
            color: #e0e0e0;
        }

 




        .dark-mode #search-bar::placeholder {
            color: #777;
        }

        .dark-mode circle {
            stroke-width: 1px;
        }



        .dark-mode circle.search-match {
            fill: #ff3366 !important;
            stroke: #0e0f0f;
            stroke-width: 2px;
            filter: drop-shadow(0 0 5px rgba(255, 51, 102, 0.7));
        }


        
        /* Additional dark mode styles for chart elements */
        .dark-mode .chart-container {
            background-color: var(--container-bg);
        }
        
  
        
    
        

        
        /* Fix for custom select dropdown in dark mode */
        .dark-mode .custom-select-trigger::after, 
        .dark-mode .metric-select-trigger::after {
            border-right: 1.5px solid var(--text-color);
            border-bottom: 1.5px solid var(--text-color);
        }
        
        /* Improve contrast for selected items in dark mode */
        .dark-mode .custom-select-option.selected, 
        .dark-mode .metric-select-option.selected {
            background-color: rgba(52, 152, 219, 0.3);
        }
        
        /* Improve visibility of SVG elements in dark mode */
        .dark-mode svg text {
            fill: #ccc;
        }
        
        .dark-mode .legend-color {
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        /* Improve button states in dark mode */
        .dark-mode .btn:hover {
            background-color: #3498db;
        }
        
        .dark-mode .btn-outline:active {
            background-color: #333;
        }
        
        /* Improve focus states for accessibility */
        .dark-mode input:focus,
        .dark-mode select:focus,
        .dark-mode .btn:focus {
            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.5);
        }
        
        /* Fix for buttons staying focused with blue outline */
        button:focus, 
        .btn:focus, 
        select:focus, 
        input:focus {
            outline: none;
        }
        
        /* Custom focus styles for better accessibility */
        button:focus-visible, 
        .btn:focus-visible, 
        select:focus-visible, 
        input:focus-visible {
            outline: none;
            box-shadow: 0 0 0 2px var(--primary-color);
        }
        
        /* Remove focus styles when using mouse */
        button:focus:not(:focus-visible), 
        .btn:focus:not(:focus-visible), 
        select:focus:not(:focus-visible), 
        input:focus:not(:focus-visible) {
            box-shadow: none;
        }



.logo img {
  width: 50px;
  height: 50px;
}


/* Promo links styling */
.promo-links-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px auto 25px;
    max-width: 800px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.promo-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--container-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    font-weight: 500;
    flex: 1;
    min-width: 220px;
    max-width: 350px;
    justify-content: center;
}

.promo-link iconify-icon {
    margin-right: 8px;
}

.promo-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.radar-link {
    border-left: 4px solid #3498db;
}

.pro-link {
    border-left: 4px solid #f39c12;
}

.dark-mode .radar-link {
    border-left: 4px solid #2980b9;
}

.dark-mode .pro-link {
    border-left: 4px solid #d35400;
}

@media (max-width: 768px) {
  
    

    
    select, input {
        width: 100%;
    }
    
    /* Make text elements more readable on mobile */
    .x-label, .y-label {
        font-size: 12px;
    }
    
    /* Adjust tooltip position for mobile */
    .tooltip {
        max-width: 80%;
    }
    
    /* Adjust promo links for mobile */
    .promo-links-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 0 15px;
    }
}




.custom-select-option {
    -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            
}
        /* Disable text selection for SVG text elements */
        svg text, .legend,
        .x-label,
        .y-label,
        .team-label,
        .player-name,
        .x-axis text,
        .y-axis text {
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            pointer-events: none;
        }


            body.dark-mode #SFctr {
        color: #ffffff !important
        }
        
        
        #SFctr input {
            background-color: #ffffff !important;
        color:#000000 !important;
        border: 1px solid #c2c2c2 !important
        }
  #SFctr {
	font-family: Arial, Helvetica, sans-serif !important;
	color: #000000 !important;
  margin-left: 21.4px;
}

#SFusrlogpst strong:first-child {
  font-size: 0px;
}

#SFusrlogpst input[type="checkbox"],
#SFusrlogpwd input[type="checkbox"],
#SFusrlogpst i,
#SFusrlogpwd i {
  display: none !important;
}

#SFctr .SFfrm input[type="text"],
#SFctr .SFfrm input[type="password"],
#SFctr .SFfrm button {
  border-radius: 6px;
}

#SFusrlogpwd strong {
  visibility: hidden; /* Hide the original text */
  position: relative;
}

#SFusrlogpwd strong::after {
  content: "Forgot Password?";
  visibility: visible;
  position: absolute;
  font-size: 12px;
  font-weight: 400;
  left: 100px;
  white-space: nowrap;
}

    