/* ===== 登录/注册页面样式 ===== */

/* 基础变量和重置 */
:root {
  --mc-green: #5B8C29;
  --mc-dark-green: #3B5C1A;
  --mc-blue: #3C44AA;
  --mc-dark-blue: #232C7A;
  --mc-brown: #8B6B4D;
  --mc-dark-brown: #6B4B2D;
  --mc-light: #F0F0F0;
  --mc-dark: #0A0A14;
  --mc-darker: #050510;
  --mc-gray: #7D7D7D;
  --mc-glow: #5CFF6D;
  --mc-lava: #FF6A00;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(92,255,109,0.05) 31px, rgba(92,255,109,0.05) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 31px, rgba(92,255,109,0.05) 31px, rgba(92,255,109,0.05) 32px),
    radial-gradient(ellipse at 50% 35%, rgba(92, 255, 109, 0.06) 0%, transparent 60%),
    linear-gradient(135deg, #181b34 0%, #23264a 100%);
  color: var(--mc-light);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}

.mc-pixel-font {
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

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

.hidden {
  display: none !important;
}

/* ===== 顶部 LOGO ===== */
.logo-text {
  font-size: 1.4rem;
  color: var(--mc-light);
  text-shadow: 0 0 10px rgba(92, 255, 109, 0.7);
  font-weight: bold;
  display: flex;
  align-items: center;
}
.logo-text span {
  color: var(--mc-glow);
}

/* ===== 主容器 ===== */
.main-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.content-wrapper {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: rgba(20, 20, 31, 0.9);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(92, 255, 109, 0.15);
  transition: box-shadow 0.4s cubic-bezier(.4,0,.2,1);
  backdrop-filter: blur(10px);
  position: relative;
}

.content-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--mc-glow), transparent);
  opacity: 0.6;
}

.content-wrapper:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(92, 255, 109, 0.3);
}

.form-section {
  padding: 36px 28px;
}

.auth-card {
  width: 100%;
  max-width: 350px;
}

/* ===== 表单标题 ===== */
.title {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  padding-bottom: 14px;
  color: #FFF;
  text-shadow: 0 0 20px rgba(92, 255, 109, 0.3);
  letter-spacing: 2px;
}

.title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mc-glow), transparent);
}

/* ===== 表单输入 ===== */
.LoginReg-input {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: all 0.3s ease;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  box-sizing: border-box;
}

.LoginReg-input:focus {
  border-color: var(--mc-glow);
  box-shadow: 0 0 0 3px rgba(92, 255, 109, 0.15);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.LoginReg-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* 密码输入框容器（用于显示切换按钮） */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper .LoginReg-input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 2px;
  top: 2px;
  bottom: 2px;
  width: 36px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 16px;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 6px 6px 0;
}

.password-toggle:hover {
  color: var(--mc-glow);
}

/* ===== 按钮 ===== */
.layui-btn-danger.auth-btn {
  background: linear-gradient(135deg, var(--mc-green), var(--mc-glow));
  border: none;
  border-radius: 8px;
  height: 44px;
  font-size: 16px;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 4px;
  color: var(--mc-dark);
  font-weight: bold;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

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

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

.layui-btn-danger.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(92, 255, 109, 0.4);
}

.layui-btn-danger.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.layui-btn-danger.auth-btn:disabled::before {
  display: none;
}

/* ===== 链接区域 ===== */
.auth-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
}

.auth-links a {
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s;
  font-size: 14px;
  text-decoration: none;
  position: relative;
}

.auth-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--mc-glow);
  transition: width 0.3s;
}

.auth-links a:hover {
  color: var(--mc-glow);
}

.auth-links a:hover::after {
  width: 100%;
}

/* ===== 表单切换动画 ===== */
#login-page, #reg-page, #getPW-page {
  animation: fadeInUp 0.35s ease both;
}

/* ===== 验证码区域 ===== */
.YZM-input {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: all 0.3s ease;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  box-sizing: border-box;
}

.YZM-input:focus {
  border-color: var(--mc-glow);
  box-shadow: 0 0 0 3px rgba(92, 255, 109, 0.15);
  outline: none;
}

.YZM-btn {
  border-radius: 8px;
  height: 44px;
  padding: 0 16px;
  font-size: 14px;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--mc-brown), var(--mc-dark-brown));
  color: var(--mc-light);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.YZM-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 107, 77, 0.4);
}

.YZM-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== 客服悬浮二维码 ===== */
.kf-compact {
  text-align: center;
  margin-top: 8px;
  position: relative;
}
.kf-compact-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,0.25);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 2px;
}
.kf-compact-btn:hover { color: var(--mc-glow); }
.kf-compact-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  transform-origin: bottom center;
  background: #16162a;
  border: 1px solid rgba(92,255,109,0.12);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.kf-compact-btn:hover .kf-compact-popup {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}
.kf-compact .kf-qr {
  display: inline-block;
  padding: 6px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  line-height: 0;
}
.kf-compact .kf-qr canvas {
  display: block;
  border-radius: 4px;
}
.kf-compact .kf-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  margin-top: 6px;
  white-space: nowrap;
}

/* ===== 输入格式提示 ===== */
.input-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  margin: -8px 0 10px 4px;
  line-height: 1.4;
  transition: color 0.3s;
}
.input-group:focus-within + .input-hint,
.password-wrapper:focus-within + .input-hint {
  color: rgba(255,255,255,0.45);
}

/* ===== 输入框图标 ===== */
.input-group {
  position: relative;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.25);
  font-size: 15px;
  z-index: 1;
  pointer-events: none;
  transition: color 0.3s;
}

.input-group:focus-within .input-icon {
  color: var(--mc-glow);
}

.input-group .LoginReg-input,
.password-wrapper .LoginReg-input {
  padding-left: 40px;
}

/* ===== 内联验证错误 ===== */
.input-error {
  display: none;
  font-size: 12px;
  color: #ff6b6b;
  margin: -10px 0 10px 0;
  padding-left: 4px;
  line-height: 1.4;
  animation: fadeInUp 0.2s ease;
}

.input-error.show {
  display: block;
}

/* ===== 大写锁定警告 ===== */
.caps-warning {
  font-size: 12px;
  color: #ffa94d;
  margin: -8px 0 10px 0;
  padding-left: 4px;
  line-height: 1.4;
  animation: fadeInUp 0.2s ease;
}

.caps-warning i {
  margin-right: 4px;
  font-size: 11px;
}

/* ===== 记住我 ===== */
.remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin: 4px 0 16px 0;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s;
}

.remember-me:hover {
  color: rgba(255, 255, 255, 0.7);
}

.remember-me input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--mc-glow);
  cursor: pointer;
}

/* ===== 密码强度指示器 ===== */
.pwd-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -8px 0 10px 0;
  min-height: 18px;
  animation: fadeInUp 0.2s ease;
}

.pwd-strength-bar {
  flex: 1;
  max-width: 120px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.pwd-strength-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

.pwd-strength-bar.weak::after {
  width: 33%;
  background: #ff6b6b;
}

.pwd-strength-bar.medium::after {
  width: 66%;
  background: #ffa94d;
}

.pwd-strength-bar.strong::after {
  width: 100%;
  background: var(--mc-glow);
}

.pwd-strength-text {
  font-size: 12px;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.4);
}

.pwd-strength-text.weak { color: #ff6b6b; }
.pwd-strength-text.medium { color: #ffa94d; }
.pwd-strength-text.strong { color: var(--mc-glow); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .content-wrapper { max-width: 100%; }

  .form-section {
    padding: 24px 20px;
  }

  .LoginReg-input {
    height: 48px;
    font-size: 16px;
  }

  .layui-btn-danger.auth-btn {
    height: 48px;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 12px;
  }

  .form-section {
    padding: 20px 16px;
  }

  .title {
    font-size: 20px;
  }

  .auth-links {
    gap: 16px;
  }
}

/* ===== 注册成功弹窗 ===== */
.layer-reg-success {
  border-radius: 12px !important;
  background: #1a1a2e !important;
  box-shadow: 0 0 0 1px rgba(92, 255, 109, 0.15), 0 20px 60px rgba(0,0,0,0.6) !important;
  overflow: hidden !important;
}

.layer-reg-success .layui-layer-page {
  overflow: hidden !important;
}

.layer-reg-success .layui-layer-content {
  overflow: hidden !important;
}

.layer-reg-success .layui-layer-title {
  background: #1a1a2e !important;
  color: #fff !important;
  font-size: 18px !important;
  text-align: center !important;
  border-bottom: 1px solid rgba(92, 255, 109, 0.1) !important;
  padding: 18px 0 14px !important;
  height: auto !important;
  line-height: 1.4 !important;
}

.layer-reg-success .layui-layer-btn {
  text-align: center !important;
  padding: 0 20px 20px !important;
  border-top: 1px solid rgba(255,255,255,0.04) !important;
  background: transparent !important;
}

.layer-reg-success .layui-layer-btn0 {
  width: 100% !important;
  height: 42px !important;
  background: linear-gradient(135deg, #5B8C29, #5CFF6D) !important;
  border: none !important;
  border-radius: 8px !important;
  color: #0a0a14 !important;
  font-size: 15px !important;
  font-weight: bold !important;
  letter-spacing: 2px !important;
  transition: all 0.3s ease !important;
}

.layer-reg-success .layui-layer-btn0:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(92, 255, 109, 0.3);
}

.layer-reg-success .layui-layer-content {
  padding: 0 !important;
  background: transparent !important;
}

.reg-success-box {
  padding: 10px 24px 4px;
}

.reg-success-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  margin-bottom: 8px;
}

.reg-success-label {
  color: rgba(255,255,255,0.4);
  font-size: 14px;
}

.reg-success-value {
  color: #5CFF6D;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
}

.reg-success-tip {
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 12px;
  padding: 10px 0 4px;
}

/* 注册赠送绿宝石横幅 */
.reg-bonus-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  margin: 8px 0 6px;
  background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(92,255,109,0.05));
  border: 1px solid rgba(255,215,0,0.12);
  border-radius: 8px;
  font-size: 13px;
  color: #FFD700;
}
.reg-bonus-banner strong {
  font-size: 16px;
  color: #5CFF6D;
  font-weight: 800;
}
