/* Login — shares GEO Agent theme tokens */
:root {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --surface-gray: #2a2a2a;
  --surface-gray-hover: #353535;
  --surface-white: #f4f4f4;
  --accent: #c8f135;
  --accent-dim: rgba(200, 241, 53, 0.15);
  --accent-glow: rgba(200, 241, 53, 0.25);
  --accent-text: #0a0a0a;
  --text: #ffffff;
  --text-muted: #8a8a8a;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 32px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --transition: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.85;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* —— Layout —— */
.login-page {
  display: flex;
  min-height: 100vh;
}

.login-brand {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--bg);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.login-brand__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 840px;
  height: 840px;
  transform: translate(-50%, -55%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.login-brand__content {
  position: relative;
  max-width: 720px;
  text-align: center;
}

/* —— Logo 舞台 + 后方标语 —— */
.logo-stage {
  position: relative;
  width: 680px;
  height: 500px;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 960px;
  perspective-origin: center 46%;
}

.slogan-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.slogan-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: var(--tx) var(--ty);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(42, 42, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  opacity: 0;
  animation: slogan-wave var(--slogan-cycle, 27s) var(--delay) ease-in-out infinite;
}

.slogan-pill::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  opacity: 0.7;
}

@keyframes slogan-wave {
  0%, 1%, 14%, 100% {
    opacity: 0;
    filter: blur(3px);
  }
  2.5%, 11% {
    opacity: var(--peak, 0.34);
    filter: blur(0);
  }
}

/* —— 表盘组件（基于提供的 watch HTML） —— */
.watch-container {
  position: relative;
  z-index: 2;
  width: 480px;
  height: 480px;
  margin: 0;
  flex-shrink: 0;
  transform-style: preserve-3d;
  transform-origin: center center;
  animation: watch-tilt 9s ease-in-out infinite;
  will-change: transform;
}

@keyframes watch-tilt {
  0%, 100% {
    transform: rotateX(7deg) rotateY(-9deg) rotateZ(0deg) translateZ(0);
  }
  25% {
    transform: rotateX(4deg) rotateY(7deg) rotateZ(0.6deg) translateZ(6px);
  }
  50% {
    transform: rotateX(-4deg) rotateY(9deg) rotateZ(-0.5deg) translateZ(2px);
  }
  75% {
    transform: rotateX(6deg) rotateY(-6deg) rotateZ(0.4deg) translateZ(8px);
  }
}

.watch-face {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.watch-face img {
  width: 64%;
  height: 64%;
  object-fit: contain;
  display: block;
}

.outer-ticks {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 3;
}

.outer-tick {
  position: absolute;
  width: 3px;
  height: 16px;
  background: #b4ff32;
  border-radius: 1px;
  left: 50%;
  top: -252px;
  transform-origin: center 252px;
  transform: translateX(-50%) rotate(var(--angle));
  opacity: 0;
  animation: tickFade 2s ease-in-out infinite;
  animation-delay: var(--delay);
  box-shadow: 0 0 4px rgba(180, 255, 50, 0.5);
}

@keyframes tickFade {
  0%, 100% {
    opacity: 0;
    transform: translateX(-50%) rotate(var(--angle)) scale(0.5);
  }
  50% {
    opacity: 0.8;
    transform: translateX(-50%) rotate(var(--angle)) scale(1);
  }
}

.hand-container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 20;
}

.hand {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 6px;
  height: 90px;
  background: #f0f0f0;
  border-radius: 3px 3px 0 0;
  transform: translateX(-50%) rotate(-135deg);
  transform-origin: bottom center;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  animation:
    gaugeSweep 2s ease-out forwards,
    gaugeBounce 1.5s ease-out 2s forwards,
    gaugeWiggle 3s ease-in-out 3.5s infinite;
}

.hand::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 18px solid #f0f0f0;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.center-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: #f0f0f0;
  border-radius: 50%;
  z-index: 30;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
}

.center-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #0a0a0a;
  border-radius: 50%;
}

@keyframes gaugeSweep {
  0% { transform: translateX(-50%) rotate(-135deg); }
  100% { transform: translateX(-50%) rotate(150deg); }
}

@keyframes gaugeBounce {
  0% { transform: translateX(-50%) rotate(150deg); }
  100% { transform: translateX(-50%) rotate(130deg); }
}

@keyframes gaugeWiggle {
  0% { transform: translateX(-50%) rotate(130deg); }
  50% { transform: translateX(-50%) rotate(100deg); }
  100% { transform: translateX(-50%) rotate(130deg); }
}

.login-brand__title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 8px;
}

.login-brand__tagline {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.login-brand__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* —— Form section —— */
.login-form-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--bg-elevated);
}

.login-form-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  border-radius: var(--radius-xl);
  background: var(--surface-gray);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-form-card__header {
  margin-bottom: 32px;
}

.login-form-card__title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.login-form-card__subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-field__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-field__icon {
  position: absolute;
  left: 16px;
  display: flex;
  color: var(--text-muted);
  pointer-events: none;
}

.form-field__icon svg {
  width: 18px;
  height: 18px;
}

.form-field__input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 48px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field__input::placeholder {
  color: rgba(138, 138, 138, 0.7);
}

.form-field__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.login-form__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -4px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox__box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: var(--bg);
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.checkbox input:checked + .checkbox__box {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox input:checked + .checkbox__box::after {
  content: "";
  display: block;
  width: 5px;
  height: 9px;
  margin: 1px auto 0;
  border: solid var(--accent-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.login-form__forgot {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.login-form__forgot:hover {
  color: var(--accent);
  opacity: 1;
}

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  margin-top: 8px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: filter var(--transition), transform var(--transition);
}

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

.btn-login:active {
  transform: translateY(0);
}

.btn-login__arrow svg {
  width: 18px;
  height: 18px;
}

.btn-login--loading {
  pointer-events: none;
  opacity: 0.85;
}

.btn-login--loading .btn-login__arrow {
  display: none;
}

.login-form-card__footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.login-form-card__footer a {
  color: var(--accent);
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .slogan-field,
  .slogan-pill,
  .outer-tick,
  .hand,
  .watch-container {
    animation: none;
  }

  .slogan-pill {
    opacity: 0.2;
    translate: var(--tx) var(--ty);
  }

  .hand {
    transform: translateX(-50%) rotate(130deg);
  }

  .outer-tick {
    opacity: 0.3;
  }
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .login-page {
    flex-direction: column;
  }

  .login-brand {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 40px 24px 32px;
  }

  .logo-stage {
    width: 100%;
    max-width: 520px;
    height: 380px;
    margin-bottom: 4px;
  }

  .watch-container {
    width: 360px;
    height: 360px;
  }

  .outer-tick {
    top: -190px;
    transform-origin: center 190px;
  }

  .hand {
    height: 68px;
  }

  .slogan-pill {
    font-size: 0.6rem;
    padding: 6px 10px;
    translate: calc(var(--tx) * 0.72) calc(var(--ty) * 0.72);
  }

  .login-brand__desc {
    display: none;
  }

  .login-form-section {
    padding: 32px 24px 48px;
  }

  .login-form-card {
    padding: 32px 24px;
  }
}
