* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 20px;
    position: relative;
    overflow: auto;
}

/* Disabled animated blobs on mobile for performance */
@media (min-width: 1024px) {
    body::before {
        content: '';
        position: absolute;
        width: 400px;
        height: 400px;
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
        border-radius: 50%;
        top: -150px;
        right: -100px;
        filter: blur(80px);
    }

    body::after {
        content: '';
        position: absolute;
        width: 350px;
        height: 350px;
        background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
        border-radius: 50%;
        bottom: -120px;
        left: -80px;
        filter: blur(80px);
    }
}

.container {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98));
    padding: 2.5rem 2rem;
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Desktop only hover effect */
@media (min-width: 1024px) {
    .container {
        padding: 3rem 2.5rem;
        border-radius: 28px;
        transition: transform 0.3s ease;
    }
    
    .container:hover {
        transform: translateY(-5px);
    }
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    border-radius: 20px 20px 0 0;
}

@media (min-width: 1024px) {
    .container::before {
        border-radius: 28px 28px 0 0;
    }
}

h2 {
    color: #1e293b;
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    margin: 1rem auto 0;
    border-radius: 10px;
}

@media (min-width: 768px) {
    h2 {
        font-size: 2rem;
    }
    
    h2::after {
        width: 80px;
    }
}

.success-message {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #10b981;
    font-weight: 600;
    font-size: 0.875rem;
}

.error-message {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #ef4444;
    font-weight: 600;
    font-size: 0.875rem;
}

.error-message ul {
    margin: 0;
    padding-left: 1.2rem;
}

.error-message li {
    margin-bottom: 0.25rem;
}

form div {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    color: #334155;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

input {
    width: 100%;
    padding: 14px 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    font-size: 16px; /* Prevents zoom on iOS */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-weight: 500;
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder {
    color: #94a3b8;
}

input:focus {
    outline: none;
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Desktop only transform effects */
@media (min-width: 1024px) {
    input:focus {
        transform: translateY(-2px);
    }
}

/* Password input wrapper for toggle icon */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input {
    padding-right: 48px; /* Make room for the eye icon */
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.toggle-password:hover {
    color: #6366f1;
}

.toggle-password:active {
    color: #4f46e5;
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.8rem;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease;
}

button:active {
    opacity: 0.85;
}

/* Desktop only hover effects */
@media (min-width: 1024px) {
    button {
        transition: all 0.3s ease;
    }
    
    button:hover {
        transform: translateY(-3px);
        box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
    }
    
    button:active {
        transform: translateY(-1px);
        opacity: 1;
    }
}

p {
    text-align: center;
    margin-top: 1.5rem;
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
}

a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

a:hover {
    color: #a855f7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 1.75rem 1.25rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }

    h2::after {
        width: 60px;
        margin-top: 0.75rem;
    }

    label {
        font-size: 0.875rem;
        margin-bottom: 0.4rem;
    }
    
    input {
        padding: 13px 14px;
    }

    button {
        padding: 13px;
        font-size: 0.95rem;
    }
}
