@import url('https://fonts.loli.net/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  padding: 0;
  margin: 0;
  outline: none;
  border: none;
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
}

body {
  background-image: url('https://pic1.imgdb.cn/item/6803aa4458cb8da5c8b6c7fc.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;

  padding-bottom: 30px;
}

body::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: -1;
}

#split-form {
  position: relative;             /* 建立定位上下文 */
  display: flex;
  flex-direction: column;
  align-items: center;

  background-color: transparent;  /* 主元素不直接绘制背景 */
  width: 90%;
  max-width: 700px;
  padding: 50px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.329);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.13);
  overflow: hidden;
  transform: translateZ(0);
}

#split-form::before {
  content: "";
  position: absolute;
  inset: 0;                        
  z-index: -1;                     
  background-color: rgba(255, 255, 255, 0.1); 
  border-radius: inherit;        
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);

  /* will-change: backdrop-filter; */
}

h1 {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 20px;
  text-align: center;
  opacity: 1;
}

.reg {
  font-size: 1rem;
  color: white;
  margin-bottom: 30px;
  text-align: center;
  opacity: 1;
}

.input-wrap {
  border: 1px solid white;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  height: 60px;
  width: 90%;
  border-radius: 50px;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.459);
  opacity: 1;
}

input {
  background-color: transparent;
  font-size: 1rem;
  color: white;
  padding: 0 25px;
  flex: 1;
}

input::placeholder {
  color: white;
}

button {
  font-size: 1rem;
  height: 60px;
  width: 100%;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-top: 15px;
  cursor: pointer;
  background-color: transparent;
  border: 1px solid white;
  color: white;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.459);
  opacity: 1;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

/* 去掉按钮渐变效果 */
button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.custom-file-button {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  height: 60px;
  width: 90%;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 20px;
  cursor: pointer;
  background-color: transparent;
  border: 1px solid white;
  color: white;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.459);
  opacity: 1;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.custom-file-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.custom-button {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  height: 60px;
  width: 90%;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 20px;
  cursor: pointer;
  background-color: transparent;
  border: 1px solid white;
  color: white;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.459);
  opacity: 1;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.custom-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

button:active,
.custom-button:active,
.custom-file-button:active {
  background-color: rgba(255, 255, 255, 0.35);
  transform: scale(0.96);
}

/* 移除 input[type=number] 的上下箭头（spinner） */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield; /* Firefox */
}

.result-panel {
  margin-top: 10px;
  width: 100%;
  padding: 100px;
  border-radius: 15px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.329);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.13);
  color: white;
}

.result-panel ul {
  list-style: none;
  padding: 0;
}

.result-panel li {
  margin-bottom: 10px;
}

.result-panel a {
  color: white;
  text-decoration: underline;
}

.result-panel button {
  display: block;
  margin: 20px auto 0 auto;
  width: 200px;
}

#splitForm {
  width: 75%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#custom-footer {
  width: 100%;
  padding: 10px 20px;
  background-color: rgba(80, 80, 80, 0.6);
  color: whitesmoke;
  font-size: 14px;
  text-align: center;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 999;
  backdrop-filter: blur(5px); 
}

#custom-footer a {
  color: whitesmoke;
  text-decoration: none;
}

#custom-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 767px) {
  body {
    padding: 30px 15px; 
    justify-content: flex-start;
    align-items: flex-start;
    height: auto;
    min-height: 100vh;
  }

  #split-form {
    width: 100%;
    max-width: 100%;
    padding: 25px 20px;
    border-radius: 20px;
    margin-top: 95px;
    margin-bottom: 20px;
  }

  .custom-file-button,
  .custom-button {
    font-size: 0.95rem;
    height: 55px;
    border-radius: 25px;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, transform 0.1s ease;
  }

  .custom-button:hover,
  .custom-file-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
  }

  .custom-button:active,
  .custom-file-button:active {
    background-color: rgba(255, 255, 255, 0.35);
    transform: scale(0.96);
  }

  .input-wrap {
    height: 55px;
    border-radius: 25px;
  }

  input {
    font-size: 0.95rem;
    padding: 0 18px;
  }

  h1 {
    font-size: 1.6rem;
    margin-bottom: 15px;
  }

  .reg {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
}

#custom-alert {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(50, 50, 50, 0.9);
  color: white;
  padding: 15px 25px;
  border-radius: 12px;
  font-size: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: top 0.4s ease;
  pointer-events: none;
}

#custom-alert.show {
  top: 20px;
}

#custom-alert.hide {
  top: -100px;
}
