/* taiweconsultant.com 模板样式 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f5f7fa;
  font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: #1a2a3a;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 头部 — 一体化粘性导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #1f2a44 100%);
  padding: 14px 0 12px;
  margin-bottom: 22px;
  border-bottom: 2px solid rgba(230, 0, 18, 0.35);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.site-header__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(230, 0, 18, 0.9), rgba(255, 111, 0, 0.85));
  color: #fff;
  box-shadow: 0 4px 12px rgba(230, 0, 18, 0.35);
}

.site-header__mark svg {
  width: 20px;
  height: 20px;
}

.site-header__title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  background: linear-gradient(135deg, #ff8a80, #e60012 45%, #ff6f00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header__search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-header__search:focus-within {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(230, 0, 18, 0.55);
}

.site-header__search-icon {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

.site-header__search input {
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  width: 180px;
}

.site-header__search input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.site-header__search button {
  border: none;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #e60012, #ff6f00);
  box-shadow: 0 2px 8px rgba(230, 0, 18, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.site-header__search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 0, 18, 0.45);
}

.site-header__nav-track {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 2px;
}

.site-header__nav-item {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.site-header__nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.site-header__nav-item.is-active {
  color: #fff;
  background: linear-gradient(135deg, #e60012, #ff6f00);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(230, 0, 18, 0.4);
}

/* 旧头部类保留兼容 */
.header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 12px 0;
  border-radius: 0 0 16px 16px;
}

.header-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.logo h1,
.logo-link {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e60012, #ff6f00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.search-form {
  display: flex;
  gap: 8px;
  background: #fff;
  border-radius: 40px;
  padding: 3px 5px 3px 18px;
}

.search-form input {
  border: none;
  padding: 8px 0;
  width: 220px;
  outline: none;
  background: transparent;
  font-size: 14px;
}

.search-form button {
  background: #e60012;
  border: none;
  border-radius: 30px;
  padding: 6px 20px;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
}

/* 导航 */
.nav-menu {
  background: #fff;
  border-radius: 0 0 16px 16px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  overflow-x: auto;
  white-space: nowrap;
}

.nav-list {
  display: inline-flex;
  list-style: none;
  padding: 0 20px;
  margin: 0;
}

.nav-list li a {
  display: inline-block;
  padding: 16px 22px;
  font-weight: 600;
  color: #333;
  font-size: 15px;
  position: relative;
}

.nav-list li.active a {
  color: #e60012;
}

.nav-list li.active a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  background: #e60012;
  border-radius: 3px;
}

/* 影视网格 */
.section {
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e60012;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-more {
  color: #999;
  font-size: 0.8rem;
}

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

.card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.card:hover {
  transform: translateY(-3px);
}

.card-image {
  position: relative;
  display: block;
  padding-top: 140%;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
}

.card-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
}

.card-content {
  padding: 8px 5px 12px;
}

.card-title {
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  font-size: 0.7rem;
  color: #888;
  text-align: center;
  margin-top: 4px;
}

/* 评论模块 */
.comment-section {
  background: #fff;
  border-radius: 24px;
  padding: 25px;
  margin: 30px 0 40px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.comment-title {
  font-size: 1.4rem;
  font-weight: 700;
  border-left: 4px solid #e60012;
  padding-left: 18px;
  margin-bottom: 25px;
}

.comment-list {
  max-height: 480px;
  overflow-y: auto;
  margin-bottom: 30px;
}

.comment-item {
  display: flex;
  gap: 15px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.comment-avatar {
  width: 46px;
  height: 46px;
  background: #e2e8f0;
  border-radius: 50%;
  flex-shrink: 0;
  background-size: cover;
}

.comment-content {
  flex: 1;
}

.comment-name {
  font-weight: 700;
  margin-bottom: 5px;
}

.comment-time {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-left: 12px;
  font-weight: normal;
}

.comment-text {
  margin: 8px 0;
  color: #334155;
  line-height: 1.45;
}

.comment-actions span {
  margin-right: 18px;
  font-size: 0.75rem;
  color: #64748b;
  cursor: pointer;
}

.comment-actions span:hover {
  color: #e60012;
}

.reply-item {
  margin-left: 55px;
  background: #f8fafc;
  padding: 10px 15px;
  border-radius: 14px;
  margin-top: 10px;
}

.reply-name {
  font-weight: bold;
  color: #e60012;
}

.comment-form textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 12px 16px;
  resize: vertical;
  font-size: 0.9rem;
  font-family: inherit;
}

.comment-form button {
  background: #e60012;
  border: none;
  padding: 8px 28px;
  border-radius: 40px;
  color: #fff;
  font-weight: 600;
  margin-top: 12px;
  cursor: pointer;
}

.rating-star {
  color: #fbbf24;
  margin-left: 6px;
  font-size: 0.7rem;
}

/* 底部 */
.footer {
  background: #0f172a;
  color: #94a3b8;
  text-align: center;
  padding: 25px 0;
  margin-top: 20px;
  font-size: 0.8rem;
  border-radius: 20px 20px 0 0;
}

.footer a {
  color: #fbbf24;
  margin: 0 5px;
}

/* 分类页 */
.page-hero {
  background: #fff;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.page-hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a2a3a;
  margin-bottom: 8px;
}

.page-hero p {
  color: #64748b;
  font-size: 0.9rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-bar select {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  background: #fff;
}

.load-more-btn {
  display: block;
  margin: 24px auto 0;
  background: #e60012;
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 10px 32px;
  font-weight: 600;
  cursor: pointer;
}

/* 播放页 */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.watch-player {
  background: #000;
  border-radius: 14px;
  overflow: hidden;
}

.watch-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.watch-info {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.watch-info h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.watch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 16px;
}

.watch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.watch-tag {
  background: #fef2f2;
  color: #e60012;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.watch-desc h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  border-left: 3px solid #e60012;
  padding-left: 10px;
}

.watch-desc p {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.6;
}

.watch-related-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 2px solid #e60012;
  padding-bottom: 8px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.65rem 1rem;
  background: #1a1a2e;
  color: #fff;
  border-radius: 0.5rem;
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .site-header {
    padding: 12px 0 10px;
    margin-bottom: 16px;
  }

  .site-header__top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
  }

  .site-header__title {
    font-size: 1rem;
    white-space: normal;
  }

  .site-header__search {
    width: 100%;
  }

  .site-header__search input {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .site-header__nav-track {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 4px;
  }

  .site-header__nav-track::-webkit-scrollbar {
    display: none;
  }

  .site-header__nav-item {
    padding: 6px 13px;
    font-size: 12px;
  }

  .comment-item {
    gap: 10px;
  }

  .reply-item {
    margin-left: 40px;
  }

  .search-form input {
    width: 140px;
  }

  .logo h1,
  .logo-link {
    font-size: 1.2rem;
  }
}

@media (min-width: 1024px) {
  .watch-layout {
    grid-template-columns: 2fr 1fr;
  }
}
