/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background-image:  url(../Images/bg333.webp);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #287fe2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}
header {
    text-align: center; /* Center text */
    margin-top: 10px; /* Space from the top */
    display: flex;
    position: absolute;
    top: 0;
    justify-content: center;
    background-color: hwb(165 95% 3%);
    border: #f736d7 solid 2px;
    border-radius: 10px;
    border-collapse: separate;
    padding: 10px;
    width: 100%;
}

header h1 {
    margin: 0; /* Remove default margin */
    font-size: 2em; /* Adjust font size */
    color: #f736d7; /* Text color */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* Add some shadow for depth */
    display: inline-block; /* Required for animation */
    animation: textAnimation 1s ease forwards; /* Initial animation */
}

@keyframes textAnimation {
    0% {
        transform: translateY(-20px); /* Start slightly above */
        opacity: 0; /* Start invisible */
    }
    50% {
        transform: translateY(10px); /* Bounce down slightly */
        opacity: 1; /* Become visible */
    }
    100% {
        transform: translateY(0); /* Settle in original position */
    }
}

header h1:hover {
    animation: textHoverAnimation 0.5s forwards; /* Animation on hover */
}

@keyframes textHoverAnimation {
    0% {
        transform: scale(1); /* Original size */
        color: #f736d7; /* Original color */
    }
    50% {
        transform: scale(1.1); /* Scale up */
        color: #ffcc00; /* Change color */
    }
    100% {
        transform: scale(1); /* Back to original size */
        color: #f736d7; /* Back to original color */
    }
}
/* Page Title */
h1 {
    font-size: 2.5em;
    color: #ffffff; /* Pink */
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

/* Form Container */
.container {
    background: linear-gradient(135deg, #f736d7, #FF1493); /* Gradient for form box */
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(247, 31, 182, 0.5);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 1s ease-out, float 3s infinite ease-in-out; /* Added floating effect */
    position: relative;
    overflow: hidden;
}

/* Glowing Effect */
.container::before { 
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(5, 243, 252, 0.2), transparent);
    animation: glowPulse 4s infinite;
    pointer-events: none;
    filter: blur(50px);
}

/* Input Styles */
input[type="password"] {
    width: 90%;
    padding: 10px;
    margin: 15px 0;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    text-align: center;
    outline: none;
    transition: border-color 0.3s ease;
}

input[type="password"]:focus {
    border-color: #FF69B4;
}

/* Button Styles */
.button {
    display: inline-block;
    background-color: #FF69B4;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1.2em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #FF1493;
    transform: scale(1.1);
}

/* Error Message */
.error-message {
    color: #f8f8f8;
    font-size: 1em;
    margin-top: 15px;
    text-align: center;
    animation: shake 0.5s ease-out;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .container {
        width: 90%;
    }

    input[type="password"] {
        font-size: 1em;
    }

    .button {
        font-size: 1em;
    }
}
