/* ===== 登入頁：仿交友站門戶（全屏實景圖 + 右側註冊框） ===== */
#page-welcome {
  padding: 0 !important;
  min-height: 100vh;
  background: #123;
}
#page-welcome.active { display: block; }

.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  color: #fff;
  /* 實景背景：盡量少遮罩，讓照片清楚 */
  /* 實景背景：壓縮圖 + WebP 優先，加快首屏 */
  background-color: #1a3a6b;
  background-image: url("/assets/img/login-hero-opt.jpg");
  background-image: -webkit-image-set(
    url("/assets/img/login-hero.webp") type("image/webp"),
    url("/assets/img/login-hero-opt.jpg") type("image/jpeg")
  );
  background-image: image-set(
    url("/assets/img/login-hero.webp") type("image/webp"),
    url("/assets/img/login-hero-opt.jpg") type("image/jpeg")
  );
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
}

.gate::before {
  content: "";
  position: absolute;
  inset: 56px 0 0 0;
  background: linear-gradient(90deg, rgba(10,20,40,.28) 0%, rgba(10,20,40,.08) 45%, rgba(10,20,40,.35) 100%);
  pointer-events: none;
  z-index: 1;
}

.gate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  min-height: 56px;
  background: #1e5bb8;
  position: relative;
  z-index: 5;
}
.gate-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .14em;
  color: #fff;
  flex: 0 0 auto;
}
.gate-quick {
  display: none;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.gate-quick input {
  width: 140px;
  height: 32px;
  border: 1px solid #fff;
  border-radius: 3px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
  color: #222;
}
.gate-quick button {
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 3px;
  background: #0b4f9c;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.gate-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 28px 16px 32px;
  gap: 24px;
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 56px - 40px);
}

.gate-copy {
  padding: 12px 8px;
  text-shadow: 0 2px 12px rgba(0,0,0,.55);
}
.gate-copy h2 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.3;
  margin-bottom: 10px;
}
.gate-copy p {
  font-size: 15px;
  opacity: .95;
  line-height: 1.7;
}

.gate-card {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: rgba(45, 48, 55, .82);
  border-radius: 6px;
  padding: 20px 22px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.gate-card h3 {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #fff;
}
.gate-tabs {
  display: flex;
  margin: 0 -22px 14px;
  border-bottom: 1px solid rgba(255,255,255,.15);
  padding: 0 22px;
}
.gate-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.55);
  padding: 10px 0;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.gate-tabs button.on {
  color: #fff;
  border-bottom-color: #4da3ff;
}

.gate-card .field {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.gate-card .field label {
  font-size: 13px;
  color: #e8e8e8;
  font-weight: 600;
  margin: 0;
  text-align: right;
}
.gate-card .field input,
.gate-card .field select {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 3px;
  padding: 0 10px;
  background: #fff;
  color: #222;
  font-size: 14px;
}
.gate-card .field input:focus,
.gate-card .field select:focus {
  outline: 2px solid #7db7ff;
}
.gate-card .row2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.gate-card .row2 .field { margin-bottom: 10px; }

.gate-gender {
  display: flex;
  gap: 20px;
  align-items: center;
  min-height: 36px;
}
.gate-gender label {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  color: #fff !important;
  font-size: 14px !important;
  cursor: pointer;
  text-align: left !important;
  width: auto !important;
}
.gate-gender input {
  width: 15px !important;
  height: 15px !important;
  accent-color: #1e5bb8;
}

.btn-gate {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 8px;
  border: 0;
  border-radius: 4px;
  background: #2f7fe2;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .2em;
  cursor: pointer;
}
.btn-gate:hover { background: #1f6fd0; }

.gate-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.7);
  line-height: 1.5;
}
.gate-foot {
  text-align: center;
  padding: 12px 16px;
  font-size: 12px;
  color: #555;
  background: #fff;
  position: relative;
  z-index: 3;
}

@media (min-width: 960px) {
  .gate-top {
    min-height: 58px;
    padding: 0 28px;
  }
  .gate-brand {
    font-size: 26px;
    position: static;
    transform: none;
    left: auto;
  }
  .gate-quick {
    display: flex;
    margin-left: 0;
  }
  .gate::before { inset: 58px 0 48px 0; }
  .gate-main {
    grid-template-columns: 1fr 400px;
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    padding: 48px 40px;
    min-height: calc(100vh - 58px - 48px);
  }
  .gate-card {
    margin: 0;
    max-width: 380px;
    padding: 24px 26px 18px;
  }
  .gate-card .row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .gate-card .row2 .field {
    grid-template-columns: 1fr;
  }
  .gate-card .row2 .field label {
    text-align: left;
    margin-bottom: 4px;
  }
}

@media (max-width: 959px) {
  .gate-copy { display: none; }
  .gate::before {
    background: linear-gradient(180deg, rgba(10,20,40,.2) 0%, rgba(10,20,40,.45) 100%);
  }
  .gate-main {
    align-items: flex-end;
    padding-bottom: 36px;
  }
  .gate-card {
    background: rgba(35, 38, 46, .88);
  }
}
