
/* Critical CSS here */
:root {
    --primary: #4CAF50;
    --primary-hover: #45a049;
    --primary-light: rgba(76, 175, 80, 0.1);
    --dark: #141414;
    --dark-light: #1e1e1e;
    --light: #f5f5f5;
    --gray: #808080;
    --gray-light: rgba(255, 255, 255, 0.1);
    --error: #ff4757;
    --card-bg: rgba(255, 255, 255, 0.05);
}

/* Lazy loading styles */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.lazy.loaded {
    opacity: 1;
}

.loading-placeholder {
    background: linear-gradient(90deg, var(--card-bg) 25%, var(--dark-light) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--dark);
    color: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
    padding: 1rem;
}

.auth-container {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gray-light);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
}

.auth-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.auth-header p {
    color: var(--gray);
    font-size: 0.9375rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 1rem;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.auth-tab.active {
    color: var(--primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.auth-tab:hover:not(.active) {
    color: var(--light);
}

.auth-form {
    display: none;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light);
    font-size: 0.9375rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: 0.5rem;
    background: var(--dark-light);
    color: var(--light);
    transition: all 0.3s ease;
    font-size: 0.9375rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control.error {
    border-color: var(--error);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 2.5rem;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--light);
}

.btn {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.form-error {
    color: var(--error);
    font-size: 0.8125rem;
    margin-top: 0.5rem;
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.form-error.show {
    display: block;
}

.social-auth {
    margin-top: 2rem;
    text-align: center;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray);
    font-size: 0.8125rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-light);
    margin: 0 0.5rem;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-light);
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-light);
}

.social-btn:hover {
    background: var(--gray-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-btn:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--gray);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.forgot-password {
    display: block;
    text-align: right;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--primary);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-tab {
        padding: 0.75rem;
        font-size: 0.9375rem;
    }
    
    .social-buttons {
        gap: 0.75rem;
    }
    
    .social-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 0.9375rem;
    }
}

input.error {
    border-color: red;
}
.form-error.show {
    display: block;
    color: red;
}
.loading {
    opacity: 0.6;
    pointer-events: none;
}
