/* ==========================================================================
   SezTube :: module/dashboard  (önek: db-)
   Ana sayfa: kategori çipleri, video ızgarası, kartlar, iskelet yükleme.
   ========================================================================== */

.db-page { width: 100%; max-width: 1800px; margin: 0 auto; padding-bottom: 12px; }

/* ---------- Kategori çubuğu (yapışık) ---------- */
.db-bar {
  position: sticky; z-index: 40;
  top: calc(var(--st-topbar-h) + var(--st-safe-t));
  padding: 10px 12px;
  background: var(--st-glass);
  -webkit-backdrop-filter: saturate(1.5) blur(18px); backdrop-filter: saturate(1.5) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.db-bar.is-stuck { border-bottom-color: var(--st-border); box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .5); }
.db-bar .st-chips { margin: 0 -12px; padding: 0 12px; }

/* ---------- Başlık + sıralama ---------- */
.db-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 14px 4px; }
.db-head__text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.db-title { font-size: 19px; font-weight: 780; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; }
.db-clear {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 620; color: var(--st-text-2); background: var(--st-surface-2); border: 1px solid var(--st-border);
  transition: background .2s, color .2s;
}
.db-clear:hover { background: var(--st-surface-3); color: var(--st-text); }

.db-sort { display: inline-flex; flex: none; padding: 3px; border-radius: 13px; background: var(--st-surface-2); border: 1px solid var(--st-border); }
.db-sort__item {
  display: inline-flex; align-items: center; height: 30px; padding: 0 13px; border-radius: 10px;
  font-size: 13px; font-weight: 640; color: var(--st-text-2); transition: background .2s, color .2s;
}
.db-sort__item:hover { color: var(--st-text); }
.db-sort__item.is-active { background: var(--st-surface-3); color: var(--st-text); box-shadow: var(--st-shadow-sm); }

/* ---------- Izgara ---------- */
.db-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px 16px; padding: 12px 12px 8px; }

@media (min-width: 600px) { .db-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); } }
@media (min-width: 768px) {
  .db-bar { padding: 12px 28px; }
  .db-bar .st-chips { margin: 0 -28px; padding: 0 28px; }
  .db-head { padding: 22px 28px 6px; }
  .db-title { font-size: 22px; }
  .db-grid { padding: 14px 28px 8px; gap: 28px 20px; }
}
@media (min-width: 1700px) { .db-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); } }

/* ---------- Kart ---------- */
.db-card { display: flex; flex-direction: column; gap: 11px; min-width: 0; animation: db-in .55s var(--st-ease) both; animation-delay: calc(min(var(--db-i, 0), 11) * 45ms); }

.db-card__thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 16px; background: var(--st-surface-2);
  transition: box-shadow .35s var(--st-ease), transform .25s var(--st-ease);
  -webkit-tap-highlight-color: transparent;
}
.db-card__thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--st-border); pointer-events: none; }
.db-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--st-ease), filter .3s; }
a.db-card__thumb:active { transform: scale(.985); }

.db-ph {
  display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255, 255, 255, .85);
  background: linear-gradient(135deg, hsl(var(--db-h, 260), 68%, 48%), hsl(calc(var(--db-h, 260) + 55), 72%, 36%));
}

.db-dur {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 8px;
  font-size: 12px; font-weight: 650; line-height: 1.5; color: #fff; font-variant-numeric: tabular-nums;
  background: rgba(8, 8, 14, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.db-play {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%; color: #fff; background: rgba(12, 12, 20, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .22);
  opacity: 0; transform: scale(.7); transition: opacity .25s, transform .4s var(--st-spring); pointer-events: none;
}
.db-play .st-icon { margin-left: 2px; }

@media (hover: hover) {
  .db-card:hover .db-card__thumb { box-shadow: 0 18px 40px -18px rgba(124, 92, 255, .65); }
  .db-card:hover .db-card__thumb img { transform: scale(1.06); filter: saturate(1.1); }
  .db-card:hover .db-play { opacity: 1; transform: none; }
  .db-card:hover .db-card__title a { color: var(--st-accent); }
}

.db-card__body { display: flex; gap: 12px; padding: 0 2px; min-width: 0; }
.db-card__avatar { flex: none; padding-top: 1px; }
.db-card__info { min-width: 0; }
.db-card__title { font-size: 15px; font-weight: 660; line-height: 1.35; letter-spacing: -.005em; }
.db-card__title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.db-card__by { margin-top: 3px; font-size: 13px; color: var(--st-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-card__meta { display: flex; align-items: center; gap: 6px; margin-top: 1px; font-size: 12.5px; color: var(--st-text-3); white-space: nowrap; overflow: hidden; }
.db-card__meta i { flex: none; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }

@media (max-width: 599px) {
  .db-card { gap: 10px; }
  .db-card__thumb { border-radius: 14px; }
}

/* ---------- İskelet ---------- */
.db-sk .db-card__thumb { background: none; }
.db-sk .db-card__thumb::after { display: none; }
.db-sk__thumb { width: 100%; height: 100%; border-radius: 0; }
.db-sk__avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.db-sk__lines { flex: 1; display: grid; gap: 8px; padding-top: 3px; }
.db-sk__lines .st-skel { height: 12px; }
.db-sk__lines .st-skel:first-child { height: 14px; width: 92%; }
.db-sk__lines .st-skel:last-child { width: 55%; }

/* ---------- Devamını yükle ---------- */
.db-more { display: flex; justify-content: center; padding: 18px 12px 10px; }
.db-end { padding: 22px 12px 10px; text-align: center; font-size: 13px; color: var(--st-text-3); }

@keyframes db-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
