/* ========================================
   NINZASMS - COMMON AUTH STYLES
   Used for: Login | Register | Forgot Password
   ======================================== */

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

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Animated background elements */
body::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent);
    top: -100px;
    left: -100px;
    border-radius: 50%;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08), transparent);
    bottom: -150px;
    right: -150px;
    border-radius: 50%;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 460px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Logo */
.logo-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #e0c3ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    background: linear-gradient(135deg, #ffd89b, #c7e9fb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-top: 8px;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 28px;
    padding: 40px 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.login-card:hover {
    transform: translateY(-2px);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}

.login-header p {
    color: #6b7280;
    font-size: 14px;
}

/* Flash Alert */
.alert {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert i {
    font-size: 18px;
}

/* Form Groups */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-group label i {
    margin-right: 8px;
    color: #667eea;
    font-size: 14px;
}

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

.input-wrapper i:first-child {
    position: absolute;
    left: 16px;
    color: #9ca3af;
    font-size: 18px;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #f9fafb;
}

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

.input-wrapper input.error {
    border-color: #ef4444;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    left: auto !important;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #667eea;
}

/* Remember Me */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #4b5563;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.forgot-link {
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* reCAPTCHA */
.recaptcha-wrapper {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Divider */
.divider {
    text-align: center;
    position: relative;
    margin-bottom: 24px;
}

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

.divider span {
    background: white;
    padding: 0 16px;
    position: relative;
    color: #9ca3af;
    font-size: 13px;
}

/* Register Link */
.register-link {
    text-align: center;
    margin-top: 16px;
}

.register-link p {
    color: #6b7280;
    font-size: 14px;
}

.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.register-link a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Security Badges */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.security-badges span {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 6px;
}

.security-badges i {
    font-size: 14px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 24px;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }
    
    .login-header h2 {
        font-size: 28px;
    }
    
    .logo {
        font-size: 34px;
    }
}

/* ========================================
   PAGE LOADER (Common for all pages)
   ======================================== */

/* Full page overlay loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}

.page-loader.active {
    visibility: visible;
    opacity: 1;
}

/* Loader animation */
.loader-content {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #667eea;
    border-right: 4px solid #764ba2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loader-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
}

.loader-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 5px;
}

.loader-dots span {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile responsive loader */
@media (max-width: 768px) {
    .spinner {
        width: 45px;
        height: 45px;
    }
    
    .loader-text {
        font-size: 14px;
    }
}
/* Registration Page Specific Improvements */

/* OTP Input Field Styling */
.otp-flex input {
    letter-spacing: 6px;
    font-size: 22px;
    font-weight: 700;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.otp-flex input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Verify Button Hover Effect */
.verify-btn {
    position: relative;
    overflow: hidden;
}

.verify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.verify-btn:active {
    transform: translateY(0);
}

/* Resend Link Hover */
.resend-link {
    transition: all 0.3s ease;
}

.resend-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Timer Text Animation */
.timer-text {
    font-weight: 500;
    animation: pulse 1s infinite;
}

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

/* OTP Hint Box */
.otp-hint {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    font-size: 13px;
}

/* Complete Registration Button */
.register-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.register-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Success/Error Alert Animations */
.alert {
    animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}