/* ===================== 基础重置 & 字体 ===================== */
* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

body {
  margin: 0;
  background: #040916;
  min-height: 100vh;
  color: #f8fafc;
}

/* ================= 页面整体 & 背景 ================= */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    linear-gradient(rgba(4, 10, 27, 0.66), rgba(4, 10, 27, 0.84)),
    url('/user/assets/img/denglu.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 36px 24px 32px;
}

.login-shell {
  width: min(calc(100% - 32px), 840px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.brand-logo-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 12px 28px rgba(2, 8, 23, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: clamp(28px, 4vw, 33px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-light {
  color: #ffffff;
}

.brand-blue {
  color: #1f6fff;
}

.hero-copy {
  text-align: center;
  margin-bottom: 26px;
}

.hero-title {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.04;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.78);
}

.login-card,
.register-card,
.auth-card,
.card {
  width: min(calc(100% - 24px), 392px);
  padding: 40px 20px 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(8, 17, 36, 0.92), rgba(7, 15, 31, 0.86));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 28px 80px rgba(1, 8, 25, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.title {
  display: none;
}

.subtitle {
  display: none;
}

.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border-radius: 12px;
  padding: 3px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.login-tabs .tab {
  flex: 1;
  min-height: 42px;
  padding: 0 12px;
  font-size: 15px;
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
  color: rgba(191, 203, 223, 0.86);
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.login-tabs .tab.active {
  background: linear-gradient(180deg, #1564ff 0%, #0f56df 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 12px 26px rgba(21, 100, 255, 0.35);
}

.login-tabs .tab:not(.active):hover {
  background: rgba(255,255,255,.04);
}

.tab-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .95;
}

.tab-icon-phone {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2e8f0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v2a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 3.1 2 2 0 0 1 4.11 1h2a2 2 0 0 1 2 1.72c.12.9.34 1.79.64 2.64a2 2 0 0 1-.45 2.11L7.1 8.9a16 16 0 0 0 6 6l1.43-1.2a2 2 0 0 1 2.11-.45c.85.3 1.74.52 2.64.64A2 2 0 0 1 22 16.92Z'/%3E%3C/svg%3E");
}

.tab-icon-email {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}

.login-tabs .tab.active .tab-icon-phone,
.login-tabs .tab.active .tab-icon-email {
  filter: brightness(1.2);
}

.input-group {
  background: rgba(13, 22, 41, 0.88);
  border-radius: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  transition: background .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
}

.input-group input {
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  width: 100%;
  font-size: 14px;
  line-height: 1;
}

.input-group:focus-within {
  background: rgba(14, 24, 46, 0.96);
  border-color: rgba(59, 130, 246, 0.66);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.input-group input::placeholder {
  color: rgba(148, 163, 184, 0.72);
}

.input-group:focus-within input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.input-group.phone-group {
  padding: 0 14px 0 0;
  display: flex;
  align-items: center;
  gap: 0;
}

.country-select {
  min-width: 78px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

.country-arrow {
  font-size: 10px;
  opacity: .9;
}

.phone-group input {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 0 0 12px;
  font-size: 14px;
  color: #fff;
  box-sizing: border-box;
}

.email-group,
.password-group {
  padding-left: 14px;
}

.email-group {
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.email-group input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  width: 100%;
  height: 46px;
  font-size: 14px;
  padding: 11px 0;
  margin: 0;
  box-sizing: border-box;
  align-self: center;
  display: block;
  line-height: 22px;
  vertical-align: middle;
}

.password-group::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-right: 10px;
  flex-shrink: 0;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6.5' y='10.5' width='11' height='8' rx='2'/%3E%3Cpath d='M8.5 10.5V8.7a3.5 3.5 0 1 1 7 0v1.8'/%3E%3C/svg%3E");
}

.phone-group::after {
  content: "";
  width: 0;
  height: 0;
}

.login-btn {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, #1564ff 0%, #0f56df 100%);
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 16px 30px rgba(21, 100, 255, 0.3);
}

.login-btn:hover {
  transform: translateY(-1px);
}

.login-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: rgba(148, 163, 184, 0.76);
  font-size: 11px;
}

.login-links-line {
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.16);
}

.login-links-text {
  white-space: nowrap;
}

.register-link-wrap {
  margin-top: 8px;
  text-align: center;
}

.register-link {
  font-size: 14px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

.register-link:hover {
  text-decoration: underline;
}

.feature-strip {
  width: min(100%, 644px);
  margin-top: 18px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(9, 17, 34, 0.92), rgba(7, 14, 28, 0.88));
  box-shadow: 0 26px 70px rgba(1, 8, 25, 0.34);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.feature-item {
  min-height: 88px;
  padding: 10px 9px 10px;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-item:last-child {
  border-right: none;
}

.feature-icon {
  width: 18px;
  height: 18px;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1564ff;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.feature-title {
  font-size: 7px;
  font-weight: 700;
  line-height: 1.25;
  color: #f8fafc;
  margin-bottom: 2px;
}

.feature-desc {
  font-size: 5.5px;
  line-height: 1.25;
  color: rgba(203, 213, 225, 0.72);
}

.secure-footer {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(203, 213, 225, 0.74);
  font-size: 11px;
}

.secure-footer-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(203, 213, 225, 0.78);
}

.secure-footer-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-error {
  margin: 6px 0 0;
  font-size: 14px;
  color: #ff4d4f;
  line-height: 1.4;
  display: none;
}

.input-error {
  border: 1px solid #ff4d4f !important;
  box-shadow: 0 0 0 1px rgba(255, 77, 79, 0.25);
}

@media (max-width: 480px) {
  .login-card,
  .register-card,
  .auth-card,
  .card {
    width: min(calc(100% - 16px), 392px);
    padding: 52px 18px 20px;
    border-radius: 22px;
  }

  .login-page {
    padding: 26px 18px 24px;
  }

  .login-brand {
    gap: 10px;
    margin-bottom: 14px;
  }

  .brand-logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .hero-copy {
    margin-bottom: 20px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .login-tabs .tab {
    min-height: 48px;
    font-size: 16px;
    gap: 8px;
  }

  .tab-icon {
    width: 18px;
    height: 18px;
  }

  .input-group,
  .input-group.phone-group {
    min-height: 56px;
  }

  .country-select {
    min-width: 86px;
    padding: 0 14px;
    font-size: 16px;
  }

  .phone-group input,
  .email-group input,
  .input-group input {
    font-size: 16px;
  }

  .email-group input {
    height: 56px;
    padding: 16px 0;
    line-height: 24px;
  }

  .remember-row {
    flex-wrap: wrap;
  }

  .login-btn {
    padding: 15px 14px;
    font-size: 18px;
  }

  .feature-item {
    min-height: 102px;
    padding: 12px 10px 11px;
  }

  .feature-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 20px;
    border-radius: 16px;
  }

  .feature-title {
    font-size: 8px;
    margin-bottom: 3px;
  }

  .feature-desc {
    font-size: 7px;
    line-height: 1.35;
  }

  .secure-footer {
    font-size: 10px;
    text-align: center;
  }
}

@media (max-width: 820px) {
  .feature-item {
    min-height: 112px;
    padding: 14px 12px 12px;
  }

  .feature-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
  }

  .feature-title {
    font-size: 9px;
  }

  .feature-desc {
    font-size: 7.5px;
    line-height: 1.35;
  }
}
