/* 全局样式 */
:root {
  --primary: #81c2e7;
  --primary-foreground: #000000;
  --secondary: #f0f9ff;
  --secondary-foreground: #0f172a;
  --background: #ffffff;
  --muted: #f8fafc;
  --foreground: #0f172a;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --ring: #81c2e7;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

/* 渐变背景 */
.gradient-bg {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

/* 导航链接样式 */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
}

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

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* 按钮过渡效果 */
.btn-primary,
.btn-secondary {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .feature-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--muted);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-foreground);
}

/* 文本选择样式 */
::selection {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* 禁用状态样式 */
button:disabled,
input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 焦点样式 */
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 图片加载动画 */
img {
  transition: opacity 0.3s ease;
}

img.loading {
  opacity: 0;
}

img.loaded {
  opacity: 1;
}

/* 骨架屏效果 */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 珍珠图片特殊处理 */
.pearl-img {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.pearl-img:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 产品卡片阴影效果 */
.product-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 评价区域特殊样式 */
.testimonial-card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 移动端导航动画 */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.mobile-menu.active {
  max-height: 500px;
}

/* 社交图标悬停效果 */
.social-icon {
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-3px);
}

/* 回到顶部按钮动画 */
#back-to-top {
  transition: all 0.3s ease;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* 页面加载过渡 */
.page-load {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.page-load.loaded {
  opacity: 1;
}

/* 标题强调效果 */
.title-emphasis {
  position: relative;
  display: inline-block;
}

.title-emphasis::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
  border-radius: 3px;
}

/* 按钮渐变效果 */
.btn-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #63a0c2 100%);
  transition: all 0.3s ease;
}

.btn-gradient:hover {
  background: linear-gradient(135deg, #63a0c2 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 特殊布局区域 */
.layout-section {
  padding: 5rem 0;
  position: relative;
}

.layout-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.layout-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* 骨架屏效果 */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 淡入淡出效果 */
.fade-in {
  animation: fadeIn 0.8s ease-in-out;
}

/* 平滑过渡 */
.smooth-transition {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 阴影效果增强 */
.shadow-enhanced {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 对比色模式适配 */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0f172a;
    --foreground: #ffffff;
    --muted: #1e293b;
    --muted-foreground: #cbd5e1;
    --border: #334155;
  }
  
  .product-card,
  .testimonial-card {
    background-color: #1e293b;
    border-color: #334155;
  }
}

/* 响应式图片 */
.responsive-img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 图片容器 */
.img-container {
  overflow: hidden;
  position: relative;
}

.img-container img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-container:hover img {
  transform: scale(1.1);
}

/* 文字渐变效果 */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(135deg, var(--primary) 0%, #63a0c2 100%);
}