/* ============================================================
   appDetail.css — Dark Design System v2
   ============================================================ */

.det-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.det-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
  overflow: hidden;
}
.det-layout > * {
  min-width: 0;
}

/* ---- App Hero ---- */
.det-hero {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF7ED 60%, rgba(249,115,22,.04) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.det-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(249,115,22,.06) 0%, transparent 60%);
  pointer-events: none;
}
.det-hero__top {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  position: relative;
}
.det-hero__icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.det-hero__info { flex: 1; min-width: 0; }
.det-hero__name {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 10px;
}
.det-hero__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.det-hero__rating {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.2);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--warn);
}
.det-hero__stars { display: flex; gap: 2px; }
.det-hero__cat {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(244,114,182,.12);
  color: var(--accent);
  border: 1px solid rgba(244,114,182,.2);
}
.det-hero__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.det-hero__badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(251,146,60,.1);
  color: var(--primary);
  border: 1px solid rgba(251,146,60,.15);
}

/* ---- Download Buttons ---- */
.det-download {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.det-dl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  height: 54px;
  border-radius: 30px;
  font-size: 17px;
  font-weight: 700;
  transition: all var(--transition);
  text-decoration: none;
  border: 2.5px solid #E5A000;
  background: transparent;
  color: #E5A000;
}
.det-dl-btn:hover {
  background: rgba(229,160,0,.08);
  color: #E5A000;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229,160,0,.25);
}
.det-dl-btn--apk {
  border-color: #E5A000;
  color: #E5A000;
}
.det-dl-btn--gp {
  border-color: #E5A000;
  color: #E5A000;
}
.det-dl-btn--gp:hover {
  background: rgba(229,160,0,.08);
  color: #E5A000;
  box-shadow: 0 6px 20px rgba(229,160,0,.25);
}
.det-dl-btn--disabled {
  opacity: .45;
  pointer-events: none;
  cursor: not-allowed;
  background: #CBD5E1;
  border-color: #CBD5E1;
  color: #94A3B8;
  box-shadow: none;
}

/* ---- Screenshots ---- */
.det-screenshots {
  margin-bottom: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.det-screenshots__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}
.det-screenshots__wrapper { position: relative; }
.det-screenshots__scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.det-screenshots__scroll::-webkit-scrollbar { display: none; }
.det-screenshots__item { scroll-snap-align: start; flex-shrink: 0; }
.det-screenshots__img {
  height: 200px;
  width: auto;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
}
.det-screenshots__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all var(--transition);
}
.det-screenshots__btn:hover { background: var(--bg-hover); color: var(--primary); border-color: var(--border-bright); }
.det-screenshots__btn--left { left: -14px; }
.det-screenshots__btn--right { right: -14px; }

/* ---- Ad ---- */
.det-ad { margin-bottom: 24px; }

/* ---- Sections ---- */
.det-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.det-section__title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.det-section__title::before {
  content: '';
  display: block;
  width: 3px;
  height: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* ---- Overview ---- */
.det-overview__content {
  font-size: 14px;
  color: #475569;
  line-height: 1.75;
}
.det-overview__content p { margin-bottom: 10px; }
.det-overview__content h2, .det-overview__content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 14px 0 8px;
}

/* ---- Info Table ---- */
.det-info-table { display: flex; flex-direction: column; gap: 4px; }
.det-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  transition: background var(--transition);
}
.det-info-row:hover { background: var(--bg-hover); }
.det-info-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.det-info-icon { color: var(--text-muted); flex-shrink: 0; }
.det-info-value { font-size: 13px; font-weight: 500; color: #475569; text-align: right; }

/* ---- Recommend Grid ---- */
.det-recommend-grid { display: flex; flex-direction: column; gap: 2px; }
.det-recommend-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  transition: all var(--transition);
  text-decoration: none;
}
.det-recommend-item:hover { background: var(--bg-hover); }
.det-recommend-item__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.det-recommend-item__info { flex: 1; min-width: 0; }
.det-recommend-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.det-recommend-item__rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--warn);
}
.det-recommend-item__arrow { flex-shrink: 0; color: var(--text-muted); }

/* ---- Sidebar ---- */
.det-sidebar { position: sticky; top: calc(var(--header-h) + 20px); }
.det-sidebar__box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.det-sidebar__title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.det-sidebar__list { display: flex; flex-direction: column; gap: 2px; }
.det-sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.det-sidebar__item:hover { background: var(--bg-hover); }
.det-sidebar__rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.det-sidebar__icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
}
.det-sidebar__info { flex: 1; min-width: 0; }
.det-sidebar__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.det-sidebar__meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.det-sidebar__dot { color: var(--border); }
.det-sidebar__get {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(251,146,60,.1);
  border: 1px solid rgba(251,146,60,.2);
  border-radius: 6px;
  padding: 4px 10px;
  flex-shrink: 0;
  transition: all var(--transition);
  text-decoration: none;
}
.det-sidebar__get:hover { background: rgba(251,146,60,.18); }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .det-layout { grid-template-columns: 1fr; gap: 0; }
  .det-sidebar { position: static; }
}
@media (max-width: 600px) {
  .det-container { padding: 16px 16px 48px; overflow-x: hidden; }
  .det-hero { padding: 20px; margin-bottom: 16px; }
  .det-hero__icon { width: 72px; height: 72px; border-radius: 16px; }
  .det-hero__name { font-size: 20px; }
  .det-screenshots__img { height: 160px; }
  .det-screenshots__btn--right { right: -4px; }
  .det-screenshots__btn--left { left: -4px; }
  .det-download { grid-template-columns: 1fr; gap: 12px; }
  .det-dl-btn { height: 48px; padding: 12px 20px; font-size: 16px; }
  .det-section { margin-bottom: 16px; padding: 18px; }
}
