/* 详情页样式 */

/* 详情页视图容器（在 index 页面中） */
.detail-view-container {
  flex: 1;
  position: relative;
  padding: 0;
  min-height: calc(100vh - 64px);
  box-sizing: border-box;
}

.detail-view-container .detail-container {
  padding: 100px 24px 40px;
  padding-left: calc(240px + 24px);
}

@media (max-width: 1024px) {
  .detail-view-container .detail-container {
    padding-left: 24px;
  }
}

@media (max-width: 1024px) {
  .detail-view-container {
    padding-left: 24px;
  }
}

/* 返回列表按钮 */
.back-to-list-btn {
  position: absolute;
  top: 20px;
  left: calc(240px + 44px);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--tool-item-bg);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-to-list-btn:hover {
  background: var(--menu-hover-bg);
  border-color: var(--menu-active-color);
  color: var(--menu-active-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-list-btn i {
  font-size: 16px;
}

.back-to-list-btn span {
  display: inline;
}

@media (max-width: 1024px) {
  .back-to-list-btn {
    left: 24px;
  }
}

@media (max-width: 768px) {
  .back-to-list-btn span {
    display: none;
  }
  .back-to-list-btn {
    padding: 10px;
    width: 44px;
    height: 44px;
    justify-content: center;
  }
}

/* 详情页容器 - 在主内容区 */
.detail-container {
  display: flex;
  gap: 24px;
  flex: 1;
  max-width: 1800px; /* 增加最大宽度，让内容更宽 */
  margin: 0 auto;
  padding: 100px 24px 40px;
  padding-left: calc(240px + 24px); /* 为左侧侧边栏留出空间 + 内边距 */
  min-height: calc(100vh - 64px);
  box-sizing: border-box;
}

/* 移动端隐藏左侧边距 */
@media (max-width: 1024px) {
  .detail-container {
    padding-left: 24px;
  }
}

.detail-main {
  flex: 1;
  min-width: 0;
  max-width: 1200px; /* 设置主内容区域的最大宽度，确保内容不会过宽 */
}

.detail-sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* 1. 导航数据介绍和直链详情卡片区 */
.detail-intro-card {
  background: var(--tool-item-bg);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.intro-card-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.intro-left {
  display: flex;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.intro-icon {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.intro-icon .text-icon {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-size: 32px;
  font-weight: 600;
}

.intro-info {
  flex: 1;
  min-width: 0;
}

.intro-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.intro-description {
  font-size: 16px;
  color: var(--text-mid);
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.intro-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intro-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.intro-tag:hover {
  background: var(--menu-hover-bg);
  border-color: var(--menu-active-color);
  color: var(--menu-active-color);
}

.intro-tag i {
  font-size: 12px;
}

.intro-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.direct-link-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--menu-active-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.direct-link-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-view-btn,
.info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--tool-item-bg);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-view-btn:hover,
.info-btn:hover {
  background: var(--menu-hover-bg);
  border-color: var(--menu-active-color);
  color: var(--menu-active-color);
}

.mobile-view-btn span {
  display: none;
}

/* 2. 走马灯广告卡片区 */
.carousel-ads-section {
  margin-bottom: 32px;
  overflow: hidden;
}

.carousel-ads-container {
  position: relative;
  overflow: hidden;
  padding: 16px 0;
}

.carousel-ads-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: carousel-marquee 25s linear infinite;
}

.carousel-ads-track:hover {
  animation-play-state: paused;
}

@keyframes carousel-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.carousel-ad-card {
  flex: 0 0 280px;
  width: 280px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--tool-item-bg);
  border: 1px solid var(--border-glass);
}

.carousel-ad-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.carousel-ad-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-ad-card .ad-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 16px;
  color: white;
}

.carousel-ad-card .ad-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.carousel-ad-card .ad-desc {
  font-size: 13px;
  opacity: 0.9;
}

/* 3. 网站详细介绍区域 */
.detail-description-section {
  background: var(--tool-item-bg);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-glass);
}

.full-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color);
}

.full-description p {
  margin: 0 0 16px 0;
}

.full-description img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

/* 4. 相关导航链接区域 */
.related-nav-section {
  margin-bottom: 32px;
}

.related-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.related-nav-card {
  background: var(--tool-item-bg);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.related-nav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--menu-active-color);
}

.related-nav-card .nav-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-size: 20px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.related-nav-card .nav-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.related-nav-card .nav-icon i {
  font-size: 24px;
}

.related-nav-card .nav-icon .text-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
}

.related-nav-card .nav-info {
  flex: 1;
  min-width: 0;
}

.related-nav-card .nav-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
}

.related-nav-card .nav-desc {
  font-size: 13px;
  color: var(--text-mid);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-nav-card .nav-arrow {
  flex-shrink: 0;
  color: var(--text-mid);
  font-size: 18px;
}

/* 5. 底部广告区 */
.bottom-ad-section {
  margin-bottom: 32px;
}

.ad-banner {
  width: 100%;
  min-height: 200px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tool-item-bg);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all 0.3s ease;
}

.ad-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ad-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* 6. 游客反馈区域 */
.comment-section {
  background: var(--tool-item-bg);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 32px;
}

.comment-form {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.comment-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  font-size: 32px;
}

.comment-input-wrapper {
  flex: 1;
  min-width: 0;
}

.comment-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 16px;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 12px;
  outline: none;
  transition: all 0.3s ease;
}

.comment-textarea:focus {
  border-color: var(--menu-active-color);
  box-shadow: 0 0 0 2px rgba(255, 0, 102, 0.1);
}

.comment-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.comment-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
}

.comment-input:focus {
  border-color: var(--menu-active-color);
  box-shadow: 0 0 0 2px rgba(255, 0, 102, 0.1);
}

.comment-submit-btn {
  padding: 10px 24px;
  background: var(--menu-active-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.comment-submit-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
}

.comment-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.comments-list {
  margin-top: 24px;
}

.no-comments {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mid);
  background: var(--bg-color);
  border-radius: 12px;
  border: 1px dashed var(--border-glass);
}

.comment-item {
  padding: 20px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  gap: 16px;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-item-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  font-size: 24px;
}

.comment-item-content {
  flex: 1;
  min-width: 0;
}

.comment-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.comment-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
}

.comment-item-time {
  font-size: 13px;
  color: var(--text-mid);
}

.comment-item-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-color);
}

/* 右侧广告区（sticky） */
.detail-sidebar {
  position: relative;
}

.sidebar-ad {
  position: sticky;
  top: 100px;
  width: 100%;
  min-height: 400px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tool-item-bg);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-ad:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-ad img {
  width: 100%;
  height: auto;
  display: block;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .detail-container {
    flex-direction: column;
  }

  .detail-sidebar {
    width: 100%;
    order: -1;
  }

  .sidebar-ad {
    position: static;
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  .detail-container {
    padding: 80px 16px 24px;
  }

  .detail-intro-card {
    padding: 20px;
  }

  .intro-card-content {
    flex-direction: column;
  }

  .intro-left {
    width: 100%;
  }

  .intro-right {
    width: 100%;
    justify-content: flex-start;
  }

  .mobile-view-btn span {
    display: inline;
  }

  .carousel-ad-card {
    width: 240px;
    height: 160px;
  }

  .related-nav-grid {
    grid-template-columns: 1fr;
  }

  .comment-form {
    flex-direction: column;
  }

  .comment-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .comment-input {
    width: 100%;
  }
}

