/* Option 13: Structured Information Cards.
   Scope is limited to Completed and Most Popular. Upcoming stays unchanged.
   Original AnimePahe, adapter, and previously approved CSS are untouched. */
.ap-discovery-shell .ap-home-panel-completed,
.ap-discovery-shell .ap-home-panel-popular {
  background: #161a1e;
  border-color: #34373e;
}
.ap-discovery-shell .ap-home-panel-completed .ap-panel-header,
.ap-discovery-shell .ap-home-panel-popular .ap-panel-header {
  min-height: 28px;
  margin-bottom: 14px;
  gap: 9px;
}
.ap-discovery-shell .ap-home-panel-completed .ap-panel-header::before,
.ap-discovery-shell .ap-home-panel-popular .ap-panel-header::before {
  content: "";
  display: block;
  flex: 0 0 3px;
  height: 22px;
  border-radius: 3px;
  background: #b98290;
}
.ap-discovery-shell .ap-home-panel-completed h2,
.ap-discovery-shell .ap-home-panel-popular h2 {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}
.ap-discovery-shell .ap-home-panel-completed .ap-panel-rule,
.ap-discovery-shell .ap-home-panel-popular .ap-panel-rule {
  background: linear-gradient(90deg, #493740, transparent);
}
.ap-discovery-shell .ap-home-panel-completed .ap-home-mini-list,
.ap-discovery-shell .ap-home-panel-popular .ap-home-mini-list {
  gap: 10px;
}
.ap-discovery-shell .ap-info-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-height: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid #343740;
  border-radius: 6px;
  background: #202329;
  overflow: hidden;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ap-discovery-shell .ap-info-card-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.ap-discovery-shell .ap-info-card .ap-home-mini-poster {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  aspect-ratio: 2/3;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #30343d;
}
.ap-discovery-shell .ap-info-card .ap-home-mini-info {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 0;
  padding: 0;
}
.ap-discovery-shell .ap-info-card .ap-home-mini-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: #f0eeee;
  margin-bottom: 8px;
}
.ap-discovery-shell .ap-info-card .ap-home-mini-genres {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #aeb2bc;
  font-size: 11px;
  line-height: 1.55;
  margin-bottom: 8px;
}
.ap-discovery-shell .ap-info-card .ap-home-mini-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #e3c093;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.ap-discovery-shell .ap-info-card .ap-home-mini-rating span {
  font-size: 13px;
  color: #e0b587;
}
.ap-discovery-shell .ap-info-card-stats {
  display: grid;
  grid-template-columns: minmax(0,1fr) 1px minmax(0,1fr);
  align-items: center;
  margin-top: 12px;
  padding: 10px 8px;
  background: #2a2d34;
  border: 1px solid #343840;
  border-radius: 4px;
}
.ap-discovery-shell .ap-info-card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}
.ap-discovery-shell .ap-info-card-stat-label {
  color: #a5abb5;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .06em;
}
.ap-discovery-shell .ap-info-card-stat:last-child .ap-info-card-stat-label { color: #c29aa6; }
.ap-discovery-shell .ap-info-card-stat-value {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  color: #eee9ec;
  font-variant-numeric: tabular-nums;
}
.ap-discovery-shell .ap-info-card-stat-divider {
  display: block;
  width: 1px;
  height: 33px;
  background: #48434d;
}
@media (hover:hover) {
  .ap-discovery-shell .ap-home-panel-completed:hover,
  .ap-discovery-shell .ap-home-panel-popular:hover {
    background: #191d22;
    border-color: #49404a;
  }
  .ap-discovery-shell .ap-info-card:hover {
    background: #27272e;
    border-color: #5c4650;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
  }
  .ap-discovery-shell .ap-info-card .ap-home-mini-title:hover { color: #e49ab4; }
}
@media (max-width: 1100px) and (min-width: 768px) {
  .ap-discovery-shell .ap-info-card { padding: 10px; }
  .ap-discovery-shell .ap-info-card-main { gap: 9px; }
  .ap-discovery-shell .ap-info-card .ap-home-mini-poster {
    width: 51px; min-width: 51px; max-width: 51px;
  }
  .ap-discovery-shell .ap-info-card .ap-home-mini-title { font-size: 12px; }
  .ap-discovery-shell .ap-info-card .ap-home-mini-genres { font-size: 10px; }
}
@media (max-width: 767.98px) {
  /* Keep v1.0.2 swipe + arrow behavior; only inner Completed/Popular cards change. */
  .ap-discovery-shell .ap-home-panel-completed,
  .ap-discovery-shell .ap-home-panel-popular { padding: 14px 12px 12px; }
  .ap-discovery-shell .ap-info-card { padding: 12px; }
  .ap-discovery-shell .ap-info-card .ap-home-mini-poster {
    width: 68px; min-width: 68px; max-width: 68px;
  }
  .ap-discovery-shell .ap-info-card .ap-home-mini-title { font-size: 14px; }
  .ap-discovery-shell .ap-info-card .ap-home-mini-genres { font-size: 12px; }
}
@media (prefers-reduced-motion:reduce) {
  .ap-discovery-shell .ap-info-card { transition: none; }
}
