html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: #b8dbea;
}

#river {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.boat {
    position: absolute;
}

.boat-name {
    position: relative;
    left: 48px;
    transform: translateX(-50%);

    width: max-content;
    max-width: 220px;

    margin-bottom: 4px;

    font-family:
        Arial,
        "Segoe UI",
        "Segoe UI Historic",
        "Noto Sans",
        sans-serif;

    font-size: 14px;
    font-weight: bold;

    color: #222;

    text-shadow:
        1px 1px 0 white,
        -1px 1px 0 white,
        1px -1px 0 white,
        -1px -1px 0 white;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    text-align: center;

    direction: auto;
    unicode-bidi: plaintext;
}

.boat-art {
    position: relative;
    width: 96px;
    height: 96px;
}

.boat-art::before {
    content: "";

    position: absolute;

    left: 50%;
    top: 74px;

    width: 96px;
    height: 12px;

    transform: translateX(-50%);

    border-radius: 50%;

    background:
        radial-gradient(
            ellipse at center,
            rgba(255, 255, 255, 0.45) 0%,
            rgba(255, 255, 255, 0.2) 45%,
            rgba(255, 255, 255, 0) 80%
        );

    pointer-events: none;
    z-index: 0;
}

.boat-role-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;

    position: relative;
    z-index: 1;
}

.boat-layer {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    object-fit: contain;
    pointer-events: none;

    z-index: 1;
}

.boat-colour {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    background-color: white;

    -webkit-mask:
        url("/boats/boat_colour.png")
        center / contain
        no-repeat;

    mask:
        url("/boats/boat_colour.png")
        center / contain
        no-repeat;

    -webkit-mask-mode: alpha;
    mask-mode: alpha;

    z-index: 1;
}

.boat-custom-image {
    width: 96px;
    height: 96px;

    object-fit: contain;
    object-position: center bottom;

    display: block;

    pointer-events: none;

    position: relative;
    z-index: 1;
}

/*
 * Temporary wake experiment.
 *
 * This is now CSS-only.
 * There should be NO .boat-wake element created in JS.
 */
.boat-art::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    top: 74px;
    bottom: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(184, 219, 234, 0.15),
            rgba(184, 219, 234, 0.35)
        );

    pointer-events: none;
    z-index: 0;
}

.water-sparkle {
    position: absolute;

    width: 3px;
    height: 3px;

    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;

    pointer-events: none;

    animation:
        water-sparkle-drift 0.9s ease-in-out forwards;
}

@keyframes water-sparkle-drift {
    0% {
        transform: translateX(4px);
        opacity: 0;
    }

    30% {
        opacity: 0.9;
    }

    70% {
        opacity: 0.7;
    }

    100% {
        transform: translateX(-6px);
        opacity: 0;
    }
}