/* Auth Pages CSS - Login, Register, Relogin - Clean Version */

/* Body and HTML */
body.login-register-page,
html.login-register-page {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh;
}

/* Main Section - Centered with Flexbox */
section.login-register,
#wrapper.login-register {
    min-height: 100vh !important;
    padding: 20px 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    position: relative !important;
    background: linear-gradient(135deg, #1a1f2e 0%, #2a2f3a 50%, #353c48 100%) !important;
    width: 100% !important;
    margin: 0 !important;
    overflow-y: auto !important;
}

/* Animated Background */
section.login-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(234, 189, 35, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(234, 189, 35, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(234, 189, 35, 0.06) 0%, transparent 50%);
    animation: backgroundPulse 8s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes backgroundPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Animated Bubbles */
section.login-register::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(234, 189, 35, 0.15), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(234, 189, 35, 0.1), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(234, 189, 35, 0.2), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(234, 189, 35, 0.15), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(234, 189, 35, 0.1), transparent),
        radial-gradient(1px 1px at 33% 80%, rgba(234, 189, 35, 0.12), transparent),
        radial-gradient(2px 2px at 10% 40%, rgba(234, 189, 35, 0.1), transparent);
    background-size: 200% 200%;
    background-position: 0% 0%, 100% 0%, 50% 50%, 0% 100%, 100% 100%, 50% 0%, 0% 50%;
    animation: bubbleMove 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes bubbleMove {
    0% {
        background-position: 0% 0%, 100% 0%, 50% 50%, 0% 100%, 100% 100%, 50% 0%, 0% 50%;
    }
    50% {
        background-position: 100% 100%, 0% 100%, 50% 0%, 100% 0%, 0% 0%, 50% 100%, 100% 50%;
    }
    100% {
        background-position: 0% 0%, 100% 0%, 50% 50%, 0% 100%, 100% 100%, 50% 0%, 0% 50%;
    }
}

/* Animated Lines */
.login-register-animated-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.login-register-animated-lines::before,
.login-register-animated-lines::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(234, 189, 35, 0.1), transparent);
    animation: lineMove 15s linear infinite;
}

.login-register-animated-lines::before {
    top: 20%;
    transform: rotate(25deg);
}

.login-register-animated-lines::after {
    top: 60%;
    transform: rotate(-25deg);
    animation-delay: -7.5s;
}

@keyframes lineMove {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Content above background - FIXED: Only z-index, NO position relative */
section.login-register > * {
    z-index: 1;
}

/* Login Box - Centered */
section.login-register .login-box {
    width: 100%;
    max-width: 450px;
    margin: 20px auto;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

/* White Box - Modern dark design */
.white-box {
    padding: 30px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(53, 60, 72, 0.95) 0%, rgba(60, 68, 82, 0.95) 100%) !important;
    border: 1px solid rgba(234, 189, 35, 0.2) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(234, 189, 35, 0.1) !important;
    backdrop-filter: blur(10px);
    width: 100%;
    box-sizing: border-box;
}

.white-box form {
    width: 100%;
    box-sizing: border-box;
}

/* Input Icons */
.white-box .form-group {
    position: relative;
}

.white-box .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #eabd23;
    font-size: 16px;
    z-index: 2;
    pointer-events: none;
    transition: all 0.3s ease;
}

.white-box .form-group:focus-within .input-icon {
    color: #fec107;
    transform: translateY(-50%) scale(1.1);
}

/* Form Inputs */
.white-box .form-control,
.white-box input[type="text"],
.white-box input[type="password"],
.white-box input[type="email"] {
    background: rgba(60, 68, 82, 0.6) !important;
    border: 2px solid rgba(234, 189, 35, 0.3) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    padding: 12px 20px 12px 45px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    font-family: 'Poppins', sans-serif !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.white-box .form-control:focus,
.white-box input[type="text"]:focus,
.white-box input[type="password"]:focus,
.white-box input[type="email"]:focus {
    background: rgba(60, 68, 82, 0.8) !important;
    border-color: #eabd23 !important;
    box-shadow: 0 0 15px rgba(234, 189, 35, 0.3) !important;
    transform: scale(1.02) !important;
}

.white-box .form-control::placeholder,
.white-box input[type="text"]::placeholder,
.white-box input[type="password"]::placeholder,
.white-box input[type="email"]::placeholder {
    color: #54667a !important;
    font-weight: 400 !important;
}

/* Text Colors */
.white-box .box-title,
.white-box h2,
.white-box h3 {
    color: #ffffff !important;
}

.white-box p,
.white-box label {
    color: #96a2b4 !important;
}

.white-box .text-dark {
    color: #96a2b4 !important;
}

.white-box a {
    color: #eabd23 !important;
}

.white-box a:hover {
    color: #fec107 !important;
}

/* Captcha */
#custom-captcha {
    max-width: 100%;
    overflow: visible;
}

/* Alert Boxes */
.white-box .alert {
    border-radius: 8px !important;
    border: none !important;
    padding: 15px 20px 15px 50px !important;
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    display: block !important;
    font-family: 'Poppins', sans-serif !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    animation: slideIn 0.3s ease-out !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow: hidden !important;
}

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

.alert-danger {
    background: linear-gradient(135deg, rgba(251, 150, 120, 0.15) 0%, rgba(251, 58, 58, 0.15) 100%) !important;
    border-left: 4px solid #fb3a3a !important;
    color: #ffffff !important;
}

.alert-danger::before {
    content: '\f00d' !important;
    font-family: 'FontAwesome', 'Font Awesome 5 Free' !important;
    font-size: 20px !important;
    color: #fb3a3a !important;
    position: absolute !important;
    left: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-weight: 900 !important;
    display: inline-block !important;
    line-height: 1 !important;
}

.alert-danger strong {
    color: #fb3a3a !important;
    font-weight: 600 !important;
    margin-right: 8px !important;
    display: inline !important;
}

.alert-success {
    background: linear-gradient(135deg, rgba(0, 194, 146, 0.15) 0%, rgba(0, 194, 146, 0.15) 100%) !important;
    border-left: 4px solid #00c292 !important;
    color: #ffffff !important;
}

.alert-success::before {
    content: '\f00c' !important;
    font-family: 'FontAwesome', 'Font Awesome 5 Free' !important;
    font-size: 20px !important;
    color: #00c292 !important;
    position: absolute !important;
    left: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-weight: 900 !important;
    display: inline-block !important;
    line-height: 1 !important;
}

.alert-success strong {
    color: #00c292 !important;
    font-weight: 600 !important;
    margin-right: 8px !important;
    display: inline !important;
}

.alert .close,
.alert button.close {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    section.login-register .login-box {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .white-box {
        padding: 20px;
        border-radius: 10px !important;
    }
    
    section.login-register {
        padding: 10px 0;
    }
}

@media (max-height: 700px) {
    section.login-register {
        align-items: flex-start;
        padding-top: 10px;
    }
}
