/* 作品登记证书 - 炫酷展示动效 */

/* ========== 入场动画 ========== */
.cert-reveal {
  opacity: 0;
  transform: translateY(60px) scale(0.92) rotateX(15deg);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.cert-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1) rotateX(0);
}

/* ========== 卡片容器：3D 透视 ========== */
.cert-stage {
  perspective: 1500px;
}
.cert-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.35s ease;
  will-change: transform;
  cursor: pointer;
  box-shadow:
    0 25px 50px -12px rgba(76, 29, 149, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}
.cert-card:hover {
  box-shadow:
    0 35px 80px -15px rgba(76, 29, 149, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 0 60px rgba(168, 85, 247, 0.35);
}

/* ========== 金光边框（conic-gradient 旋转） ========== */
.cert-card::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 1.5rem;
  background: conic-gradient(
    from 0deg,
    #fbbf24 0deg,
    #f59e0b 60deg,
    #d97706 120deg,
    #f59e0b 180deg,
    #fbbf24 240deg,
    transparent 300deg,
    #fbbf24 360deg
  );
  z-index: -2;
  opacity: 0.85;
  animation: cert-border-spin 6s linear infinite;
}
.cert-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #fffaf0, #f5e6c8);
  z-index: -1;
}

@keyframes cert-border-spin {
  to { transform: rotate(360deg); }
}

/* ========== 悬浮光带（shimmer） ========== */
.cert-shimmer {
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 70%,
    transparent 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 3;
  animation: cert-shimmer-sweep 4s ease-in-out infinite;
}
@keyframes cert-shimmer-sweep {
  0%, 12%   { left: -100%; }
  50%, 100% { left: 150%; }
}

/* ========== 印章脉冲 ========== */
.cert-seal {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 96px;
  height: 96px;
  pointer-events: none;
  z-index: 4;
  animation: cert-seal-pulse 2.4s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(220, 38, 38, 0.55));
}
.cert-seal::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.35) 0%, transparent 70%);
  z-index: -1;
  animation: cert-seal-glow 2.4s ease-in-out infinite;
}
@keyframes cert-seal-pulse {
  0%, 100% { transform: scale(1) rotate(-6deg); }
  50%      { transform: scale(1.06) rotate(2deg); }
}
@keyframes cert-seal-glow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.25); opacity: 1; }
}

/* ========== 标题入场：字符逐个上浮 ========== */
.cert-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: cert-title-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes cert-title-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 角标（4 角小三角） ========== */
.cert-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid #d97706;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.cert-card:hover .cert-corner { opacity: 1; }
.cert-corner.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; transform: translate(-6px,-6px); }
.cert-corner.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; transform: translate(6px,-6px); }
.cert-corner.bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; transform: translate(-6px,6px); }
.cert-corner.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; transform: translate(6px,6px); }
.cert-card:hover .cert-corner.tl { transform: translate(0,0); }
.cert-card:hover .cert-corner.tr { transform: translate(0,0); }
.cert-card:hover .cert-corner.bl { transform: translate(0,0); }
.cert-card:hover .cert-corner.br { transform: translate(0,0); }

/* ========== 移动端：弱化 3D ========== */
@media (max-width: 768px) {
  .cert-card { transform: none !important; }
  .cert-card::before { animation-duration: 10s; opacity: 0.55; }
  .cert-seal { width: 72px; height: 72px; right: -6px; bottom: -6px; }
}
