* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, rgba(121, 163, 206, 0.8), rgba(173, 216, 230, 0.8));
    background-size: 600% 600%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    color: #e0e0e0;
    /* 初始化鼠标位置变量 */
    --mouse-x: 50%;
    --mouse-y: 50%;
}

/* 全局鼠标柔和光效 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.15) 15%,
        rgba(255, 255, 255, 0.08) 30%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(255, 255, 255, 0) 70%
    );
    z-index: 3;
    opacity: 0.8;
}

/* 流动光线 (保持原有效果) */
body::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    opacity: 0.3;
    animation: slide 2s infinite linear;
}

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

@keyframes slide {
    0% { background-position: -100% center; }
    100% { background-position: 200% center; }
}

/* 引入公共样式 */
@import url('./common.css');

/* 登录/注册页面特定样式 */
.form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.form-content {
  width: 100%;
}

.form-title {
  text-align: center;
  color: #000000;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

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

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #0055ff;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  outline: none;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: #ccc;
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 2px rgba(107, 176, 247, 0.5);
}

.form-button {
  width: 100%;
  padding: 14px;
  background: #6bb0f7;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 10px;
  box-sizing: border-box;
}

.form-button:hover {
  background: #5aa0e7;
}

.switch-form {
  text-align: center;
  margin-top: 20px;
}

.switch-form a {
  color: #8ec5fc;
  text-decoration: none;
  font-weight: 500;
}

.switch-form a:hover {
  text-decoration: underline;
}

.message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #d1ecf1;
  color: #0c5460;
  padding: 15px 20px;
  border-radius: 4px;
  font-size: 14px;
  min-width: 200px;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: none;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
}

/* ----------- 手机端适配（屏幕宽度 ≤ 768px）----------- */
@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .form-container {
        max-width: 100%;
        width: 100%;
        padding: 20px 15px;
        border-radius: 12px;
        min-height: auto;
    }

    .form-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

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

    .form-input {
        padding: 14px 12px;
        font-size: 16px;
    }

    .form-button {
        padding: 16px;
        font-size: 17px;
    }

    .switch-form a {
        font-size: 15px;
    }
    
    .message {
        left: 10px;
        right: 10px;
        transform: none;
        min-width: auto;
    }
}

/* 可选：超小屏进一步优化 */
@media (max-width: 480px) {
    .form-container {
        padding: 15px 10px;
    }

    .form-title {
        font-size: 22px;
    }

    .form-input {
        padding: 12px;
        font-size: 15px;
    }

    .form-button {
        padding: 14px;
        font-size: 16px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .form-input,
    .form-button {
        min-height: 44px;
    }
}