/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;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(135deg, #0f0c29, #302b63, #24243e);
    color: #ffffff;
    overflow: hidden; 
}

/* Background Blobs */
body::before, body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    z-index: -1;
    filter: blur(120px);
    opacity: 0.6;
    animation: float 10s infinite alternate;
}

body::before {
    background: #7b2cbf;
    top: -50px;
    left: -50px;
}

body::after {
    background: #00b4d8;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 50px); }
}

/* Login Card Glassmorphism */
.login-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 50px 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    z-index: 1;
}

.login-card h2 {
    font-size: 2.2rem;
    margin-bottom: 5px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
}

.login-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
    text-align: center;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.input-group input:focus {
    border-color: #00b4d8;
    box-shadow: 0 0 15px rgba(0, 180, 216, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.input-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: 0.3s;
    font-size: 1rem;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    padding: 0 5px;
    background: #1a1a2e; /* Matches dark bg somewhat to hide line */
    color: #00b4d8;
    border-radius: 3px;
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, #00b4d8, #0077b6);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
    letter-spacing: 1px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 180, 216, 0.5);
}

/* Error State */
.error-anim {
    animation: shake 0.4s ease-in-out;
    border: 1px solid #ff4d4d !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Success Overlay */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.success-overlay.active {
    opacity: 1;
    visibility: visible;
}

.success-content {
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-overlay.active .success-content {
    transform: scale(1);
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    display: block;
    animation: popIn 0.6s 0.2s backwards;
}

.success-content h2 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.btn-container {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-retry {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: auto;
    padding: 12px 30px;
}

.btn-retry:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(0);
}

.btn-next {
    background: #00ff88;
    color: #0f0c29;
    width: auto;
    padding: 12px 40px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.btn-next:hover {
    background: #00cc6a;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}