/* =====================================
MARK: 1. CSS VARIABLES (COLOURS)
===================================== */

/* The colours are defined at the highest level (:root).
    JavaScript reads them, so you only need to change colours here in CSS.
*/
:root {
    --bg-color: #000000;
    /* Background colour (dark grey/black) */
    --text-color: rgba(255, 255, 255, 1);
    /* Colour of the letters (e.g. ECOLOGY) */
    --edges-color: rgba(255, 255, 255, 0.8);
    /* Colour of the lines between the dots */
    --nodes-color: #ffffff;
    /* Colour of the dots (nodes) themselves */
}

/* =====================================
MARK: 2. BASE LAYOUT
===================================== */
.animation-container {
    margin: 0;
    overflow: clip;
    /* Prevent scrollbars without blocking scrolling */
    background-color: var(--bg-color);
    /* Use the CSS variable for the background */
    width: 100%;
    height: var(--animation-height, 90vh);
}

.animation-container canvas {
    display: block;
    cursor: grab;
    /* Show that the canvas can be grabbed and dragged */
}

/* Change the cursor while the user holds the mouse button down */
.animation-container canvas:active {
    cursor: grabbing;
}

/* =====================================
MARK: 3. RESPONSIVE ADJUSTMENTS
===================================== */

/* Tablet */
@media (max-width: 1024px) {
    .animation-container {
        height: var(--animation-height, 70vh);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .animation-container {
        height: var(--animation-height, 55vh);
    }

    .animation-container canvas {
        /* Prevent default browser touch behaviour (scrolling, zooming) so the canvas interaction works */
        touch-action: none;
    }
}
