/* 基础样式 */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    height: 100%;
    background-color: #9A3476;
}

/* 顶部导航栏样式 */
.navbar-top {
    height: 150px;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: flex-start;
    margin-bottom:50px;
}

.navbar-top img {
    width: 550px;
    height: 100%;
    object-fit: contain;
}

/* 底部导航栏样式 */
.navbar-bottom {
    height: 150px;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    margin-top:50px;
}

.navbar-bottom img {
    height: 100%;
    object-fit: fill;
}

.vericodediv{
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.vericodeimg{
    height: 80%;
    text-align: center;
    justify-content: center;

}

/* 警告框样式 */
.alert-box {
    display: none;
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f44336;
    color: white;
    padding: 15px;
    border-radius: 8px;
    z-index: 9999;
    font-size: 1rem;
    text-align: center;
    width: 80%;
    max-width: 400px;
}

.alert-box button {
    background-color: #fff;
    color: #f44336;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.alert-box button:hover {
    background-color: #f1f1f1;
}


/* 主体内容容器，使用flex布局 */
.main-content {
    display: flex;
    align-items: center;
    justify-content: space-between;  /* 使左中右三个区域紧挨着 */
    padding: 0 10px; /* 添加左右间距，使得布局更加居中 */
}

/* 左侧图片区域 */
.side-image {
    flex: 1; /* 左右图片区域占用剩余空间 */
    height: 100%;
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.side-image.left {
    background-color: #9A3476;
    text-align: center;
    align-items: center;
}

.side-image.right {
    background-color: #9A3476;
    text-align: center;
    align-items: center;
}

.side-image img {
    width: 25%;
    height: 100%;
}

/* 登录框样式 */
.login-box {
    flex: 1; /* 登录框空间 */
    background-color: rgba(255, 255, 255, 0.6);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: slideIn 0.5s ease-in-out;
}

/* 登录框标题 */
.login-box-img {
    font-size: 16px;
    color: #333;
    text-align: center;
}

.login-box-img img{
    text-align: center;
    width: 95%;
    height: auto;
    object-fit: fill;
}

.login-box-img h2{
    text-align: center;
    margin:0;
    color:white;
}

/* 登陆表单样式 */
form{
    margin-top:20px;
}

/* 输入框样式 */
.input-container {
    width: 100%;
    margin-bottom: 20px;
}
.input-container:hover .input-tooltip {
    opacity: 1;
    visibility: visible;
}

label {
    display: block;
    font-size: 21px;
    margin-bottom: 5px;
    color: white;
}

input[type="text"], input[type="password"] {
    width: 99.5%;
    padding-top: 12px;
    padding-bottom: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
    text-align: center;
}

/* 输入框聚焦效果 */
input[type="text"]:focus, input[type="password"]:focus {
    border-color: #007BFF;
    outline: none;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
}

/* 按钮样式 */
button {
    width: 25%;
    padding: 12px;
    background-color: #9A3476;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #8D1D67;
}

/* 注册按钮样式 */
.register-link {
    text-align: center;
    margin-top: 15px;
}

.register-label {
    text-align: center;
    margin-top: 15px;
}

.register-label label{
    color:black;
    font-size:16px;
}

.register-link button {
    background-color: #9A3476;
    border-radius: 5px;
}

.register-link button:hover {
    background-color: #8D1D67;
}

.center-button {
    text-align: center;
    width: 100%;
}


/* 自适应调整：屏幕宽度小于768px时 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        height: auto; /* 自动调整高度 */
    }

    .side-image img{
        display: none; /* 隐藏左右图片区域 */
    }

    .login-box {
        margin-top: 20px;
    }
    .navbar-top img{
        display: none; /* 隐藏导航栏区域 */
    }
    .navbar-bottom img{
        display: none; /* 隐藏导航栏区域 */
    }
}

/* 自适应调整：屏幕宽度小于480px时 */
@media (max-width: 480px) {
    h2 {
        font-size: 22px;
    }

    input[type="text"], input[type="password"], button {
        padding: 10px;
    }
}

/* 包裹每个输入项，用于定位 tooltip */
.input-container {
    position: relative;
    display: block;
    margin-bottom: 16px;
}

/* 浮动提示样式 */
.input-tooltip {
    position: absolute;
    top: -42px;
    left: 0;
    background-color: #000;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.input-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 12px;
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #000 transparent transparent transparent;
}

/* 显示时的类 */
.input-tooltip.show {
    opacity: 1;
    visibility: visible;
}

/* 保持原有 .vericodediv 布局不变 */
.vericodediv {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vericodediv input {
    flex: 1;
}
.vericodeimg {
    height: 36px;
    cursor: pointer;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-content {
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.popup-content button {
    margin-top: 10px;
    padding: 6px 16px;
    background-color: #af4d8d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.popup-content button:hover {
    background-color: #9A3476;
}

#popup-message {
  display: block;
  text-align: left;
  width: 100%;
  padding: 0 20px;
  line-height: 1.5;
}


.input-with-icon {
        position: relative;
    }

.input-with-icon .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    color: #6c757d;
    transition: color 0.2s;
}
.input-with-icon .toggle-password:hover {
    color: #007bff;
}