/* Wulin Saga — login screen (js/ui/login.js). Owned by core-client. */

.screen-login {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(18px, 4vh, 40px);
  padding: 24px 16px 84px;
  overflow-y: auto;
  background: radial-gradient(ellipse at 50% 60%, rgba(10, 4, 6, 0) 40%, rgba(10, 4, 6, 0.35) 100%);
}

/* --- Title block ------------------------------------------------------------------------------ */
.login-hero {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  animation: login-rise 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.login-title {
  position: relative; margin: 0;
  font-size: clamp(52px, 8.4vw, 104px); font-weight: 700; line-height: 1.12; letter-spacing: 4px;
  background: linear-gradient(180deg, #fff7da 0%, #f5d57e 36%, #cf9a33 60%, #8a5a18 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #3a0c06) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 26px rgba(255, 190, 90, 0.3));
}
.login-title::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, 0.85) 50%, transparent 62%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: login-shimmer 6s ease-in-out 1.2s infinite;
  pointer-events: none;
}
.login-seal {
  position: absolute; right: -44px; top: 6px;
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(8deg);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(135deg, #c8302a, #8e1a14);
  border: 2px solid #f2c7a0; border-radius: 6px;
  box-shadow: 0 0 0 2px #8e1a14, 0 4px 14px rgba(0, 0, 0, 0.55);
  animation: login-stamp 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 0.9s both;
}
.login-seal span {
  font-size: 20px; font-weight: 700; color: #fff0dc; letter-spacing: 1px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.login-sub {
  display: flex; align-items: center; gap: 14px; margin-top: 2px;
  font-size: clamp(14px, 1.6vw, 20px); font-weight: 500; letter-spacing: 10px; text-transform: uppercase;
  color: #f3dcae; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}
.login-sub span { margin-right: -10px; }
.login-sub .orn {
  width: clamp(40px, 7vw, 90px); height: 9px;
  background:
    radial-gradient(circle, #e8c46a 0 2.4px, transparent 3px) right center / 9px 9px no-repeat,
    linear-gradient(90deg, transparent, #e8c46a) left center / calc(100% - 10px) 1px no-repeat;
}
.login-sub .orn.r { transform: scaleX(-1); }
.login-tagline {
  margin-top: 10px; font-size: 14px; color: rgba(243, 230, 200, 0.85); letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* --- Login form ------------------------------------------------------------------------------- */
.win.login-panel {
  position: relative; flex: none;
  width: min(380px, calc(100vw - 32px));
  animation: login-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(150, 50, 25, 0.2), transparent 62%),
    linear-gradient(180deg, rgba(42, 24, 16, 0.94) 0%, rgba(22, 13, 8, 0.96) 100%);
  backdrop-filter: blur(3px);
}
.login-panel .win-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 18px; max-height: none; overflow: visible; }
.login-field input { width: 100%; font-size: 15px; min-height: 38px; }
.login-msg {
  min-height: 20px; font-size: 13px; line-height: 1.45; text-align: center;
  opacity: 0; transform: translateY(-2px); transition: opacity 0.2s, transform 0.2s;
}
.login-msg.show { opacity: 1; transform: none; }
.login-msg.error { color: #ff8f7f; }
.login-msg.info { color: var(--c-gold); }
.login-buttons { display: flex; gap: 10px; }
.login-buttons .btn { flex: 1 1 0; min-width: 0; padding-left: 10px; padding-right: 10px; font-size: 16px; }
.login-note { font-size: 11px; color: var(--c-muted); text-align: center; }
.login-panel.busy .login-buttons .btn-primary::after {
  content: ''; width: 14px; height: 14px; margin-left: 6px; border-radius: 50%;
  border: 2px solid rgba(255, 240, 200, 0.3); border-top-color: #fff0c8;
  animation: spin 0.8s linear infinite;
}

/* --- Footer ----------------------------------------------------------------------------------- */
.login-footer {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 16px 12px;
  background: linear-gradient(180deg, transparent, rgba(8, 3, 4, 0.7));
  pointer-events: none;
}
.login-tip { display: flex; align-items: center; gap: 8px; max-width: min(720px, 100%); font-size: 13px; color: rgba(243, 230, 200, 0.9); text-shadow: 0 1px 3px #000; }
.login-tip-label {
  flex: none; padding: 1px 8px; font-size: 11px; font-weight: 600; color: #2a1608;
  background: linear-gradient(180deg, #fff0b8, #e8c46a 50%, #a07a2a); border-radius: 2px;
}
.login-tip-text { opacity: 0; }
.login-tip-text.show { animation: login-tip 0.6s ease-out both; }
.login-meta { display: flex; align-items: center; gap: 16px; font-size: 11px; color: rgba(168, 151, 122, 0.85); }
.login-conn { display: inline-flex; align-items: center; gap: 5px; }
.login-conn .dot { width: 8px; height: 8px; border-radius: 50%; background: #9a3a30; box-shadow: 0 0 6px rgba(255, 90, 60, 0.6); }
.login-conn.online .dot { background: #5fbf4a; box-shadow: 0 0 6px rgba(120, 230, 90, 0.7); }

@keyframes login-rise { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes login-shimmer { 0%, 55% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
@keyframes login-stamp { from { opacity: 0; transform: rotate(8deg) scale(2.2); } to { opacity: 1; transform: rotate(8deg) scale(1); } }
@keyframes login-tip { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-height: 620px) {
  .screen-login { justify-content: flex-start; }
  .login-title { font-size: 48px; }
  .login-tagline { display: none; }
}
@media (max-width: 520px) {
  .login-seal { right: -8px; top: -28px; width: 46px; height: 46px; }
  .login-seal span { font-size: 16px; }
  .login-sub { letter-spacing: 6px; }
}
