@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
    overflow: hidden;
    color: #fff;
}

.rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.drop {
    position: absolute;
    width: 2px;
    height: 60px;
    background: linear-gradient(transparent, #00f2ff);
    filter: drop-shadow(0 0 5px #00f2ff);
    animation: fall 2s linear infinite;
    opacity: 0.7;
    animation-delay: 0s !important; /* Remove any delay to start immediately */
}

@keyframes fall {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.container {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    transition: 0.3s;
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

input:focus,
input:valid {
    border-color: #00f2ff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

input:focus ~ label,
input:valid ~ label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    color: #00f2ff;
    background: #24243e;
    padding: 0 5px;
    border-radius: 4px;
}

button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0, 114, 255, 0.4);
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 114, 255, 0.6);
    background: linear-gradient(45deg, #0072ff, #00c6ff);
}

button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

button:hover::after {
    left: 100%;
}

.link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.link a {
    color: #00f2ff;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.link a:hover {
    text-shadow: 0 0 8px #00f2ff;
    text-decoration: underline;
}

.message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    animation: shake 0.5s ease-in-out;
}

.error {
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid #ff4444;
    color: #ff4444;
}

.success {
    background: rgba(0, 255, 0, 0.15);
    border: 1px solid #00c851;
    color: #00c851;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.dashboard-container {
    width: 600px;
    max-width: 90%;
}

.logout-btn {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    box-shadow: 0 5px 15px rgba(255, 75, 43, 0.4);
    display: inline-block;
    text-decoration: none;
    text-align: center;
    margin-top: 20px;
}

.logout-btn:hover {
    background: linear-gradient(45deg, #ff4b2b, #ff416c);
    box-shadow: 0 8px 20px rgba(255, 75, 43, 0.6);
}

@media (max-width: 480px) {
    .container {
        width: 90%;
        padding: 30px 20px;
    }
}