/* ============================================================
   Landing Page Styles - Optimized for Mobile
   ============================================================ */

.landing {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  transform: scale(1.02);
}

.landing-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* AI 未来人背景图 - WebP 格式（优先加载，94% 更小） */
.landing-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('landing-bg.webp') center top / cover no-repeat;
  opacity: 0.45;
}

/* 不支持 WebP 的浏览器回退到 JPEG */
@supports not (background-image: url('data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA')) {
  .landing-bg::before {
    background-image: url('landing-bg.jpg');
  }
}

/* IE11 回退到 JPEG */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .landing-bg::before {
    background-image: url('landing-bg.jpg');
  }
}

/* 横屏时主体下移，确保AI头部在画面内 */
@media (min-aspect-ratio: 4/3) {
  .landing-bg::before {
    background-position: center 20%;
  }
}

/* 渐变遮罩 - 确保文字可读性 */
.landing-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(7, 5, 17, 0.2) 0%,
    rgba(7, 5, 17, 0.4) 40%,
    rgba(7, 5, 17, 0.7) 75%,
    rgba(7, 5, 17, 0.92) 100%);
}

.landing-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.08);
  animation: orbitRotate linear infinite;
  z-index: 1;
}

.landing-orbit.ring-1 {
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
  animation-duration: 60s;
}

.landing-orbit.ring-2 {
  width: 180%;
  height: 180%;
  top: -40%;
  left: -40%;
  animation-duration: 90s;
  border-color: rgba(139, 92, 246, 0.05);
}

.landing-orbit.ring-3 {
  width: 220%;
  height: 220%;
  top: -60%;
  left: -60%;
  animation-duration: 120s;
  border-color: rgba(139, 92, 246, 0.03);
}

.landing-starfield {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.landing-starfield::before,
.landing-starfield::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 
    20vw 10vh 0 rgba(255, 255, 255, 0.3),
    40vw 30vh 0 rgba(255, 255, 255, 0.2),
    60vw 15vh 0 rgba(255, 255, 255, 0.35),
    80vw 40vh 0 rgba(255, 255, 255, 0.25),
    10vw 50vh 0 rgba(255, 255, 255, 0.3),
    30vw 70vh 0 rgba(255, 255, 255, 0.2),
    50vw 60vh 0 rgba(255, 255, 255, 0.35),
    70vw 80vh 0 rgba(255, 255, 255, 0.25),
    90vw 65vh 0 rgba(255, 255, 255, 0.3);
  animation: twinkle 4s ease-in-out infinite alternate;
}

.landing-starfield::after {
  animation-delay: -2s;
  opacity: 0.6;
}

.landing-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding: 0 24px;
  text-align: center;
}

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.landing-avatar-ring {
  position: relative;
  width: 96px;
  height: 96px;
}

.landing-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.3);
}

.landing-avatar svg {
  width: 48px;
  height: 48px;
}

.landing-avatar-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.3) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
  z-index: 1;
}

.landing-title {
  font-size: 42px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin: 0;
  text-shadow: 0 2px 20px rgba(124, 58, 237, 0.4);
}

.landing-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  max-width: 280px;
  line-height: 1.5;
}

.landing-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  margin-bottom: 40px;
}

.landing-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.landing-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.landing-feature-icon svg {
  width: 20px;
  height: 20px;
  color: #a78bfa;
}

.landing-feature-text {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.landing-feature-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2px;
}

.landing-feature-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

.landing-cta {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.landing-btn {
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.landing-btn-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.landing-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.landing-btn small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
}

.landing-btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.landing-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(124, 58, 237, 0.4);
}

.landing-btn-primary:active {
  transform: translateY(0);
}

.landing-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.landing-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.landing-footer {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
}

.landing-footer-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

/* 激活提示 */
.activation-prompt {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 20px;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.activation-prompt.hidden {
  opacity: 0;
  pointer-events: none;
}

.activation-prompt-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.activation-prompt-btn {
  padding: 4px 12px;
  background: rgba(124, 58, 237, 0.4);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.activation-prompt-btn:hover {
  background: rgba(124, 58, 237, 0.6);
}

/* Animations */
@keyframes orbitRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 0.3; }
}

@keyframes twinkle {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

/* Hide landing */
.landing.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
