/**
 * 尔湾云 (erwanyun.shop) - 视觉系统
 * 框架 98: 3D 软陶 · 可爱品牌吉祥物眨眼 (Claymorphism & Cute Mascot Blinking System)
 */

:root {
  /* 3D 软陶核心调色盘：温润天蓝、棉花糖白、珊瑚暖橙、柔和薄荷 */
  --clay-bg: #f0f4f9;
  --clay-surface: #ffffff;
  --clay-surface-soft: #f8fafc;
  --clay-primary: #3b82f6;
  --clay-primary-light: #60a5fa;
  --clay-primary-dark: #1d4ed8;
  --clay-secondary: #f97316;
  --clay-secondary-light: #fb923c;
  --clay-accent: #06b6d4;
  --clay-text: #1e293b;
  --clay-text-muted: #64748b;
  --clay-text-light: #94a3b8;
  --clay-border: rgba(226, 232, 240, 0.8);

  /* 3D 软陶触感阴影与高光系统 (Clay Inset & Drop Shadows) */
  --clay-shadow-sm: 6px 6px 14px rgba(160, 185, 220, 0.35),
                    -4px -4px 10px rgba(255, 255, 255, 0.9),
                    inset 2px 2px 4px rgba(255, 255, 255, 0.7),
                    inset -2px -2px 5px rgba(170, 195, 230, 0.25);

  --clay-shadow-md: 10px 12px 24px rgba(150, 180, 220, 0.4),
                    -8px -8px 20px rgba(255, 255, 255, 0.95),
                    inset 3px 3px 6px rgba(255, 255, 255, 0.8),
                    inset -3px -3px 7px rgba(160, 190, 230, 0.3);

  --clay-shadow-lg: 16px 20px 36px rgba(140, 175, 220, 0.45),
                    -12px -12px 28px rgba(255, 255, 255, 1),
                    inset 4px 4px 8px rgba(255, 255, 255, 0.9),
                    inset -4px -4px 9px rgba(150, 185, 230, 0.35);

  --clay-shadow-btn: 6px 8px 18px rgba(37, 99, 235, 0.35),
                     -4px -4px 12px rgba(255, 255, 255, 0.85),
                     inset 2px 2px 4px rgba(255, 255, 255, 0.6),
                     inset -2px -2px 6px rgba(29, 78, 216, 0.4);

  --clay-shadow-btn-hover: 8px 12px 24px rgba(37, 99, 235, 0.45),
                           -5px -5px 14px rgba(255, 255, 255, 0.95),
                           inset 2px 2px 5px rgba(255, 255, 255, 0.75),
                           inset -2px -2px 7px rgba(29, 78, 216, 0.45);

  --clay-shadow-inset: inset 5px 5px 10px rgba(160, 185, 220, 0.35),
                       inset -5px -5px 10px rgba(255, 255, 255, 0.85);

  /* 软陶圆角系统 */
  --clay-radius-sm: 16px;
  --clay-radius-md: 24px;
  --clay-radius-lg: 32px;
  --clay-radius-full: 9999px;
}

/* 软陶基础容器与卡片 */
.clay-card {
  background: var(--clay-surface);
  border-radius: var(--clay-radius-md);
  box-shadow: var(--clay-shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.clay-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--clay-shadow-lg);
}

.clay-card-inset {
  background: #f1f5f9;
  border-radius: var(--clay-radius-md);
  box-shadow: var(--clay-shadow-inset);
  border: 1px solid rgba(226, 232, 240, 0.6);
}

/* 软陶微粒徽章 */
.clay-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--clay-radius-full);
  background: #ffffff;
  box-shadow: var(--clay-shadow-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clay-primary);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.clay-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: clay-pulse 2s infinite ease-in-out;
}

@keyframes clay-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

/* 软陶触感按钮 */
.clay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--clay-radius-full);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  position: relative;
}

.clay-btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: var(--clay-shadow-btn);
}

.clay-btn-primary:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  box-shadow: var(--clay-shadow-btn-hover);
  transform: translateY(-3px) scale(1.02);
  color: #ffffff;
}

.clay-btn-primary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: var(--clay-shadow-sm);
}

.clay-btn-secondary {
  background: #ffffff;
  color: var(--clay-text);
  box-shadow: var(--clay-shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.clay-btn-secondary:hover {
  background: #f8fafc;
  color: var(--clay-primary);
  transform: translateY(-2px);
  box-shadow: var(--clay-shadow-md);
}

.clay-btn-coral {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 6px 8px 18px rgba(234, 88, 12, 0.35),
              -4px -4px 12px rgba(255, 255, 255, 0.85),
              inset 2px 2px 4px rgba(255, 255, 255, 0.6);
}

.clay-btn-coral:hover {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  transform: translateY(-2px) scale(1.02);
}

/* =======================================================
   可爱品牌吉祥物「小湾」与眨眼互动 (Cute Mascot Blinking)
   ======================================================= */
.clay-mascot-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  user-select: none;
}

.clay-mascot-card {
  width: 220px;
  height: 220px;
  background: linear-gradient(145deg, #ffffff 0%, #e0f2fe 100%);
  border-radius: 48px;
  box-shadow: var(--clay-shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 3px solid rgba(255, 255, 255, 0.9);
  animation: clay-float 4s ease-in-out infinite;
  transform-style: preserve-3d;
}

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

.mascot-avatar {
  width: 170px;
  height: 170px;
  position: relative;
}

/* 吉祥物眼睛基础与眨眼动画 */
.mascot-eye {
  transform-origin: center;
  transition: transform 0.1s ease;
}

/* 周期性自然眨眼动画 */
.mascot-eye-left,
.mascot-eye-right {
  animation: mascot-blink-cycle 4.5s infinite;
  transform-origin: 50% 50%;
}

.mascot-eye-right {
  animation-delay: 0.05s; /* 微秒延迟让神态更生动自然 */
}

@keyframes mascot-blink-cycle {
  0%, 94%, 100% {
    transform: scaleY(1);
  }
  96%, 98% {
    transform: scaleY(0.08); /* 闭眼眨动瞬间 */
  }
}

/* 悬停或交互时抛媚眼 Winking */
.clay-mascot-wrapper:hover .mascot-eye-right {
  animation: mascot-wink 1.2s ease-in-out infinite;
}

@keyframes mascot-wink {
  0%, 20%, 80%, 100% { transform: scaleY(1); }
  40%, 60% { transform: scaleY(0.1); }
}

/* 瞳孔高光流动 */
.mascot-pupil {
  transition: transform 0.15s ease-out;
}

/* 互动微气泡提示语 */
.mascot-speech-bubble {
  position: absolute;
  top: -24px;
  right: -20px;
  background: #ffffff;
  padding: 8px 14px;
  border-radius: var(--clay-radius-full);
  box-shadow: var(--clay-shadow-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--clay-primary-dark);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: bubble-pop 3s ease-in-out infinite;
  z-index: 5;
}

@keyframes bubble-pop {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.05) translateY(-3px); }
}

/* 手机自适应与无障碍动效降级 */
@media (prefers-reduced-motion: reduce) {
  .clay-mascot-card,
  .clay-card,
  .mascot-eye-left,
  .mascot-eye-right,
  .mascot-speech-bubble {
    animation: none !important;
    transition: none !important;
  }
}
