/* Ana sayfa sıralı diziler: IMDb "Top 10 on IMDb this week" kartları.
   Sadece [data-top-series] içindeki .t10-card kartlarını etkiler. */
html body .ranked-rail[data-top-series] {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 32px) / 3) !important;
  gap: 16px !important;
  overflow-x: auto;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
  padding: 2px 0 8px !important;
}
html body .ranked-rail[data-top-series]::-webkit-scrollbar { display: none; }

html body .ranked-rail .t10-card {
  position: relative;
  display: grid !important;
  grid-template-columns: 42% 1fr;
  gap: 14px !important;
  align-items: start;
  min-height: 0;
  padding: 12px !important;
  background: #1f1f1f !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  color: #fff !important;
  scroll-snap-align: start;
  transform: none !important;
  overflow: visible;
}
/* IMDb'deki ilk kart: sol üstten maviye, sonra siyaha geçiş */
html body .ranked-rail .t10-card.is-first {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(20, 84, 160, .85) 0%, rgba(20, 60, 110, .45) 38%, rgba(31, 31, 31, 0) 72%),
    #1f1f1f !important;
}
html body .ranked-rail .t10-card:hover { background-color: #262626 !important; }

/* Poster + izleme listesi kurdelesi */
html body .t10-poster { position: relative; }
html body .t10-poster a { display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: #000; }
html body .t10-poster img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s ease; }
html body .t10-poster a:hover img { opacity: .85; }
html body .t10-ribbon {
  position: absolute; top: 0; left: 0;
  width: 32px; height: 44px;
  display: grid; place-items: start center;
  padding: 6px 0 0 !important;
  border: 0 !important; border-radius: 8px 0 0 0 !important;
  background: rgba(31, 31, 31, .78) !important;
  color: #fff !important;
  font-size: 20px; font-weight: 400; line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  cursor: pointer;
  box-shadow: none !important;
}
html body .t10-ribbon:hover { background: rgba(60, 60, 60, .9) !important; }
html body .t10-ribbon.is-saved,
html body .t10-ribbon[aria-pressed="true"] { background: #f5c518 !important; color: #000 !important; font-weight: 700; }
html body .t10-ribbon:focus-visible { outline: 2px solid #5799ef; outline-offset: 2px; }

/* Gövde */
html body .t10-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 2px; }
html body .t10-rank {
  align-self: flex-start;
  padding: 2px 16px 2px 10px;
  background: #0e63be;
  color: #fff;
  font-size: 14px; font-weight: 700; line-height: 1.5;
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
  border-radius: 4px 0 0 4px;
}
html body .t10-title { margin: 0 !important; font-size: 18px !important; font-weight: 700 !important; line-height: 1.3; letter-spacing: 0 !important; }
html body .t10-title a { color: #fff !important; }
html body .t10-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
html body .t10-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: rgba(255, 255, 255, .7); font-size: 15px; }

html body .t10-actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
html body .t10-score { display: inline-flex; align-items: center; gap: 4px; color: rgba(255, 255, 255, .7); font-size: 15px; }
html body .t10-score svg { width: 16px; height: 16px; fill: #f5c518; }
html body .t10-score b { color: rgba(255, 255, 255, .7); font-weight: 400; }
html body .t10-score small { font-size: 13px; color: rgba(255, 255, 255, .5); }
html body .t10-score[hidden] { display: none; }

html body .t10-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 0 !important;
  background: none !important; border: 0 !important; box-shadow: none !important;
  color: #5799ef !important;
  font: 500 15px/1.4 Roboto, Arial, sans-serif !important;
  cursor: pointer; text-align: left;
}
html body .t10-link svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
html body .t10-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
html body .t10-link:focus-visible { outline: 2px solid #5799ef; outline-offset: 2px; border-radius: 4px; }
html body .t10-watched[aria-pressed="true"] { color: #fff !important; }
html body .t10-watched[aria-pressed="true"] svg { stroke: #5799ef; }

/* Kart içi yıldız seçici */
html body .t10-rate {
  display: flex; gap: 2px;
  padding: 6px 8px;
  background: #121212; border: 1px solid #333; border-radius: 8px;
}
html body .t10-rate[hidden] { display: none; }
html body .t10-rate button { padding: 2px !important; background: none !important; border: 0 !important; color: #555; cursor: pointer; box-shadow: none !important; }
html body .t10-rate button svg { width: 22px; height: 22px; fill: currentColor; }
html body .t10-rate button.on, html body .t10-rate button:hover, html body .t10-rate button:hover ~ button.on { color: #5799ef; }

html body .t10-desc {
  margin: 4px 0 0 !important;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  color: rgba(255, 255, 255, .7) !important;
  font-size: 15px !important; line-height: 1.45;
}

/* Kaydırma okları kartın ortasında */
html body .x-rail-wrap:has([data-top-series]) .x-rail-btn { top: 50%; }

@media (max-width: 1100px) {
  html body .ranked-rail[data-top-series] { grid-auto-columns: calc((100% - 16px) / 2) !important; }
}
@media (max-width: 640px) {
  html body .ranked-rail[data-top-series] { grid-auto-columns: 88% !important; }
  html body .ranked-rail .t10-card { grid-template-columns: 38% 1fr; }
  html body .t10-title { font-size: 16px !important; }
  html body .t10-meta, html body .t10-link, html body .t10-desc { font-size: 14px !important; }
  html body .t10-desc { -webkit-line-clamp: 3; }
}
