/* General body styling */
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #E29578 0%, #83C5BE 30%, #FFDDD2 0%, #006D77 100%);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150vh;
    flex-direction: column;
    overflow-x: hidden;
    box-sizing: border-box;
    animation: fadeIn 2s ease-in-out, gradientAnimation 8s ease-in-out infinite;
}

/* Header styling */
h1 {
    color: whitesmoke;  /* Rich teal */
    font-size: 36px;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
    animation: fadeIn 1s ease-in-out;
}

/* Header fade-in animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form container styling */
form {
    background-color: #f1f1f1;  /* Pale peach background */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    width: 75%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    position: relative;
    animation: formFadeIn 1s forwards;
}

.form:hover {
    transform: translateY(-6px); /* Slight lift effect on hover */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Form fade-in animation */
@keyframes formFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form input and textarea styling */
input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 7px;
    border-radius: 8px;
    border: 1px solid #BCCCDC;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Input fields hover effect */
input[type="text"]:hover,
input[type="password"]:hover,
textarea:hover {
    border-color: #83C5BE;  /* Cool teal border */
    box-shadow: 0 0 8px rgba(154, 166, 178, 0.6);
}

/* Input fields focus effect */
input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #83C5BE;  /* Cool teal border */
    box-shadow: 0 0 8px rgba(154, 166, 178, 0.6);
    outline: none;
}

/* Label styling */
label {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 16px;
}

/* Button styling */
button {
    background-color: #E29578;  /* Warm brownish button color */
    color: white;
    padding: 10px;
    border-radius: 8px;
    border: none;
    width: 100%;
    cursor: pointer;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 18px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transform: scale(1);
    transition: all 0.3s ease-in-out;
}

/* Button hover effect */
button:hover {
    background: linear-gradient(to right, #E29578, #FFDDD2);
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    animation: buttonHover 0.5s ease-out;
    margin-top: 5px;
    margin-bottom: 10px;
}

/* Button active effect */
button:active {
    transform: scale(1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Camera and video section styling */
video {
    border: 1px solid #BCCCDC;
    border-radius: 5px;
    max-width: 100%;
}

canvas {
    display: none;
}

/* Link styling */
a {
    text-decoration: none;
    color: #83C5BE;  /* Teal link color */
    font-size: 14px;
    display: block;
    margin-top: 15px;
    text-align: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Link hover effect */
a:hover {
    opacity: 1;
}

/* Responsiveness */
@media (max-width: 480px) {
    form {
        width: 90%;
        padding: 20px;
    }

    button {
        font-size: 16px;
        padding: 14px;
    }

    .toggle-button {
        padding: 12px 16px;
    }

    h1 {
        font-size: 30px;
    }
}
