#player {
    position: relative;

    flex: 1 1 auto;

    min-width: 0;
    min-height: 0;

    overflow: hidden;

    background: #000;
}

#player video,
#player canvas {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

#player video {
    z-index: 0;

    background: #000;
}

#player canvas {
    z-index: 1;

    pointer-events: none;
}

/* Controls */

#controls {
    position: absolute;

    z-index: 10;

    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 12px;

    box-sizing: border-box;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8),
        rgba(0, 0, 0, 0)
    );

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

#controls button {
    flex: 0 0 auto;

    width: 36px;
    height: 36px;

    padding: 0;

    border: 0;
    border-radius: 4px;

    background: rgba(255, 255, 255, 0.1);
    color: white;

    font-size: 18px;

    cursor: pointer;
}

#controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

#seekbar {
    flex: 1 1 auto;
    min-width: 0;
}

#volume {
    flex: 0 1 100px;

    width: 100px;
    min-width: 0;
}

#controls.hidden {
    opacity: 0;

    transform: translateY(100%);

    pointer-events: none;
}