/* Reset and basic settings */
*, *:before, *:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Home Back Button */
.home-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.home-back-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.home-back-btn i {
    font-size: 16px;
    color: #d4af7a;
}

.home-back-btn span {
    color: #333;
}

/* 背景视频样式 */
#bgVideo {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    object-fit: cover;
}

body {
    font-family: 'Open Sans', Helvetica, Arial, sans-serif;
    background: #ededed;
}

input, button {
    border: none;
    outline: none;
    background: none;
    font-family: 'Open Sans', Helvetica, Arial, sans-serif;
}

.error-message {
    color: red;
    text-align: center;
    margin-top: 10px;
}

/* 
  Main container: 设置为 1000px x 600px，并通过负 margin 居中 
  margin-top: -300px (高度一半)， margin-left: -500px (宽度一半)
*/
.dowebok {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1000px;
    height: 600px;
    margin: -300px 0 0 -500px;
    background: rgb(255, 255, 255);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}


/* .dowebok {
    overflow: hidden;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1000px;
    height: 600px;
    margin: -300px 0 0 -500px;
    background: #fff;
} */

/* 
   表单区域 .form：这里宽度设置为 700px，高度 100% 
*/
.form {
    position: relative;
    width: 700px;
    height: 100%;
    transition: transform 0.6s ease-in-out;
    padding: 0 30px 0; /* 上下无固定 padding，左右仅留 30px */
}

/* 根据需要区分登录、注册顶部留白 */
.form.sign-in {
    padding-top: 14%;
}
.form.sign-up {
    padding-top: 8%;
}

/* Center form contents */
.form.sign-in form,
.form.sign-up form {
    
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 
  Sub container (右侧容器)
  left 与表单宽度对应 => 700px
  width 与外层容器一致 => 1000px
*/
.sub-cont {
    
    overflow: hidden;
    position: absolute;
    left: 700px;
    top: 0;
    width: 1000px;
    height: 100%;
    /* 下文 .img 宽度是 300px，这里可设置 padding-left: 300px */
    padding-left: 300px; 
    background: #fff;
    transition: transform 0.6s ease-in-out;
}
/* 
   切换时向左移动 .sub-cont => translate3d(-700px, 0, 0)
   因为表单宽度是 700px
*/
.dowebok.s--signup .sub-cont {
    transform: translate3d(-700px, 0, 0);
}

/* Sign-in transition */
.sign-in {
    transition-timing-function: ease-out;
}
.dowebok.s--signup .sign-in {
    transition-timing-function: ease-in-out;
    transition-duration: 0.6s;
    /* 登录表单向右平移 700px */
    transform: translate3d(700px, 0, 0);
}

/* 
   Sign-up transition
   让注册表单初始位置在 -1000px (父容器总宽度)
*/
.sign-up {
    border-radius: 20px;
    transform: translate3d(-1000px, 0, 0);
}
.dowebok.s--signup .sign-up {
    transform: translate3d(0, 0, 0);
}

/* 
  左侧图片区域 .img：宽度 300px，高度 100%
*/
.img {
    overflow: hidden;
    z-index: 2;
    position: absolute;
    left: 0;
    top: 0;
    width: 300px;
    height: 100%;
    padding-top: 360px;
}

/* 
  .img:before 覆盖整容器 => width: 1000px
*/
.img:before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 1000px;
    height: 100%;
    background-image: url('/assets/images/bg5.jpg');
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease-in-out;
}
.img:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}
/* 
   切换时移动 .img:before => translate3d(700px, 0, 0)
   与上面 .sub-cont 移动量一致 
*/
.dowebok.s--signup .img:before {
    transform: translate3d(700px, 0, 0);
}

/* Toggle text and buttons in the left image area */
.img__text {
    z-index: 2;
    position: absolute;
    left: 0;
    top: 50px;
    width: 100%;
    padding: 0 20px;
    text-align: center;
    color: #fff;
    transition: transform 0.6s ease-in-out;
}
.img__text h2 {
    margin-bottom: 10px;
    margin-top: 50px;
    font-weight: normal;
}
.img__text p {
    font-size: 14px;
    line-height: 1.5;
}
/* 
   这里维持原先 translateX(520px) 
   不必严格等比，只要两边对应即可
*/
.dowebok.s--signup .img__text.m--up {
    transform: translateX(520px);
}
.img__text.m--in {
    transform: translateX(-520px);
}
.dowebok.s--signup .img__text.m--in {
    transform: translateX(0);
}

.img__btn {
    overflow: hidden;
    z-index: 2;
    position: relative;
    width: 100px;
    height: 36px;
    margin: 0 auto;
    background: transparent;
    color: #fff;
    text-transform: uppercase;
    font-size: 15px;
    cursor: pointer;
}
.img__btn:after {
    content: '';
    z-index: 2;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border: 2px solid #fff;
    border-radius: 30px;
}
.img__btn span {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
}
.img__btn span.m--in {
    transform: translateY(-72px);
}
.dowebok.s--signup .img__btn span.m--in {
    transform: translateY(0);
}
.dowebok.s--signup .img__btn span.m--up {
    transform: translateY(72px);
}

/* Titles */
h2 {
    width: 100%;
    font-size: 26px;
    text-align: center;
    margin-bottom: 10px;
    
}

/* Labels and inputs */
label {
    width: 80%;
    margin-top: 20px;
    text-align: center;
}
label span {
    font-size: 12px;
    color: #ffffff;
    text-transform: uppercase;
}
input {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding-bottom: 5px;
    font-size: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    text-align: center;
}

/* Forgot password link */
.forgot-pass {
    margin-top: 15px;
    text-align: center;
    font-size: 12px;
    color: #ffffff;
}
.forgot-pass a {
    color: #fffdfd;
}

/* Buttons */
button.submit {
    display: block;
    width: 260px;
    height: 36px;
    border-radius: 30px;
    color: #fff;
    font-size: 15px;
    text-transform: uppercase;
    background: #d4af7a;
    margin: 25px auto auto auto;
    cursor: pointer;
}
button.submit:hover {
    background: #c9a06e;
}

/* Registration two-column layout */
.register-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}
.register-col {
    flex: 1;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Password eye icon */
.password-wrapper {
    position: relative;
    width: 100%;
}
.password-wrapper i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
}

/* Verification code container */
.verification-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 80%;
}

/* Password criteria & strength bar */
#passwordCriteria {
    width: 80%;
    margin: 10px auto;
    text-align: left;
    font-size: 0.9em;
}
#passwordCriteria p {
    margin: 4px 0;
}
.valid {
    color: green;
}
.invalid {
    color: red;
}
.valid:before {
    content: '✔ ';
    color: green;
}
.invalid:before {
    content: '✖ ';
    color: red;
}

#password-strength-container {
    width: 80%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 10px auto 15px auto;
    overflow: hidden;
}

#password-strength {
    height: 100%;
    width: 0;
    background-color: red;
    transition: width 0.3s;
}

button.verification-but {
    display: block;
    min-width: 20%;
    width: 25%;
    height: 13%;
    min-height: 10%;
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    padding: 2%;
    text-transform: uppercase;
    background: #d4af7a;
    cursor: pointer;
}
button.verification-but:hover {
    background: #c9a06e;
}

/* Responsive design for home back button */
@media (max-width: 768px) {
    .home-back-btn {
        top: 15px;
        left: 15px;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .home-back-btn i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .home-back-btn {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .home-back-btn i {
        font-size: 12px;
    }
    
    .home-back-btn span {
        display: none;
    }
}
