body {
    background: url("/image/pic/bg-login.png");
    padding-top: 0px;
    background-position: left;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    font-family: 'Prompt', sans-serif;
}

.background-login {
    display: flex;
    justify-content: end;
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.background-image {
    height: 100%;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
}

/* เพิ่ม Moon Glow Effect */
.moon-glow {
    position: absolute;
    top: 15%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 1;
    animation: pulse 8s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }

    100% {
        opacity: 0.4;
        transform: scale(1);
    }
}

/* เพิ่ม Floating Orbs */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    filter: blur(50px);
}

.orb-1 {
    width: 200px;
    height: 200px;
    background: rgba(255, 123, 76, 0.2);
    top: 20%;
    left: 10%;
    animation: float 15s infinite ease-in-out;
}

.orb-2 {
    width: 150px;
    height: 150px;
    background: rgba(250, 186, 137, 0.15);
    bottom: 20%;
    right: 15%;
    animation: float 12s infinite ease-in-out reverse;
}

@keyframes float {
    0% {
        transform: translate(0px, 0px);
    }

    25% {
        transform: translate(15px, -15px);
    }

    50% {
        transform: translate(0px, -30px);
    }

    75% {
        transform: translate(-15px, -15px);
    }

    100% {
        transform: translate(0px, 0px);
    }
}

.btn-theme {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, var(--theme) 0%, #faba89 100%);
    margin-top: 30px;
    border-radius: 50px;
    font-weight: 500;
    padding: 10px 20px;
    border: none;
    box-shadow: 0 10px 20px rgba(255, 123, 76, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-theme:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(255, 123, 76, 0.3);
}

.btn-theme:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px rgba(255, 123, 76, 0.2);
}

.btn-theme::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.btn-theme:hover::after {
    left: 100%;
}

@keyframes gentle-float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0);
    }
}

section {
    position: relative;
    z-index: 1;
    height: auto;
    min-height: 75vh;
    align-content: center;
    display: flex;
    align-items: center;
}

.light-effect,
.shadow-effect {
    position: relative;
}

.light-effect:before,
.shadow-effect:before,
.shadow-effect:after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 100%;
    filter: blur(90px);
}

.light-effect:before {
    left: 5%;
    top: -30px;
    height: 30%;
    width: 60%;
    background: var(--white);
}

.shadow-effect:before,
.shadow-effect:after {
    top: 30%;
    height: 20%;
    width: 40%;
    background: #333;
    opacity: 0.7;
}

.shadow-effect:before {
    left: -5px;
}

.shadow-effect:after {
    right: 15%;
}

/* form */
.card.login-page {
    min-height: 400px;
    width: 435px;
    max-width: 100%;
    padding: 40px 30px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transform: translateY(0);
    transition: all 0.4s ease;
}

.card.login-page:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.15);
}

.card.login-page h1 {
    padding-bottom: 20px;
    margin-bottom: 35px;
    position: relative;
    font-weight: 600;
    color: #333;
}

.card.login-page h1::before {
    content: "";
    position: absolute;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--theme), #faba89);
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 25px;
}

.login-usernamer,
.login-password {
    position: relative;
    margin-bottom: 5px;
}

.form-control {
    padding: 12px 15px 12px 45px;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-size: 15px;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(255, 123, 76, 0.2);
    border-color: var(--theme);
    background-color: white;
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.login-usernamer:before,
.login-password:before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    background: transparent;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.form-control:focus+.login-usernamer:before,
.form-control:focus+.login-password:before {
    opacity: 1;
}

.login-usernamer:before {
    background-image: url("../image/icon/user.png");
}

.login-password:before {
    background-image: url("../image/icon/password.png");
}

.text-danger {
    font-size: 0.8rem;
    display: block;
    margin-top: 5px;
    margin-left: 15px;
    transition: all 0.2s ease;
}

.footer-login {
    position: relative;
    z-index: 2;
    color: var(--white);
}

/* Link styles */
.text-decoration-underline {
    color: var(--theme);
    position: relative;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.2s;
}

.text-decoration-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--theme);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.text-decoration-underline:hover {
    color: var(--theme);
}

.text-decoration-underline:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Navbar improvements */
.navbar {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.logo {
    height: 45px;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Loading icon animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-icon img {
    animation: spin 1s linear infinite;
}

/*--------------------------------------------------------
    Start: Responsive View Google Chrome
----------------------------------------------------------*/
/* Nest Hub*/
@media (max-width: 1199px) {
    section {
        height: auto;
        min-height: 74vh;
    }

    .moon-glow,
    .orb-1,
    .orb-2 {
        opacity: 0.5;
    }
}

/* Surface Pro 7*/
@media (max-width: 991px) {
    .img-login {
        max-width: 450px;
        margin-bottom: 30px;
    }
}

/* other custom*/
@media (max-width: 991px) and (min-height: 1000px) {
    body::before {
        height: 50%;
    }

    .col-md-5,
    .col-md-7 {
        width: 100%;
    }

    .shadow-effect:before,
    .shadow-effect:after {
        display: none;
    }
}

/* iPad Pro*/
@media (max-width: 1024px) {
    .background-image {
        display: flex;
        justify-content: end;
        width: 50%;
        height: 100%;
        opacity: 0.7;
    }

    .col-md-5,
    .col-md-7 {
        width: 100%;
    }
}

/* iPad Mini*/
@media (max-width: 769px) {
    .card.login-page {
        padding: 30px 20px;
    }
}

/* Surface Duo*/
@media (max-width: 569px) {
    .background-image {
        display: flex;
        justify-content: end;
        width: 50%;
        opacity: 0.4;
    }

    .card.login-page {
        backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.85);
    }
}

/*iPhone 14 Pro Max*/
@media (max-width: 481px) {
    .img-login {
        max-width: 85%;
    }

    .orb-1,
    .orb-2 {
        display: none;
    }
}

/*iPhone SE*/
@media (max-width: 376px) {
    .card.login-page {
        min-height: 350px;
        padding: 25px 15px;
    }
}

/* Galaxy Fold 5*/
@media (max-width: 345px) {
    .card.login-page h1 {
        font-size: 1.5rem;
    }
}

/* สไตล์สำหรับข้อความแจ้งเตือน */
.text-warning {
    color: #ff6a00 !important;
}

/* Lockout timer */
.lockout-timer {
    padding: 10px;
    background-color: rgba(255, 106, 0, 0.1);
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    color: #ff6a00;
    margin-top: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#lockout-countdown {
    font-weight: bold;
    font-family: monospace;
    font-size: 1.1em;
    background-color: rgba(255, 106, 0, 0.15);
    padding: 3px 8px;
    border-radius: 4px;
    margin: 0 5px;
}

/* ปรับปรุง animation สั่นให้ชัดเจนขึ้น */
@keyframes shake {
    0%, 100% {transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateX(-5px);}
    20%, 40%, 60%, 80% {transform: translateX(5px);}
}

.shake {
    animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ปรับแต่งปุ่มแจ้งเตือน */
.btn-warning {
    background-color: #ff6a00;
    border-color: #ff6a00;
    color: white;
}

.btn-warning:hover {
    background-color: #e65c00;
    border-color: #e65c00;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.login-error i {
    margin-right: 5px;
}

/*--------------------------------------------------------
    End: Responsive
----------------------------------------------------------*/
