/* =============================================
 * UGOOE Premium Design Enhancements v2.0
 * 毛玻璃 / 微交互 / 渐变光效 / 高级阴影
 * Linear/Vercel 级别设计品质
 * ============================================= */

/* ===== 1. 玻璃态卡片效果 ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(16, 185, 129, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
}

.glass-card.featured-glass {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.06) 0%,
    rgba(94, 106, 210, 0.04) 100%
  ) !important;
  border-color: rgba(16, 185, 129, 0.15);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(16, 185, 129, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.glass-card.featured-glass:hover {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow:
    0 8px 48px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(16, 185, 129, 0.12),
    0 0 30px rgba(16, 185, 129, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ===== 2. 按钮高级悬停动效 ===== */
.btn-premium {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-premium::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out;
}

.btn-premium:hover::before {
  width: 300px;
  height: 300px;
}

.btn-premium:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 8px 30px rgba(16, 185, 129, 0.25),
    0 0 0 1px rgba(16, 185, 129, 0.15);
}

.btn-premium:active {
  transform: translateY(0px) scale(0.97);
}

/* Ghost按钮高级效果 */
.btn-premium-ghost {
  position: relative;
  isolation: isolate;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-premium-ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(16, 185, 129, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.btn-premium-ghost:hover {
  border-color: rgba(16, 185, 129, 0.3) !important;
  transform: translateY(-2px);
}

.btn-premium-ghost:hover::before {
  opacity: 1;
}

/* ===== 3. 渐变文字标题 ===== */
.title-gradient-green {
  background: linear-gradient(135deg, #10B981 0%, #34D399 50%, #6EE7B7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-gradient-violet {
  background: linear-gradient(135deg, #5e6ad2 0%, #818CF8 50%, #A5B4FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-gradient-mixed {
  background: linear-gradient(135deg, #10B981 0%, #5e6ad2 50%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-fine {
  font-weight: 300 !important;
  letter-spacing: -0.04em;
}

.title-medium {
  font-weight: 500 !important;
  letter-spacing: -0.03em;
}

.title-semibold {
  font-weight: 600 !important;
  letter-spacing: -0.02em;
}

/* ===== 4. 边框发光效果 ===== */
.glow-border {
  position: relative;
}

.glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.08),
    rgba(94, 106, 210, 0.08),
    rgba(16, 185, 129, 0.04)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

.glow-border:hover::after {
  opacity: 1;
}

.glow-border-active::after {
  opacity: 1;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.15),
    rgba(94, 106, 210, 0.1),
    rgba(16, 185, 129, 0.08)
  );
}

/* ===== 5. 径向渐变光晕背景 ===== */
.radial-glow-green {
  background-image:
    radial-gradient(ellipse 80% 60% at 0% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 100% 50%, rgba(94, 106, 210, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(16, 185, 129, 0.04) 0%, transparent 70%);
}

.radial-glow-subtle {
  background-image:
    radial-gradient(ellipse 60% 50% at 0% 50%, rgba(16, 185, 129, 0.02) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(94, 106, 210, 0.02) 0%, transparent 60%);
}

/* ===== 6. 页面背景光晕 ===== */
.page-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(ellipse 40% 30% at 15% 20%, rgba(16, 185, 129, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 30% 40% at 85% 30%, rgba(94, 106, 210, 0.025) 0%, transparent 70%),
    radial-gradient(ellipse 50% 25% at 50% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 60%);
}

/* ===== 7. 微交互动画 ===== */
@keyframes floatIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0); }
  50% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.06); }
}

@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-float-in {
  animation: floatIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-slide {
  animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.12s; }
.stagger-3 { animation-delay: 0.2s; }
.stagger-4 { animation-delay: 0.28s; }
.stagger-5 { animation-delay: 0.36s; }
.stagger-6 { animation-delay: 0.44s; }
.stagger-7 { animation-delay: 0.52s; }
.stagger-8 { animation-delay: 0.6s; }

/* ===== 8. 增强表单控件 ===== */
.input-premium {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text, #e8edf5);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.input-premium:focus {
  border-color: rgba(16, 185, 129, 0.3) !important;
  background: rgba(255, 255, 255, 0.03);
  box-shadow:
    0 0 0 3px rgba(16, 185, 129, 0.06),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
  outline: none;
}

.input-premium::placeholder {
  color: var(--text3, #535d6e);
}

/* ===== 9. 卡片入场动画序列 ===== */
.card-stagger {
  opacity: 0;
  animation: floatIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== 10. 特殊元素装饰光环 ===== */
.accent-ring {
  position: relative;
}

.accent-ring::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.2),
    rgba(94, 106, 210, 0.15)
  );
  z-index: -1;
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s;
}

.accent-ring:hover::before {
  opacity: 1;
}

/* ===== 11. 分割线装饰 ===== */
.divider-gradient {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(16, 185, 129, 0.08) 20%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(94, 106, 210, 0.08) 80%,
    transparent 100%
  );
  border: none;
  margin: 24px 0;
}

/* ===== 12. 选中态发光 ===== */
.focus-glow:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(16, 185, 129, 0.15),
    0 0 20px rgba(16, 185, 129, 0.05);
}

/* ===== 13. 徽章升级 ===== */
.badge-premium {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(94, 106, 210, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.12);
  color: #10B981;
}

.badge-premium-gold {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.08));
  border-color: rgba(251, 191, 36, 0.15);
  color: #FBBF24;
}

/* ===== 14. 按钮加载脉冲 ===== */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ===== 15. 价格卡片特色优化 ===== */
.plan-premium {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-premium:hover {
  border-color: rgba(16, 185, 129, 0.2) !important;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(16, 185, 129, 0.06);
}

.plan-premium.featured {
  border-color: rgba(16, 185, 129, 0.2) !important;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.06) 0%,
    rgba(94, 106, 210, 0.03) 100%
  ) !important;
  box-shadow:
    0 4px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(16, 185, 129, 0.08);
}

/* ===== 16. 主页光晕增强 ===== */
.hero-glow-enhanced {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, rgba(94, 106, 210, 0.02) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: breathe 4s ease-in-out infinite;
}
