.font-playfair { font-family: 'Playfair Display', serif; }
.font-inter { font-family: 'Inter', sans-serif; }

.crystal-sparkle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.hero-gradient {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #1a1a2e 75%, #0f0f23 100%);
}

.text-gradient {
    background: linear-gradient(45deg, #e5e7eb, #f9fafb, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.luxury-card {
    background: rgba(255, 255, 255, 0.02);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hover-glow:hover {
    box-shadow: 0 8px 25px -5px rgba(139, 92, 246, 0.3), 0 10px 10px -5px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

/* Additional animations */
.loaded { animation: fadeIn 1s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.animate-fade-in { animation: slideInUp 0.6s ease-out forwards; }
@keyframes slideInUp { from { opacity: 0; transform: translateY(30px);} to { opacity: 1; transform: translateY(0);} }

/* Hero文字渐显动画增强 */
.hero-text-line-1, .hero-text-line-2 {
    animation: textGlow 2s ease-in-out infinite alternate;
}

.hero-text-line-2 {
    animation-delay: 0.5s;
}

@keyframes textGlow {
    0% { text-shadow: 0 0 5px rgba(139, 92, 246, 0.3); }
    100% { text-shadow: 0 0 20px rgba(139, 92, 246, 0.6), 0 0 30px rgba(139, 92, 246, 0.4); }
}

/* 流光溢彩背景动画 */
.flowing-gradient {
    position: relative;
    background: linear-gradient(135deg, #581c87, #7c3aed, #3730a3, #1e1b4b);
    background-size: 400% 400%;
    animation: gradientFlow 8s ease-in-out infinite;
    overflow: hidden;
    /* 性能优化 */
    will-change: background-position;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.flowing-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 3s ease-in-out infinite;
    /* 性能优化 */
    will-change: left, opacity;
    transform: translateZ(0);
}

.flowing-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        -45deg,
        transparent,
        rgba(168, 85, 247, 0.15),
        rgba(139, 92, 246, 0.2),
        transparent
    );
    animation: reverseShimmer 4s ease-in-out infinite;
    animation-delay: 1.5s;
    /* 性能优化 */
    will-change: right, opacity;
    transform: translateZ(0);
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 25%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 75%;
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes reverseShimmer {
    0% {
        right: -100%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        right: 100%;
        opacity: 0;
    }
}

/* 星光闪烁效果 */
.flowing-gradient .starlight {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite;
}

.flowing-gradient .starlight:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.flowing-gradient .starlight:nth-child(2) { top: 40%; left: 30%; animation-delay: 0.5s; }
.flowing-gradient .starlight:nth-child(3) { top: 60%; left: 60%; animation-delay: 1s; }
.flowing-gradient .starlight:nth-child(4) { top: 80%; left: 80%; animation-delay: 1.5s; }
.flowing-gradient .starlight:nth-child(5) { top: 30%; left: 80%; animation-delay: 2s; }

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.5);
    }
}

/* 响应式动画优化 - 在移动设备上减少动画以提高性能 */
@media (max-width: 768px) {
    .flowing-gradient {
        animation-duration: 12s; /* 减慢动画速度 */
    }
    
    .flowing-gradient::before,
    .flowing-gradient::after {
        animation-duration: 6s; /* 减慢流光动画 */
    }
    
    .flowing-gradient .starlight {
        animation-duration: 3s; /* 减慢星光动画 */
    }
    
    .hero-text-line-1, .hero-text-line-2 {
        animation: none; /* 在移动端禁用文字发光效果 */
    }
}

/* 降低动画偏好设置的支持 */
@media (prefers-reduced-motion: reduce) {
    .flowing-gradient,
    .flowing-gradient::before,
    .flowing-gradient::after,
    .flowing-gradient .starlight,
    .hero-text-line-1,
    .hero-text-line-2 {
        animation: none;
    }
}

/* 优雅的自定义滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { 
  background: linear-gradient(to bottom, #a78bfa, #c084fc); 
  border-radius: 6px; 
  transition: all 0.2s ease;
}
::-webkit-scrollbar-thumb:hover { 
  background: linear-gradient(to bottom, #8b5cf6, #a855f7); 
}

/* 文本选择效果 */
::selection { 
  background-color: rgba(139, 92, 246, 0.2); 
  color: #1e293b; 
}

/* 现代化焦点样式 */
input:focus, textarea:focus, select:focus, button:focus { 
  outline: none; 
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Button transitions */
button { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
button:hover { transform: translateY(-2px); }
button:active { transform: translateY(0); }

/* Mobile tweaks */
@media (max-width: 640px) {
  .font-playfair { font-kerning: normal; }
  .luxury-card { border-radius: 1rem; }
}

/* 通用响应式图片优化 */
.crystal-gallery img { display: block; height: auto; max-width: 100%; }
.crystal-breadcrumb a { color: #9ca3af; }
.crystal-breadcrumb a:hover { color: #c4b5fd; }

/* Line clamp helpers for titles without Tailwind plugin */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 移动端底部菜单样式确保 */
@media (max-width: 1023px) {
  /* 确保移动端底部菜单能够正确浮动 */
  nav[aria-label="移动端底部导航"] {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
  }
  
  /* 米白色主题优化 */
  nav[aria-label="移动端底部导航"] {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }
  
  /* 菜单项悬停效果优化 */
  nav[aria-label="移动端底部导航"] a:hover,
  nav[aria-label="移动端底部导航"] button:hover {
    transform: translateY(-2px) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
}


