/* style.css - 公共样式，适用于 index.html, view.html, list.html */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Google Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #3c4043;
  line-height: 1.6;
  font-size: 14px;
}
a {
    color: #292929;
    text-decoration: none;
}

/* 顶部导航 */
header {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  background-color: #fff;
  border-bottom: 1px solid #dadce0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  width: 24px;
  height: 24px;
  background: conic-gradient(from 0deg at 50% 50%, #4285f4 0%, #34a853 25%, #fbbc05 50%, #ea4335 75%, #4285f4 100%);
  border-radius: 50%;
  margin-right: 12px;
}

.store-title {
  font: 500 16px/24px "Google Sans", sans-serif;
  color: #5f6368;
}

.search-container {
  flex: 1;
  max-width: 600px;
  margin: 0 24px;
  position: relative;
}

.search-bar {
  width: 100%;
  padding: 10px 16px 10px 44px;
  border: 1px solid #dadce0;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%235f6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>') no-repeat 16px center;
  background-size: 16px;
}

.search-bar:focus {
  border-color: #1a73e8;
  box-shadow: 0 1px 6px rgba(32,33,36,.28);
}

.login-btn {
  background-color: #1a73e8;
  color: white;
  border: none;
  padding: 8px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

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












/* 主内容容器 */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  gap: 32px;
}

/* 左侧导航 - 自适应 */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.nav-title {
  font-size: 14px;
  color: #5f6368;
  margin: 16px 0 8px;
  font-weight: 500;
}

.nav-list {
  list-style: none;
}

.nav-item {
  padding: 8px 0;
  font-size: 14px;
  color: #3c4043;
  cursor: pointer;
}

.nav-item:hover {
  color: #1a73e8;
}

.nav-item.active {
  color: #1a73e8;
  font-weight: 500;
}

/* 内容区域 */
.content {
  flex: 1;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 2px 6px rgba(60,64,67,.15);
  transition: box-shadow .2s;
  cursor: pointer;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(60,64,67,.3), 0 8px 16px rgba(60,64,67,.15);
}

.card-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  background: #eee;
  border-bottom: 1px solid #eee;
}

.card-body {
  padding: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.card-rating {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #5f6368;
}

.stars {
  color: #f9ab00;
  margin-right: 4px;
}

/* 横幅 */
.banner {
  background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
  color: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.banner::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 120px;
  height: 120px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23ff6d00" d="M50 10 L61.8 38.2 L90 40 L68.2 58.2 L73.6 86.4 L50 72.4 L26.4 86.4 L31.8 58.2 L10 40 L38.2 38.2 Z"/></svg>') no-repeat center;
  background-size: 80px;
  opacity: 0.3;
  transform: rotate(15deg);
}

.banner-text h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.banner-text p {
  font-size: 14px;
  opacity: 0.9;
}

.banner-btn {
  background: white;
  color: #1a237e;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
}

.banner-btn:hover {
  background: #e8f0fe;
}

/* 详情页专用 */
.header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 20px;
}

.icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: white;
  font-weight: bold;
}

.icon img{width:80px;height: 80px;}

.title-info h1 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #202124;
}

.meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 12px;
}

.add-btn {
  background-color: #1a73e8;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  margin-top: 16px;
}

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

.tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  background: #e8f0fe;
  color: #1a73e8;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}

/* === 截图轮播区域 - 修复撑宽问题 === */
.screenshots-container {
  position: relative;
  margin: 32px 0;
  width: 100%;
  max-width: 900px;
  overflow: hidden; /* 隐藏溢出 */
  border-radius: 12px;
  box-sizing: border-box;
}

.screenshots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 0;
  width: 100%; /* 确保不超出容器 */
  box-sizing: border-box;
}

.screenshots::-webkit-scrollbar {
  display: none;
}

.screenshots {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.screenshot {
  width: 280px;
  height: 175px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #eee center/cover no-repeat;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  scroll-snap-align: start;
  transition: transform 0.2s ease;
}

.screenshot:hover {
  transform: scale(1.02);
  z-index: 1;
}

/* 左右箭头 */
.screenshots-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s;
}

.screenshots-container:hover .screenshots-arrow {
  opacity: 1;
}

.screenshots-arrow.prev { left: 8px; }
.screenshots-arrow.next { right: 8px; }

.screenshots-arrow::after {
  content: '';
  width: 10px;
  height: 10px;
  border-top: 2px solid #5f6368;
  border-right: 2px solid #5f6368;
  display: block;
}

.screenshots-arrow.prev::after {
  transform: rotate(-135deg);
  margin-left: 3px;
}

.screenshots-arrow.next::after {
  transform: rotate(45deg);
  margin-right: 3px;
}


.section {
  margin-bottom: 40px;
}
.section-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #202124;
}
.see-more {
  font-size: 14px;
  color: #1a73e8;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 16px;
  transition: background-color 0.2s, color 0.2s;
}

.see-more:hover {
  background-color: rgba(26, 115, 232, 0.08);
  color: #1557b0;
  text-decoration: none;
}

.section h2 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 16px;
  color: #202124;
}

.section p, .section li {
  font-size: 14px;
  color: #3c4043;
  margin-bottom: 8px;
}

.section ul {
  padding-left: 20px;
}

.section li::marker {
  color: #1a73e8;
}

.contact {
  color: #1a73e8;
  text-decoration: none;
}

.contact:hover {
  text-decoration: underline;
}

.info-table {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 24px;
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 32px;
}

.info-table dt {
  font-weight: 500;
  color: #3c4043;
}

.privacy-notice {
  background: #f8f9fa;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  color: #5f6368;
  margin-bottom: 32px;
}

.privacy-notice strong {
  color: #3c4043;
}

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

.related-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(60,64,67,.15);
  transition: box-shadow .2s;
}

.related-card:hover {
  box-shadow: 0 4px 8px rgba(60,64,67,.25);
}

.related-icon {
  width: 48px;
  height: 48px;
  background: #ddd;
  border-radius: 8px;
  margin: 12px;
}

.related-body {
  padding: 0 12px 12px;
}

.related-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.related-desc {
  font-size: 12px;
  color: #5f6368;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(60,64,67,.15);
  margin-bottom: 24px;
}

.sidebar-card h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 12px;
}

.stat {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 8px;
}

.stat strong {
  color: #3c4043;
}

/* 页脚 */
footer {
  margin-top: 60px;
  padding: 40px 24px 60px;
  background-color: #f8f9fa;
  border-top: 1px solid #dadce0;
  font-size: 12px;
  color: #5f6368;
  text-align: center;
}

footer a {
  color: #1a73e8;
  text-decoration: none;
  margin: 0 12px;
}

footer a:hover {
  text-decoration: underline;
}

/* 响应式 */
@media (max-width: 992px) {
  .main {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    position: static;
    max-height: none;
    overflow: visible;
  }
  .nav-title {
    margin-top: 24px;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
  }
  .screenshot {
    width: calc(100vw - 80px);
    height: auto;
    aspect-ratio: 16 / 10;
  }
  .screenshots {
    margin: 0 -16px;
    padding: 8px 16px;
  }

}