<template>
  <div class="wrapper">
    <div class="screen">
      <div class="container">
        <div class="main">
          <div class="schoolIcon">
            <img src="../../../public/HangZhouIcon.png" alt="杭州电子信息技术职业学校">
            <span>杭州电子信息技术职业学校</span>
          </div>
          <div id="sign-in-p" class="page active max">
            <form>
              <h2>用户名</h2>
              <input class="entry" type="text" placeholder="用户名">
              <h2>密码</h2>
              <input class="entry" type="password" placeholder="密码">
              <input class="submit" type="submit" value="登录">
            </form>
            <div class="forgot">
              <a href="#"><h3>忘记密码？</h3></a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>

</script>

<style scoped lang="scss">
* {
  box-sizing: border-box;
}

.wrapper {
  height: 100%;
  width: 100%;
  opacity: .7;
  background: linear-gradient(225deg, rgba(65, 184, 131, 1) 0%, rgba(44, 0, 165, 1) 99%);
}

.screen {
  display: flex; /* 使用 flex 布局 */
  justify-content: center; /* 水平居中 */
  align-items: flex-start; /* 垂直居中 */
  height: 100vh;
}

.page {
  opacity: 0;
  width: 100%;
  max-width: 500px;
  padding-top: 10%;
  transition: .5s;
  overflow: hidden;
}

.page.active {
  opacity: 1;
  z-index: 10;
  transform: translateX(0);
}

#screen-right, #screen-left {
  background: white;
  height: 100vh;
  width: 100%;
  position: absolute;
  top: 0;
  transition: transform 0.3s ease;
}

.schoolIcon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px;
}

.schoolIcon span {
  font-size: 1.5em;
  margin-left: 10px;
}

.max {
  max-width: 500px;
}

#screen-right {
  right: 100%;
}

#screen-left {
  left: 100%;
}

.container {
  padding: 10% 5% 5% 5%;
}

.main {
  position: relative;
  width: 100%;
}

.forgot {
  border-top: 1px solid white;
  text-align: center;
  margin-top: 10%;
}

li, h2, h3 {
  color: white;
  font-family: Arial, Helvetica, sans-serif;
}

h2 {
  padding: 10px 0;
}

h3 {
  display: inline-block;
  padding-top: 25px;
}

li, h2 {
  text-transform: uppercase;
}

li {
  display: inline-block;
  margin-right: 20%;
  padding-bottom: .25em;
  font-size: 1.3em;
  position: relative;
}

li:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  border-bottom: 2px solid #FFFFFF;
  transition: 0.4s;
}

.sign-btn {
  cursor: pointer;
}

.sign-btn:hover:after {
  width: 100%;
}

.sign-btn.active:after {
  border-bottom: 3px solid #3366FF;
  width: 100%;
}

.page {
  opacity: 0;
  position: absolute;
  width: 100%;
  padding-top: 10%;
  transition: .5s;
  overflow: hidden;
}

#sign-in-p.active, #sign-up-p.active {
  opacity: 1;
  z-index: 10;
  transform: translateX(0);
}

#sign-in-p {
  transform: translateX(100%);
}

#sign-up-p {
  transform: translateX(-100%);
}

.entry {
  width: 100%;
  height: 2.3em;
  border-radius: 25px;
  padding-left: 1em;
}

.entry {
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0);
  transition: 0.6s;
}

.entry:focus {
  background-color: rgba(196, 182, 224, 0.6);
  border: 2px solid rgba(255, 255, 255, 1);
  outline: 0;
  transition: 0.6s;
}

.entry:hover {
  background-color: rgba(196, 182, 224, 0.6);
  transition: 0.6s;
}

.log-in-check {
  padding-left: 1%;
  cursor: pointer;
}

input[type="checkbox"]:checked {
  background-color: #1161ed;
}

.submit {
  width: 100%;
  border-radius: 25px;
  padding: .75em 0;
  margin-top: 10%;
  background-color: #1161ed;
  border: none;
  color: white;
  font-weight: bold;
  transition: .2s;
  cursor: pointer;
}

.submit:focus {
  outline: 0;
}

.submit:active {
  background-color: #0C49B3;
}
</style>
