/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: url('https://snowkap.com/wp-content/uploads/2023/11/view-green-forest-trees-with-co2-1024x499.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

/* Create an overlay to lighten the background */
body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.166);
    /* สว่างขึ้นด้วยสีขาวที่โปร่งใส */
    filter: blur(8px);
    /* เบลอภาพพื้นหลัง */
    pointer-events: none;
    /* ทำให้ไม่รบกวนการคลิก */
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 500px;
    /* เพิ่มขนาดการ์ด */
    height: 600px;
    /* ตั้งค่าความสูงการ์ดให้เหมาะสม */
    perspective: 1000px;
    /* For the 3D effect */
}

/* Card Styling (for the flip effect) */
.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}


/* Front Side (Login Form) */
.card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: rgba(252, 252, 252, 0.2);
    /* โปร่งใส */
    backdrop-filter: blur(15px);
    /* เอฟเฟกต์เบลอ */
    text-align: center;
    z-index: 1;
    /* ใส่ให้เป็นลำดับเหนือด้านหลัง */
    transition: background-color 0.3s, backdrop-filter 0.3s;
}

/* Back Side (Register Form) */
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    /* ซ่อนด้านหน้าเมื่อพลิก */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: rgba(252, 252, 252, 0.2);
    /* สีขาวโปร่งใส */
    text-align: center;
    backdrop-filter: blur(15px);
    /* เอฟเฟกต์เบลอ */
    transform: rotateY(180deg);
    /* พลิกด้านหลัง */
    z-index: 0;
    /* ด้านหลังต้องมี z-index น้อยกว่า */
}



/* Back Side (Register Form) */
.card-back {
    transform: rotateY(180deg);
    /* Rotate the back side 180 degrees */
}

/* Heading */
h1 {
    background-image: url('https://snowkap.com/wp-content/uploads/2023/11/view-green-forest-trees-with-co2-1024x499.jpg');
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    font-weight: 700;
    font-size: 50px;
    /* เพิ่มความหนาของตัวอักษร */

}


/* Form Styling */
.form-group {
    margin-bottom: 15px;
    text-align: left;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input:focus {
    /* border-color: #397bff; */
    outline: solid #b5edba;
    border-radius: 4px;
}

.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    flex: 1;
    padding-right: 40px;
    /* เพิ่มพื้นที่สำหรับไอคอน */
}

.password-container i {
    position: absolute;
    right: 10px;
    cursor: pointer;
    color: #081506;
    font-size: 18px;
}

.password-container i:hover {
    color: #0e6e21;
}


.toggle-password:hover {
    text-decoration: underline;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border: 0;
    position: relative;
    overflow: hidden;
    border-radius: 10rem;
    transition: all 0.02s;
    font-weight: bold;
    cursor: pointer;
    color: #b4ba47;
    z-index: 0;
    box-shadow: 0 0px 7px -5px rgba(0, 0, 0, 0.5);
}

.button:hover {
    background: rgb(228, 255, 237);
    color: #093713;
}

.button:active {
    transform: scale(0.97);
}

.hoverEffect {
    position: absolute;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hoverEffect div {
    background: #2b25ce;
    background: linear-gradient(90deg,
            #25b8ce 0%,
            #20b440 45%,
            #f8ff71 100%);
    border-radius: 40rem;
    width: 10rem;
    height: 10rem;
    transition: 0.5s;
    filter: blur(20px);
    animation: effect infinite 4.5s linear;
    opacity: 0.5;
}

.button:hover .hoverEffect div {
    width: 8rem;
    height: 8rem;
}

@keyframes effect {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.reset-password-form h1 {
    background-image: url('https://snowkap.com/wp-content/uploads/2023/11/view-green-forest-trees-with-co2-1024x499.jpg');
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    font-weight: 700;
    font-size: 40px;
    margin-bottom: 20px;
}

.reset-password-form {
    display: none;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    border-radius: 8px;
    background-color: rgba(252, 252, 252, 0.2);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.reset-password-form #back-to-login {
    color: #fafbfc;
    text-decoration: none;
    font-size: 14px;
    margin-top: 15px;
    display: inline-block;
}

.reset-password-form #back-to-login:hover {
    text-decoration: underline;
}

.reset-password-form .error {
    margin-top: 15px;
    color: #ff4d4d;
    font-size: 14px;
    /* background-color: rgba(255, 255, 255, 0.8); */
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.reset-password-form input:focus {
    outline: solid #b5edba;
    border-color: #b5edba;
}

.reset-password-form .button {
    width: 100%;
    /* ปรับความกว้างเต็มพื้นที่ */
    max-width: 300px;
    /* จำกัดความกว้างสูงสุด */
    margin: 20px auto;
    /* จัดให้อยู่กึ่งกลาง */
}

.reset-password-form {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.toggle-link {
    margin-top: 15px;
    font-size: 14px;
    color: #555;
    font-weight: normal;
    /* ตัวอักษรธรรมดา */
}

.toggle-link a {
    color: #1a75d6;
    text-decoration: none;
    /* ลบขีดเส้นใต้จากลิงก์ */
    font-weight: normal;
}

.toggle-link a:hover {
    text-decoration: underline;
    /* เพิ่มขีดเส้นใต้เมื่อ Hover */
}

.reset-password-form {
    display: none;
    /* By default, hide the reset form */
}


/* Error Message */
.error {
    margin-top: 15px;
    color: rgb(255, 255, 255);
    font-size: 14px;
    background-color: #dddddd00;
    padding: 10px;
    border-radius: 4px;
    text-align: left;
}

