/* auth.css - Modern UI Design for both Login & Register Pages */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated background effect */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
    pointer-events: none;
}

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 45px 35px;
    border-radius: 28px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.auth-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    width: 85px;
    height: 85px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: block;
    border: 4px solid #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 8px;
    color: #1a1a2e;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.auth-box form {
    margin-top: 25px;
}

.auth-box input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 8px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
    outline: none;
}

.auth-box input:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.auth-box input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.error-text {
    color: #e53e3e;
    font-size: 12px;
    margin-top: -5px;
    margin-bottom: 12px;
    padding-left: 5px;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-btn:hover::before {
    width: 300px;
    height: 300px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Login page specific styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 45px 35px;
    border-radius: 28px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo img {
    width: 85px;
    height: 85px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.login-logo img:hover {
    transform: scale(1.05);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 8px;
    color: #1a1a2e;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 30px;
    font-size: 14px;
}

.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
    outline: none;
}

.input-group input:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.3s ease;
    font-size: 18px;
}

.toggle-password:hover {
    color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
}

.forgot-link,
.register-link {
    text-align: center;
    margin-top: 20px;
}

.forgot-link a,
.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-link a:hover,
.register-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.register-link p {
    color: #64748b;
    font-size: 14px;
}

.error-box {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 25px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid #dc2626;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-box,
    .login-box {
        padding: 35px 25px;
        max-width: 95%;
    }
    
    .auth-box h2,
    .login-box h2 {
        font-size: 24px;
    }
    
    .auth-logo,
    .login-logo img {
        width: 70px;
        height: 70px;
    }
    
    .auth-box input,
    .input-group input {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .auth-box,
    .login-box {
        background: rgba(30, 30, 46, 0.98);
    }
    
    .auth-box h2,
    .login-box h2 {
        color: #e2e8f0;
    }
    
    .login-subtitle,
    .register-link p,
    .auth-footer {
        color: #94a3b8;
    }
    
    .input-group label {
        color: #cbd5e1;
    }
    
    .input-group input,
    .auth-box input {
        background: #1e293b;
        border-color: #334155;
        color: #f1f5f9;
    }
    
    .input-group input:focus,
    .auth-box input:focus {
        background: #334155;
        border-color: #667eea;
    }
    
    .input-group input::placeholder,
    .auth-box input::placeholder {
        color: #64748b;
    }
}

/* Loading state for buttons */
.auth-btn.loading,
.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-btn.loading::after,
.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.password-box{
    position: relative;
}

.password-box input{
    width: 100%;
    padding-right: 40px;
}

.password-box .toggle{
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.success-box{
    background: linear-gradient(135deg,#dcfce7,#bbf7d0);
    color: #166534;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}