/* 登录页面 - 现代化设计样式 */
@import "../../styles/design-system.wxss";
@import "../../styles/components.wxss";

/* 主容器 - 全屏渐变背景 */
.login-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* 头部Logo区域 */
.header-section {
  margin-bottom: 60rpx;
  text-align: center;
  animation: fadeInDown 0.8s ease-out;
}

/* Logo容器 */
.app-logo {
  width: 160rpx;
  height: 160rpx;
  border-radius: 32rpx;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 40rpx;
  backdrop-filter: blur(20px);
  border: 2rpx solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

/* Logo图片 */
.logo-image {
  width: 100rpx;
  height: 100rpx;
  z-index: 2;
}

/* 光环动画 */
.logo-rings {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.ring {
  position: absolute;
  border: 2rpx solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: ringPulse 3s infinite ease-out;
}

.ring-1 {
  width: 120%;
  height: 120%;
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.ring-2 {
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
  animation-delay: 1s;
}

.ring-3 {
  width: 160%;
  height: 160%;
  top: -30%;
  left: -30%;
  animation-delay: 2s;
}

/* 应用标题 */
.app-title {
  font-size: 56rpx;
  font-weight: 600;
  color: white;
  margin-bottom: 16rpx;
  text-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.2);
}

/* 打字机效果容器 */
.typewriter-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40rpx;
  margin-top: 20rpx;
}

.typewriter-text {
  display: flex;
}

.typewriter-char {
  font-size: 32rpx;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  animation: typewriter 0.3s ease-out forwards;
}

.typewriter-char:nth-child(1) { animation-delay: 0.1s; }
.typewriter-char:nth-child(2) { animation-delay: 0.2s; }
.typewriter-char:nth-child(3) { animation-delay: 0.3s; }
.typewriter-char:nth-child(4) { animation-delay: 0.4s; }
.typewriter-char:nth-child(5) { animation-delay: 0.5s; }
.typewriter-char:nth-child(6) { animation-delay: 0.6s; }
.typewriter-char:nth-child(7) { animation-delay: 0.7s; }
.typewriter-char:nth-child(8) { animation-delay: 0.8s; }
.typewriter-char:nth-child(9) { animation-delay: 0.9s; }
.typewriter-char:nth-child(10) { animation-delay: 1.0s; }
.typewriter-char:nth-child(11) { animation-delay: 1.1s; }
.typewriter-char:nth-child(12) { animation-delay: 1.2s; }
.typewriter-char:nth-child(13) { animation-delay: 1.3s; }
.typewriter-char:nth-child(14) { animation-delay: 1.4s; }
.typewriter-char:nth-child(15) { animation-delay: 1.5s; }

.typewriter-char.comma {
  margin: 0 8rpx;
}

/* 光标闪烁 */
.typewriter-cursor {
  width: 4rpx;
  height: 32rpx;
  background: rgba(255, 255, 255, 0.8);
  margin-left: 8rpx;
  animation: blink 1s infinite;
}

/* 表单区域 */
.form-section {
  width: 100%;
  padding: 0 64rpx;
  margin-bottom: 40rpx;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.form-container {
  width: 100%;
  max-width: 640rpx;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 32rpx;
  padding: 64rpx;
  backdrop-filter: blur(20px);
  box-shadow: 0 16rpx 64rpx rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}

/* 输入组 */
.input-group {
  margin-bottom: 40rpx;
}

.input-label {
  font-size: 28rpx;
  color: #666;
  margin-bottom: 16rpx;
  display: block;
  font-weight: 500;
}

/* 输入容器 */
.input-container {
  display: flex;
  align-items: center;
  background: #f6f6f6;
  border-radius: 16rpx;
  border: 2rpx solid #e5e5e5;
  transition: all 0.3s ease;
  padding: 0 24rpx;
  height: 96rpx;
}

.input-container:hover {
  border-color: #667eea;
  background: #fff;
}

/* 输入图标 */
.input-icon {
  font-size: 36rpx;
  margin-right: 16rpx;
}

/* 输入框 */
.phone-input,
.code-input {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 32rpx;
  color: #333;
}

.input-placeholder {
  color: #999;
}

/* 清除按钮 */
.input-clear {
  width: 40rpx;
  height: 40rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.input-clear.show {
  opacity: 1;
}

.clear-icon {
  font-size: 24rpx;
  color: #999;
}

/* 验证码容器 */
.code-container {
  padding-right: 0;
}

/* 验证码按钮 */
.code-button {
  height: 64rpx;
  padding: 0 32rpx;
  background: #667eea;
  color: white;
  border-radius: 12rpx;
  font-size: 28rpx;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 20rpx;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.code-button.active {
  background: #667eea;
}

.code-button.active:active {
  background: #5a6fd8;
  transform: scale(0.95);
}

.code-button.disabled {
  background: #ccc;
  color: #666;
}

.code-button-text {
  white-space: nowrap;
}

/* 登录按钮 */
.login-button {
  width: 100%;
  height: 96rpx;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16rpx;
  margin-top: 60rpx;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8rpx 32rpx rgba(102, 126, 234, 0.3);
}

.login-button.active:active {
  transform: scale(0.98);
  box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.3);
}

.login-button.disabled {
  background: #ccc;
  box-shadow: none;
}

.login-content {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  z-index: 2;
}

.login-icon {
  font-size: 36rpx;
  margin-right: 12rpx;
}

.login-text {
  font-size: 32rpx;
  color: white;
  font-weight: 500;
}

/* 登录按钮背景动画 */
.login-bg-animation {
  position: absolute;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, 
    transparent 30%, 
    rgba(255, 255, 255, 0.2) 50%, 
    transparent 70%
  );
  top: -50%;
  left: -50%;
  animation: shimmer 3s infinite;
  display: none;
}

.login-button.active .login-bg-animation {
  display: block;
}

/* 微信登录区域 */
.wechat-section {
  margin-top: 40rpx;
  width: 100%;
}

/* 分割线 */
.divider {
  display: flex;
  align-items: center;
  margin: 40rpx 0;
  color: #999;
  font-size: 28rpx;
}

.divider-line {
  flex: 1;
  height: 1rpx;
  background: #e5e5e5;
}

.divider-text {
  margin: 0 32rpx;
}

/* 微信登录按钮 */
.wechat-button {
  width: 100%;
  height: 96rpx;
  background: #07c160;
  border-radius: 16rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.wechat-button:active {
  background: #06a850;
  transform: scale(0.98);
}

.wechat-content {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.wechat-icon {
  font-size: 36rpx;
  margin-right: 12rpx;
}

.wechat-text {
  font-size: 32rpx;
  color: white;
  font-weight: 500;
}

/* 微信登录加载动画 */
.wechat-animation {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8rpx;
}

.bounce {
  width: 12rpx;
  height: 12rpx;
  background: white;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.bounce-1 { animation-delay: -0.32s; }
.bounce-2 { animation-delay: -0.16s; }
.bounce-3 { animation-delay: 0s; }

/* 协议区域 */
.agreement-section {
  padding: 0 64rpx;
  margin-bottom: 40rpx;
  animation: fadeIn 0.8s ease-out 0.6s both;
}

.agreement-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.agreement-checkbox {
  margin-right: 16rpx;
}

.checkbox {
  width: 32rpx;
  height: 32rpx;
  border: 2rpx solid rgba(255, 255, 255, 0.6);
  border-radius: 8rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.checkbox.checked {
  background: #667eea;
  border-color: #667eea;
}

.check-icon {
  font-size: 20rpx;
  color: white;
}

.agreement-text {
  display: flex;
  align-items: center;
  font-size: 24rpx;
}

.agreement-normal {
  color: rgba(255, 255, 255, 0.8);
}

.link-text {
  color: white;
  text-decoration: underline;
  margin: 0 4rpx;
}

/* 背景装饰 */
.background-decorations {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
}

.decoration {
  position: absolute;
  font-size: 48rpx;
  opacity: 0.1;
  animation: float 15s infinite ease-in-out;
}

.decoration-1 { top: 10%; left: 10%; animation-delay: 0s; }
.decoration-2 { top: 20%; right: 15%; animation-delay: 2s; }
.decoration-3 { top: 60%; left: 5%; animation-delay: 4s; }
.decoration-4 { bottom: 30%; right: 10%; animation-delay: 6s; }
.decoration-5 { bottom: 10%; left: 20%; animation-delay: 8s; }
.decoration-6 { top: 40%; right: 30%; animation-delay: 10s; }

/* 粒子效果 */
.floating-particle {
  position: absolute;
  width: 8rpx;
  height: 8rpx;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: particle 20s infinite linear;
}

.particle-1 { left: 20%; animation-delay: 0s; }
.particle-2 { left: 40%; animation-delay: 5s; }
.particle-3 { left: 60%; animation-delay: 10s; }
.particle-4 { left: 80%; animation-delay: 15s; }

/* 版本信息 */
.version-info {
  position: absolute;
  bottom: 40rpx;
  left: 50%;
  transform: translateX(-50%);
}

.version-text {
  font-size: 24rpx;
  color: rgba(255, 255, 255, 0.6);
}

/* 动画定义 */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40rpx);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes typewriter {
  from {
    opacity: 0;
    transform: translateY(10rpx);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes ringPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20rpx) rotate(90deg);
  }
  50% {
    transform: translateY(0) rotate(180deg);
  }
  75% {
    transform: translateY(20rpx) rotate(270deg);
  }
}

@keyframes particle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100rpx) rotate(720deg);
    opacity: 0;
  }
}

/* 适配小屏幕设备 */
@media (max-height: 667px) {
  .login-container {
    padding: 40rpx 32rpx;
  }
  
  .header-section {
    margin-bottom: 40rpx;
  }
  
  .app-logo {
    width: 120rpx;
    height: 120rpx;
  }
  
  .logo-image {
    width: 80rpx;
    height: 80rpx;
  }
  
  .app-title {
    font-size: 48rpx;
  }
  
  .form-container {
    padding: 48rpx;
  }
} 