/* ═══════════════════════════════════════════════════════════════
   Run Up Studio - Master Enhancements
   艺术品级优化 - 统一增强文件
   ═══════════════════════════════════════════════════════════════ */

/* 基于模块优化专家的深度分析创建 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1. 导航系统增强
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 导航链接呼吸态颜色 */
.site-nav a {
  transition: 
    color 480ms cubic-bezier(0.34, 1.56, 0.64, 1),
    letter-spacing 420ms cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav a:hover {
  letter-spacing: 0.08em;
}

/* 下划线发光效果 */
.site-nav a::after {
  box-shadow: 
    0 0 8px rgba(235, 203, 121, 0.4),
    0 2px 12px rgba(235, 203, 121, 0.2);
  transition: 
    transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 380ms ease;
}

/* Brand Mark 旋转微交互 */
.brand-mark {
  transition: transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-mark {
  transform: rotate(8deg) scale(1.05);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   2. 产品卡片增强
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 卡片内部光晕 */
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(154, 123, 230, 0.08) 0%,
    transparent 35%,
    rgba(116, 214, 222, 0.06) 100%
  );
  opacity: 0;
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 1;
}

.product-card:hover::before {
  opacity: 1;
}

/* 产品链接箭头动画 */
.product-card__button::after {
  content: '→';
  display: inline-block;
  margin-left: 4px;
  opacity: 0;
  transform: translateX(-8px);
  transition: 
    opacity 320ms ease,
    transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-card:hover .product-card__button::after {
  opacity: 1;
  transform: translateX(0);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   3. 房间页面增强
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 背景视差呼吸 */
.room-hero {
  background-size: 105% auto;
  animation: roomParallax 18s ease-in-out infinite;
}

@keyframes roomParallax {
  0%, 100% {
    background-size: 105% auto;
    background-position: center center;
  }
  50% {
    background-size: 110% auto;
    background-position: center 48%;
  }
}

/* Room Kicker 淡入延迟 */
.room-kicker {
  animation: fadeInUp 800ms cubic-bezier(0.22, 1, 0.36, 1) 200ms both;
}

/* Room Actions 序列动画 */
.room-actions > * {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp 680ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.room-actions > *:nth-child(1) {
  animation-delay: 600ms;
}

.room-actions > *:nth-child(2) {
  animation-delay: 720ms;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   4. Hero 大厅增强
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 标题渐变流动 */
.hero h1 span {
  background-size: 200% 100%;
  animation: gradientFlow 14s ease-in-out infinite;
}

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

/* Featured Badge 发光脉冲 */
.featured-badge {
  animation: badgePulse 3.2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 
      0 0 0 0 rgba(235, 203, 121, 0.4),
      0 0 12px rgba(235, 203, 121, 0.2);
  }
  50% {
    box-shadow: 
      0 0 0 6px rgba(235, 203, 121, 0),
      0 0 28px rgba(235, 203, 121, 0.4);
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   5. 按钮系统增强
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 主按钮内发光扫描 */
.button::before,
.primary-action::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: translateX(-100%) skewX(-12deg);
  transition: transform 680ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.button:hover::before,
.primary-action:hover::before {
  transform: translateX(100%) skewX(-12deg);
}

/* 按钮文字微缩放 */
.button:hover,
.primary-action:hover {
  transform: translateY(-2px) scale(1.02);
}

/* 线框按钮背景微亮 */
.button-line {
  position: relative;
  overflow: hidden;
}

.button-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(235, 203, 121, 0.04);
  opacity: 0;
  transition: opacity 420ms ease;
}

.button-line:hover::after {
  opacity: 1;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   6. Atlas 球体增强
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 球体阴影动态扩散 */
.atlas-orb {
  box-shadow: 0 8px 32px rgba(154, 123, 230, 0.15);
  transition: 
    transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 520ms ease;
}

.atlas-orb:hover {
  transform: scale(1.08);
  box-shadow: 0 16px 48px rgba(154, 123, 230, 0.25);
}

/* Hover 时停止旋转 */
.atlas-orb:hover .atlas-ring {
  animation-play-state: paused;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   7. 信息卡片增强
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 卡片 3D 倾斜 */
.info-card {
  transition: 
    transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 520ms ease;
}

.info-card:hover {
  transform: perspective(800px) rotateY(4deg) translateY(-4px);
  box-shadow: 
    0 24px 56px rgba(42, 35, 70, 0.12),
    0 8px 20px rgba(154, 123, 230, 0.08);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   8. 加载状态增强
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Shimmer 加载动画（已在 civilization-tokens.css 中定义） */

/* 骨架屏脉冲 */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(245, 245, 243, 0.8) 0%,
    rgba(245, 245, 243, 0.5) 50%,
    rgba(245, 245, 243, 0.8) 100%
  );
  background-size: 200% 100%;
  animation: skeletonPulse 2s ease-in-out infinite;
}

@keyframes skeletonPulse {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   9. 通用微交互
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 平滑的 focus 状态 */
*:focus-visible {
  outline: 2px solid rgba(154, 123, 230, 0.6);
  outline-offset: 4px;
  transition: outline-offset 280ms ease;
}

*:focus-visible:hover {
  outline-offset: 6px;
}

/* 链接 hover 下划线动画 */
a:not(.button):not(.button-line) {
  position: relative;
}

a:not(.button):not(.button-line)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

a:not(.button):not(.button-line):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   10. 性能优化
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* GPU 加速提示 */
.product-card,
.room-hero,
.atlas-orb,
.button {
  will-change: transform;
}

/* 动画完成后移除 will-change */
.product-card:not(:hover),
.atlas-orb:not(:hover),
.button:not(:hover) {
  will-change: auto;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   结束
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
