/* ===========================
   Authentication Pages Styles - Premium Dark Theme
   =========================== */
:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #818cf8;
    --secondary-color: #f093fb;
    --danger-color: #ff4d4f;
    --success-color: #52c41a;
    
    --text-primary: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-light: #64748B;
    
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-card: #1E293B;
    
    --border-color: rgba(102, 126, 234, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);
    
    --transition: all 0.3s ease;
    --border-radius: 16px;
    --border-radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Premium Background Effects */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(240, 147, 251, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

.auth-container {
    width: 100%;
    max-width: 550px;
    position: relative;
    z-index: 1;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.auth-container::-webkit-scrollbar {
    display: none;
}

.auth-box {
    width: 100%;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(102, 126, 234, 0.2);
    padding: 40px 45px;
    animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 1px solid rgba(102, 126, 234, 0.2);
    margin: 20px 0;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #f093fb);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    margin-bottom: 20px;
    transition: var(--transition);
}

.logo:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.logo i {
    font-size: 32px;
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header h1 {
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, #E2E8F0 0%, #94A3B8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Alert Box */
.alert {
    padding: 16px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Form Styles */
.auth-form {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i:not(.toggle-password) {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-size: 18px;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 50px 14px 50px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: var(--transition);
    color: var(--text-primary);
}

.input-wrapper input::placeholder {
    color: var(--text-light);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 0 20px rgba(102, 126, 234, 0.2);
}

.input-wrapper input:hover:not(:focus) {
    border-color: rgba(102, 126, 234, 0.4);
}

.toggle-password {
    position: absolute;
    right: 16px;
    cursor: pointer;
    color: var(--text-secondary);
    z-index: 10;
    font-size: 16px;
    padding: 8px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.checkbox:hover {
    color: var(--text-primary);
}

.checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #f093fb);
    transition: width 0.3s ease;
}

.link:hover::after {
    width: 100%;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 2px;
    overflow: hidden;
    display: none;
}

.password-strength.show {
    display: block;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.password-strength-bar.medium {
    width: 66%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.password-strength-bar.strong {
    width: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.password-strength-text {
    font-size: 12px;
    margin-top: 6px;
    display: none;
    font-weight: 500;
}

.password-strength-text.show {
    display: block;
}

.password-strength-text.weak {
    color: #f87171;
}

.password-strength-text.medium {
    color: #fbbf24;
}

.password-strength-text.strong {
    color: #4ade80;
}

/* Button Styles */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-loader {
    display: none;
}

.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .btn-loader {
    display: inline-block;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0 15px 0;
    color: var(--text-secondary);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.divider span {
    padding: 0 15px;
    font-size: 14px;
    font-weight: 500;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-social:not(:disabled):hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.btn-social:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-social i {
    font-size: 18px;
}

/* Footer */
.auth-footer {
    text-align: center;
    color: var(--text-secondary);
    padding: 15px 0 0 0;
    margin-top: 15px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.auth-footer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    body::before {
        background: radial-gradient(600px at 50% 50%, rgba(102, 126, 234, 0.15), transparent 80%);
    }
    
    .auth-box {
        padding: 25px 20px;
        margin: 10px 0;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .auth-header p {
        font-size: 14px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-primary {
        padding: 12px 24px;
        font-size: 14px;
    }
}
