/* TikNote Pricing Page Styles */

/* CSS Variables */
:root {
  --radius: 0.5rem; /* 8px - 匹配原始HTML */
}

/* Main Content Layout */
.main-content {
  min-height: 100vh;
  padding-top: 5rem; /* Account for fixed navbar */
}

/* Pricing Hero Section - 合并到pricing-section中 */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1280px; /* max-w-7xl */
  margin: 0 auto 50px; /* 与价格卡片的间距 */
  padding: 0 1rem; /* px-4 */
}

@media (min-width: 640px) {
  .hero-content {
    padding: 0 1.5rem; /* sm:px-6 */
  }
}

@media (min-width: 1024px) {
  .hero-content {
    padding: 0 2rem; /* lg:px-8 */
  }
}

.hero-title {
  font-size: 2.25rem; /* text-4xl */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem; /* mb-6 = 24px */
  color: white;
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3rem; /* lg:text-5xl */
  }
}

.hero-description {
  font-size: 1.25rem; /* text-xl */
  color: rgb(203, 213, 225); /* text-slate-300 */
  line-height: 1.6;
  margin-bottom: 0;
}

/* Pricing Section */
.pricing-section {
  padding-top: 20px; /* 标题距离导航栏底部 20px，总计约100px */
  padding-bottom: 50px; /* 与下一个section的间距 */
  background: linear-gradient(135deg, var(--tiknote-primary) 0%, var(--tiknote-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.pricing-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(29, 78, 216, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem; /* 根据参考图调整间距 */
  max-width: 1200px; /* 减小最大宽度 */
  margin: 0 auto;
  padding: 1.5rem; /* 根据参考图调整内边距 */
  overflow: visible; /* 确保标签不被裁剪 */
}

/* Responsive grid layout matching original */
@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr); /* md:grid-cols-2 */
    gap: 1.5rem; /* 调整平板端间距 */
    padding: 1.5rem 2rem; /* 调整平板端内边距 */
  }
}

@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(4, 1fr); /* lg:grid-cols-4 */
    gap: 1.5rem; /* 根据参考图调整大屏幕间距 */
    padding: 1.5rem 3rem; /* 调整桌面端内边距 */
  }
}

/* Pricing Cards */
.pricing-card {
  background: rgba(30, 41, 59, 0.8); /* 更深的背景色 */
  border: 1px solid rgba(71, 85, 105, 0.8); /* 更明显的边框 */
  border-radius: 0.75rem; /* 12px 圆角 */
  padding: 0;
  position: relative;
  transition: all 150ms;
  display: flex;
  flex-direction: column;
  height: 380px !important; /* 增加卡片高度 */
  min-height: 380px;
  max-height: 380px;
  cursor: pointer;
  animation: fadeIn 0.6s ease-out;
  overflow: visible;
}

.pricing-card:hover {
  border-color: rgba(147, 51, 234, 0.5); /* hover:border-tiknote-accent/50 */
}

/* Popular Plan Highlight - Monthly Plan */
.pricing-card.popular {
  border: 2px solid #8b5cf6; /* 紫色边框，完全匹配参考图 */
}

/* Plan Header */
.plan-header {
  padding: 1.5rem 1rem 0.5rem; /* 增加顶部内边距，让内容整体下移 */
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.125rem; /* 进一步减少元素间距 */
}

.plan-name {
  font-size: 1.125rem; /* 根据参考图调整标题字体 = 18px */
  line-height: 1.5rem; /* 调整行高 = 24px */
  font-weight: 700; /* font-bold */
  color: white;
  margin: 0 0 0.25rem 0; /* 进一步减少底部边距 */
  letter-spacing: -0.025em; /* tracking-tight */
}

.plan-price {
  margin: 0;
}

.price-amount {
  font-size: 2.5rem; /* 根据参考图调整价格字体 = 40px */
  line-height: 2.5rem; /* 调整行高 = 40px */
  font-weight: 700; /* font-bold */
  color: #8b5cf6; /* 紫色，匹配参考图 */
}

/* Free Trial 价格使用紫色 */
.pricing-card:nth-child(1) .price-amount {
  color: #8b5cf6; /* 紫色 */
}

/* Annual Plan 价格使用绿色 */
.pricing-card:nth-child(4) .price-amount {
  color: #10b981; /* 绿色，匹配参考图 */
}

.plan-description {
  font-size: 0.75rem; /* 根据参考图调整描述字体 = 12px */
  line-height: 1rem; /* 调整行高 = 16px */
  color: rgb(156, 163, 175); /* text-gray-400 */
  margin: 0.25rem 0 0 0; /* 完全移除底部边距 */
}

/* Plan Features */
.plan-features {
  padding: 0 1rem 1rem; /* 完全移除顶部内边距，让特性列表紧贴描述 */
  flex: 1; /* 自动填充剩余空间，确保按钮对齐 */
  display: flex;
  flex-direction: column;
  min-height: 0; /* 允许flex子项收缩 */
  /* 使用原始HTML的space-y-4布局 */
}

.plan-features > * + * {
  margin-top: 0.25rem; /* 进一步减少plan-features内部元素间距 */
}

.features-list {
  flex: 0 1 auto; /* 不强制占据剩余空间，允许收缩 */
  min-height: 0; /* 允许收缩 */
  /* 使用原始HTML的space-y-3布局 */
}

.features-list > * + * {
  margin-top: 0.5rem; /* 根据参考图调整特性项间距 */
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* 图标与文字间距 */
  margin-bottom: 0; /* 移除底部边距，只使用上面的间距 */
}

.feature-item span {
  font-size: 0.75rem; /* 根据参考图调整特性文字 = 12px */
  line-height: 1rem; /* 调整行高 = 16px */
  color: rgb(156, 163, 175); /* text-gray-400 */
}

.feature-icon {
  width: 0.875rem; /* 根据参考图调整图标 = 14px */
  height: 0.875rem; /* 根据参考图调整图标 = 14px */
  color: var(--tiknote-accent);
  flex-shrink: 0;
}

.plan-btn {
  width: 100%;
  font-weight: 600; /* font-semibold */
  height: 2.5rem; /* 根据参考图调整按钮高度 = 40px */
  padding: 0.5rem 1rem; /* 根据参考图调整内边距 */
  font-size: 0.875rem; /* 根据参考图调整字体 = 14px */
  border-radius: 0.375rem; /* 根据参考图调整圆角 */
  border: none;
  cursor: pointer;
  transition: all 150ms; /* transition-all */
  margin-top: auto; /* 自动推到底部 */
  margin-bottom: 0; /* 确保没有底部边距 */
  flex-shrink: 0; /* 防止按钮被压缩 */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Featured Plan Styles */
.pricing-card.featured {
  border: 2px solid var(--tiknote-accent); /* border-2 border-tiknote-accent */
  background: linear-gradient(to bottom right,
    rgba(147, 51, 234, 0.1),
    rgba(59, 130, 246, 0.1)
  ); /* bg-gradient-to-br from-tiknote-accent/10 to-tiknote-blue/10 */
}

/* Plan Badge */
.plan-badge {
  position: absolute;
  top: -0.75rem; /* 根据参考图调整位置 */
  left: 50%;
  transform: translateX(-50%); /* left-1/2 transform -translate-x-1/2 */
  z-index: 10;
  background: linear-gradient(to right, var(--tiknote-accent), var(--tiknote-blue)); /* bg-gradient-to-r from-tiknote-accent to-tiknote-blue */
  color: white;
  padding: 0.5rem 1.5rem; /* 根据参考图调整内边距 */
  border-radius: 9999px; /* 完全圆角，胶囊形状 */
  font-size: 0.6875rem; /* text-xs = 11px */
  line-height: 0.875rem; /* 14px */
  font-weight: 600; /* font-semibold */
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* 根据参考图调整阴影 */
  height: 2rem; /* 根据参考图调整高度 */
}

/* Annual Plan Badge - Green */
.pricing-card:nth-child(4) .plan-badge {
  background: linear-gradient(to right, #10b981, #059669); /* from-green-500 to-emerald-500 */
}

/* Button Styles */
/* Free Trial Button - Purple Gradient */
.pricing-card:nth-child(1) .plan-btn {
  background: linear-gradient(135deg, var(--tiknote-accent), var(--tiknote-blue));
  color: white;
  border: none;
  transition: opacity var(--transition-normal);
}

.pricing-card:nth-child(1) .plan-btn:hover {
  opacity: 0.9;
}

/* Pay as You Go Button - Purple Border */
.pricing-card:nth-child(2) .plan-btn {
  background: transparent;
  color: var(--tiknote-accent);
  border: 2px solid var(--tiknote-accent);
  transition: all var(--transition-normal);
}

.pricing-card:nth-child(2) .plan-btn:hover {
  background: var(--tiknote-accent);
  color: white;
}

/* Monthly Plan Button - Purple Gradient */
.pricing-card:nth-child(3) .plan-btn {
  background: linear-gradient(135deg, var(--tiknote-accent), var(--tiknote-blue));
  color: white;
  border: none;
  transition: opacity var(--transition-normal);
}

.pricing-card:nth-child(3) .plan-btn:hover {
  opacity: 0.9;
}

/* Annual Plan Button - Green Gradient */
.pricing-card:nth-child(4) .plan-btn {
  background: linear-gradient(to right, #10b981, #059669); /* from-green-500 to-emerald-500 */
  color: white;
  border: none;
  transition: all var(--transition-normal);
}

.pricing-card:nth-child(4) .plan-btn:hover {
  background: linear-gradient(to right, #059669, #047857); /* hover:from-green-600 hover:to-emerald-600 */
}



/* Plan Header */
.plan-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
  z-index: 2;
}



.plan-price {
  margin-bottom: var(--spacing-md);
}



.price-period {
  font-size: 1rem;
  color: var(--slate-400);
  margin-left: var(--spacing-xs);
}

.plan-description {
  color: var(--slate-300);
  font-size: 0.875rem;
}



.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}



.feature-icon {
  color: var(--success);
  flex-shrink: 0;
}

/* Plan Action */
.plan-action {
  position: relative;
  z-index: 2;
}

/* FAQ Section */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 50px; /* 底部间距 */
}

.faq-title {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: var(--spacing-2xl);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  text-align: left;
}

.faq-item {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(71, 85, 105, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
}

.faq-item:hover {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(59, 130, 246, 0.3);
}

.faq-question {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  margin-bottom: var(--spacing-md);
}

.faq-answer {
  color: var(--slate-300);
  line-height: 1.6;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .pricing-hero {
    padding: var(--spacing-2xl) 0;
  }
  
  .pricing-section {
    padding-top: 40px; /* 移动端保持相同间距 */
    padding-bottom: 30px; /* 移动端间距 */
  }

  .faq-section {
    padding-bottom: 30px; /* 移动端底部间距 */
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
  }
  
  .pricing-card {
    height: 420px !important; /* 移动端也使用相同高度 */
    min-height: 420px;
    max-height: 420px;
  }
  
  .price-amount {
    font-size: 2.25rem; /* 移动端稍微小一点 */
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
}

/* Animation Enhancements */
.hero-content {
  animation: fadeIn 0.8s ease-out;
}

/* Animation delays for cards */

.pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-card:nth-child(2) { animation-delay: 0.2s; }
.pricing-card:nth-child(3) { animation-delay: 0.3s; }

.faq-section {
  animation: fadeIn 0.8s ease-out 0.4s both;
}

/* Interactive Effects */
.pricing-card:active {
  transform: translateY(-2px);
}

.plan-btn:hover {
  transform: translateY(-1px);
}

/* Loading States */
.pricing-card.loading {
  opacity: 0.7;
  pointer-events: none;
}

.pricing-card.loading .plan-btn {
  opacity: 0.5;
}

/* Special Effects for Featured Plan */
.pricing-card.featured {
  animation: featuredGlow 3s ease-in-out infinite;
}

@keyframes featuredGlow {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4), 0 0 20px rgba(59, 130, 246, 0.1);
  }
}
