/* General body styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

/* Background video styling */
video#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Game container styling */
.game-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Back button styling */
.button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    font-size: 18px;
    background-color: #ff2f2f52;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
}

.button:hover {
    background-color: #ff5050;
}

/* Clear and save area styling */
.clear-area, .save-area {
    position: absolute;
    bottom: 1rem;
    width: 150px;
    height: 50px;
    color: #fff;
    border: 2px dashed #fff;
    border-radius: 4px;
    text-align: center;
    line-height: 50px;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
}

.clear-area {
    left: 1rem;
    background-color: rgba(211, 211, 211, 0.24); /* Light grey */
}

.clear-area:hover {
    background-color: rgba(169, 169, 169, 1); /* Darker grey on hover */
}

.save-area {
    right: 22%;
    background-color: rgba(211, 211, 211, 0.24); /* Light pink */
}

.save-area:hover {
    background-color: rgba(169, 169, 169, 1);; /* Bright pink on hover */
}

/* Game elements */
.game-element {
    padding: 0.2rem 0.4rem;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #000;
    cursor: move;
    position: absolute;
    white-space: nowrap;
    width: fit-content;
    font-size: 1rem;
}

.element-list {
    position: absolute;
    top: 0;
    right: 0;
    width: 20%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    border-left: 2px solid #FFFFFF;
    padding: 1rem;
    box-sizing: border-box;
    overflow-y: auto;
    color: #FFFFFF;
    z-index: 5;
}

.search-bar {
    width: 100%; /* Ensure it stays within the element list's width */
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #FFFFFF;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    box-sizing: border-box; /* Include padding in width calculation */
    overflow: hidden; /* Prevent overflowing content */
}

.search-bar::placeholder {
    color: #FFFFFF; /* Placeholder text color */
}

.draggable-button {
    padding: 0.2rem 0.4rem;
    margin: 0.5rem 0;
    text-align: center;
    border: 1px solid #FFFFFF;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    cursor: grab;
    display: inline-block;
    font-size: 1rem;
    white-space: nowrap; /* Prevent resizing due to wrapping */
    width: fit-content; /* Automatically size to text */
}

.draggable-button:active {
    cursor: grabbing;
}
.clear-all-button {
    position: absolute;
    bottom: 1rem;
    left: calc(2rem + 150px + 1rem);
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: none; /* No background image */
    border: none;
    cursor: pointer;
    z-index: 10;
}

.button-image {
    width: 120%;
    height: 100%;
    filter: brightness(0) invert(1); /* Ensure the image is white */
}
