.navbar-custom {
  background-color: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* PC端样式 */
.desktop-layout {
  display: flex;
  flex-direction: row;
}

.desktop-cover {
  flex: 0 0 300px;
  margin-right: 2rem;
}

.desktop-info {
  flex: 1;
}

.anime-cover {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s;
  width: 100%;
  height: auto;
}

.anime-cover:hover {
  transform: translateY(-5px);
}

.anime-title {
  font-weight: bold;
  color: var(--dark-light);
  margin-bottom: 0.8rem;
}

.anime-subtitle {
  color: var(--text-gray);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.anime-info-item {
  margin-bottom: 0.8rem;
  color: var(--text-gray);
}

.anime-info-label {
  display: inline-block;
  width: 50px;
  color: #6c757d;
}

.anime-description {
  line-height: 1.6;
  color: var(--text-gray);
  margin-bottom: 2rem;
}

.btn-play {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
  padding: 0.7rem 1.8rem;
  border-radius: 5px;
  border: none;
  transition: all 0.3s;
  font-size: 1rem;
  margin-right: 1rem;
  margin-bottom: 1rem;
}

.btn-play:hover {
  background-color: #0b5ed7;
  transform: scale(1.05);
}

.btn-favorite {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.7rem 1.8rem;
  border-radius: 5px;
  transition: all 0.3s;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.btn-favorite:hover {
  background-color: rgba(13, 110, 253, 0.1);
}

/* 手机端样式 */
.mobile-layout {
  display: flex;
  flex-direction: row; /* 反向排列：封面在右，信息在左 */
  align-items: flex-start;
}
.mobile-info-btm {
  margin-bottom: 1.5rem;
}

.mobile-cover-container {
  flex: 0 0 120px;
  margin-left: 1rem;
}

.mobile-info-container {
  flex: 1;
}

.mobile-cover {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.mobile-title {
  font-weight: bold;
  color: var(--text-light);
  margin-bottom: 0.4rem;
  font-size: 1.3rem;
}

.mobile-subtitle {
  color: var(--text-gray);
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}

.mobile-info-item {
  margin-bottom: 0.3rem;
  color: var(--text-gray);
  font-size: 0.85rem;
}

.mobile-info-label {
  display: inline-block;
  width: 60px;
  color: #6c757d;
}

.mobile-tags {
  margin-bottom: 0.8rem;
}

.mobile-tag {
  display: inline-block;
  background-color: rgba(13, 110, 253, 0.1);
  color: var(--primary-color);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}

.mobile-buttons {
  margin-bottom: 1rem;
}

.btn-mobile-play {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
  padding: 0.5rem 1.2rem;
  border-radius: 5px;
  border: none;
  transition: all 0.3s;
  font-size: 0.9rem;
  margin-right: 0.8rem;
  margin-bottom: 0.5rem;
}

.btn-mobile-favorite {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1.2rem;
  border-radius: 5px;
  transition: all 0.3s;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* 剧集选项卡样式 */
.episode-tabs {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 2rem;
}

.episode-tabs .nav-tabs {
  border-bottom: none;
  padding: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
}

.episode-tabs .nav-tabs::-webkit-scrollbar {
  height: 4px;
}

.episode-tabs .nav-tabs::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.episode-tabs .nav-link {
  color: var(--text-gray);
  border: none;
  border-radius: 5px;
  margin-right: 0.3rem;
  padding: 0.5rem 0.8rem;
  transition: all 0.3s;
  white-space: nowrap;
}

.episode-tabs .nav-link:hover {
  color: var(--text-light);
  background-color: rgba(255, 255, 255, 0.05);
}

.episode-tabs .nav-link.active {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
}

.episode-tabs .tab-content {
  padding: 1.5rem;
}

.episode-card {
  background-color: #f8f8f8;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1rem;
  padding: 1rem;
}

.episode-card:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 110, 253, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  background-color: rgba(13, 110, 253, 0.05);
}

.episode-number {
  background-color: var(--primary-color);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.episode-title {
  font-weight: bold;
  margin-bottom: 0.2rem;
}

.episode-meta {
  color: var(--text-gray);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.episode-duration {
  color: var(--text-gray);
}

.server-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.server-tag.hd {
  background-color: rgba(25, 135, 84, 0.2);
  color: var(--success-color);
  border: 1px solid rgba(25, 135, 84, 0.3);
}

.server-tag.fhd {
  background-color: rgba(13, 110, 253, 0.2);
  color: var(--primary-color);
  border: 1px solid rgba(13, 110, 253, 0.3);
}

.server-tag.uhd {
  background-color: rgba(220, 53, 69, 0.2);
  color: var(--danger-color);
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.server-tag.speed {
  background-color: rgba(255, 193, 7, 0.2);
  color: var(--warning-color);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.section-title {
  border-left: 4px solid var(--primary-color);
  padding-left: 15px;
  margin-bottom: 1.5rem;
  font-weight: bold;
}

.tag {
  display: inline-block;
  background-color: rgba(53, 53, 54, 0.1);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.rating-star {
  color: #ffc107;
  margin-right: 0.2rem;
}

.rating-value {
  font-weight: bold;
  color: #ffc107;
}

/* 响应式显示控制 */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .episode-tabs .nav-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }

  .episode-tabs .tab-content {
    padding: 1rem;
  }

  .episode-card {
    padding: 0.8rem;
    margin-bottom: 0.8rem;
  }

  .episode-number {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .episode-title {
    font-size: 0.95rem;
  }

  .episode-meta {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
}

@media (min-width: 769px) {
  .desktop-only {
    display: block;
  }

  .mobile-only {
    display: none;
  }
}
#serverTabsContent .card-link-container {
  display: flex;
  flex-wrap: wrap; /* 允许换行 */
  gap: 20px; /* 同时控制水平和垂直间距 */
  justify-content: flex-start;
}
#serverTabsContent .episode-item {
  padding: 0.3rem 0.5rem;
  background: var(--light-bg);
  display: inline-block;
  border-radius: 3px;
  border: 1px solid var(--secondary-color);
  font-size: 13px;
}
#serverTabsContent a:hover {
  background: var(--secondary-color);
  color: var(--light-bg);
}

.gallery-title {
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.gallery-subtitle {
  opacity: 0.9;
  font-weight: 300;
}

.image-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  height: 100%;
}

.image-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.image-container {
  position: relative;
  width: 100%;
  padding-top: 150%; /* 200:300比例 = 2:3 = 150% */
  overflow: hidden;
}

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-card:hover .image-container img {
  transform: scale(1.05);
}

.image-caption {
  padding: 1.2rem;
  text-align: center;
}
.image-caption h3 {
  height: 50px;
  line-height: 25px;
  display: block;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.image-title {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.image-subtitle {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.4;
}

.badge-container {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.image-badge {
  background-color: rgba(52, 58, 64, 0.85);
  color: white;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 10px;
  margin-left: 5px;
}

.device-indicator {
  background-color: #e9ecef;
  border-radius: 20px;
  padding: 10px 20px;
  margin-top: 20px;
  font-size: 0.9rem;
  display: inline-block;
}

.device-indicator i {
  color: var(--primary-color);
  margin-right: 8px;
}

.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
  color: #6c757d;
  font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 767.98px) {
  .col-md-3 {
    width: 50%; /* 手机端一行显示两个 */
    flex: 0 0 auto;
  }

  .image-caption {
    padding: 1rem;
  }

  .image-title {
    font-size: 1rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .col-md-3 {
    width: 33.333%; /* 平板端一行显示三个 */
    flex: 0 0 auto;
  }
}

@media (min-width: 992px) {
  .col-md-3 {
    width: 25%; /* 桌面端一行显示四个 */
    flex: 0 0 auto;
  }
}
