/* ========== Post tags (SEO chips) ========== */
.post-tags {
  margin: 28px 0 8px;
  padding: 20px 0 0;
  border-top: 1px solid var(--border-light);
}

.detail-page .post-tags {
  margin: 8px 0 16px;
  padding: 0;
  border-top: none;
}

.post-tags-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 4px;
}

.post-tags-scroll::-webkit-scrollbar {
  display: none;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.post-tag:hover {
  background: var(--hover);
  color: var(--text);
  border-color: var(--text-muted);
}

.post-tags + .comments-area,
.post-tags + .blog-comments {
  margin-top: 16px;
  padding-top: 0;
  border-top: none;
}

/* ========== Device chips ========== */
.device-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 20px;
  scrollbar-width: none;
  margin-bottom: 8px;
}

.device-bar::-webkit-scrollbar {
  display: none;
}

.device-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.device-chip svg {
  width: 18px;
  height: 18px;
}

.device-chip:hover {
  background: var(--hover);
}

.device-chip.active {
  background: var(--play-green-soft);
  border-color: transparent;
  color: var(--play-green);
}

/* ========== Carousel ========== */
.carousel-wrap {
  position: relative;
}

.carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 2px 8px;
  scroll-behavior: smooth;
}

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

.carousel > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0;
  transition: opacity var(--transition);
  color: var(--text-secondary);
}

.carousel-wrap:hover .carousel-btn {
  opacity: 1;
}

.carousel-btn:hover {
  background: var(--hover);
}

.carousel-btn.prev {
  right: -8px;
}

.carousel-btn.next {
  left: -8px;
}

.carousel-btn:disabled {
  opacity: 0 !important;
  pointer-events: none;
}

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

/* ========== Featured card (large screenshot) ========== */
.featured-card,
.indie-card,
.app-tile {
  cursor: pointer;
}

a.featured-card,
a.indie-card,
a.app-tile {
  display: block;
}

.featured-card {
  width: 280px;
}

.featured-card:hover .featured-art {
  box-shadow: var(--shadow);
}

.featured-art {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--hover);
  position: relative;
  transition: box-shadow var(--transition);
}

.featured-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-meta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  align-items: flex-start;
}

.featured-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--hover);
}

.featured-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.featured-info h3 {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-info .meta-line {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}

.rating svg {
  width: 12px;
  height: 12px;
}

/* ========== App tile (icon + title) ========== */
.app-tile {
  width: 120px;
  cursor: pointer;
}

.app-tile:hover .app-tile-icon {
  opacity: 0.92;
}

.app-tile-icon {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--hover);
  transition: opacity var(--transition);
}

.app-tile-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-tile-name {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.app-tile .rating {
  margin-top: 2px;
}

.app-tile .price {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Category / archive tile grid (must load on category pages, not only blog) */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px 20px;
  width: 100%;
}

.category-grid .app-tile {
  width: 100%;
  max-width: 160px;
}

.category-grid .app-tile-icon {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

/* Compact horizontal app row for charts */
.chart-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.chart-row:hover {
  background: var(--hover);
}

.chart-rank {
  width: 28px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.chart-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--hover);
}

.chart-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.chart-info h3 {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-info .meta-line {
  font-size: 12px;
  color: var(--text-secondary);
}

.chart-rating {
  flex-shrink: 0;
}

/* ========== Charts panel ========== */
.charts-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 8px 16px 16px;
  border: 1px solid var(--border-light);
}

.charts-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.charts-tabs::-webkit-scrollbar {
  display: none;
}

.charts-tab {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  margin-bottom: -1px;
}

.charts-tab:hover {
  color: var(--text);
}

.charts-tab.active {
  color: var(--play-green);
  border-bottom-color: var(--play-green);
}

.charts-list {
  display: none;
}

.charts-list.active {
  display: block;
}

.charts-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .charts-columns {
    grid-template-columns: 1fr;
  }
}

/* ========== Indie / medium featured ========== */
.indie-card {
  width: 200px;
  cursor: pointer;
}

.indie-card .featured-art {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
}

.indie-card .featured-meta {
  margin-top: 10px;
}

.indie-card .featured-icon {
  width: 40px;
  height: 40px;
}

.badge-sale {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--play-green);
  background: var(--play-green-soft);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

.price-was {
  text-decoration: line-through;
  color: var(--text-muted);
  margin-left: 4px;
}

/* ========== Event cards ========== */
.event-card {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  margin-bottom: 16px;
  min-height: 200px;
}

.event-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-deadline {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.event-body h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
}

.event-body p {
  font-size: 14px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.event-app {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.event-app-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--hover);
}

.event-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.event-app-info .name {
  font-size: 14px;
  font-weight: 500;
}

.event-app-info .dev {
  font-size: 12px;
  color: var(--text-secondary);
}

.event-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.btn-install {
  background: var(--play-green);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 999px;
  transition: background var(--transition);
}

.btn-install:hover {
  background: var(--play-green-hover);
}

.event-note {
  font-size: 11px;
  color: var(--text-muted);
}

.event-media {
  background: var(--hover);
  min-height: 200px;
}

.event-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 200px;
}

@media (max-width: 768px) {
  .event-card {
    grid-template-columns: 1fr;
  }

  .event-media {
    order: -1;
    max-height: 180px;
  }

  .event-media img {
    max-height: 180px;
  }
}

/* ========== Beta / new badge ========== */
.badge-new {
  display: inline-block;
  font-size: 11px;
  color: var(--play-green);
  font-weight: 500;
}

/* ========== Appdoni Plus badge (corner star) ========== */
.app-icon-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.app-icon-wrap .art-thumb,
.app-icon-wrap .art-placeholder {
  border-radius: inherit;
  overflow: hidden;
}

.badge-appdoni-plus {
  position: absolute;
  z-index: 2;
  inset-inline-start: 3px;
  bottom: 3px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #9b5cff 0%, #6d28d9 100%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 1px 3px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.badge-appdoni-plus svg {
  width: 12px;
  height: 12px;
  display: block;
}

.featured-icon .badge-appdoni-plus,
.chart-icon .badge-appdoni-plus {
  width: 16px;
  height: 16px;
  inset-inline-start: 2px;
  bottom: 2px;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(0, 0, 0, 0.18);
}

.featured-icon .badge-appdoni-plus svg,
.chart-icon .badge-appdoni-plus svg {
  width: 9px;
  height: 9px;
}

/* ========== Placeholder gradient art ========== */
.grad-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.grad-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.grad-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.grad-4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.grad-5 { background: linear-gradient(135deg, #fa709a, #fee140); }
.grad-6 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.grad-7 { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.grad-8 { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.grad-9 { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.grad-10 { background: linear-gradient(135deg, #d4fc79, #96e6a1); }
.grad-11 { background: linear-gradient(135deg, #84fab0, #8fd3f4); }
.grad-12 { background: linear-gradient(135deg, #cfd9df, #e2ebf0); }
.grad-13 { background: linear-gradient(135deg, #e0c3fc, #8ec5fc); }
.grad-14 { background: linear-gradient(135deg, #f77062, #fe5196); }
.grad-15 { background: linear-gradient(135deg, #30cfd0, #330867); }

.art-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.art-placeholder.sm {
  font-size: 18px;
}

/* ========== Explore PC banner ========== */
.promo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  margin-bottom: 32px;
}

.promo-banner h2 {
  font-size: 18px;
  font-weight: 500;
}

.promo-banner p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.btn-outline {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--play-green);
  white-space: nowrap;
}

.btn-outline:hover {
  background: var(--play-green-soft);
  border-color: transparent;
}

@media (max-width: 640px) {
  .featured-card {
    width: 240px;
  }

  .app-tile,
  .app-tile-icon {
    width: 96px;
  }

  .app-tile-icon {
    height: 96px;
  }

  .category-grid .app-tile {
    width: 100%;
    max-width: none;
  }

  .category-grid .app-tile-icon {
    width: 100%;
    height: auto;
  }

  .indie-card {
    width: 160px;
  }

  .promo-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* Featured art real images */
.featured-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-icon .art-thumb,
.featured-icon .art-placeholder,
.detail-icon .art-thumb,
.detail-icon .art-placeholder,
.app-tile-icon .art-thumb,
.app-tile-icon .art-placeholder,
.chart-icon .art-thumb,
.chart-icon .art-placeholder {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
