:root {
  color-scheme: light;
  --bg: #f3f2ef;
  --ink: #000000;
  --muted: #666666;
  --line: #e0e0e0;
  --panel: #ffffff;
  --accent: #0a66c2;
  --accent-strong: #004182;
  --accent-light: #378fe9;
  --danger: #cc1016;
  --success: #057642;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-8px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(8px);
  }
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  right: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(10, 102, 194, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 8s ease-in-out infinite;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(55, 143, 233, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 10s ease-in-out infinite;
  animation-delay: 2s;
  pointer-events: none;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.register-panel {
  width: min(100%, 480px);
  padding: 40px 36px 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.6s ease-out;
  position: relative;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.register-panel::-webkit-scrollbar {
  width: 6px;
}

.register-panel::-webkit-scrollbar-track {
  background: transparent;
}

.register-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

.register-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

.register-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
  animation: shimmer 3s infinite;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 20px;
  color: var(--accent);
  animation: slideInRight 0.5s ease-out;
  margin-bottom: 8px;
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  font-size: 20px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-mark:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.heading {
  margin: 28px 0 24px;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  padding: 4px 12px;
  background: rgba(10, 102, 194, 0.08);
  border-radius: 4px;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.heading p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

form {
  display: grid;
  gap: 16px;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  position: relative;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  outline: none;
  transition: all 0.2s ease;
}

input::placeholder {
  color: #a0a0a0;
  font-size: 14px;
}

input:hover {
  border-color: #b0b0b0;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
  background: #fafafa;
}

input:focus + .input-hint {
  opacity: 1;
  transform: translateY(0);
}

button,
.login-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

button {
  margin-top: 4px;
  border: 0;
  color: white;
  background: var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before {
  width: 300px;
  height: 300px;
}

button:hover {
  background: var(--accent-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

button:disabled:hover {
  background: var(--accent);
  box-shadow: var(--shadow-sm);
}

.message {
  min-height: 20px;
  margin: 0;
  padding: 10px 14px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
  border-radius: 8px;
  background: transparent;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
}

.message:not(:empty) {
  opacity: 1;
  transform: translateY(0);
}

.message.error {
  color: var(--danger);
  background: rgba(204, 16, 22, 0.08);
  border-left: 3px solid var(--danger);
}

.message.success {
  color: var(--success);
  background: rgba(5, 118, 66, 0.08);
  border-left: 3px solid var(--success);
}

.login-link {
  margin-top: 12px;
  width: 100%;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  font-weight: 600;
  animation: fadeInUp 0.5s ease-out;
}

.login-link:hover {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

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

.notice {
  margin-top: 28px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(10, 102, 194, 0.04) 0%, rgba(55, 143, 233, 0.04) 100%);
  border-radius: 10px;
  border: 1px solid rgba(10, 102, 194, 0.12);
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.notice h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.notice h3::before {
  content: 'ℹ️';
  font-size: 16px;
}

.notice ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}

.notice li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.notice li:last-child {
  margin-bottom: 0;
}

.notice li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

@media (max-width: 520px) {
  .shell {
    align-items: start;
    padding: 20px 16px;
  }

  .register-panel {
    padding: 28px 20px 24px;
  }

  h1 {
    font-size: 24px;
  }

  button,
  .login-link {
    min-height: 46px;
    font-size: 15px;
  }

  input {
    min-height: 46px;
    font-size: 14px;
  }

  .notice {
    padding: 16px;
    margin-top: 24px;
  }

  .notice h3 {
    font-size: 14px;
  }

  .notice li {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

