/* pages/discover.css — მსახიობი, კოლექციები, „შენთვის“, შეტყობინებები, საჯარო პროფილი */

.discover-root { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.segmented-count { margin-left: 6px; font-size: var(--fs-2xs); color: var(--c-text-3); font-variant-numeric: tabular-nums; }
.segmented-item[aria-pressed="true"] .segmented-count { color: var(--c-accent-soft); }

/* ── საერთო: მინიშნება (callout) ─────────────────────────── */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(61, 126, 255, 0.16), transparent 62%),
    var(--c-surface);
  border: 1px solid rgba(61, 126, 255, 0.22);
}
.callout > .icon { flex: none; color: var(--c-accent-soft); margin-top: 2px; }
.callout-title { font-weight: 600; }
.callout-body { color: var(--c-text-2); font-size: var(--fs-sm); line-height: 1.55; }

/* ══ მსახიობის გვერდი ═════════════════════════════════════ */
.person-page { display: grid; gap: 40px; }
.person-hero {
  display: grid;
  grid-template-columns: clamp(200px, 20vw, 280px) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}
.person-photo {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(160deg, var(--c-surface-3), var(--c-surface));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--c-line) inset;
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-initials {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--c-text-3);
  letter-spacing: 0.04em;
}
.person-intro { display: grid; gap: 16px; min-width: 0; padding-top: 6px; }
.person-dept {
  justify-self: start;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(61, 126, 255, 0.14);
  border: 1px solid rgba(61, 126, 255, 0.28);
  color: var(--c-accent-soft);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.person-name {
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
.person-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 24px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
}
.person-fact { display: grid; gap: 3px; min-width: 0; }
.person-fact dt { font-size: var(--fs-xs); color: var(--c-text-3); }
.person-fact dd { font-size: var(--fs-md); overflow-wrap: anywhere; }
.person-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font-size: var(--fs-sm); color: var(--c-text-2); }
.person-count, .person-ext { display: inline-flex; align-items: center; gap: 8px; }
.person-ext { color: var(--c-accent-text); border-radius: var(--radius-xs); }
.person-ext:hover { text-decoration: underline; text-underline-offset: 3px; }
.person-bio-wrap { display: grid; gap: 8px; max-width: 820px; }
.person-bio-text { color: var(--c-text-2); line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.person-bio.is-clamped .person-bio-text {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.person-bio-note { font-size: var(--fs-xs); color: var(--c-text-3); }
.person-bio-empty { color: var(--c-text-3); }
.person-bio-toggle { justify-self: start; }
.person-body { display: grid; gap: 40px; }
.person-films .title-section-head,
.collection-body .title-section-head { flex-wrap: wrap; }
.person-body .row { margin-inline: calc(var(--gutter) * -1); }

/* ფილმოგრაფია */
.credit-list { display: grid; gap: 2px; }
.credit {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.credit + .credit { border-top: 1px solid var(--c-line); }
.credit-year { font-size: var(--fs-sm); font-weight: 600; color: var(--c-text-3); font-variant-numeric: tabular-nums; }
.credit-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  margin-inline: -10px;
  border-radius: var(--radius-md);
  transition: background-color var(--dur-fast) var(--ease);
}
.credit-link:hover { background: var(--c-surface); }
.credit-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--c-surface-2);
  color: var(--c-text-3);
}
.credit-thumb img { width: 100%; height: 100%; object-fit: cover; }
.credit-text { display: grid; gap: 2px; min-width: 0; }
.credit-title { font-weight: 600; overflow-wrap: anywhere; }
.credit-role { font-size: var(--fs-sm); color: var(--c-text-2); overflow-wrap: anywhere; }
.credit-type {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-line-strong);
  font-size: var(--fs-2xs);
  color: var(--c-text-2);
  white-space: nowrap;
}

/* ══ კოლექციები ═══════════════════════════════════════════ */
.collections-body { display: grid; gap: 22px; min-height: 200px; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.collection-link { display: grid; gap: 12px; border-radius: var(--radius-lg); }
.collection-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(150deg, var(--c-surface-3), var(--c-surface));
  color: var(--c-text-3);
  box-shadow: 0 0 0 1px var(--c-line) inset;
}
.collection-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.collection-art .collection-art-poster { object-fit: contain; background: var(--c-surface); }
.collection-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 11, 17, 0.55), rgba(8, 11, 17, 0) 55%);
}
.collection-link:hover .collection-art img { transform: scale(1.04); }
.collection-caption { display: grid; gap: 4px; justify-items: start; }
.collection-kind {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 201, 77, 0.12);
  border: 1px solid rgba(255, 201, 77, 0.3);
  color: #ffd98a;
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.collection-name { font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.collection-meta { font-size: var(--fs-sm); color: var(--c-text-2); }

/* კოლექციის გვერდი */
.main--collection { padding-top: 0; }
.collection-page { display: grid; gap: 34px; }
.collection-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(380px, 36vw, 560px);
  margin-inline: calc(var(--gutter) * -1);
  padding: 120px var(--gutter) 28px;
  isolation: isolate;
}
.collection-stage { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--c-surface); }
.collection-stage img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 25%; }
.collection-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 11, 17, 0.92) 0%, rgba(8, 11, 17, 0.6) 40%, rgba(8, 11, 17, 0.1) 75%),
    linear-gradient(0deg, var(--c-bg) 0%, rgba(8, 11, 17, 0.4) 30%, rgba(8, 11, 17, 0) 60%);
}
.collection-hero-body { display: flex; align-items: flex-end; gap: clamp(18px, 2.4vw, 32px); max-width: 980px; }
.collection-poster {
  flex: none;
  width: clamp(120px, 12vw, 180px);
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.collection-hero-text { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.collection-title { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 700; line-height: 1.06; letter-spacing: -0.02em; overflow-wrap: anywhere; text-shadow: 0 4px 26px rgba(0, 0, 0, 0.5); }
.collection-hero-meta { color: rgba(238, 242, 248, 0.86); }
.collection-overview { max-width: 680px; color: var(--c-text-2); line-height: 1.6; }

.saga-list { display: grid; gap: 14px; counter-reset: saga; }
.saga-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px 104px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
}
.saga-index {
  align-self: center;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(173, 196, 255, 0.5);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.saga-poster {
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--c-surface-2);
  color: var(--c-text-3);
}
.saga-poster img { width: 100%; height: 100%; object-fit: cover; }
.saga-text { display: grid; gap: 6px; align-content: start; min-width: 0; }
.saga-title { font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.saga-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.saga-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--c-text-2); }
.badge--inline { position: static; }
.saga-overview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.saga-watch { justify-self: start; margin-top: 4px; }

/* ══ „შენთვის“ ═════════════════════════════════════════════ */
.for-you-head { gap: 12px; }
.for-you-head .segmented { justify-self: start; max-width: 100%; }
.for-you-body { display: grid; gap: 30px; min-height: 240px; }
.for-you-body .row { margin-inline: calc(var(--gutter) * -1); }
.for-you-grid { display: grid; gap: 16px; }

/* ══ შეტყობინებები ════════════════════════════════════════ */
.notices-head { align-items: end; max-width: 900px; }
.notices-body { display: grid; gap: 18px; min-height: 200px; max-width: 900px; }
.notice-list { display: grid; gap: 8px; }
.notice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.notice.is-unread {
  background:
    linear-gradient(90deg, rgba(61, 126, 255, 0.1), rgba(61, 126, 255, 0) 60%),
    var(--c-surface);
  border-color: rgba(61, 126, 255, 0.25);
}
.notice:hover { border-color: var(--c-line-strong); }
.notice-link {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px 6px 12px 14px;
  border-radius: inherit;
}
.notice-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 69px;
  border-radius: 8px;
  background: var(--c-surface-2);
  color: var(--c-text-3);
}
.notice-visual img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.notice-visual--actor { width: 46px; height: 46px; border-radius: 50%; }
.notice-avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, #3d7eff, #7b5cff);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 700;
}
.notice-kind {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-surface-3);
  border: 2px solid var(--c-surface);
  color: var(--c-text);
}
.notice-kind--review_like { background: #e5485f; color: #fff; }
.notice-kind--follow { background: #3ecf8e; color: #062216; }
.notice-kind--review_comment,
.notice-kind--comment_reply,
.notice-kind--followed_review { background: var(--c-accent); color: #fff; }
.notice-kind--new_episode,
.notice-kind--new_season,
.notice-kind--available { background: #ffc94d; color: #2a1d00; }
.notice-kind--release { background: #ff9f43; color: #2a1400; }
.notice-text { display: grid; gap: 2px; min-width: 0; }
.notice-lead { font-weight: 600; overflow-wrap: anywhere; }
.notice-body { font-size: var(--fs-sm); color: var(--c-text-2); overflow-wrap: anywhere; line-height: 1.45; }
.notice-time { font-size: var(--fs-xs); color: var(--c-text-3); }
.notice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 4px rgba(61, 126, 255, 0.18); }
.notice-delete { margin-right: 8px; opacity: 0.55; }
.notice:hover .notice-delete,
.notice-delete:focus-visible { opacity: 1; }

.pref-group { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.pref-legend { margin-bottom: 8px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-text-3); }
.pref-row.is-disabled { cursor: default; opacity: 0.6; }
.pref-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--c-surface-3);
  color: var(--c-text-2);
  font-size: var(--fs-2xs);
  font-weight: 600;
  vertical-align: 1px;
}

/* ══ საჯარო პროფილი ═══════════════════════════════════════ */
.pp-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
  padding: clamp(20px, 2.6vw, 32px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(61, 126, 255, 0.18), transparent 60%),
    radial-gradient(70% 120% at 100% 100%, rgba(123, 92, 255, 0.12), transparent 60%),
    var(--c-surface);
  border: 1px solid var(--c-line);
  overflow: hidden;
}
.pp-avatar {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(145deg, #3d7eff, #7b5cff);
  color: #fff;
  font-weight: 700;
}
.pp-avatar--lg { width: 96px; height: 96px; font-size: 2rem; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06), 0 16px 40px rgba(0, 0, 0, 0.4); }
.pp-avatar--sm { width: 36px; height: 36px; font-size: var(--fs-xs); }
.state .pp-avatar--lg { margin-bottom: 8px; }
.pp-intro { display: grid; gap: 8px; min-width: 0; }
.pp-name { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.pp-handle { font-size: var(--fs-sm); color: var(--c-text-2); }
.pp-bio { max-width: 640px; color: var(--c-text-2); line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.pp-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pp-stat {
  display: grid;
  justify-items: start;
  min-width: 88px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: rgba(8, 11, 17, 0.45);
  border: 1px solid var(--c-line);
  text-align: left;
}
.pp-stat--button { cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.pp-stat--button:hover { border-color: var(--c-line-strong); background: rgba(8, 11, 17, 0.7); }
.pp-stat-value { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-stat-label { font-size: var(--fs-xs); color: var(--c-text-3); }
.pp-actions { display: flex; gap: 8px; }
.pp-follow { display: contents; }
.pp-actions .share-btn { flex: none; }
.collection-hero-text .share-btn { margin-top: 4px; }
.person-meta .share-btn { min-height: 34px; }
.follow-btn[aria-pressed="true"]:hover { border-color: rgba(255, 59, 79, 0.5); color: #ffd4d9; }
.pp-tabs .segmented { display: inline-flex; max-width: 100%; }
.pp-panel { display: grid; gap: 18px; min-height: 200px; }

.pp-review-list { display: grid; gap: 14px; max-width: 900px; }
.pp-review {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
}
.pp-review.is-hidden { border-style: dashed; opacity: 0.8; }
.pp-review-poster {
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--c-surface-2);
  color: var(--c-text-3);
}
.pp-review-poster img { width: 100%; height: 100%; object-fit: cover; }
.pp-review-main { display: grid; gap: 6px; align-content: start; min-width: 0; }
.pp-review-title { font-size: var(--fs-md); font-weight: 600; overflow-wrap: anywhere; }
.pp-review-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pp-review-year { font-weight: 400; color: var(--c-text-3); }
.pp-review-flag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: #ffcf8f; }
.pp-review-stats { display: flex; gap: 16px; font-size: var(--fs-xs); color: var(--c-text-3); }
.pp-review-stats span { display: inline-flex; align-items: center; gap: 5px; }

.rated-card { position: relative; }
.rated-score {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(8, 11, 17, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: var(--fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rated-score .icon { color: #ffc94d; }

.follow-list { display: grid; gap: 4px; max-height: min(60vh, 460px); overflow-y: auto; }
.follow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
}
.follow-row:hover { background: var(--c-surface-2); }
.follow-row-text { display: grid; min-width: 0; }
.follow-row-name { font-weight: 600; overflow-wrap: anywhere; }
.follow-row-handle { font-size: var(--fs-xs); color: var(--c-text-3); }

/* ── მობილური / ტაბლეტი ────────────────────────────────── */
@media (max-width: 899px) {
  .person-page { gap: 30px; }
  .person-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 20px; }
  .person-photo { width: min(200px, 56vw); }
  .person-intro { justify-items: center; }
  .person-dept { justify-self: center; }
  .person-facts { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; }
  .person-meta { justify-content: center; }
  .person-bio-wrap { text-align: left; }
  .person-body .row, .for-you-body .row { margin-inline: -16px; }
  .credit { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; }
  .credit-link { grid-template-columns: 40px minmax(0, 1fr); }
  .credit-thumb { width: 40px; }
  .credit-type { display: none; }

  .collection-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .collection-hero { margin-inline: -16px; padding: 96px 16px 20px; min-height: 340px; }
  .collection-poster { width: 96px; }
  .saga-item { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; padding: 12px; }
  .saga-index { position: absolute; top: 10px; right: 12px; font-size: 1.4rem; }
  .saga-text { padding-right: 28px; }

  .notices-head .library-actions { display: grid; grid-template-columns: minmax(0, 1fr) 50px; }
  .notices-head .library-actions .segmented { grid-column: 1 / -1; }
  .notices-head .library-actions .btn { width: auto; min-width: 0; }
  .notices-head .library-actions .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .notice-link { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; padding: 10px 4px 10px 12px; }
  .notice-delete { opacity: 1; }

  .pp-hero { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
  .pp-avatar--lg { width: 72px; height: 72px; font-size: 1.5rem; }
  .pp-actions { grid-column: 1 / -1; }
  .pp-actions .btn { flex: 1; }
  .pp-actions .share-btn { flex: none; }
  .pp-stat { min-width: 0; flex: 1 1 calc(33% - 8px); }
  .pp-review { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .collection-art img { transition: none; }
  .collection-link:hover .collection-art img { transform: none; }
}
