﻿/* 全局样式重置 & 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Helvetica", "Tahoma", "Arial", "PingFang SC", "Microsoft Yahei", "SimSun", "SimHei", "sans-serif";
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 4rem;
  position: relative;
  overflow: hidden;
  background-color: #f9fafb;
  background-image: 
    radial-gradient(circle at 70% 40%, rgba(220, 252, 231, 0.5) 0%, transparent 60%),
    radial-gradient(circle at 85% 20%, rgba(209, 250, 229, 0.3) 0%, transparent 50%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* 装饰元素样式 */
.decor {
  position: absolute;
  opacity: 0.8;
  pointer-events: none;
}
.decor-t {
  top: 20%;
  right: 15%;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #3b82f6, #93c5fd);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  font-weight: bold;
  color: white;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
  transform: rotate(5deg);
}
.decor-btn-primary {
  top: 30%;
  right: 25%;
  width: 100px;
  height: 40px;
  background: #3b82f6;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}
.decor-btn-secondary {
  top: 35%;
  right: 28%;
  width: 100px;
  height: 40px;
  background: #e5e7eb;
  color: #4b5563;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  box-shadow: 0 5px 15px rgba(156, 163, 175, 0.2);
  transform: rotate(-8deg);
}
.decor-circles {
  top: 45%;
  right: 22%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.circle-blue {
  background: linear-gradient(135deg, #3b82f6, #93c5fd);
}
.circle-green {
  background: linear-gradient(135deg, #10b981, #5eead4);
}
.circle-white {
  background: white;
  border: 1px solid #e5e7eb;
}
.decor-toggle {
  bottom: 30%;
  right: 20%;
  width: 50px;
  height: 30px;
  background: #e5e7eb;
  border-radius: 20px;
  position: relative;
}
.toggle-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 24px;
  height: 24px;
  background: #3b82f6;
  border-radius: 50%;
}

/* 注册主体样式 */
.register-container {
  width: 350px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Logo与标题 */
.logo-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-box {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: linear-gradient(to bottom right, #34d399, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}
.title-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}

/* 登录提示 */
.login-tip {
  font-size: 0.875rem;
  color: #6b7280;
}
.login-tip a {
  color: #10b981;
  text-decoration: none;
}
.login-tip a:hover {
  text-decoration: underline;
}

/* 输入框容器 */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.input-wrapper {
  position: relative;
}
.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  outline: none;
}
.password-input {
  padding-right: 2.5rem;
}
.form-input:focus {
  border-color: #a7f3d0;
  box-shadow: 0 0 0 2px #a7f3d0;
}
.eye-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  cursor: pointer;
}

/* 注册按钮 */
.register-btn {
  width: 100%;
  padding: 0.75rem;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.register-btn:hover {
  background-color: #059669;
}
.register-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 协议提示 */
.agreement-tip {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
}
.agreement-tip a {
  color: #10b981;
  text-decoration: none;
}
.agreement-tip a:hover {
  text-decoration: underline;
}

/* 备案信息 */
.record-info {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .decor {
    display: none !important;
  }
  body {
    padding: 0.625rem !important;
    justify-content: center !important;
  }
  .register-container {
    width: 100% !important;
    max-width: 350px;
  }
}