* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
}

body {
  width: 100%;
  height: 100%;
  display: flex;
}

.navbar {
  width: 100%;
  height: 40px;
  background-color: #fee16b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

.navbar a {
  text-decoration: none;
  color: black;
  font-size: 20px;
  line-height: 40px;
  margin-left: 20px;
  display: block;
}
.navbar ul {
  display: flex;
  flex-direction: row;
  list-style-type: none;
}

.left-side {
  background-color: #fff3c4;
  flex: 1;
  /* 以下为新增样式：让左侧内容居中 */
  display: flex; /* 启用flex布局 */
  flex-direction: column; /* 子元素垂直排列 */
  justify-content: center; /* 垂直方向居中 */
  align-items: center; /* 水平方向居中 */
  padding: 20px; /* 增加内边距，避免内容贴边 */
  text-align: center; /* 文本水平居中（针对文字元素） */
}

.login-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 25px;
  margin: 0 auto;
}
.cats {
  font-size: 0; /*消除img标签之间的空隙*/
  display: flex;
  margin-top: 70px;
  margin-bottom: 50px; /* 增加上下间距，让布局更透气 */
}

.gif-wrap {
  position: relative;
  cursor: pointer;
}

.static {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}
.gif-wrap:hover .static {
  opacity: 1;
}

/* 右侧：图片悬停变GIF */
.gif-wrap:hover #gif {
  opacity: 1;
}

#gif {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}
.login-container form label {
  font-size: 20px;
}
.login-container form input {
  font-size: 18px;
  padding: 8px;
  margin: 10px 0;
  width: 220px;
  min-width: 350px;
  height: 48px;
  border-radius: 8px;
  border-color: #e0e0e0;
  background-color: #f5f5f5;
}
.login-container form input:focus {
  border-color: #ffe6e6;
  background-color: #ffffff;
}
.login-container form input:hover {
  border-color: #ffe6e6;
  background-color: #ffffff;
}
.login-container form input:active {
  border-color: #8b5a2b;
  background-color: #ffd9d9;
}
.login-container form button {
  font-size: 20px;
  padding: 10px 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  width: 340px;
  height: 50px;
  border-radius: 8px;
  border: none;
  background-color: #ffa2a2;
  color: white;
  cursor: pointer;
}
svg {
  width: 70px;
  height: 50px;
  margin-right: 10px;
}
/* 让输入框和猫爪图标垂直居中对齐 */
.input-group {
  display: flex;
  align-items: center;
  width: 220px;
  margin: auto; /* 让输入框组水平居中 */
}

#gif,
#png {
  width: 200px;
  height: 200px;
}
.left-side a h1 {
  font-family: "Times New Roman", Times, sans-serif;
  font-size: 180px;
  font-weight: bold;
  color: #ffaaaa;
  margin-bottom: 20px;
  text-shadow: 5px 5px 5px white;
  text-align: center;
  line-height: 1;
  letter-spacing: -2px;
  word-spacing: 2px;
  text-transform: uppercase;
  text-decoration: underline;
}

.left-side a h1:hover {
  color: #ff7777;
  text-shadow: 8px 8px 8px white;
}
.login-container h1 {
  font-family: "Lucida Console", Monaco, monospace;
}
/* 媒体查询写在所有基础样式之后，确保规则能覆盖基础样式 */
@media screen and (max-width: 768px) {
  .left-side {
    display: none; /* 小屏时隐藏左侧 */
  }
  .login-container {
    flex: none; /* 取消flex占比，避免继承大屏的flex:1 */
    width: 100%; /* 小屏时右侧占满宽度 */
    padding: 0 20px; /* 增加左右内边距，避免内容贴边 */
  }
  /* 额外优化：小屏时输入框不溢出屏幕 */
  .login-container form input {
    min-width: auto; /* 取消最小宽度限制 */
    width: 100%; /* 输入框占满父容器宽度 */
  }
  /* 额外优化：小屏时按钮宽度适配 */
  .login-container form button {
    width: 100%; /* 按钮占满父容器宽度 */
  }
  /* 额外优化：小屏时左侧标题（若误显）字体适配 */
  .left-side a h1 {
    font-size: 80px; /* 缩小字体，避免溢出 */
  }
}
