body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column; /* Change to column to stack elements vertically */
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Use min-height to ensure full page coverage */
    background-image: linear-gradient(to right, #f4f4f4, #e8e8e8);
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px; /* Limit the width of the form for better aesthetics */
    min-height: 340px; /* Ensure the form is tall enough to display the loader */
    transition: min-height 0.5s ease; /* Animate min-height over 0.5 seconds */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
}

h2 {
    color: #333;
}

.description {
    margin-bottom: 20px;
    color: #666;
}

.info {
    color: #666;
    padding: 15px; /* Inner space */
    margin: 20px 0; /* Space above and below */
    border: 1px solid #e1e1e1; /* Subtle border */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
    font-size: 16px; /* Slightly larger font */
    line-height: 1.5; /* Improve readability */
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input[type=file], input[type=password], input[type=button] {
    border: 1px solid #ccc;
    padding: 10px;
    width: 100%; /* Ensure inputs span the full width of the form */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    border-radius: 4px; /* Add rounded corners */
}

input[type=button] {
    background-color: #007bff;
    color: white;
    cursor: pointer;
}

input[type=button]:hover {
    background-color: #0056b3;
}

input[type=button]:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

input[type="file"], input[type="password"], input[type="button"] {
    padding: 15px;
    transition: border-color 0.3s ease-in-out;
}

input[type="file"]:focus, input[type="password"]:focus {
    border-color: #007bff;
    outline: none;
}

input[type=button], #links .button, #refreshButtonContainer .button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Add shadow */
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease; /* Transition for smooth effect */
}

/* Hover effect for active buttons */
input[type=button]:not(:disabled):hover, #links .button:not(:disabled):hover, #refreshButtonContainer .button:not(:disabled):hover {
    background-color: #0056b3;
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.25); /* Slightly larger shadow */
}

input[type=button]:active, #links .button:active, #refreshButtonContainer .button:active {
    transform: translateY(2px); /* Move button down */
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); /* Reduce shadow */
}

#links {
    display: none;
    margin-top: 10px;
}

#refreshButtonContainer {
    display:none;
    margin-top: 20px;
}

#refreshButtonContainer .button {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block; /* Place buttons next to each other */
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px; /* Add rounded corners */
}

#links .button {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block; /* Place buttons next to each other */
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px; /* Add rounded corners */
}

#links .button:hover {
    background-color: #0056b3;
}

label {
    font-weight: bold; /* Make label text bold */
    margin-bottom: 5px; /* Add space below labels */
    display: block; /* Ensure labels appear above inputs */
}

.error-message {
    background-color: red; /* Red background */
    color: white; /* White text */
    text-align: center; /* Center text */
    font-weight: bold; /* Bold text */
    padding: 1px; /* Add some padding */
    display: none; /* Hide by default */
    border-radius: 5px; /* Optional: Rounds the corners of the div */
}

#progress {
    padding: 20px;
    border-radius: 8px;
    display: none; /* Keep your inline style to control visibility */
    margin-top: 20px; /* Add some space at the top */
    width: 600px; /* Limit the width of the progress bar to match the container */
}

#progress-text {
    font-size: 16px;
    color: #333; /* Dark grey color for better readability */
    margin-bottom: 10px; /* Space between text and progress bar */
}

#progress-bar {
    width: 100%; /* Full width of its container */
    height: 20px; /* Make the progress bar taller */
    border-radius: 5px; /* Rounded corners */
    background-color: #cfd2d4; /* Lighter grey background */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Style for the progress value */
#progress-bar::-webkit-progress-bar {
    background-color: #e9ecef; /* Lighter grey background */
}

#progress-bar::-webkit-progress-value {
    transition: width 0.5s;
    background-color: #007bff; /* Bootstrap primary blue */
}

#progress-bar::-moz-progress-bar {
    background-color: #007bff; /* Bootstrap primary blue */
}


.loading {
  display:none;
  width: 60px;
  height: 60px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -85px 0 0 -30px;
  transform: rotate(45deg);
}
.loading div {
  width: 6px;
  height: 6px;
  background: #007bff;
  border-radius: 100%;
  float: left;
  margin-bottom: 12px;
  animation: scaleDot 2s ease infinite;
}
.loading div:not(:nth-child(4n+4)) {
  margin-right: 12px;
}
.loading div:nth-child(1) {
  animation-delay: 0;
}
.loading div:nth-child(2),
.loading div:nth-child(5) {
  animation-delay: 0.1s;
}
.loading div:nth-child(3),
.loading div:nth-child(6),
.loading div:nth-child(9) {
  animation-delay: 0.2s;
}
.loading div:nth-child(4),
.loading div:nth-child(7),
.loading div:nth-child(10),
.loading div:nth-child(13) {
  animation-delay: 0.3s;
}
.loading div:nth-child(8),
.loading div:nth-child(11),
.loading div:nth-child(14) {
  animation-delay: 0.4s;
}
.loading div:nth-child(12),
.loading div:nth-child(15) {
  animation-delay: 0.5s;
}
.loading div:nth-child(16) {
  animation-delay: 0.6s;
}
@-moz-keyframes scaleDot {
  40% {
    transform: scale(1.3) translate(-2px, -2px);
  }
  80% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
@-webkit-keyframes scaleDot {
  40% {
    transform: scale(1.3) translate(-2px, -2px);
  }
  80% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
@-o-keyframes scaleDot {
  40% {
    transform: scale(1.3) translate(-2px, -2px);
  }
  80% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes scaleDot {
  40% {
    transform: scale(1.3) translate(-2px, -2px);
  }
  80% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

.check-container {
    display:none;
	position: relative;
	margin: 0 auto;
	width: 6.25rem;
	height: 7.5rem;
	flex-flow: column;
	align-items: center;
	justify-content: space-between;

	.check-background {
		width: 100%;
		height: calc(100% - 1.25rem);
		background: linear-gradient(to bottom right, #5de593, #41d67c);
		box-shadow: 0px 0px 0px 65px rgba(255, 255, 255, 0.25) inset,
			0px 0px 0px 65px rgba(255, 255, 255, 0.25) inset;
		transform: scale(0.84);
		border-radius: 50%;
		animation: animateContainer 0.75s ease-out forwards 0.75s;
		display: flex;
		align-items: center;
		justify-content: center;
		opacity: 0;

		svg {
			width: 65%;
			transform: translateY(0.25rem);
			stroke-dasharray: 80;
			stroke-dashoffset: 80;
			animation: animateCheck 0.35s forwards 1.25s ease-out;
		}
	}

	.check-shadow {
		bottom: calc(-15% - 5px);
		left: 0;
		border-radius: 50%;
		background: radial-gradient(closest-side, rgba(73, 218, 131, 1), transparent);
		animation: animateShadow 0.75s ease-out forwards 0.75s;
	}
}

@keyframes animateContainer {
	0% {
		opacity: 0;
		transform: scale(0);
		box-shadow: 0px 0px 0px 65px rgba(255, 255, 255, 0.25) inset,
			0px 0px 0px 65px rgba(255, 255, 255, 0.25) inset;
	}
	25% {
		opacity: 1;
		transform: scale(0.9);
		box-shadow: 0px 0px 0px 65px rgba(255, 255, 255, 0.25) inset,
			0px 0px 0px 65px rgba(255, 255, 255, 0.25) inset;
	}
	43.75% {
		transform: scale(1.15);
		box-shadow: 0px 0px 0px 43.334px rgba(255, 255, 255, 0.25) inset,
			0px 0px 0px 65px rgba(255, 255, 255, 0.25) inset;
	}
	62.5% {
		transform: scale(1);
		box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 0.25) inset,
			0px 0px 0px 21.667px rgba(255, 255, 255, 0.25) inset;
	}
	81.25% {
		box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 0.25) inset,
			0px 0px 0px 0px rgba(255, 255, 255, 0.25) inset;
	}
	100% {
		opacity: 1;
		box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 0.25) inset,
			0px 0px 0px 0px rgba(255, 255, 255, 0.25) inset;
	}
}

@keyframes animateCheck {
	from {
		stroke-dashoffset: 80;
	}
	to {
		stroke-dashoffset: 0;
	}
}

@keyframes animateShadow {
	0% {
		opacity: 0;
		width: 100%;
		height: 15%;
	}
	25% {
		opacity: 0.25;
	}
	43.75% {
		width: 40%;
		height: 7%;
		opacity: 0.35;
	}
	100% {
		width: 85%;
		height: 15%;
		opacity: 0.25;
	}
}