html
	{
		scroll-behavior: smooth;
	}
	.machine-border
	{
        margin-top: clamp(20px, 5vw, 50px);
        display: flex;
        justify-content: center;
        align-items: center;
	}
	.machine-wrapper
	{
		position: relative;
		width: 100%;
		max-width: 660px;
		aspect-ratio: 660 / 370;
		overflow: visible;
	}
    .machine-overlay
    {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 10;
        pointer-events: none;
    }

    .machine-cog-img
	{
		position: absolute;
		z-index: 1;
		pointer-events: none;
		height: auto;
	}

	.machine-spin-cw
	{
		animation: machine-spin 4s linear infinite;
	}
	
	.machine-spin-ccw
	{
		animation: machine-spin 4s linear infinite reverse;
	}
	
	#machine-cogs1
	{
		top: -6%;
		left: 3%;
		width: 15.15%;
		animation-duration: 40s;
	}
	
	#machine-cogs3
	{
		bottom: 15%;
		left: 0%;
		width: 18.18%;
		animation-duration: 20s;
	}
	
	#machine-cogs2
	{
		top: -11%;
		right: 17%;
		width: 18.18%;
		animation-duration: 50s;
	}
	
	#machine-cogs4
	{
		bottom: -1%;
		right: 4%;
		width: 10.61%;
		animation-duration: 25s;
	}
    
	@keyframes machine-spin
    {
        100%
        {
            transform: rotate(360deg);
        }
    }

    #mask-left
    {
        left: 16%;
    }

    #mask-right
    {
        left: 55%;
    }
    .machine-metal-door
    {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
        transition: transform 1s cubic-bezier(0.5, 0, 0.75, 0);
        transform: translateY(0);

        background-repeat: no-repeat;
        background-size: cover;
        background-position: calc(50% + var(--door-offset-x, 0px)) calc(50% + var(--door-offset-y, 0px));
    }

    .machine-metal-door.open
    {
        transform: translateY(-100%);
    }

    #machine-door1
    {
        background-image: url('https://images.marapets.com/digital/Mechanical-Menagerie-Door1.png');
        --door-offset-x: 0px;
        --door-offset-y: 0px;
    }

    #machine-door2
    {
        background-image: url('https://images.marapets.com/digital/Mechanical-Menagerie-Door2.png');
        --door-offset-x: 0px;
        --door-offset-y: 0px;
    }

    .machine-controls
    {
        position: absolute;
        bottom: -60px;
        z-index: 20;
    }
	
    .window-mask
    {
        position: absolute;
        z-index: 5;
        overflow: hidden;
        background: #d8d1cb;
        border-radius: 4px;
        top: 16%;
        width: 27%;
        height: 45%;
    }

    .prize-item
    {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1;
    }

    .prize-item .itempic
    {
        width: 100%;
        max-width: 80px;
        height: auto;
		background-color: var(--colour-surface, #FFF);
		border-radius: 14px;
		padding:2px;
		border: 2px solid #695752;
		overflow: hidden;
    }
