html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* Disable scrolling */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-image: url("bg.png"); /* Set the background image */
    background-size: cover; /* Ensure the background image covers the whole viewport */
    background-position: center; /* Center the background image */
    background-repeat: no-repeat; /* Prevent the image from repeating */
}

/* Basic Styling for the Toolbar and Canvas */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  position: relative;
}



/* Modal styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black; /* Full opaque black background */
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Ensure it's on top of other content */
  opacity: 1; /* Fully opaque */
  transition: opacity 2s ease; /* Fade-out effect */
}

/* Modal content styles */
.modal-content {
  background-color: black; /* Black background for the modal */
  color: red; /* Red text */
  padding: 40px;
  border-radius: 10px;
  width: 80%;
  max-width: 500px; /* Max width for better responsiveness */
  text-align: center;
  z-index: 10000
}

/* Input box styles */
input[type="text"] {
  padding: 12px 20px;
  margin: 10px;
  border: 2px solid red; /* Red border */
  background-color: black; /* Black background */
  color: red; /* Red text */
  font-size: 16px;
  border-radius: 5px;
  transition: all 0.3s ease;
  text-align: center;
}

/* Help Button Styling */
.help-button {
  position: fixed;
  top: 7px;
  left: 7px;
  padding: 7px 17px;
  background-color: black;
  color: white;
  border: 2px solid white;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  z-index: 9999; /* Ensure it stays above other content */
}

.help-button:hover {
  background-color: red;
  color: black;
}

/* Modal styles for the help page */
.help-modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: auto; /* Enable interactions */
  height: 100%;
  background-color: black;
  z-index: 10000; /* Make sure it's on top of everything else */
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: darkgray; /* Dark grey text color */
}

.help-modal-content {
  position: relative;
  background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
  color: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 80%;
  text-align: left;
  overflow: hidden; /* Disable scrolling */
  max-height: 90%; /* Adjust the height if necessary */
  z-index: 10001;
}

/* For Webkit browsers (e.g., Chrome, Safari) */
.help-modal-content::-webkit-scrollbar {
  display: none; /* Hide scrollbar */
}

/* For Firefox */
.help-modal-content {
  scrollbar-width: none; /* Hide scrollbar */
}
.help-text h1 {
  color: white; /* Heading color */
}

.help-text ul {
  list-style-type: none;
  padding: 0;
}

.help-text ul li {
  margin-bottom: 10px;
}

/* Exit button styling */
.exit-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10002;
}

.exit-button img {
  width: 30px; /* Size of the exit icon */
  height: 30px;
}

/* Ensure the content behind the modal is not clickable */
body.modal-open {
  pointer-events: none;
}

/* Button styles */
button {
  padding: 12px 20px;
  margin: 10px;
  cursor: pointer;
  background-color: black; /* Black background for buttons */
  color: red; /* Red text for buttons */
  border: 2px solid red; /* Red outline */
  font-size: 16px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* Hover effect for buttons */
button:hover {
  color: white; /* Change text to black when hovered */
  border: 2px solid black; /* Change border to black on hover */
}

/* Ensure modal content is responsive */
@media screen and (max-width: 600px) {
  .modal-content {
    width: 90%;
    padding: 20px;
  }
}

.shadow-drop-2-center:hover {
	-webkit-animation: shadow-drop-2-center 0.4s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
	        animation: shadow-drop-2-center 0.4s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;

}

@-webkit-keyframes shadow-drop-2-center {
  0% {
    -webkit-transform: translateZ(0);
            transform: translateZ(0);
    -webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
            box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
  100% {
    -webkit-transform: translateZ(50px);
            transform: translateZ(50px);
    -webkit-box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.35);
            box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.35);
  }
}
@keyframes shadow-drop-2-center {
  0% {
    -webkit-transform: translateZ(0);
            transform: translateZ(0);
    -webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
            box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
  100% {
    -webkit-transform: translateZ(50px);
            transform: translateZ(50px);
    -webkit-box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.35);
            box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.35);
  }
}

/* Table container */
.table {
    position: relative;
    width: calc(100% - 100px); /* Table width is 100px less than screen width */
    height: calc(100vh - 200px - 35vh); /* Full height minus slider space and 100px at the bottom */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    background-color: transparent;
    margin: 20px auto; /* Center the table */
}

.card-number-back {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: transparent;        /* Make the number text fully transparent */
    user-select: none;         /* Disable text selection */
    pointer-events: none;      /* Prevent interaction with the text */
    font-size: 32px;           /* Optional: Make sure the font size is appropriate */
    font-weight: bold;         /* Optional: Make the number stand out if needed */
}

.card {
    width: 60px;
    height: 90px;
    background-image: url('card.png'); /* Image for the card */
    background-size: cover; /* Make sure the image covers the whole card */
    background-position: center; /* Center the image in the card */
    color: white;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px;
    position: absolute;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
	animation: card-enter 0.5s ease-in-out forwards; /* Apply fade-in animation */
}

.qcard {
    width: 60px;
    height: 100px;
    background-image: url('qcard.png'); /* Replace with the image for the qcard */
    background-size: 100% 100%;
    background-position: center;
    color: white;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    pointer-events: auto; /* Enable pointer events for qcards */
    animation: q-card-enter 0.5s ease-in-out forwards; /* Fade-in animation */
    backface-visibility: hidden; /* Hide the back face during the flip */
    transform: rotateY(0deg); /* Start unflipped */
    transition: transform 0.3s ease-in-out; /* Smooth flip animation */
}

.q-card:hover {
    transform: scale(3) !important; /* Scale the card to 300% on hover */
}

.rcard {
    width: 60px;
    height: 90px;
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transform: rotateY(180deg); /* Ensure it flips */
    cursor: default; /* No pointer on revealed cards */
    animation: flip-vertical-fwd 0.4s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
}

.qcard.flipping {
    transform: rotateY(180deg); /* Flip the card */
}
/* Dragging styles */
.card.dragging {
    opacity: 0.5;
    cursor: none; /* Hide the cursor while dragging */
}

/* Style the slider container */
.slider-container {
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    justify-content: center; /* Center the content vertically */
    align-items: center;     /* Center the content horizontally */
    width: 100%;             /* Full width */
    max-width: 600px;        /* Optional: Set a max-width for the container */
    margin: 0 auto;          /* Center the container horizontally */
    padding: 20px;
}

/* Style the slider */
input[type="range"] {
    width: 100%;  /* Full width of the parent container */
    margin: 20px 0; /* Vertical space between the slider and text */
}


/* Style the slider track (the line) */
input[type="range"] {
    -webkit-appearance: none;  /* Removes default styling in WebKit browsers */
    appearance: none;  /* Standard appearance removal */
    width: 100%;  /* Full width */
    height: 1px;  /* Thin line */
    background: white;  /* White track */
    border: none;
    border-radius: 5px;  /* Optional: rounded edges */
    outline: none;
    opacity: 0.8;  /* Optional: slightly transparent */
}

/* Style the thumb (the handle) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;  /* Thumb width */
    height: 30px;  /* Thumb height */
    background: url('star.png') no-repeat center center;  /* Use star.png for the thumb */
    background-size: contain;  /* Ensure the image is fully contained within the thumb */
    border-radius: 50%;  /* Optional: make it circular */
    border: none;
    cursor: pointer;
}

/* For Firefox */
input[type="range"]::-moz-range-thumb {
    width: 30px;
    height: 30px;
    background: url('star.png') no-repeat center center;  /* Use star.png for the thumb */
    background-size: contain;  /* Ensure the image is fully contained within the thumb */
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* For Internet Explorer */
input[type="range"]::-ms-thumb {
    width: 30px;
    height: 30px;
    background: url('star.png') no-repeat center center;  /* Use star.png for the thumb */
    background-size: contain;  /* Ensure the image is fully contained within the thumb */
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.center {
    text-align: center;
	color: white;
}

input[type="range"] {
    width: 300px;
    margin: 20px 0;
}

p {
    font-size: 18px;
    margin: 0;
}

#sliderValue {
    font-weight: bold;
    color: #007BFF;
}

/* Animation for creating (entering) the card */
@keyframes card-enter {
    0% {
        opacity: 0;
        transform: scale(0.5); /* Start smaller */
    }
    100% {
        opacity: 1;
        transform: scale(1); /* End at normal size */
    }
}

@keyframes q-card-enter {
    0% {
        opacity: 0;
        transform: scale(0.1); /* Start smaller */
    }
	90% {
		opacity: 25;
	}
    100% {
        opacity: 1;
        transform: scale(1); /* End at normal size */
    }
}
/* Animation for removing the card */
@keyframes card-remove {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5); /* Shrink and fade out */
    }
}

/* Card removal animation class */
.card.removing {
    animation: card-remove 1s forwards;
}

.flip-vertical-fwd {
    -webkit-animation: flip-vertical-fwd 0.4s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
    animation: flip-vertical-fwd 0.4s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
}

@-webkit-keyframes flip-vertical-fwd {
  0% {
    -webkit-transform: translateZ(0) rotateY(0);
    transform: translateZ(0) rotateY(0);
  }
  100% {
    -webkit-transform: translateZ(160px) rotateY(180deg) scale(0);
    transform: translateZ(160px) rotateY(180deg) scale(0.5);
  }
}

@keyframes flip-vertical-fwd {
  0% {
    transform: translateZ(0) rotateY(0);
  }
  100% {
    transform: translateZ(160px) rotateY(180deg) scale(0.5);
  }
}
$d: 4px;

