/* 全局基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

/* 页面基础布局 */
html, body {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* 禁止整个页面的滚动 */
}

body {
  color: #333;
  background: #f5f7fa;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* 背景置底 */
  background: linear-gradient(to bottom, #f0f9ff, #d0e8ff);
  background-size: cover;
  background-repeat: no-repeat;
}

/* 顶部导航 */
nav {
  background: #00bcd4;
  color: white;
  padding: 5px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.8;
}

.nav-links {
  flex-wrap: wrap;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
}

.nav-right a {
  white-space: nowrap;
}

.logo {
  font-size: 22px;
  font-weight: bold;
  margin-right: 30px;
  color: white;
}

/* 页脚 */
footer {
  width: 100%;
  flex-shrink: 0; /* 防止页脚被压缩 */
  text-align: center;
  padding: 10px;
  background: #eeeeee;
  font-size: 0.9em;
  color: #555;
}

main {
  flex: 1; /* 主体自动撑开 */
  display: flex;
  min-height: 0; /* 允许内容区域压缩，避免溢出 */
  flex-direction: column;
}

/* 主体居中容器 */
.container {
  flex: 1;                  /* 占据父容器剩余空间 */
  display: flex;            /* 启用 Flex 布局 */
  flex-direction: column;  /* 垂直排列子元素 */
  justify-content: center; /* 垂直居中 */
  align-items: center;     /* 水平居中 */
  overflow-y: auto;        /* 内容超出时允许垂直滚动 */
  text-align: center;      /* 文本居中 */
  min-height: 0; /* 允许内容区域压缩，避免溢出 */
}

/* 保证页面内容区域滚动 */
.content-wrapper {
  max-width: 400px; /* 限制内容区域的最大宽度，避免大屏幕时内容过宽影响阅读 */
  min-width: 350px; /* 限制内容区域的最大宽度，避免大屏幕时内容过宽影响阅读 */
  margin: 20 auto; /* 左右自动外边距，让内容在水平方向居中 */
  padding: 20px 20px; /* 内边距，上下 40px，左右 20px，避免内容紧贴边界 */
  text-align: center; /* 将内容（文字、标题等）水平居中对齐 */
}

.content-wrapper h2 {
  text-align: center;
  color: #00796b;
}

/* 输入框 */
.content-wrapper input,
.input-field {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1em;
  box-sizing: border-box;
  background-color: white;
}

/* select 样式 */
select.input-field {
  appearance: none;
  background: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center;
  background-size: 16px;
  padding-right: 40px;
}

select.input-field option[disabled] {
  color: #999;
}

input::placeholder {
  color: #999;
}

/* 验证码行 */
.verify-row {
  display: flex;
  gap: 10px;
}

.verify-row input {
  flex: 2;
}

.verify-row button {
  flex: 1;
  background-color: #ccc;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* 主按钮 */
.container button.primary {
  width: 100%;
  padding: 12px;
  background-color: #00796b;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  margin-top: 10px;
}

.container button.primary:hover {
  background-color: #004d40;
}

/* 额外链接 */
.switch-link, .method-toggle {
  text-align: center;
  margin-top: 12px;
  font-size: 0.9em;
}

.switch-link a, .method-toggle a {
  color: #00796b;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
}

.hidden {
  display: none;
}

/* 辅助表单区域 */
.form-aux {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9em;
  margin-top: 10px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
}

.form-aux a {
  color: #00796b;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: bold;
}

.form-aux a:hover {
  color: #007bff;
}

/* 忘记密码、保持登录部分 */
.form-aux {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9em;
  margin-top: 10px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 5px; /* 控制复选框与文字的间距 */
  white-space: nowrap; /* 防止文字换行 */ 
}

.remember-me input[type="checkbox"] {
  width: 16px;           /* 与文字高度接近 */
  height: 16px;
  margin: 0;             /* 移除默认外边距 */
  vertical-align: middle;
}

.form-aux a {
  color: #00796b;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: bold; /* 加粗文字 */
}

.form-aux a:hover {
  color: #007bff;
}
/* 忘记密码、保持登录部分 */

.input-field {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 5px;       /* 去掉圆角，方形 */
  border: 1px solid #ccc;
  font-size: 1em;
  box-sizing: border-box;
  background-color: white;
}

select.input-field {
  appearance: none;
  background: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center;
  background-size: 16px;
  padding-right: 40px;
}

/* select 默认提示颜色 */
select.input-field option[disabled] {
  color: #999;   /* 让“安全问题：”的颜色一致 */
}

/* 输入框 placeholder 颜色 */
input::placeholder {
  color: #999;   /* 和用户名的 placeholder 相同 */
}

/* === 操作按钮统一样式 === */
.action-btn {
  width: 100px;                  /* 统一宽度 */
  height: 45px;                  /* 固定高度 */
  line-height: 20px;             /* 统一行高 */
  font-size: 16px;               /* 统一字体大小 */
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;           /* 防止按钮文字换行 */
  transition: background 0.3s ease;

  /* ✅ 关键：按钮文字水平垂直居中 */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* === 按钮行容器 === */
.button-row {
  display: flex;
  justify-content: space-between; /* 两端对齐：一个在最左，一个在最右 */
  gap: 10px;                      /* 按钮之间的间距 */
  margin-top: 10px;               /* 按钮行与输入框的间距 */
}

/* === 主要按钮（绿色） === */
.but1 {
  background-color: #00796b;
  color: white;
}
.but1:hover {
  background-color: #004d40;
}

/* === 退出按钮（红色） === */
.but2 {
  background-color: #e53935;
  color: white;
}
.but2:hover {
  background-color: #c62828;
}


.icp-link {
  color: inherit;          /* 和前面的文字一样颜色 */
  text-decoration: none;   /* 去掉默认的下划线 */
  transition: color 0.3s;  /* 平滑过渡效果，可选 */
}
 
.icp-link:hover {
  color: blue;             /* 鼠标悬停时变蓝色 */
  text-decoration: underline; /* 鼠标悬停时出现下划线 */
}
