body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0; /* Light grey background */
    overflow-y: scroll;
}

#rules {
    text-align: left;
    margin-bottom: 20px;
    font-size: 20px;
    color: black;
}

#game-container {
    display: grid;
    grid-template-columns: repeat(6, 60px);
    gap: 10px;
    margin-bottom: 20px;
}

.line-person {
    width: 50px;
    height: 100px;
    border: 2px solid black;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.head {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.body {
    width: 10px;
    height: 40px;
    margin: 5px 0;
}

.arm {
    width: 10px;
    height: 30px;
    position: absolute;
    top: 25px;
    transition: transform 0.3s;
}

.arm.left {
    left: 0px;
    transform-origin: top right;
}

.arm.right {
    right: 0px;
    transform-origin: top left;
}

.arm.up {
    transform: rotate(45deg);
}

.arm.down {
    transform: rotate(0deg);
}

.arm.still {
    transform: rotate(-45deg);
}

#youtube-container {
    display: none; /* Hidden by default */
}

#game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: red;
    background-color: black;
    padding: 20px;
    border-radius: 10px;
    display: none;
}

#diagram-container {
    margin-top: 20px;
}

#diagram {
    width: 100%;
    max-width: 800px;
}
