/* Firebase Authentication Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-header h1 {
    color: #2d3748;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.auth-header p {
    color: #718096;
    font-size: 14px;
    line-height: 1.5;
}

.auth-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #2d3748;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f7fafc;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 20px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-google {
    background: white;
    color: #2d3748;
    border: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.btn-google:hover:not(:disabled) {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover:not(:disabled) {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.google-icon {
    width: 20px;
    height: 20px;
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #a0aec0;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.user-panel {
    padding: 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-details h3 {
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-details p {
    color: #718096;
    font-size: 14px;
    margin-bottom: 8px;
}

.user-role {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 20px 30px;
    font-size: 14px;
    border-left: 4px solid #e53e3e;
}

.loading-indicator {
    text-align: center;
    padding: 40px 30px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    color: #718096;
    font-size: 14px;
}

.btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: inline;
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-header {
        padding: 30px 20px 20px;
    }
    
    .auth-form,
    .user-panel {
        padding: 20px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .auth-header h1 {
        font-size: 20px;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .user-avatar {
        width: 80px;
        height: 80px;
    }
}

/* Success Animation */
.success-animation {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Focus States for Accessibility */
.btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

input:focus {
    outline: none;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: #2d3748;
        color: white;
    }
    
    .auth-header {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
    
    .auth-header h1 {
        color: white;
    }
    
    .form-group label {
        color: #e2e8f0;
    }
    
    .form-group input {
        background-color: #4a5568;
        border-color: #718096;
        color: white;
    }
    
    .form-group input:focus {
        background-color: #2d3748;
    }
    
    .user-info {
        background: #4a5568;
    }
    
    .user-details h3 {
        color: white;
    }
}