@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Inter', sans-serif; 
}

/* Dynamic Animated Background */
body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(-45deg, #0f172a, #1e293b, #020617, #334155);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow: hidden;
    color: #f8fafc;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glassmorphism Card with Slide-Up Entry */
.login-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3.5rem 3rem;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(40px);
}

@keyframes slideUpFade {
    to { opacity: 1; transform: translateY(0); }
}

/* Shake Animation for Failed Logins */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
}

h2 { 
    text-align: center; 
    margin-bottom: 2.5rem; 
    font-weight: 300; 
    letter-spacing: 2px; 
    color: #38bdf8; 
}

/* Floating Label Input Fields */
.input-group { 
    position: relative; 
    margin-bottom: 2rem; 
}

.input-group input {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    color: #fff;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    outline: none;
    background: transparent;
    transition: border-color 0.3s;
}

.input-group label {
    position: absolute;
    top: 10px;
    left: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: 0.3s ease all;
}

/* Move label up when focused or when text is entered */
.input-group input:focus, 
.input-group input:valid {
    border-bottom-color: #38bdf8;
}

.input-group input:focus ~ label, 
.input-group input:valid ~ label {
    top: -20px;
    font-size: 0.8rem;
    color: #38bdf8;
}

/* Animated Button */
.login-btn {
    width: 100%;
    padding: 12px;
    margin-top: 1rem;
    background: transparent;
    border: 2px solid #38bdf8;
    color: #38bdf8;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.login-btn:hover {
    background: #38bdf8;
    color: #0f172a;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.login-btn .arrow { 
    transition: transform 0.3s ease; 
}

.login-btn:hover .arrow { 
    transform: translateX(6px); 
}

/* Message Display */
#login-msg {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#login-msg.show { 
    opacity: 1; 
}