/* 云手机官网 - 自定义样式 */

/* 加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* 加强版动画类 */
.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.slide-in-left {
  animation: slideInFromLeft 0.8s ease forwards;
}

.slide-in-right {
  animation: slideInFromRight 0.8s ease forwards;
}

.pulse {
  animation: pulse 2s infinite;
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* 响应式调整 */
@media (max-width: 640px) {
  /* 基本布局调整 */
  .section {
    padding: 3rem 0 !important;
    min-height: 100vh !important;
  }
  
  /* 手机框架调整 */
  .phone-frame {
    width: 200px !important;
    height: 400px !important;
    border: 12px solid #1E293B !important;
    border-radius: 25px !important;
    margin: 1rem auto !important;
  }
  
  /* 英雄区域调整 */
  .hero-bg {
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%) !important;
  }
  
  /* 字体大小调整 */
  h1 {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }
  
  h2 {
    font-size: 2rem !important;
  }
  
  h3 {
    font-size: 1.5rem !important;
  }
  
  /* 文本换行优化 */
  p {
    text-align: justify !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
  
  /* 布局调整 */
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* 按钮样式优化 */
  .download-btn {
    font-size: 0.9rem !important;
    padding: 0.75rem 1.5rem !important;
  }
  
  /* 防止文字溢出容器 */
  * {
    box-sizing: border-box !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .phone-frame {
    width: 240px !important;
    height: 480px !important;
  }
  
  /* 防止文字溢出容器 */
  p {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
}

/* 全局响应式优化 */
@media (max-width: 768px) {
  /* 防止文字错乱 */
  body {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }
  
  /* 卡片布局调整 */
  .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
  
  .grid-cols-1.md\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  /* 图片响应式 */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* 防止布局错乱 */
  .flex {
    flex-wrap: wrap !important;
  }
}

/* 增强的按钮样式 */
.gradient-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.gradient-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  z-index: -1;
  transition: opacity 0.3s ease;
}

.gradient-btn:hover::before {
  opacity: 0.8;
}

/* 卡片悬停效果增强 */
.enhanced-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.enhanced-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 滚动条美化 */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 加载状态指示器 */
.loading-spinner {
  border: 3px solid rgba(79, 70, 229, 0.3);
  border-radius: 50%;
  border-top: 3px solid #4F46E5;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 高光文字效果 */
.glow-text {
  text-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

/* 背景图案 */
.pattern-bg {
  background-image: radial-gradient(#4F46E5 1px, transparent 1px);
  background-size: 30px 30px;
}

/* 自定义表单控件 */
.custom-input {
  transition: all 0.3s ease;
}

.custom-input:focus {
  border-color: #4F46E5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}