:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #6b7280;
  --line: #d9e1ec;
  --panel: #ffffff;
  --accent: #2f6fed;
  --accent-soft: #e7efff;
  --danger: #cc4d5d;
  --lamp-on: .18;
  --cord-y: 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: #eef3f8;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.ghost {
  background: #edf2f7;
  color: #24324a;
}

.hidden {
  display: none !important;
}

.login-stage {
  min-height: 100vh;
  display: grid;
  overflow: hidden;
  position: relative;
  background: #ffffff;
}

.career-login {
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
}

.character-panel {
  min-height: 100vh;
  position: relative;
  padding: 48px;
  background: #818b99;
  overflow: hidden;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-size: 20px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #111827;
  font-size: 12px;
  font-weight: 900;
}

.character-scene {
  position: absolute;
  left: clamp(36px, 9vw, 134px);
  bottom: 118px;
  width: min(520px, 78%);
  height: 430px;
}

.character {
  position: absolute;
  display: block;
  overflow: hidden;
  transform: skewX(calc(var(--skew, 0) * 1deg));
  transform-origin: bottom center;
  transition: transform .38s ease, height .38s ease, left .38s ease;
}

.block-purple {
  left: 86px;
  top: 18px;
  width: 180px;
  height: 255px;
  border-radius: 8px;
  background: #6d39f4;
}

.career-login.password-active .block-purple {
  left: 118px;
  height: 292px;
  --skew: -9;
}

.block-black {
  left: 256px;
  top: 108px;
  width: 120px;
  height: 183px;
  border-radius: 7px;
  background: #2d2c2b;
}

.career-login.password-active .block-black {
  left: 278px;
  --skew: 5;
}

.blob-orange {
  left: 0;
  bottom: 0;
  width: 240px;
  height: 210px;
  border-radius: 120px 120px 0 0;
  background: #ff9865;
}

.blob-yellow {
  left: 327px;
  bottom: 0;
  width: 140px;
  height: 240px;
  border-radius: 85px 85px 0 0;
  background: #ecdc4e;
}

.dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2a2c2d;
  transform: translate(calc(var(--face-x, 0) * 1px), calc(var(--face-y, 0) * 1px));
  transition: transform .12s ease-out, height .12s ease, opacity .12s ease;
}

.block-purple .dot,
.block-black .dot {
  width: 18px;
  height: 18px;
  background: #f8fafc;
}

.block-purple .dot::after,
.block-black .dot::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: #303033;
  transform: translate(calc(var(--pupil-x, 0) * 1px), calc(var(--pupil-y, 0) * 1px));
  transition: transform .1s ease-out;
}

.character.blink .dot {
  height: 3px;
  border-radius: 999px;
  transform: translate(calc(var(--face-x, 0) * 1px), calc(var(--face-y, 0) * 1px)) translateY(8px);
}

.character.blink .dot::after {
  opacity: 0;
}

.block-purple .dot-left {
  left: 46px;
  top: 39px;
}

.block-purple .dot-right {
  right: 58px;
  top: 39px;
}

.block-black .dot-left {
  left: 26px;
  top: 32px;
}

.block-black .dot-right {
  right: 38px;
  top: 32px;
}

.blob-orange .dot-left {
  left: 82px;
  top: 90px;
}

.blob-orange .dot-right {
  left: 126px;
  top: 90px;
}

.blob-yellow .dot-left {
  left: 52px;
  top: 40px;
}

.blob-yellow .dot-right {
  left: 88px;
  top: 40px;
}

.flat-mouth {
  position: absolute;
  left: 41px;
  top: 83px;
  width: 80px;
  height: 4px;
  border-radius: 999px;
  background: #2f3133;
  transform: translate(calc(var(--face-x, 0) * 1px), calc(var(--face-y, 0) * 1px));
  transition: transform .12s ease-out;
}

.career-login.typing .block-purple .dot {
  --face-x: 10;
  --face-y: 16;
}

.career-login.typing .block-black .dot {
  --face-x: 6;
  --face-y: -12;
}

.career-login.password-active .block-purple .dot,
.career-login.password-active .block-black .dot,
.career-login.password-active .blob-orange .dot,
.career-login.password-active .blob-yellow .dot,
.career-login.password-active .flat-mouth {
  --face-x: -16;
  --face-y: -8;
  --pupil-x: -4;
  --pupil-y: -4;
}

.auth-footlinks {
  position: absolute;
  left: 48px;
  bottom: 48px;
  display: flex;
  gap: 36px;
}

.auth-footlinks a {
  color: #59636f;
  text-decoration: none;
  font-size: 14px;
}

.login-card {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  z-index: 2;
  color: #030712;
  align-self: center;
  justify-self: center;
}

.login-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #86fff0;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  opacity: .8;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: hsl(calc(172 + var(--lamp-on) * 60) 70% 54%);
  box-shadow: 0 0 14px hsl(calc(172 + var(--lamp-on) * 60) 70% 54% / .9);
}

.login-card h1,
.topbar h2,
.works-panel h2,
.preview-panel h2,
.admin-panel h2 {
  margin: 0 0 8px;
  letter-spacing: 0;
}

.login-card h1 {
  font-size: 31px;
  line-height: 1.18;
  text-align: center;
  color: #020817;
  text-shadow: none;
}

.login-card p {
  margin: 0 0 38px;
  color: #61708a;
  text-align: center;
  font-size: 15px;
  line-height: 1.65;
}

label {
  display: grid;
  gap: 8px;
  color: #3b465b;
  font-weight: 700;
}

.login-card label {
  color: #020817;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.055);
  color: #ecfffb;
  padding: 10px 12px;
  outline: none;
}

.login-card input {
  height: 48px;
  border-color: #e1e7ef;
  border-radius: 24px;
  background: #ffffff;
  color: #020817;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 52px;
}

.password-field button {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 28px;
  height: 28px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  box-shadow: none;
  font-size: 16px;
}

.login-card input::placeholder {
  color: #64748b;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .16);
}

.login-card input:focus {
  border-color: #6072ff;
  box-shadow: 0 0 0 3px rgba(96, 114, 255, .12);
}

form {
  display: grid;
  gap: 14px;
}

.auth-actions,
.composer-row,
.preview-header,
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.remember-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: #020817;
  font-weight: 500;
}

.remember-row input {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.auth-actions button {
  flex: 1;
  height: 48px;
  background: #ffffff;
  color: #020817;
  border: 1px solid #e1e7ef;
  border-radius: 24px;
  box-shadow: none;
}

.auth-actions button[type="button"] {
  background: transparent;
  color: #4f46e5;
  border: 0;
  padding: 0;
  width: auto;
  height: auto;
}

.forgot-link {
  color: #4f46e5;
  text-decoration: none;
  font-size: 14px;
}

.google-button {
  width: 100%;
  height: 48px;
  margin-top: 10px;
  border: 1px solid #e1e7ef;
  border-radius: 24px;
  background: #ffffff;
  color: #020817;
}

.signup-line {
  margin: 20px 0 0 !important;
  color: #64748b !important;
}

.signup-line button {
  padding: 0;
  background: transparent;
  color: #4f46e5;
  font-weight: 700;
}

.message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

.message.error {
  color: var(--danger);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 22px;
  background: #172033;
  color: white;
}

.sidebar h1 {
  margin: 0 0 10px;
  font-size: 22px;
}

.sidebar p {
  margin: 0;
  color: #cbd5e1;
}

.sidebar label {
  color: #dbe7f5;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.nav-button {
  text-align: left;
  background: rgba(255,255,255,.08);
}

.nav-button.active {
  background: #ffffff;
  color: #172033;
}

.workspace {
  min-width: 0;
  padding: 22px;
  display: grid;
  gap: 18px;
}

.topbar {
  justify-content: space-between;
}

.topbar p {
  margin: 0;
  color: var(--muted);
}

.credit-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #1f4aa8;
}

.composer,
.works-panel,
.preview-panel,
.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.composer textarea {
  min-height: 120px;
  resize: vertical;
}

.composer-row {
  margin-top: 12px;
}

.composer-row input,
.composer-row select {
  min-width: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 18px;
  min-height: 520px;
}

.works-list {
  display: grid;
  gap: 10px;
  max-height: 650px;
  overflow: auto;
}

.work-item {
  width: 100%;
  display: grid;
  gap: 8px;
  text-align: left;
  background: #f8fafc;
  color: var(--ink);
  border: 1px solid var(--line);
}

.work-item strong {
  font-size: 15px;
}

.work-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.preview-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.preview-header {
  justify-content: space-between;
}

iframe {
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

@media (max-width: 900px) {
  .login-stage,
  .app-shell,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .login-stage {
    gap: 18px;
    padding: 24px 16px;
  }

  .cute-lamp-zone {
    height: 250px;
    transform: scale(.82);
  }

  .sidebar {
    position: static;
  }

  .composer-row {
    flex-direction: column;
    align-items: stretch;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
