/* ===== General page style ===== */
body {
    font-family: "Inter", "Roboto", sans-serif;
    background: linear-gradient(135deg, #f0f4f8, #d9e4ec);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    color: #333;
}

/* ===== Graph container ===== */
#graph {
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.12);
    margin-top: 40px;
    text-align: center;
    max-width: 1300px;
}

/* ===== Titles ===== */
h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: #222;
}

h2 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #666;
}

/* ===== Tooltip ===== */
#tooltip {
    position: absolute;
    background: rgba(40, 44, 52, 0.95);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.1s ease;
    max-width: 250px;
    text-align: left;
}

/* ===== Dots ===== */
.dot {
    stroke: #fff;
    stroke-width: 1.5px;
    cursor: pointer;
    transition: r 0.2s ease, fill 0.3s ease;
}

.dot:hover {
    r: 7;
    stroke: #222;
}

/* Colors for dots */
.dot[fill="green"] {
    fill: #3cb371;
    /* nice modern green */
}

.dot[fill="red"] {
    fill: #e63946;
    /* modern red */
}

/* ===== Axes ===== */
#x-axis path,
#y-axis path,
#x-axis line,
#y-axis line {
    stroke: #bbb;
}

#x-axis text,
#y-axis text {
    font-size: 0.85rem;
    fill: #444;
}

/* ===== Legend ===== */
#legend rect {
    stroke: #ccc;
    rx: 10;
    ry: 10;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}

#legend text {
    font-size: 0.85em;
    fill: #333;
}