/* tool-intro.css */
.secondary-page {
  padding: 0; /* 移除 padding，由内部容器控制 */
  width: 100%;
  flex: 1;
  color: #f1f5f9;
  background-color: #0f172a;
  background-image: 
    radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.05) 0px, transparent 50%);
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* 允许垂直滚动 */
  overscroll-behavior: contain; /* 阻止滚动穿透触发翻页 */
}

.light-theme .secondary-page {
  color: #1e293b;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.03) 0px, transparent 50%);
}

.intro-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 30px; /* 从 40px 减小到 30px */
  animation: introFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 5% 30px 5%; /* 从 40px 减小到 30px */
  box-sizing: border-box;
}

.intro-related-section {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.light-theme .intro-related-section {
  border-top-color: rgba(0, 0, 0, 0.05);
  background: transparent !important; /* 确保在浅色模式下背景透明 */
}

@keyframes introFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-header {
  text-align: center;
}

.intro-header h2 {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 8px; /* 从 12px 减小到 8px */
  background: linear-gradient(to right, #10b981, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.intro-header p {
  font-size: 1.125rem;
  line-height: 1.6;
  color: #64748b;
  max-width: 700px;
  margin: 0 auto;
}

.light-theme .intro-header p {
  color: #64748b;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.intro-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 20px 15px; /* 从 28px 20px 减小 */
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.intro-card:hover {
  transform: translateY(-4px);
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(16, 185, 129, 0.4);
}

.light-theme .intro-card {
  background: rgba(255, 255, 255, 0.5);
  border-color: #e2e8f0;
}

.light-theme .intro-card:hover {
  background: #ffffff;
  border-color: #10b981;
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.1);
}

.card-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.intro-card:hover .card-icon {
  transform: scale(1.1);
  background: rgba(16, 185, 129, 0.2);
}

.intro-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #f8fafc;
}

.light-theme .intro-card h3 {
  color: #1e293b;
}

.intro-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.intro-feature-list li {
  font-size: 0.875rem;
  color: #94a3b8;
  padding: 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.intro-feature-list li::before {
  content: "•";
  color: #10b981;
}

.light-theme .intro-feature-list li {
  color: #64748b;
}

.intro-bottom-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  padding-top: 0;
}

.light-theme .intro-bottom-section {
  background: transparent !important;
  box-shadow: none !important;
}

.intro-usage-box, .intro-faq-box {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px; /* 从 24px 减小 */
  padding-top: 0;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.intro-usage-box:hover, .intro-faq-box:hover {
  transform: translateY(-4px);
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(16, 185, 129, 0.3);
}

.light-theme .intro-usage-box, .light-theme .intro-faq-box {
  background: rgba(255, 255, 255, 0.5) !important; /* 改为半透明，不再是纯白 */
  border-color: #e2e8f0;
  box-shadow: none; /* 移除投影，减少视觉负担 */
}

.light-theme .intro-usage-box:hover, .light-theme .intro-faq-box:hover {
  background: #ffffff !important;
  border-color: #10b981;
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.1);
}

.intro-usage-box h3, .intro-faq-box h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px; /* 从 20px 减小 */
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.light-theme .intro-usage-box h3, .light-theme .intro-faq-box h3 {
  color: #1e293b;
}

.intro-usage-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px; /* 从 16px 减小 */
  counter-reset: step;
  flex: 1;
}

.intro-usage-list li {
  font-size: 0.9375rem;
  color: #94a3b8;
  line-height: 1.5;
  display: flex;
  gap: 12px;
  counter-increment: step;
}

.intro-usage-list li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.light-theme .intro-usage-list li {
  color: #64748b;
}

.intro-faq-item {
  margin-bottom: 12px; /* 从 16px 减小 */
  padding-bottom: 8px; /* 从 12px 减小 */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.intro-faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.intro-faq-q {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}

.intro-faq-q::before {
  content: "Q:";
  color: #10b981;
  font-weight: 800;
}

.intro-faq-a {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.6;
  display: flex;
  gap: 8px;
}

.intro-faq-a::before {
  content: "A:";
  color: #64748b;
  font-weight: 800;
  flex-shrink: 0;
}

.light-theme .intro-faq-item {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.light-theme .intro-faq-q { color: #1e293b; }
.light-theme .intro-faq-a { color: #64748b; }

/* 相关工具内链样式 */
.intro-related-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px; /* 从 24px 减小到 16px，使网格更靠近标题 */
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.intro-related-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.refresh-related-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.refresh-related-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  transform: scale(1.05);
}

.refresh-related-btn:active {
  transform: scale(0.95);
}

.refresh-related-btn i {
  font-style: normal;
  font-size: 0.875rem;
  transition: transform 0.4s ease;
}

.refresh-related-btn.spinning i {
  transform: rotate(360deg);
}

.light-theme .refresh-related-btn {
  background: rgba(16, 185, 129, 0.05);
}

.light-theme .intro-related-title {
  color: #1e293b;
}

.intro-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.related-tool-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
}

.related-tool-link:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
  transform: translateY(-2px);
}

.light-theme .related-tool-link {
  background: rgba(255, 255, 255, 0.5);
  border-color: #e2e8f0;
  color: #475569;
}

.light-theme .related-tool-link:hover {
  background: #ffffff;
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.1);
}

.related-tool-icon {
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #0b1120;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.light-theme .related-tool-icon {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
}

.related-tool-name {
  font-size: 0.9375rem;
  font-weight: 500;
}