/*
 * Extineo Auth Stylesheet
 * 
 * Shared styles for Login, Register, Forgot Password, and Reset Password pages.
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal scroll from background zoom */
    padding: 40px 20px;
    /* Increased vertical padding */
}

/* Animated Background */
body::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/public/images/login-background.png');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    animation: subtleZoom 20s ease-in-out infinite alternate;
}

@keyframes subtleZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
    }
}

/* Floating Particles */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(251, 146, 60, 0.6);
    border-radius: 50%;
    animation: float 15s infinite;
    box-shadow: 0 0 10px rgba(251, 146, 60, 0.8);
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.particle:nth-child(3) {
    left: 40%;
    animation-delay: 4s;
    animation-duration: 12s;
}

.particle:nth-child(4) {
    left: 60%;
    animation-delay: 1s;
    animation-duration: 20s;
}

.particle:nth-child(5) {
    left: 80%;
    animation-delay: 3s;
    animation-duration: 16s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    50% {
        transform: translateY(-10vh) translateX(50px);
    }
}

/* Container */
.login-container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 460px;
    padding: 48px;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(59, 130, 246, 0.1),
        inset 0 0 80px rgba(255, 255, 255, 0.02);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header & Logo */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(251, 146, 60, 0.4), 0 0 60px rgba(251, 146, 60, 0.2);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.logo-circle svg {
    width: 40px;
    height: 40px;
    color: white;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 15px;
    color: #94a3b8;
    font-weight: 400;
}

/* Form Elements */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    background: #0f172a;
    border: 1.5px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    color: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
}

.form-input::placeholder {
    color: #64748b;
}

.form-input:focus {
    outline: none;
    border-color: #fb923c;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.1), 0 4px 12px rgba(251, 146, 60, 0.2);
    transform: translateY(-2px);
}

.form-input:focus+.form-label {
    color: #fb923c;
}

/* Autofill styling to prevent white background in dark mode */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f8fafc !important;
    -webkit-box-shadow: 0 0 0px 1000px #0f172a inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Buttons */
.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(251, 146, 60, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #fbbf24 0%, #fb923c 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(251, 146, 60, 0.45), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-login:hover::before {
    opacity: 1;
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login span {
    position: relative;
    z-index: 1;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    gap: 12px;
}

.btn-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-google:active {
    transform: translateY(0);
}

.btn-google span {
    color: #374151;
    font-weight: 500;
    font-size: 15px;
}

/* Social Separator */
.social-separator {
    text-align: center;
    margin: 16px 0;
    color: #64748b;
    font-size: 13px;
    position: relative;
}

.social-separator span {
    background: #1e293b;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

.social-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(148, 163, 184, 0.2);
    z-index: 0;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    animation: showAlert 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes showAlert {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* Links & Utilities */
.login-links {
    margin-top: 24px;
    text-align: center;
}

.login-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.login-links a:hover {
    color: #fb923c;
}

.login-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

.login-footer a {
    color: #fb923c;
    text-decoration: none;
    font-weight: 600;
}

.form-help {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

/* Loading States */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .login-container {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 24px;
    }

    .logo-circle {
        width: 64px;
        height: 64px;
    }

    .logo-circle svg {
        width: 32px;
        height: 32px;
    }
}