body {
    background-color: #000;
    color: #e0e0e0;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

/* Override Bootstrap vh-100 for mobile compatibility */
.vh-100 {
    height: 100vh !important;
    height: 100dvh !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

.txt-custom {
    color: #d2e603;
}

.login-branding {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.login-branding img {
    max-width: clamp(10.3rem, 27.5vw, 20.6rem);
    height: auto;
}

.login-title {
    font-size: clamp(1.65rem, 4.4vw, 3.3rem);
    color: #d2e603;
    text-shadow:
        0 1px 0 rgba(140, 160, 15, 0.6),
        0 2px 0 rgba(112, 129, 12, 0.4),
        0 3px 6px rgba(0, 0, 0, 0.4);
    letter-spacing: 2px;
}

/* Larger branding on tablets / small laptops */
@media (min-width: 577px) and (max-width: 1000px) {
    .login-branding img {
        max-width: 18rem;
    }

    .login-title {
        font-size: 2.8rem;
    }
}

/* Larger branding on mobile */
@media (max-width: 576px) {
    .login-branding img {
        max-width: 14rem;
    }

    .login-title {
        font-size: 2.2rem;
    }
}

/* Background video */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
}

.video-background video.active {
    opacity: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Override Bootstrap btn-outline-success */
.btn-outline-success {
    color: #d2e603;
    border-color: #d2e603;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    color: #000;
    background-color: #d2e603;
    border-color: #d2e603;
}

.btn-outline-success:disabled,
.btn-outline-success.disabled,
.btn-outline-success:active {
    color: #d2e603 !important;
    border-color: #d2e603 !important;
    background-color: transparent !important;
}

.btn-outline-success .spinner-border {
    color: #d2e603;
}

.custom-login-btn {
    width: 300px;
    height: 40px;
    border: none;
    outline: none;
    color: rgb(211, 229, 7);
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 10px;
}

.custom-login-btn:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    background: linear-gradient(45deg,
        rgb(211, 229, 7),
        rgb(230, 245, 92),
        rgb(218, 238, 52),
        rgb(239, 240, 150),
        rgb(246, 235, 107),
        rgb(186, 211, 23),
        rgb(172, 194, 20),
        rgb(140, 160, 15),
        rgb(112, 129, 12),
        rgb(225, 200, 47),
        rgb(211, 229, 7)
    );
    background-size: 400%;
    z-index: -1;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    animation: glowing 20s linear infinite;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 2px;
}

.custom-login-btn:hover:before,
.custom-login-btn:focus:before {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgb(211, 229, 7)) drop-shadow(0 0 12px rgba(211, 229, 7, 0.6));
}

.custom-login-btn:active {
    color: #fff;
}

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

/* Shake animation for invalid fields */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%, 75% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
}

.shake {
    animation: shake 0.3s ease-in-out;
}

/* Password requirement hints */
.password-hints {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-hints li {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    padding: 1px 0;
}

.password-hints li::before {
    content: "\2022";
    margin-right: 6px;
}

/* Error toast styling */
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1055;
    background: transparent;
    border: 1px solid rgba(220, 53, 69, 0.6);
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.3);
    padding: 0.75rem 1.5rem 0.75rem 1rem;
    max-width: 340px;
}

.error-toast p {
    color: #dc3545;
    font-size: 0.85rem;
    margin: 0;
}

/* Hide default invalid-feedback */
.invalid-feedback {
    display: none !important;
}

/* Transparent form fields */
.form-control,
.input-group-text {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.3);
}

.input-group-text .bi {
    color: #d2e603;
}

.form-control {
    caret-color: #fff;
}

.form-control:focus {
    background-color: transparent !important;
    border-color: rgb(211, 229, 7);
    box-shadow: 0 0 0 0.2rem rgba(211, 229, 7, 0.25);
    caret-color: rgb(211, 229, 7);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Override browser autofill styling */
@keyframes autofillTransparent {
    to {
        background: transparent;
    }
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    animation: autofillTransparent 0s forwards;
}

@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}
