/* Reset & 全局基础 */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: Roboto, "Segoe UI", Arial, sans-serif; background:#f9f9f9; color:#202124; }
a { text-decoration:none; color:inherit; }
.hidden { display: none !important; }

/* Header */
#header { background:#fff; border-bottom:1px solid #e0e0e0; position:sticky; top:0; z-index:100; }
.header-inner { max-width:1200px; margin:0 auto; padding:0 20px; display:flex; align-items:center; gap:16px; height:56px; }
.logo img { height:32px; }
.search-box { flex:1; }
.search-box input { width:100%; padding:6px 12px; border:1px solid #dadce0; border-radius:4px; font-size:14px; }
.menu a { margin-left:12px; font-size:14px; color:#5f6368; }
.menu a:hover { color:#1a73e8; }

/* 主体布局 */
.app-detail-container { display: flex; gap: 24px; max-width: 1200px; margin: 20px auto; padding: 0 20px; }
.app-main { flex: 1; max-width: 800px; }
..app-sidebar {
    width: 280px;       /* 右侧宽度，加宽卡片 */
    flex-shrink: 0;     /* 防止右边被压缩 */
}

/* App Header */
.app-header { display:flex; gap:20px; background:#fff; padding:24px; border-radius:12px; box-shadow:0 1px 3px rgba(0,0,0,.1); position: relative; }
/* 桌面图标大小 */
.app-header .icon img { width:140px; height:140px; border-radius:24px; object-fit:cover; }
.app-header .info { flex:1; display:flex; flex-direction:column; justify-content:center; }
.app-header .title { font-size:24px; font-weight:600; margin-bottom:6px; }
.app-header .author { font-size:14px; color:#5f6368; margin-bottom:8px; }
.meta { font-size:14px; color:#5f6368; margin-bottom:12px; display: flex; gap: 12px; }

/* ======================= */
/* 按钮样式修改 */
/* ======================= */

/* 桌面端按钮容器 */
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

/* 安装按钮变长 */
.install-btn {
  display: inline-block;
  padding: 10px 32px;
  background: #34a853;
  color: #fff;
  border-radius: 4px;
  font-weight: 500;
  transition: background .3s;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font-size: 14px;
  min-width: 120px;
}
.install-btn:hover { background:#2c8e46; }

/* 移除分享和心愿单按钮的外框，保持绿色 */
.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #34a853;
  font-size: 14px;
  cursor: pointer;
  transition: background .3s, color .3s;
  white-space: nowrap;
}

/* 桌面版按钮悬停效果调整 */
.action-btn:hover {
  background: rgba(52, 168, 83, 0.1);
  color: #34a853;
}

/* 保持分享和心愿单图标的绿色填充 */
.action-btn svg path {
  fill: #34a853;
  transition: fill .3s;
}

.action-btn:hover svg path {
  fill: #34a853;
}

/* 移动端按钮容器 - 默认隐藏 */
.mobile-actions {
  display: none;
}

/* Screenshot Carousel */
/* Screenshot Carousel - 桌面端 */
@media (min-width: 769px) {
    .screenshots { 
        margin-top:24px; 
        background:#fff; 
        padding:16px; 
        border-radius:8px; 
    }
    .screenshots h2 { 
        font-size:18px; 
        margin-bottom:12px; 
    }
    .carousel-container { 
        position: relative; 
        display: flex; 
        align-items: center; 
        overflow: hidden; 
        margin-top: 12px; 
    }
    .carousel-track-wrapper { 
        overflow: hidden; 
        flex: 1; 
    }
    .carousel-track { 
        display: flex; 
        transition: transform 0.3s ease-in-out; 
        gap: 12px; 
    }
    /* 修改：固定宽度，高度自适应，限制显示5张 */
    .screenshot-item { 
        flex: 0 0 auto; 
        width: 114.75px; 
        min-width: 114.75px;
        border-radius: 8px; 
        overflow: hidden; 
        box-shadow: 0 2px 6px rgba(0,0,0,.1); 
        background: #f5f5f5;
        display: flex;
        align-items: center;
        justify-content: center;
        height: auto; /* 高度自适应 */
    }
    .screenshot-item:nth-child(n+6) {
        display: none; /* 隐藏第6张及以后的截图 */
    }
    /* 修改：图片高度自适应，保持比例 */
    .screenshot-item img { 
        display: block; 
        width: 100%; 
        height: auto; /* 改为auto，高度自适应 */
        object-fit: contain; /* 保持图片比例 */
        object-position: center;
        max-height: 300px; /* 设置最大高度限制 */
    }
    .carousel-btn { 
        position: absolute; 
        top:50%; 
        transform: translateY(-50%); 
        background: rgba(255,255,255,0.8); 
        border:none; 
        font-size:28px; 
        color:#1a73e8; 
        padding:4px 12px; 
        cursor:pointer; 
        border-radius:4px; 
        z-index:10; 
        transition:background .3s; 
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .carousel-btn:hover { 
        background: rgba(26,115,232,0.1); 
    }
    .prev-btn { 
        left:0; 
    }
    .next-btn { 
        right:0; 
    }
}

/* 移动端截图样式 - 保持不变 */
@media (max-width: 768px) {
    .screenshots { 
        margin-top:24px; 
    }
    .carousel-container { 
        position: relative; 
        display: flex; 
        align-items: center; 
        overflow: hidden; 
        margin-top: 12px; 
    }
    .carousel-track-wrapper { 
        overflow: hidden; 
        flex: 1; 
    }
    .carousel-track { 
        display: flex; 
        transition: transform 0.3s ease-in-out; 
    }
    .screenshot-item { 
        flex: 0 0 auto; 
        width:114.75px; 
        height:204px; 
        margin-right:12px; 
        border-radius:8px; 
        overflow:hidden; 
        box-shadow:0 2px 6px rgba(0,0,0,.1); 
    }
    .screenshot-item img { 
        display:block; 
        width:100%; 
        height:100%; 
        object-fit:cover; 
    }
    .carousel-btn { 
        position: absolute; 
        top:50%; 
        transform: translateY(-50%); 
        background: rgba(255,255,255,0.8); 
        border:none; 
        font-size:28px; 
        color:#1a73e8; 
        padding:4px 12px; 
        cursor:pointer; 
        border-radius:4px; 
        z-index:10; 
        transition:background .3s; 
    }
    .carousel-btn:hover { 
        background: rgba(26,115,232,0.1); 
    }
    .prev-btn { 
        left:0; 
    }
    .next-btn { 
        right:0; 
    }
}

/* Description 区 */
.description {margin-top:24px; background:#fff; padding:16px; border-radius:8px; }
.description h2 { font-size:18px; margin-bottom:12px; }
/* 修复描述部分间距问题 */
.description {
    margin-top: 24px;
    background: #fff;
    padding: 16px;
    border-radius: 8px;
}

.description h2 {
    font-size: 18px;
    margin-bottom: 16px;  /* 调整标题下边距 */
    color: #202124;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

/* 修复描述内容间距 */
#desc-short,
#desc-full .desc-content {
    line-height: 1.6 !important;
    white-space: normal !important;
    word-break: break-word !important;
    margin-bottom: 8px;
}

#desc-full {
    padding-top: 8px;
}

#desc-full .desc-content p {
    margin-bottom: 16px;
}

#desc-full .desc-content p:last-child {
    margin-bottom: 0;
}

/* 调整按钮间距 */
.description .toggle-desc {
    display: inline-block;
    margin: 8px 0 0;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.3s;
}

.description .toggle-desc:hover {
    background: #e9ecef;
}



.desc-text {
  font-size: 14px;
  line-height: 1.6;
  color: #202124;
}

.toggle-desc { 
  margin-top:8px; 
  padding:6px 12px; 
  background:transparent; 
  border:1px solid #1a73e8; 
  border-radius:4px; 
  color:#1a73e8; 
  cursor:pointer; 
  font-size:14px; 
  border: none; 
}

/* 更新日志 */
.whats-new { margin-top:24px; background:#fff; padding:16px; border-radius:8px; }
.whats-new h2 { font-size:18px; margin-bottom:12px; }
.update-list { max-height:120px; overflow:hidden; transition:max-height .3s ease; }
.update-item { font-size:14px; line-height:1.5; padding:8px 0; border-bottom:1px solid #eee; }
.toggle-updates { margin-top:8px; padding:6px 12px; background:transparent; border:1px solid #1a73e8; border-radius:4px; color:#1a73e8; cursor:pointer; font-size:14px; border: none; }

/* 评分区 */
.user-ratings { margin-top:24px; background:#fff; padding:16px; border-radius:8px; }
.user-ratings h2 { font-size:18px; margin-bottom:12px; }
.average-rating { font-size:28px; font-weight:600; color:#1a73e8; }
.stars { font-size:18px; color:#fbc02d; margin:4px 0; }
.rating-count { font-size:14px; color:#5f6368; }

/* ======================= */
/* 右侧相关推荐卡片样式 */
/* ======================= */

.related-list { 
    display:flex; 
    flex-direction:column; 
    gap:16px; 
}

.related-card { 
    width:100%; 
    display:flex; 
    align-items:center; 
    background:#fff; 
    border-radius:8px; 
    padding:12px; 
    box-shadow:0 1px 3px rgba(0,0,0,.1); 
    transition: all 0.3s ease; 
    cursor:pointer; 
    position: relative;
    border: 1px solid #e0e0e0;
    opacity: 1 !important;
}

/* 卡片悬停效果 */
.related-card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(0,0,0,.15); 
    border-color: #1a73e8;
}

/* 卡片选中状态 - 仅在用户点击时显示 */
.related-card.active {
    border: 2px solid #1a73e8 !important;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2) !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4ff 100%) !important;
}

.related-card img { 
    width:48px; 
    height:48px; 
    border-radius:12px; 
    object-fit:cover; 
    margin-right:12px; 
}

.related-card .rel-title { 
    font-size:14px; 
    font-weight:500; 
    color:#202124; 
}

.related-card .meta { 
    font-size:12px; 
    color:#5f6368; 
    display:flex; 
    gap:6px; 
}

/* 卡片选中标记 */
.card-checkmark {
    animation: popIn 0.3s ease-out;
}

/* Footer */
#footer { margin:40px 0; text-align:center; color:#777; font-size:13px; }

/* ======================= */
/* 移动端应用卡片列表 */
/* ======================= */

.mobile-apps-list {
  display: none;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.mobile-app-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s;
  position: relative;
}

.mobile-app-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* 移动端卡片布局 */
.mobile-app-card {
  display: flex;
  flex-direction: column;
}

/* 移动端卡片顶部布局 */
.card-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  overflow: hidden;
  float: left;
  margin-right: 16px;
  margin-bottom: 16px;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-info {
  overflow: hidden;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #202124;
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-developer {
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 移动端卡片按钮容器 */
.card-actions-container {
  clear: both;
  margin-top: 0;
  width: 100%;
}

.card-actions-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  margin-left: 0;
  padding-left: 0;
}

.card-actions-row:first-child {
  margin-top: 8px;
}

.card-actions-row:last-child {
  margin-bottom: 0;
}

/* 确保按钮左对齐图标 */
.card-actions-container .install-btn {
  padding: 10px 20px;
  background: #34a853;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
  min-width: 120px;
  margin-left: 0;
}

.card-actions-container .action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #34a853;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
  min-width: 80px;
  margin-left: 0;
}

.card-actions-container .action-btn:hover {
  background: rgba(52, 168, 83, 0.1);
}

.card-actions-container .action-btn svg path {
  fill: #34a853;
}

/* 收起按钮容器 */
.card-collapse-btn-container {
  margin-top: 16px;
  width: 100%;
  display: none;
}

.collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #5f6368;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.collapse-btn:hover {
  background: #e9ecef;
  border-color: #ccc;
}

.collapse-btn svg {
  transform: rotate(180deg);
  transition: transform 0.3s;
}

/* ======================= */
/* 移动端详情样式 */
/* ======================= */

.mobile-screenshots,
.mobile-description,
.mobile-whats-new,
.mobile-user-ratings,
.mobile-detail-footer {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  animation: fadeInUp 0.3s ease forwards;
  opacity: 0;
  transform: translateY(10px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-screenshots h2,
.mobile-description h2,
.mobile-whats-new h2,
.mobile-user-ratings h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #202124;
}

.mobile-description .desc-container {
  max-height: 72px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-description .desc-container.expanded {
  max-height: 500px;
}

.mobile-whats-new .update-list {
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-detail-footer {
  text-align: center;
  margin: 20px 0 30px 0;
  padding: 0 20px;
  background: transparent;
  box-shadow: none;
}

.mobile-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #5f6368;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
  max-width: 200px;
}

.mobile-collapse-btn:hover {
  background: #e9ecef;
  border-color: #ccc;
}

.mobile-collapse-btn svg {
  transform: rotate(180deg);
  transition: transform 0.3s;
}

/* 详情按钮样式 */
.detail-btn {
  color: #34a853;
  transition: color 0.3s;
}

.detail-btn:hover {
  color: #2c8e46;
}

.detail-btn.expanded {
  color: #1a73e8 !important;
}

.detail-btn.expanded:hover {
  color: #1557b0 !important;
}

/* 防止详情展开时的布局抖动 */
.mobile-app-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.view-full-container {
  text-align: center;
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.view-full-detail {
  padding: 10px 20px;
  background: #1a73e8;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
}

.view-full-detail:hover {
  background: #1557b0;
}

/* ======================= */
/* 响应式布局调整 */
/* ======================= */

@media (max-width: 768px) {
  /* 桌面端详情隐藏 */
  .desktop-app-detail {
    display: none;
  }
  
  /* 显示移动端应用列表 */
  .mobile-apps-list {
    display: flex;
  }
  
  /* 移动端隐藏侧边栏 */
  .app-sidebar {
    display: none;
  }
  
  /* 调整整体布局 */
  .app-detail-container {
    flex-direction: column;
    padding: 0 12px;
  }
  
  .app-main {
    width: 100%;
  }
  
  /* 移动端卡片按钮调整 */
  .card-actions-container {
    width: 100%;
  }
  
  .card-actions-row {
    margin-left: 0;
    padding-left: 0;
  }
  
  /* 确保按钮左对齐图标 */
  .card-actions-container .install-btn,
  .card-actions-container .action-btn {
    margin-left: 0;
  }
  
  /* 按钮行布局调整 */
  .card-actions-row {
    display: flex;
    gap: 36px;
    flex-wrap: nowrap;
  }
  
  /* Screenshot Carousel 自适应宽度 */
  .carousel-track-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .carousel-track {
    display: flex;
    gap: 12px;
    padding-bottom: 8px;
  }

  .screenshot-item {
    flex: 0 0 auto;
    width: 30%;
    min-width: 120px;
    height: 200px;
  }

  .carousel-btn { 
    display: none; 
  }

  /* Header 自适应 */
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
  }

  .search-box {
    width: 100%;
    margin-top: 8px;
    order: 3;
  }

  .menu {
    width: 100%;
    display: flex;
    justify-content: space-around;
    margin-top: 8px;
    order: 2;
  }
  
  .logo {
    order: 1;
  }
  
  /* 顶部详情区域按钮（.mobile-actions） */
  .mobile-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 16px;
  }

  /* 安装按钮 → 全宽跟随容器 */
  .mobile-actions .install-btn {
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
    border-radius: 10px;
    max-width: 420px;
    text-align: center;
  }

  /* 分享 + 详情按钮 → 居中、自适应宽度 */
  .mobile-secondary-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
  }

  .mobile-secondary-actions .action-btn {
    padding: 10px 18px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 14px;
  }

  /* 移动端卡片按钮（列表卡片） */
  /* 第一排：安装按钮全宽 */
  .mobile-app-card .card-actions-row:first-child .install-btn {
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
    border-radius: 10px;
    max-width: 420px;
    margin: 0 auto;
  }

  /* 第二排：按钮居中，不拉伸 */
  .mobile-app-card .card-actions-row:last-child {
    width: 100%;
    justify-content: center !important;
    gap: 20px;
  }

  .mobile-app-card .card-actions-row:last-child .action-btn {
    padding: 10px 14px;
    border-radius: 8px;
    white-space: nowrap;
    min-width: auto !important;
  }
  
  /* 移动端详情内容的边距调整 */
  .mobile-screenshots {
    margin-top: 10px;
    margin-bottom: 15px;
  }
  
  .mobile-description,
  .mobile-whats-new,
  .mobile-user-ratings {
    margin-top: 15px;
    margin-bottom: 15px;
  }
  
  .mobile-detail-footer {
    margin-top: 10px;
    margin-bottom: 20px;
  }
}

/* 小屏幕手机适配 */
@media (max-width: 480px) {
  .card-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    margin-bottom: 12px;
  }
  
  .card-title {
    font-size: 16px;
  }
  
  .card-developer {
    font-size: 13px;
  }
  
  .card-meta {
    font-size: 13px;
    gap: 8px;
  }
  
  .card-actions-container .install-btn {
    padding: 2px 16px;
    font-size: 13px;
    min-width: 240px;
  }
  
  .card-actions-container .action-btn {
    padding: 6px 10px;
    font-size: 13px;
    gap: 3px;
    min-width: 70px;
  }
  
  /* 截图区域在小屏幕上显示2张 */
  .screenshot-item {
    width: 45%;
    min-width: 140px;
    height: 220px;
  }
}

/* 桌面端保持原有样式 */
@media (min-width: 769px) {
  /* 桌面端显示详情，隐藏移动端内容 */
  .mobile-apps-list {
    display: none !important;
  }
  
  .desktop-app-detail {
    display: block;
  }
  
  /* 桌面端显示侧边栏 */
  .app-sidebar {
    display: block;
  }
}
/* 彻底杜绝桌面端文字溢出 */
.description,
.short-desc,
.full-desc {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    line-height: 1.8 !important;
    max-width: 100% !important;
}

/* 展开按钮更好看 */
.toggle-desc-btn:hover {
    text-decoration: underline;
}
/* 紧急修复：强制重置所有描述相关元素的间距 */
.description,
.description * {
    line-height: 1.5 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    white-space: normal !important;
}

.description h2 {
    margin-bottom: 12px !important;
}

#desc-short,
#desc-full {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 强制移除所有br标签的额外间距 */
br {
    display: block;
    content: "";
    margin-bottom: 0 !important;
    line-height: 0 !important;
}

/* 确保收起按钮区域有合适的间距 */
#desc-full > div:last-child {
    margin-top: 12px !important;
    padding-top: 12px !important;
}
/* 右侧推荐使用移动端卡片样式 + 高度对齐 */
.app-sidebar {
    width: 280px !important;
    padding: 0 8px;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
    position: sticky;
    top: 80px;
}

.related-mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-card-item {
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.7;
    border-radius: 12px;
    overflow: hidden;
}

.related-card-item:hover {
    opacity: 1 !important;
    transform: translateY(-2px);
}

.related-card-item:active {
    transform: scale(0.98);
}

/* 让移动端卡片在桌面端也完美显示 */
/* ===== 仅桌面端样式 ===== */
/* 桌面端右侧卡片独立样式 */
/* 桌面端右侧推荐卡片 */
@media (min-width: 769px) {
/* 右侧推荐区域 - 修复水平滚动条问题 */
.app-sidebar {
    width: 280px !important;
    padding: 0 8px;
    overflow-y: auto; /* 保留垂直滚动 */
    overflow-x: hidden; /* 隐藏水平滚动条 */
    max-height: calc(100vh - 100px);
    position: sticky;
    top: 80px;
    box-sizing: border-box; /* 确保padding不影响宽度 */
}

/* 确保侧边栏内容不产生水平滚动 */
.sidebar-content-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* 隐藏水平溢出 */
}

/* 修改相关列表容器 */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%; /* 确保不超过父容器 */
    overflow-x: hidden; /* 隐藏水平滚动 */
}

/* 修改相关卡片样式 */
.related-card {
    width: 100%;
    max-width: 100%; /* 确保不超过父容器 */
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    transition: transform .3s;
    cursor: pointer;
    box-sizing: border-box; /* padding包含在宽度内 */
    overflow: hidden; /* 隐藏内部溢出 */
}

/* 修复卡片悬停时的宽度变化 */
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* ======================= */
/* 新增修复样式 ======================= */
/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #34a853;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #d32f2f;
}

.retry-btn {
    margin-top: 16px;
    padding: 10px 24px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.retry-btn:hover {
    background: #1557b0;
}

/* 动画关键帧 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
