/* ============================================
   春节喜庆登录页 - 大红色、富贵金主题
   ============================================ */

/* 全局样式 */
body {
  margin: 0;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #8B0000 0%, #DC143C 50%, #B22222 100%);
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
  color: #333333;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 页面容器 - 左右分栏布局 */
.login-page-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ============================================
   左侧背景区域
   ============================================ */
.login-background {
  flex: 1;
  position: relative;
  display: none; /* 移动端隐藏 */
  background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
  overflow: hidden;
}

.background-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 215, 0, 0.03) 10px, rgba(255, 215, 0, 0.03) 20px),
    repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(255, 215, 0, 0.03) 10px, rgba(255, 215, 0, 0.03) 20px);
  opacity: 0.5;
}

/* 灯笼容器 */
.lanterns-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.lantern {
  position: absolute;
  width: 80px;
  height: 100px;
  animation: lanternSway 3s ease-in-out infinite;
}

.lantern-left {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.lantern-right {
  top: 15%;
  right: 10%;
  animation-delay: 1.5s;
}

.lantern-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes lanternSway {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

/* 烟花容器 */
.fireworks-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.firework {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #FFD700;
  border-radius: 50%;
  animation: fireworkExplode 1s ease-out forwards;
  box-shadow: 
    0 0 10px #FFD700,
    0 0 20px #FFD700,
    0 0 30px #FFD700;
}

@keyframes fireworkExplode {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(20);
    opacity: 0;
  }
}

/* ============================================
   右侧登录表单区域
   ============================================ */
.login-form-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.95), rgba(178, 34, 34, 0.95));
}

/* 红包卡片 */
.red-envelope-card {
  width: 100%;
  max-width: 450px;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  border-radius: 20px;
  padding: 40px 32px;
  position: relative;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 100px rgba(255, 215, 0, 0.2),
    inset 0 2px 10px rgba(255, 255, 255, 0.1);
  border: 3px solid rgba(255, 215, 0, 0.5);
  overflow: hidden;
  animation: cardFloat 3s ease-in-out infinite;
}

@keyframes cardFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
}
}

/* 金色回形纹边框装饰 */
.border-decoration {
  position: absolute;
  background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
  background-size: 200% 100%;
  animation: borderGlow 3s linear infinite;
  z-index: 1;
}

.border-top,
.border-bottom {
  left: 20px;
  right: 20px;
  height: 4px;
}

.border-top {
  top: 0;
  border-radius: 20px 20px 0 0;
}

.border-bottom {
  bottom: 0;
  border-radius: 0 0 20px 20px;
}

.border-left,
.border-right {
  top: 20px;
  bottom: 20px;
  width: 4px;
}

.border-left {
  left: 0;
  border-radius: 20px 0 0 20px;
}

.border-right {
  right: 0;
  border-radius: 0 20px 20px 0;
}

@keyframes borderGlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* 卡片内容 */
.card-content {
  position: relative;
  z-index: 2;
}

/* 登录表单 */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 福字徽标 */
.form-logo-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.logo-circle {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 8px 24px rgba(255, 215, 0, 0.4),
    inset 0 2px 8px rgba(255, 255, 255, 0.3);
  border: 4px solid rgba(255, 215, 0, 0.6);
  position: relative;
  z-index: 2;
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4), inset 0 2px 8px rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(255, 215, 0, 0.6), inset 0 2px 8px rgba(255, 255, 255, 0.4);
  }
}

.logo-svg {
  width: 70px;
  height: 70px;
}

.logo-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 50%;
  animation: logoPulse 2s ease-in-out infinite;
}

/* 祥云装饰 */
.cloud-decoration {
  position: absolute;
  width: 60px;
  height: 40px;
  opacity: 0.6;
  z-index: 1;
}

.cloud-1 {
  top: -10px;
  left: 20%;
  animation: cloudFloat 4s ease-in-out infinite;
}

.cloud-2 {
  top: -10px;
  right: 20%;
  animation: cloudFloat 4s ease-in-out infinite 2s;
}

.cloud-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.5));
}

@keyframes cloudFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
}
  50% {
    transform: translateY(-8px) translateX(5px);
  }
}

/* 标题 */
.form-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: #FFD700;
  margin: 0 0 8px 0;
  letter-spacing: 4px;
  text-shadow: 
    3px 3px 6px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 215, 0, 0.5);
  font-family: 'Ma Shan Zheng', 'Microsoft YaHei', serif;
  position: relative;
}

.form-title::before,
.form-title::after {
  content: '◆';
  color: #FFD700;
  font-size: 20px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
}

.form-title::before {
  left: -40px;
}

.form-title::after {
  right: -40px;
}

.form-subtitle {
  text-align: center;
  font-size: 16px;
  color: #FFD700;
  margin: 0 0 32px 0;
  font-weight: 500;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   输入框组 - 描金设计
   ============================================ */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-label {
  font-size: 15px;
  font-weight: 600;
  color: #FFD700;
  margin-left: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.input-wrapper {
  position: relative;
  background: linear-gradient(135deg, #FFF8E7, #FFE5B4);
  border: 2px solid #FFD700;
  border-radius: 12px;
  padding: 14px 18px;
  transition: all 0.3s ease;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 0 0 0 rgba(255, 215, 0, 0.4);
}

.input-wrapper::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700);
  background-size: 200% 200%;
  border-radius: 12px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: inputBorderGlow 2s linear infinite;
}

.input-wrapper:focus-within::before {
  opacity: 1;
}

.input-wrapper:focus-within {
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 0 20px rgba(255, 215, 0, 0.6);
  border-color: #FFA500;
  transform: translateY(-2px);
}

@keyframes inputBorderGlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.input-field {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 16px;
  color: #8B4513;
  font-weight: 500;
  outline: none;
  font-family: inherit;
}

.input-field::placeholder {
  color: #DC143C;
  font-weight: 400;
  opacity: 0.7;
  font-style: italic;
}

/* ============================================
   登录按钮 - 卷轴/如意锁样式
   ============================================ */
.login-button {
  width: 100%;
  height: 56px;
  line-height: 56px;
  text-align: center;
  background: linear-gradient(135deg, #DC143C, #B22222);
  color: #FFD700;
  border: 3px solid #FFD700;
  border-radius: 28px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 20px rgba(220, 20, 60, 0.4),
    0 0 40px rgba(255, 215, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 3px;
  font-family: 'Ma Shan Zheng', 'Microsoft YaHei', serif;
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
  transition: left 0.5s ease;
}

.login-button:hover::before {
  left: 100%;
}

.login-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4), transparent);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.login-button:hover::after {
  width: 300px;
  height: 300px;
}

.login-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #FF1744, #DC143C);
  box-shadow: 
    0 6px 30px rgba(220, 20, 60, 0.6),
    0 0 60px rgba(255, 215, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  border-color: #FFA500;
}

.login-button:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 
    0 4px 20px rgba(220, 20, 60, 0.5),
    0 0 40px rgba(255, 215, 0, 0.4);
}

.login-button:disabled {
  background: #999;
  border-color: #666;
  color: #CCC;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 爆竹闪烁效果 */
.button-sparkles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.login-button:hover .button-sparkles::before,
.login-button:hover .button-sparkles::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 
    0 0 10px #FFD700,
    0 0 20px #FFD700;
  animation: sparkle 0.6s ease-out forwards;
}

.login-button:hover .button-sparkles::before {
  top: 20%;
  left: 20%;
  animation-delay: 0s;
}

.login-button:hover .button-sparkles::after {
  top: 20%;
  right: 20%;
  animation-delay: 0.2s;
}

@keyframes sparkle {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(3) translate(20px, -20px);
    opacity: 0;
  }
}

.button-text {
  position: relative;
  z-index: 1;
}

/* 加载动画 */
.loading {
  width: 18px;
  height: 18px;
  border: 2px solid #FFD700;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   快速链接 - 丝带样式
   ============================================ */
.quick-links {
  text-align: center;
  margin-top: 20px;
}

.quick-link {
  display: inline-block;
  font-size: 15px;
  color: #FFD700;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.quick-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
  transition: left 0.5s ease;
  border-radius: 20px;
}

.quick-link:hover::before {
  left: 100%;
}

.quick-link:hover {
  color: #FFA500;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.ribbon-text {
  position: relative;
  z-index: 1;
}

/* ============================================
   错误/成功消息
   ============================================ */
.error-message {
  background: linear-gradient(135deg, rgba(255, 248, 231, 0.95), rgba(255, 229, 229, 0.95));
  color: #DC143C;
  border: 2px solid #DC143C;
  border-left: 6px solid #DC143C;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  border-radius: 10px;
  animation: fadeInUp 0.3s ease;
  box-shadow: 
    0 4px 12px rgba(220, 20, 60, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.success-message {
  color: #2E7D32;
  border-color: #4CAF50;
  border-left-color: #4CAF50;
  background: linear-gradient(135deg, rgba(232, 245, 233, 0.95), rgba(200, 230, 201, 0.95));
}

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

/* ============================================
   响应式设计
   ============================================ */
@media (min-width: 1024px) {
  .login-background {
    display: block;
}

  .login-form-wrapper {
    flex: 0 0 50%;
    max-width: 50%;
}
}

@media (max-width: 1023px) {
  .login-background {
    display: none;
  }
  
  .login-form-wrapper {
    flex: 1;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.98), rgba(178, 34, 34, 0.98));
  }
  
  .red-envelope-card {
    max-width: 100%;
    padding: 32px 24px;
  }
  
  .form-title::before,
  .form-title::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .login-form-wrapper {
    padding: 20px 16px;
  }
  
  .red-envelope-card {
    padding: 28px 20px;
    border-radius: 16px;
  }
  
  .logo-circle {
    width: 80px;
    height: 80px;
  }
  
  .logo-svg {
    width: 56px;
    height: 56px;
  }
  
  .logo-img {
    width: 56px;
    height: 56px;
  }
  
  .form-title {
    font-size: 26px;
    letter-spacing: 2px;
  }
  
  .form-subtitle {
    font-size: 14px;
  }
  
  .input-wrapper {
    padding: 12px 16px;
  }
  
  .input-field {
    font-size: 15px;
  }
  
  .login-button {
    height: 50px;
    line-height: 50px;
    font-size: 16px;
    letter-spacing: 2px;
  }
  
  .quick-link {
    font-size: 14px;
    padding: 6px 12px;
  }
}

/* ============================================
   无障碍支持
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .red-envelope-card,
  .logo-circle,
  .lantern,
  .cloud-decoration,
  .input-wrapper,
  .login-button,
  .error-message {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================
   滚动条样式
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(220, 20, 60, 0.2);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #FFA500, #FFD700);
}
