/* 
   HelloDJI Enterprise Global UI/UX Enhancements
   Theme: Glassmorphism & Dynamic Flowing Light (Orange/Dark) 
*/

/* =====================================================
   Android / Mobile Browser Compatibility Fixes
   ===================================================== */

/* 1. 禁止 Android 浏览器自动放大字体 */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* 2. 防止 Android WebView overflow-x 溢出 */
body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* 3. 修复 Android 上 backdrop-filter 导致的白屏/卡顿
      降级为半透明背景作为安全fallback */
@supports not (backdrop-filter: blur(1px)) {
  .glass-panel {
    background: rgba(25, 25, 25, 0.92) !important;
  }
  header {
    background: rgba(20, 20, 20, 0.97) !important;
  }
}

/* 4. 手机端 letter-spacing 收紧，防止 CJK 字符撑爆容器 */
@media (max-width: 767px) {
  .tracking-widest {
    letter-spacing: 0.05em !important;
  }
  .tracking-wider {
    letter-spacing: 0.03em !important;
  }
  /* 首屏副标题收小 */
  .hero-subtitle {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }
  /* 安卓上固定定位元素的底部留白（规避导航栏遮挡） */
  .fixed.bottom-0 {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}


:root {
  --dji-orange: #FF6700;
  --dji-orange-glow: rgba(255, 103, 0, 0.4);
  --dji-dark: #141414;
  --dji-panel-bg: rgba(30, 30, 30, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* Base Glassmorphism Panel */
.glass-panel {
  background: var(--dji-panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  background: rgba(40, 40, 40, 0.75);
  border-color: rgba(255, 103, 0, 0.3);
  box-shadow: 0 12px 40px 0 rgba(255, 103, 0, 0.15);
}

/* Ambient Animated Lighting Effects (The "Orbs") */
.ambient-light {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  opacity: 0.5;
  mix-blend-mode: screen;
  z-index: 0;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.ambient-light.primary {
  background: radial-gradient(circle, rgba(255, 103, 0, 0.8) 0%, rgba(255, 103, 0, 0) 70%);
}

.ambient-light.secondary {
  background: radial-gradient(circle, rgba(255, 70, 0, 0.6) 0%, rgba(255, 70, 0, 0) 70%);
  animation-delay: -5s;
  animation-duration: 15s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(10%, -15%) scale(1.1);
  }
  66% {
    transform: translate(-10%, 15%) scale(0.9);
  }
  100% {
    transform: translate(0, 0) scale(1.05);
  }
}

/* Navbar specific glass effect */
.nav-glass {
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Form Input Focus Glow */
.floating-input:focus {
  background: rgba(30, 30, 30, 0.9);
  box-shadow: 0 0 0 1px var(--dji-orange), 0 0 20px var(--dji-orange-glow);
  border-color: transparent !important;
}

/* Enhanced Gradient Text */
.text-gradient-flow {
  background: linear-gradient(270deg, #FF6700, #ff8c42, #FF6700);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: gradientFlow 4s linear infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Subtle pulse for critical CTAs */
.btn-pulse-glow {
  position: relative;
}

.btn-pulse-glow::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  box-shadow: 0 0 15px 2px rgba(255, 103, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-pulse-glow:hover::before {
  opacity: 1;
  animation: pulseGlow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 15px 2px rgba(255, 103, 0, 0.5);
  }
  50% {
    opacity: 0.5;
    box-shadow: 0 0 25px 6px rgba(255, 103, 0, 0.3);
  }
}

/* Overriding inline btn-hover-fx for stronger lift & glow */
.btn-hover-fx:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 24px rgba(255, 103, 0, 0.6) !important;
}
