/* AppShare Design Language - 应用详情页 */
:root {
  /* 主题色 - 青蓝色渐变 */
  --primary-color: #06b6d4;
  --primary-dark: #0891b2;
  --primary-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);

  /* 背景色 */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;

  /* 文字色 */
  --text-primary: #1a1a1a;
  --text-secondary: #5f6368;
  --text-tertiary: #9aa0a6;

  /* 边框色 */
  --border-color: #e8eaed;
  --border-hover: #dadce0;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* 过渡 */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 64px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  body {
    padding-top: 56px;
  }

  .container {
    padding: 0 16px;
  }
}
/* Hero Section - 应用头部 */
.hero-section {
  padding: 32px 0 56px 0;
}

.hero-content {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.app-icon-wrapper {
  flex-shrink: 0;
}

.app-icon {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.app-icon:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.app-info {
  flex: 1;
  min-width: 0;
}

.app-title-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.app-name {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  max-width: calc(100% - 80px);
  word-wrap: break-word;
  word-break: break-word;
}

.app-package {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  font-family: 'Courier New', monospace;
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

.meta-item .material-icons {
  font-size: 18px;
  color: var(--primary-color);
}

.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  height: fit-content;
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: 2px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.download-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.download-btn .material-icons {
  font-size: 18px;
}

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .app-icon {
    width: 100px;
    height: 100px;
  }

  .app-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .app-title-wrapper {
    justify-content: center;
    width: 100%;
  }

  .app-name {
    font-size: 24px;
    text-align: center;
  }

  .app-meta {
    justify-content: center;
  }
}

/* Stats Section - 统计数据 */
.stats-section {
  padding-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card .material-icons {
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

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

  .stat-card {
    padding: 16px;
  }

  .stat-card .material-icons {
    font-size: 28px;
  }

  .stat-value {
    font-size: 20px;
  }
}

/* Section Title - 通用标题 */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-title .material-icons {
  font-size: 24px;
  color: var(--primary-color);
}

/* Content Section - 内容区域 */
.content-section {
  padding-bottom: 24px;
}

.content-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.content-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Screenshots Section - 截图 */
.screenshots-section {
  padding-bottom: 24px;
}

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

.screenshot-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  aspect-ratio: 9 / 16;
}

.screenshot-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .screenshots-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
}

/* Warning Section - 警告提示 */
.warning-section {
  padding-bottom: 24px;
}

.warning-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border-left: 4px solid #ff9800;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.warning-card.version-warning {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-left-color: #2196f3;
}

.warning-card .material-icons {
  font-size: 28px;
  color: #ff9800;
  flex-shrink: 0;
}

.warning-card.version-warning .material-icons {
  color: #2196f3;
}

.warning-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.warning-content p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* Technical Info - 技术信息 */
.tech-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tech-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.tech-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.tech-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .tech-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Uploader Info - 上传者信息 */
.uploader-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.uploader-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.uploader-details {
  flex: 1;
}

.uploader-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.uploader-id {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Tags Section - 标签 */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-item {
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(8, 145, 178, 0.1) 100%);
  color: var(--primary-color);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.tag-item:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(8, 145, 178, 0.2) 100%);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Type List - 版本类型列表 */
.type-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.type-item {
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary-color);
  transition: var(--transition);
}

.type-item:hover {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.type-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Beian Card - 备案信息 */
.beian-card {
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  border: 1px solid var(--border-color);
}

.beian-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.beian-content .material-icons {
  font-size: 20px;
  color: #4caf50;
}

/* Related Apps - 相关应用 */
.related-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
}

.related-app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: var(--transition);
}

.related-app-item:hover {
  transform: translateY(-4px);
}

.related-app-item img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
  transition: var(--transition);
}

.related-app-item:hover img {
  box-shadow: var(--shadow-md);
}

.related-app-name {
  text-align: center;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width: 768px) {
  .related-apps-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
  }

  .related-app-item img {
    width: 64px;
    height: 64px;
  }

  .related-app-name {
    font-size: 12px;
    max-width: 80px;
  }
}

/* ==================== Dark Mode - 深色模式适配 ==================== */
@media (prefers-color-scheme: dark) {
  :root {
    /* Background Colors for Dark Mode */
    --bg-primary: #1a1c1e;
    --bg-secondary: #1e2022;
    --bg-tertiary: #282a2d;
    --bg-card: #1e2022;

    /* Text Colors for Dark Mode */
    --text-primary: #e3e2e6;
    --text-secondary: #c4c6d0;
    --text-tertiary: #8e9099;

    /* Border Colors for Dark Mode */
    --border-color: #44474e;
    --border-hover: #5f6368;
  }

  body {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }

  .hero-section,
  .stats-section,
  .content-section,
  .screenshots-section,
  .warning-section {
    background: var(--bg-primary);
  }

  .stat-card,
  .content-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
  }

  .screenshot-item {
    background: var(--bg-secondary);
  }

  .tech-info-item {
    background: var(--bg-tertiary);
  }

  .type-item {
    background: var(--bg-tertiary);
    border-left-color: var(--md-primary);
  }

  .warning-card {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-left-color: #f59e0b;
  }

  .warning-card.version-warning {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-left-color: #3b82f6;
  }

  .beian-card {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.1) 0%, rgba(80, 80, 80, 0.05) 100%);
    border-color: var(--border-color);
  }
}
