/* Tag aggregation page. Scoped to .tag-page/.tag-banner only. */

@keyframes tagBannerRipple {
  0% { transform: scale(0.05); opacity: 0.7; }
  60% { opacity: 0.25; }
  100% { transform: scale(1); opacity: 0; }
}

@keyframes tagRadarSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes tagGlowBreath {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.2); }
}

.tag-banner .banner-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  pointer-events: none;
}

.tag-banner .banner-ripple::before,
.tag-banner .banner-ripple::after {
  content: "";
  position: absolute;
}

.tag-banner .banner-ripple::before {
  width: 2400px;
  height: 1px;
  top: 0;
  left: -1200px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.07) 15%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.07) 85%, transparent 100%);
}

.tag-banner .banner-ripple::after {
  width: 1px;
  height: 900px;
  top: -450px;
  left: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.07) 15%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.07) 85%, transparent 100%);
}

.tag-banner .radar-static-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tag-banner .radar-static-ring:nth-child(1) { width: 260px; height: 260px; top: -130px; left: -130px; }
.tag-banner .radar-static-ring:nth-child(2) { width: 520px; height: 520px; top: -260px; left: -260px; }
.tag-banner .radar-static-ring:nth-child(3) { width: 800px; height: 800px; top: -400px; left: -400px; }

.tag-banner .radar-sweep {
  position: absolute;
  width: 800px;
  height: 800px;
  top: -400px;
  left: -400px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(255,255,255,0.03) 300deg, rgba(255,240,220,0.1) 338deg, rgba(255,255,255,0.2) 358deg, transparent 360deg);
  animation: tagRadarSpin 8s linear infinite;
}

.tag-banner .ripple-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  top: -100px;
  left: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.28) 0%, rgba(255,230,200,0.14) 28%, rgba(255,210,170,0.05) 52%, transparent 72%);
  animation: tagGlowBreath 4s ease-in-out infinite;
}

.tag-banner .ripple-ring {
  position: absolute;
  width: 1000px;
  height: 1000px;
  top: -500px;
  left: -500px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  transform: scale(0.05);
  animation: tagBannerRipple 4.2s infinite ease-out;
}

.tag-banner .ripple-ring:nth-child(6) { animation-delay: 0s; }
.tag-banner .ripple-ring:nth-child(7) { animation-delay: -0.7s; }
.tag-banner .ripple-ring:nth-child(8) { animation-delay: -1.4s; }
.tag-banner .ripple-ring:nth-child(9) { animation-delay: -2.1s; }
.tag-banner .ripple-ring:nth-child(10) { animation-delay: -2.8s; }
.tag-banner .ripple-ring:nth-child(11) { animation-delay: -3.5s; }

.tag-page {
  --tag-theme-rgb: 255, 116, 1;
  background: #f5f5f5;
  color: #1f1f1f;
}

.tag-page a {
  color: inherit;
}

.tag-banner {
  min-height: 320px;
  padding: 100px 0 60px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(46, 34, 18, .88), rgba(255, 116, 1, .72)),
    url('../img/fude/backgrounds/bg-banner-kline.webp') center / cover no-repeat;
}

.tag-banner > .container {
  position: relative;
  z-index: 2;
}

.tag-banner-content {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.tag-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.74);
}

.tag-breadcrumb a:hover,
.tag-breadcrumb .current {
  color: #fff;
}

.tag-breadcrumb .separator {
  color: rgba(255, 255, 255, 0.45);
}

.tag-banner-title {
  margin: 0 0 16px;
  font-size: 36px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0;
}

.tag-banner-subtitle,
.tag-banner-desc {
  max-width: 760px;
  margin: 0 auto 16px;
  color: rgba(255, 255, 255, 0.84);
}

.tag-banner-subtitle {
  font-size: 18px;
  line-height: 1.55;
}

.tag-banner-desc {
  font-size: 16px;
  line-height: 1.75;
}

.tag-banner-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 30px;
}

.tag-stat-item {
  text-align: center;
}

.tag-stat-number {
  display: block;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 800;
}

.tag-stat-label {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.tag-main {
  padding: 50px 0 80px;
}

.tag-content-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.tag-articles-main,
.tag-sidebar {
  min-width: 0;
}

.tag-panel,
.tag-related-section,
.tag-sidebar-block {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.tag-panel + .tag-panel,
.tag-video-section + .tag-panel {
  margin-top: 24px;
}

.tag-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 20px 30px;
  border-bottom: 1px solid #eeeeee;
}

.tag-section-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
}

.tag-section-title span {
  font-size: 14px;
  color: #999;
  font-weight: 400;
}

.tag-sort-options {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}

.sort-label {
  color: #999;
}

.sort-option {
  min-height: 32px;
  padding: 6px 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #666;
  transition: color .2s, background-color .2s;
}

.sort-option:hover {
  color: var(--orange);
}

.sort-option.active {
  color: #fff;
  background: var(--orange);
}

.tag-article-list {
  overflow: hidden;
}

.tag-article-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 30px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color .2s;
}

.tag-article-item:last-child {
  border-bottom: 0;
}

.tag-article-item:hover {
  background: #fafafa;
}

.tag-article-thumb {
  width: 220px;
  aspect-ratio: 220 / 145;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
}

.tag-article-thumb img,
.tag-video-thumb img,
.tag-activity-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tag-article-thumb img {
  transition: transform .3s;
}

.tag-article-item:hover .tag-article-thumb img {
  transform: scale(1.04);
}

.tag-article-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tag-article-title {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}

.tag-article-item:hover .tag-article-title {
  color: var(--orange);
}

.tag-article-excerpt {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-article-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tag-article-info {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: #999;
}

.tag-article-column {
  max-width: 150px;
  padding: 4px 12px;
  border-radius: 4px;
  background: #f5f5f5;
  color: #666;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-no-articles {
  padding: 70px 30px;
  text-align: center;
}

.no-articles-text {
  font-size: 16px;
  color: #555;
}

.no-articles-hint {
  margin-top: 8px;
  font-size: 14px;
  color: #999;
}

.tag-pagination,
.tag-video-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-pagination {
  min-height: 88px;
  margin-top: 20px;
  padding: 22px;
  background: #fff;
  border-radius: 8px;
}

.page-btn,
.page-num,
.tag-video-page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #666;
  font-size: 14px;
  transition: color .2s, border-color .2s, background-color .2s;
}

.page-btn:hover:not(.disabled),
.page-num:hover,
.tag-video-page-btn:hover:not(.disabled) {
  color: var(--orange);
  border-color: var(--orange);
}

.page-num.active,
.tag-video-page-btn.active {
  color: #fff;
  border-color: var(--orange);
  background: var(--orange);
}

.page-btn.disabled,
.tag-video-page-btn.disabled {
  color: #c9c9c9;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 6px;
}

.page-ellipsis,
.tag-video-page-ellipsis {
  color: #999;
  padding: 0 4px;
}

.tag-related-section {
  margin-top: 20px;
  padding: 24px 30px;
}

.tag-related-section h3,
.tag-sidebar-title,
.tag-more-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  color: #333;
}

.tag-related-section h3,
.tag-sidebar-title {
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.tag-related-list,
.tag-cloud,
.tag-more-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-related-list {
  margin-top: 18px;
}

.tag-related-item,
.tag-cloud-item,
.tag-more-item {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 16px;
  border-radius: 999px;
  background: #f5f5f5;
  color: #666;
  font-size: 14px;
  transition: color .2s, background-color .2s, transform .2s;
}

.tag-related-item:hover,
.tag-cloud-item:hover,
.tag-cloud-item.active,
.tag-more-item:hover,
.tag-more-item.current {
  color: #fff;
  background: var(--orange);
}

.tag-more-item:hover {
  transform: translateY(-2px);
}

.tag-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 24px 30px 10px;
}

.tag-video-card {
  overflow: hidden;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
}

.tag-video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
}

.tag-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #eee;
  overflow: hidden;
}

.tag-video-tags {
  position: absolute;
  left: 10px;
  top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-video-tag {
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(var(--tag-theme-rgb), .9);
  font-size: 12px;
}

.tag-video-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  color: #fff;
  background: rgba(0, 0, 0, .62);
  font-size: 12px;
}

.tag-video-body {
  padding: 16px;
}

.tag-video-title {
  margin: 0 0 8px;
  min-height: 48px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-video-desc {
  min-height: 44px;
  margin: 0 0 14px;
  color: #666;
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-video-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #999;
  font-size: 13px;
}

.tag-video-play {
  min-width: 80px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-size: 13px;
  cursor: pointer;
}

.tag-video-pagination {
  padding: 18px 30px 28px;
}

.tag-video-empty {
  grid-column: 1 / -1;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}

.tag-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tag-sidebar-block {
  padding: 24px;
}

.tag-sidebar-title {
  margin-bottom: 18px;
}

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

.tag-recommend-item a {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
  color: #555;
  font-size: 14px;
  line-height: 1.55;
  transition: color .2s;
}

.tag-recommend-item:last-child a {
  border-bottom: 0;
}

.tag-recommend-item a:hover {
  color: var(--orange);
}

.recommend-num {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #d4af37;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.tag-recommend-item:nth-child(-n+3) .recommend-num {
  background: var(--orange);
}

.recommend-title {
  min-width: 0;
}

.tag-cloud {
  margin-top: 18px;
}

.tag-activity-block {
  padding: 0;
  overflow: hidden;
}

.tag-activity-slides {
  position: relative;
  aspect-ratio: 340 / 160;
  background: #eee;
}

.tag-activity-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.tag-activity-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.tag-activity-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
}

.tag-activity-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d8d8d8;
  cursor: pointer;
}

.tag-activity-dot.active {
  background: var(--orange);
}

.tag-more-section {
  padding: 60px 0 80px;
  background: #fff;
}

.tag-more-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.tag-more-header h2 {
  font-size: 20px;
}

.tag-video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .72);
}

.tag-video-modal.active {
  display: flex;
}

.tag-video-modal-panel {
  position: relative;
  width: min(920px, 100%);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.tag-video-modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.tag-video-modal-player {
  background: #000;
  aspect-ratio: 16 / 9;
}

.tag-video-modal-player video {
  width: 100%;
  height: 100%;
  display: block;
}

.tag-video-modal-info {
  padding: 20px 24px 24px;
}

.tag-video-modal-info h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.45;
}

.tag-video-modal-info p {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 1080px) {
  .tag-banner .radar-sweep {
    display: none;
  }

  .tag-banner .ripple-ring {
    width: 600px;
    height: 600px;
    top: -300px;
    left: -300px;
  }

  .tag-banner .ripple-ring:nth-child(n+9) {
    display: none;
  }

  .tag-banner {
    min-height: 260px;
    padding: clamp(72px, 18vw, 110px) 0 clamp(34px, 8vw, 48px);
  }

  .tag-banner-title {
    font-size: clamp(24px, 6vw, 34px);
    line-height: 1.22;
  }

  .tag-banner-subtitle {
    font-size: clamp(14px, 3.5vw, 18px);
  }

  .tag-banner-desc {
    font-size: clamp(13px, 3.2vw, 15px);
    line-height: 1.65;
  }

  .tag-banner-stats {
    gap: 36px;
  }

  .tag-stat-number {
    font-size: clamp(24px, 6vw, 34px);
  }

  .tag-stat-label,
  .tag-breadcrumb {
    font-size: clamp(12px, 2.59vw, 14px);
  }

  .tag-main {
    padding: 28px 0 48px;
  }

  .tag-content-wrapper {
    grid-template-columns: 1fr;
  }

  .tag-section-header {
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .tag-section-title {
    font-size: clamp(18px, 3.89vw, 22px);
  }

  .tag-section-title span,
  .tag-sort-options,
  .sort-option,
  .tag-related-item,
  .tag-cloud-item,
  .tag-more-item {
    font-size: clamp(12px, 2.8vw, 14px);
  }

  .tag-video-grid {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .tag-article-item {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .tag-article-title {
    font-size: clamp(15px, 3.6vw, 18px);
    line-height: 1.42;
  }

  .tag-article-excerpt {
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.6;
  }

  .tag-article-info,
  .tag-article-column {
    font-size: clamp(12px, 2.8vw, 13px);
  }

  .tag-article-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .tag-article-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .tag-pagination,
  .tag-video-pagination {
    justify-content: center;
  }

  .page-numbers {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .tag-related-section,
  .tag-sidebar-block {
    padding: 18px;
  }

  .tag-related-section h3,
  .tag-sidebar-title,
  .tag-more-header h2 {
    font-size: clamp(18px, 3.89vw, 22px);
  }

  .tag-video-title {
    font-size: clamp(15px, 3.6vw, 18px);
    line-height: 1.42;
  }

  .tag-video-desc,
  .tag-video-footer,
  .tag-video-play,
  .tag-recommend-item a,
  .tag-video-empty,
  .tag-video-modal-info p {
    font-size: clamp(12px, 2.9vw, 14px);
  }

  .tag-video-tag,
  .tag-video-duration,
  .recommend-num {
    font-size: 12px;
  }

  .tag-video-modal-info h3 {
    font-size: clamp(18px, 3.89vw, 22px);
  }

  .tag-more-section {
    padding: 42px 0 56px;
  }
}

@media (max-width: 640px) {
  .tag-breadcrumb {
    justify-content: flex-start;
    overflow: hidden;
    white-space: nowrap;
  }

  .tag-banner-content {
    text-align: left;
  }

  .tag-banner-title {
    font-size: clamp(24px, 6vw, 30px);
  }

  .tag-banner-stats {
    justify-content: flex-start;
    gap: 26px;
  }

  .tag-sort-options {
    width: 100%;
  }

  .tag-video-footer,
  .tag-article-info {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .page-btn,
  .page-num,
  .tag-video-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
  }

  .tag-pagination {
    min-height: auto;
    margin-top: 16px;
    padding: 14px 10px;
    gap: 8px;
    overflow: hidden;
  }

  .tag-pagination .page-numbers {
    order: 1;
    gap: 4px;
  }

  .tag-pagination .page-prev,
  .tag-pagination .page-next {
    order: 2;
    flex: 1 1 calc(50% - 4px);
    max-width: 150px;
    min-width: 0;
    white-space: nowrap;
  }

  .page-num,
  .tag-video-page-btn {
    padding: 0;
  }

  .page-ellipsis,
  .tag-video-page-ellipsis {
    min-width: 18px;
    text-align: center;
  }

  .tag-video-pagination {
    gap: 6px;
  }
}
