/* ===== 會員登入頁 ===== */

.login-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* left hero */
.login-hero {
  flex: 1.15;
  position: relative;
  min-width: 0;
  display: none;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 880px) {
  .login-hero {
    display: block;
  }
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(106, 229, 209, 0.06) 0 2px, transparent 2px 22px);
  background-color: #0c0f22;
}

.login-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 18% 12%, rgba(106, 229, 209, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(10, 12, 25, 0) 35%, rgba(10, 12, 25, 0.92) 100%);
}

.login-hero-logo {
  position: absolute;
  top: 48px;
  left: 52px;
  z-index: 1;
}

.login-hero-copy {
  position: absolute;
  left: 52px;
  bottom: 64px;
  right: 52px;
  z-index: 1;
}

.login-hero-kicker {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 18px;
}

.login-hero-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.32;
  text-wrap: balance;
  margin: 0;
}

.login-hero-sub {
  margin-top: 20px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.8;
  max-width: 440px;
}

.login-hero-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.3);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 1;
}

/* right form panel */
.login-panel {
  width: 560px;
  max-width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 64px;
}

.login-form-wrap {
  width: 100%;
  max-width: 380px;
}

.login-form-wrap .logo {
  margin-bottom: 44px;
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
}

.login-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 34px;
}

.login-field {
  margin-bottom: 20px;
}

.login-captcha-row {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}

.login-captcha-row .input {
  flex: 1;
  min-width: 0;
}

.captcha-box {
  width: 124px;
  height: 46px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #141832, #0e1126);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: relative;
  overflow: hidden;
}

img.captcha-box {
  display: block;
  padding: 0;
  border: none;
  background: none;
  object-fit: fill;
}

.captcha-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-50deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 11px);
}

.captcha-box span {
  display: inline-block;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 25px;
  position: relative;
  z-index: 1;
}

.login-submit {
  width: 100%;
  padding: 14px;
}

.login-forgot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 18px 0 0;
}

.login-forgot a,
.login-forgot .link-button {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.link-button:hover {
  color: #fff;
}

.login-note {
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(106, 229, 209, 0.06);
  border: 1px solid rgba(106, 229, 209, 0.18);
  border-radius: 9px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
}

.login-note strong {
  color: var(--accent);
}

.login-guest {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.login-guest a {
  font-size: 14px;
  color: var(--accent);
  border-bottom: 1px solid rgba(106, 229, 209, 0.4);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

.login-guest a:hover {
  color: #fff;
  border-color: #fff;
}

/* ===== Alert Modal ===== */

.alert-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.alert-modal[hidden] {
  display: none;
}

.alert-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 25, 0.72);
  backdrop-filter: blur(4px);
}

.alert-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 28px 28px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, #141832, #0e1126);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.alert-modal__title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.alert-modal__body {
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
  word-break: break-word;
}

.alert-modal__body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.alert-modal__body a:hover {
  color: #fff;
}

.alert-modal__ok {
  width: 100%;
  padding: 12px;
}

body.alert-modal-open {
  overflow: hidden;
}

/* ===== Forgot Password Modal ===== */

.forgot-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.forgot-modal[hidden] {
  display: none;
}

.forgot-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 25, 0.72);
  backdrop-filter: blur(4px);
}

.forgot-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 28px 28px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, #141832, #0e1126);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.forgot-modal__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.forgot-modal__desc {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.forgot-modal__step[hidden] {
  display: none;
}

.forgot-modal__hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.forgot-modal__actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.forgot-modal__actions .btn {
  flex: 1;
}

.forgot-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.forgot-modal__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.forgot-modal__email-display {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  word-break: break-all;
}

body.forgot-modal-open {
  overflow: hidden;
}

body.forgot-modal-open .alert-modal {
  z-index: 1200;
}

.forgot-modal__error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 100, 100, 0.12);
  border: 1px solid rgba(255, 100, 100, 0.35);
  color: #ffb4b4;
  font-size: 13px;
  line-height: 1.5;
}

.forgot-modal__error[hidden] {
  display: none;
}

.forgot-modal .input.is-error {
  border-color: rgba(255, 100, 100, 0.65);
}
