/* ===== 登录页样式 ===== */
.login-page {
  width: 100vw;
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(0, 212, 255, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(43, 139, 255, 0.12) 0%, transparent 50%),
    var(--bg-primary);
}

/* 3D 立方体装饰 */
.cube-decor {
  position: absolute;
  width: 400px;
  height: 400px;
  left: 10%;
  top: 50%;
  transform: translateY(-50%) perspective(800px) rotateX(20deg) rotateY(-25deg);
  pointer-events: none;
  animation: floatCube 8s ease-in-out infinite;
}

.cube-decor .face {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(0, 212, 255, 0.4);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(43, 139, 255, 0.04));
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.2) inset;
}

.cube-decor .face.front  { transform: translateZ(100px); }
.cube-decor .face.back   { transform: rotateY(180deg) translateZ(100px); }
.cube-decor .face.left   { transform: rotateY(-90deg) translateZ(100px); }
.cube-decor .face.right  { transform: rotateY(90deg) translateZ(100px); }
.cube-decor .face.top    { transform: rotateX(90deg) translateZ(100px); }
.cube-decor .face.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes floatCube {
  0%, 100% { transform: translateY(-50%) perspective(800px) rotateX(20deg) rotateY(-25deg); }
  50%      { transform: translateY(-55%) perspective(800px) rotateX(25deg) rotateY(-20deg); }
}

/* 数据点装饰 */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: rise 6s linear infinite;
}

@keyframes rise {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* 登录卡片 */
.login-card {
  position: relative;
  z-index: 10;
  width: 440px;
  max-width: calc(100vw - 32px);
  padding: 40px 36px 32px;
  background: rgba(8, 22, 60, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 0 40px rgba(0, 212, 255, 0.15),
    0 20px 60px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.6s ease;
}

.login-card::before,
.login-card::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent-cyan);
}
.login-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.login-card::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.brand-logo .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 8px;
  font-size: 18px;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.4);
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.login-title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-primary);
  position: relative;
}

.login-title::before,
.login-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}
.login-title::before { right: calc(50% + 60px); }
.login-title::after  { left:  calc(50% + 60px); }

.input-group {
  position: relative;
  margin-bottom: 18px;
}

.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
  transition: var(--transition);
}

.input-group .form-control { padding-left: 42px; }
.input-group .form-control:focus + .input-icon { color: var(--accent-cyan); }

.input-group .toggle-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  padding: 4px;
}
.input-group .toggle-eye:hover { color: var(--accent-cyan); }

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 20px;
  font-size: 13px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox input { display: none; }
.checkbox .check-box {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.checkbox input:checked + .check-box {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}
.checkbox input:checked + .check-box::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.login-options a {
  color: var(--accent-cyan);
  font-size: 13px;
  transition: var(--transition);
}
.login-options a:hover { text-shadow: 0 0 8px var(--accent-cyan); }

.btn-login {
  width: 100%;
  height: 44px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 4px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.btn-login::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: 0.6s;
}
.btn-login:hover::before { left: 100%; }
.btn-login:hover { box-shadow: 0 4px 20px rgba(0, 212, 255, 0.5); }

.login-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}
.login-divider span { padding: 0 12px; }

.social-login {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.social-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 18px;
  background: rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}
.social-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.login-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .cube-decor { display: none; }
}

@media (max-width: 480px) {
  .login-card { padding: 30px 24px 24px; }
  .brand-logo { font-size: 18px; }
  .login-title { font-size: 16px; }
  .login-title::before, .login-title::after { width: 30px; }
  .login-title::before { right: calc(50% + 40px); }
  .login-title::after  { left:  calc(50% + 40px); }
}
