* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a1f25, #242c37);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Enhanced background animation */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 10%, rgba(100, 181, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(25, 118, 210, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(30, 136, 229, 0.05) 0%, transparent 70%);
    animation: backgroundPulse 15s ease-in-out infinite;
    z-index: 0;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.page-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.auth-container {
    background: rgba(30, 40, 54, 0.95);
    backdrop-filter: blur(20px);
    width: 100%;
    padding: 2.8rem;
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 0 3px rgba(100, 181, 246, 0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-container:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        0 0 0 4px rgba(100, 181, 246, 0.15);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.auth-header::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #64b5f6, #1976d2);
    border-radius: 2px;
}

.auth-header h2 {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: #90a4ae;
    font-size: 1rem;
    line-height: 1.5;
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    color: #ef5350;
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    color: #e3f2fd;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
    display: block;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 1rem;
    color: #64b5f6;
    font-size: 1.1rem;
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(30, 40, 54, 0.7);
    border: 1px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.2);
}

.submit-btn {
    background: linear-gradient(135deg, #64b5f6, #1976d2);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #90caf9, #2196f3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.submit-btn.loading {
    position: relative;
    color: transparent;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: #90a4ae;
    font-size: 0.95rem;
    padding-top: 1.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer a {
    color: #64b5f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #90caf9;
    text-decoration: underline;
}

.password-match-indicator {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.password-match-indicator.match {
    color: #4caf50;
}

.password-match-indicator.mismatch {
    color: #ef5350;
}

@media (max-width: 480px) {
    .auth-container {
        padding: 2rem;
    }

    .auth-header h2 {
        font-size: 1.8rem;
    }
}