/* 全局变量：清新夏日风格 */
:root {
  --bg-main: #f8f9fa;
  --nav-bg: rgba(255,255,255,0.95);
  --text-main: #2d3748;
  --text-light: #718096;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.08);
  --primary: #f6ad55;
  --primary-hover: #ed8936;
  --primary-light: #fbd38d;
  --accent: #48bb78;
  --success: #48bb78;
  --error: #fc8181;
  --warning: #f6ad55;
  --info: #4299e1;
  --glass-bg: rgba(255,255,255,0.85);
  --gradient-1: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  --gradient-2: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  --gradient-3: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
  --water-blue: #4fd1c5;
  --sand-yellow: #fefcbf;
  --watermelon-red: #fc8181;
  --watermelon-green: #68d391;
  --sky-blue: #63b3ed;
  --palm-green: #48bb78;
}

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "微软雅黑", "PingFang SC", sans-serif;
}

body {
  background: linear-gradient(180deg, #87ceeb 0%, #b3e5fc 30%, #ffe4b5 60%, #ffd4a3 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-main);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* 阳光效果 */
body::before {
  content: '';
  position: fixed;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 220, 100, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: sunPulse 6s ease-in-out infinite;
}

@keyframes sunPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.8;
  }
}

/* 顶部导航栏 */
.top-nav {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  padding: 12px 0;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo-text {
  font-size: 18px;
  font-weight: bold;
  background: linear-gradient(90deg, var(--water-blue) 0%, var(--palm-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  margin: 0 20px;
  font-size: 16px;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.3s;
  background: transparent;
}

.nav-links a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--water-blue) 0%, var(--palm-green) 100%);
}

.nav-links a:hover:not(.active) {
  color: var(--water-blue);
  background: rgba(79,209,197,0.1);
}

.nav-links a.active, .nav-links a:hover {
  border-bottom: 2px solid #2196f3;
}

/* 认证容器 */
.auth-container {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-wrapper {
  display: flex;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.12), 0 0 0 2px rgba(255,255,255,0.6);
  overflow: hidden;
  max-width: 1000px;
  width: 100%;
}

/* 左侧装饰区域 - 海洋渐变 */
.auth-decoration {
  flex: 1;
  background: linear-gradient(180deg, #87ceeb 0%, #4fd1c5 40%, #20b2aa 100%);
  padding: 60px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 阳光元素 */
.auth-decoration::before {
  content: '';
  position: absolute;
  top: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(255, 200, 50, 0.6) 0%, transparent 70%);
  border-radius: 50%;
  animation: sunGlow 4s ease-in-out infinite;
}

/* 西瓜装饰 */
.auth-decoration::after {
  content: '';
  position: absolute;
  bottom: 40px;
  left: 30px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #ff3b3b);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  animation: float 5s ease-in-out infinite;
}

@keyframes sunGlow {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.15) rotate(180deg);
    opacity: 0.9;
  }
}

.decoration-content {
  text-align: center;
  color: #fff;
  position: relative;
  z-index: 1;
}

.decoration-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.icon-float {
  font-size: 40px;
  opacity: 0.95;
  animation: float 3s ease-in-out infinite;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
}

.decoration-content h2 {
  font-size: 32px;
  margin-bottom: 15px;
  font-weight: bold;
}

.decoration-content p {
  font-size: 16px;
  opacity: 0.95;
  margin-bottom: 30px;
}

.decoration-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.decoration-features span {
  background: rgba(255,255,255,0.25);
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  transition: all 0.3s;
}

.decoration-features span:hover {
  background: rgba(255,255,255,0.35);
  transform: translateX(5px);
}

.decoration-features i {
  color: #ffeb3b;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 右侧表单区域 */
.auth-form-container {
  flex: 1.2;
  padding: 60px 50px;
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-header h1 {
  font-size: 28px;
  background: linear-gradient(135deg, var(--sky-blue) 0%, var(--water-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  font-weight: 800;
}

.auth-header p {
  font-size: 15px;
  color: var(--text-light);
}

/* 表单样式 */
.auth-form {
  max-width: 400px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group label i {
  color: var(--water-blue);
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  background: rgba(255,255,255,0.8);
}

.form-group input:focus {
  border-color: var(--water-blue);
  box-shadow: 0 0 0 4px rgba(79,209,197,0.1), 0 0 0 1px var(--water-blue);
  transform: translateY(-2px);
  background: #fff;
}

.form-group input::placeholder {
  color: #999;
}

.password-input {
  position: relative;
}

.password-input input {
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 5px;
  font-size: 16px;
  transition: color 0.3s;
}

.toggle-password:hover {
  color: var(--water-blue);
}

.form-hint {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-light);
}

/* 表单选项 */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.remember-me,
.agree-terms {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
}

.remember-me input,
.agree-terms input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.agree-terms {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.forgot-password {
  color: var(--water-blue);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.forgot-password:hover {
  color: var(--palm-green);
}

/* 认证按钮 */
.auth-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

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

.auth-btn:hover::before {
  left: 100%;
}

.login-btn {
  background: linear-gradient(135deg, #4fd1c5 0%, #38a169 100%);
  color: #ffffff;
}

.login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(79,209,197,0.4);
}

.register-btn {
  background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
  color: #ffffff;
}

.register-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(252,129,129,0.4);
}

/* 分隔线 */
.divider {
  text-align: center;
  margin: 24px 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  right: 0;
  height: 1px;
  background: #e0e0e0;
}

.divider span {
  background: #fff;
  padding: 0 20px;
  color: var(--text-light);
  font-size: 14px;
  position: relative;
  z-index: 1;
}

/* 社交登录 */
.social-login {
  display: flex;
  gap: 12px;
}

.social-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
}

.social-btn.wechat {
  color: #07c160;
  border-color: #07c160;
}

.social-btn.wechat:hover {
  background: #07c160;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(7,193,96,0.3);
}

/* 底部链接 */
.auth-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e0e0e0;
}

.auth-footer p {
  font-size: 14px;
  color: var(--text-light);
}

.link {
  color: var(--water-blue);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s;
  position: relative;
}

.link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--water-blue) 0%, var(--palm-green) 100%);
  transition: width 0.3s;
}

.link:hover {
  color: var(--palm-green);
}

.link:hover::after {
  width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .auth-wrapper {
    flex-direction: column;
    max-width: 500px;
  }

  .auth-decoration {
    padding: 40px 30px;
  }

  .auth-form-container {
    padding: 40px 30px;
  }

  .decoration-content h2 {
    font-size: 24px;
  }

  .decoration-features {
    flex-direction: column;
  }

  .auth-header h1 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .auth-container {
    padding: 20px 15px;
  }

  .auth-form-container {
    padding: 30px 20px;
  }

  .nav-links a {
    margin: 0 10px;
    font-size: 14px;
  }
}

/* 提示框样式 */
.toast {
  position: fixed;
  top: 100px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 16px;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: linear-gradient(135deg, var(--palm-green) 0%, #38a169 100%);
}

.toast.error {
  background: linear-gradient(135deg, var(--watermelon-red) 0%, #e53e3e 100%);
}

.toast.warning {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.toast.info {
  background: linear-gradient(135deg, var(--sky-blue) 0%, var(--water-blue) 100%);
}
