/* ===========================================================
   TV 版下载 —— 右下角悬浮按钮
   仅样式；链接与文案在 js/tfn-tv-fab.js 顶部配置
   =========================================================== */

.tfn-tv-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1060;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 10px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #ffd647 0%, #fac501 55%, #e79b00 100%);
  color: #141310;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(250, 197, 1, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.tfn-tv-fab:hover,
.tfn-tv-fab:focus-visible {
  color: #141310;
  text-decoration: none;
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(250, 197, 1, 0.5);
}

.tfn-tv-fab:active {
  transform: translateY(0);
}

.tfn-tv-fab:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.tfn-tv-fab__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #141310;
  color: #fac501;
  font-size: 15px;
  flex: 0 0 auto;
}

.tfn-tv-fab__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.tfn-tv-fab__text strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.tfn-tv-fab__text small {
  font-size: 11px;
  font-weight: 600;
  color: rgba(20, 19, 16, 0.72);
}

/* 让返回顶部按钮向上错开，避免两个悬浮按钮重叠 */
.back-to-top {
  bottom: 92px !important;
}

/* 页脚底部留白，滚动到最底部时悬浮按钮不会压住版权行 */
.site-footer {
  padding-bottom: 104px !important;
}

/* 轻提示 */
.tfn-tv-toast {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 1070;
  max-width: 260px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #1c1b18;
  color: #f4f2ec;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tfn-tv-toast--show {
  opacity: 1;
  transform: translateY(0);
}

html[data-theme="light"] .tfn-tv-toast {
  background: #1b1a17;
  color: #f4f2ec;
}

@media (max-width: 575.98px) {
  .tfn-tv-fab {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    padding: 7px 14px 7px 8px;
    gap: 8px;
  }

  .tfn-tv-fab__icon {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .tfn-tv-fab__text strong {
    font-size: 13px;
  }

  .tfn-tv-fab__text small {
    font-size: 10px;
  }

  .back-to-top {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .site-footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .tfn-tv-toast {
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .tfn-tv-fab,
  .tfn-tv-toast {
    transition: none;
  }
}

@media print {
  .tfn-tv-fab,
  .tfn-tv-toast {
    display: none !important;
  }
}
