* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
    background: #bcc2ca;
    color: #1f2937;
}

h1 {
    margin-bottom: 1rem;
    text-align: center;
}

.chart-panel {
    position: relative;
    width: min(90vw, 900px);
    margin-bottom: 1.5rem;
}

#chart-svg {
    width: 100%;
    height: auto;
    background: #ffffff;
    border: 1px solid #dfe7f2;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#x-axis,
#y-axis {
    stroke: #1f2937;
    stroke-width: 2;
}

#bisector-line {
    stroke: #2aa8ce;
    stroke-width: 3;
    
}

.grid-line {
    stroke: #c8d2e0;
    stroke-width: 1;
    
}

#chart-line {
    fill: none;
    stroke: #7c2ace;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-dasharray: 6 5;
}
.axis-label.x-label {
    fill: #2aa8ce;
}
.axis-label.y-label {
    fill: #259a4b;
}
.vertex-point {
    fill: #e3a506;
    stroke: #ffffff;
    stroke-width: 1;
}

.vertex-label {
    fill: #ab4d0b;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.guide-line {
    fill: none;
    stroke: #ca8612;
    stroke-width: 2;
    stroke-dasharray: 7 8;
}
#performance-line {
    fill: none;
    stroke: #259a4b;
    stroke-width: 3;
}
.axis-label {
    fill: #1f2937;
    font-size: 14px;
    font-weight: 400;
}

.tick-label {
    fill: #374151;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 11px;
    font-weight: 600;
}

.x-label {
    text-anchor: middle;
}

.y-label {
    text-anchor: middle;
}

.axis-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    background: #ffffff;
}

.axis-control input[type="range"] {
    -webkit-appearance: auto;
    appearance: auto;
    writing-mode: horizontal-tb;
    direction: ltr;
    width: min(40vw, 400px);
    height: 22px;
    min-height: 0;
    accent-color: #2563eb;
}

.slider-row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    width: 100%;
    padding: 1rem;
    height: 20vh;
    background: #ffffff;
}

.slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: auto;
    min-width: 120px;
}

.slider-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
}

input[type="range"] {
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    writing-mode: bt-lr;
    direction: rtl;
    width: 22px;
    height: 25vh;
    min-height: 180px;
    accent-color: #2563eb;
    cursor: pointer;
    background: transparent;
}

.slider-container input[type="range"] {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
    background: #dbeafe;
    border-radius: 10px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #fff;
    margin-left: -2px;
}

@supports (-moz-appearance: auto) {
    input[type="range"] {
        writing-mode: vertical-lr;
        direction: rtl;
        width: 22px;
        height: 0;
        min-height: 0;
    }
}

.chart-tooltip {
    position: absolute;
    display: none;
    min-width: 50px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #9d0f0f;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
    transform: translate(-50%, -120%);
    white-space: nowrap;
    box-shadow: 0 4px 10px rgb(138, 24, 24, 0,18);
    z-index: 10;
}

.chart-tooltip.visible {
    display: block;
}