/* Video title page (hero, gallery, notify, facts). Player chrome is in video-player.css.
 * See docs/SITE_CSS.md.
 */

.video-title-hero {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
    margin-bottom: 24px;
}


.video-title-hero-wide {
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: start;
}


.video-title-back-actions {
    margin-bottom: 16px;
}


.video-title-cover {
    min-width: 0;
}


.video-title-cover-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}


.video-title-poster {
    aspect-ratio: 2 / 3;
    border-radius: 14px;
}


.video-title-cover-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(8, 14, 24, 0.84);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}


.video-title-copy {
    display: grid;
    align-content: start;
    gap: 16px;
    text-align: left;
}


.video-title-heading {
    margin: 0;
    width: 100%;
    justify-self: stretch;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}


.video-title-description {
    margin: 0;
    max-width: 100%;
    line-height: 1.75;
}


.video-title-alternative-names {
    margin: -6px 0 0;
    max-width: 900px;
    color: #b8c4d8;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.45;
}


.video-title-alternative-names::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 1px;
    margin-right: 9px;
    background: linear-gradient(90deg, rgba(141, 162, 198, 0.1), rgba(141, 162, 198, 0.82));
    vertical-align: middle;
}


.video-title-gallery-strip {
    margin-bottom: 24px;
    overflow: hidden;
}


.video-title-user-screenshots {
    margin-top: 24px;
    margin-bottom: 24px;
}


.video-title-user-screenshots-header p {
    margin: 8px 0 0;
    color: #93a3bc;
}


.video-title-user-screenshots-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}


.video-title-user-shot-card {
    position: relative;
    display: block;
    padding: 0;
    border: 1px solid #2a313d;
    border-radius: 16px;
    overflow: hidden;
    background: #11151d;
    cursor: pointer;
    text-align: left;
}


.video-title-user-shot-card img {
    display: block;
    width: 100%;
    aspect-ratio: 0.84;
    object-fit: cover;
}


.video-title-user-shot-overlay {
    position: absolute;
    inset: auto 10px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(4, 8, 16, 0.08), rgba(4, 8, 16, 0.82));
    color: #f5f7fb;
}


.video-title-user-shot-overlay strong,
.video-title-user-shot-overlay span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.video-title-user-shot-description {
    font-size: 11px;
    color: rgba(245, 247, 251, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.video-title-gallery-marquee {
    overflow: hidden;
    cursor: pointer;
}


.video-title-gallery-track {
    display: flex;
    gap: 14px;
    width: max-content;
    animation: video-gallery-scroll 42s linear infinite;
}


.video-title-gallery-marquee:hover .video-title-gallery-track {
    animation-play-state: paused;
}


.video-title-gallery-card {
    flex: 0 0 auto;
    width: 260px;
    padding: 0;
    border: 1px solid #2a313d;
    border-radius: 16px;
    overflow: hidden;
    background: #11151d;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}


.video-title-gallery-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}


.video-title-user-shot-card.is-live-preview {
    opacity: 0.85;
}


@keyframes video-gallery-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% - 7px));
    }
}


.video-title-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    width: 100%;
    align-items: start;
}


.video-title-fact {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(14, 22, 37, 0.92), rgba(11, 17, 28, 0.9));
    border: 1px solid #273246;
}


.video-title-fact strong {
    color: #fff;
    font-size: 0.94rem;
    line-height: 1.25;
}


.video-title-fact-label {
    color: #8da2c6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}


.video-title-fact-wide {
    grid-column: span 1;
}


.video-title-genre-row {
    display: grid;
    gap: 8px;
    min-width: 0;
}


.video-title-genre-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


.video-title-genre-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #273246;
    background: linear-gradient(180deg, rgba(14, 22, 37, 0.92), rgba(11, 17, 28, 0.9));
    color: #fff;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}


.video-title-genre-chip:hover {
    border-color: #3d5474;
    color: #d9f2ff;
}


.video-latest-episode-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border-color: rgba(126, 217, 87, 0.42);
    background:
        radial-gradient(circle at 8% 50%, rgba(126, 217, 87, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(19, 38, 37, 0.96), rgba(13, 25, 31, 0.96));
    color: #fff;
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}


.video-latest-episode-notice:hover {
    transform: translateY(-1px);
    border-color: rgba(126, 217, 87, 0.88);
    box-shadow: 0 16px 34px rgba(3, 12, 18, 0.32);
}


.video-latest-episode-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}


.video-latest-episode-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7ed957;
    box-shadow: 0 0 0 6px rgba(126, 217, 87, 0.13), 0 0 18px rgba(126, 217, 87, 0.58);
}


.video-latest-episode-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}


.video-latest-episode-copy > span {
    color: #9fb3c8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}


.video-latest-episode-copy strong {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: #f3fff0;
    font-size: .95rem;
    line-height: 1.35;
}


.video-latest-episode-copy strong span {
    color: #6f8b87;
}


.video-latest-episode-action {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(126, 217, 87, 0.16);
    color: #caffbd;
    font-size: 12px;
    font-weight: 700;
}


.video-title-meta {
    justify-content: flex-start;
}


.video-title-link {
    color: #fff;
    text-decoration: none;
}


.video-title-link:hover {
    color: #9fd0ff;
}


.video-strip-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
}


.video-strip-head h2 {
    margin: 0;
}


.video-strip-note {
    color: #8fa2c0;
    font-size: 13px;
}


.episode-card-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}


.episode-card-tile {
    min-width: 0;
}


.episode-card-link {
    display: block;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    border-radius: 16px;
    border: 1px solid #2a313d;
    background: #151a23;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}


.episode-card-link:hover {
    transform: translateY(-2px);
    border-color: #4d8dff;
    box-shadow: 0 12px 24px rgba(4, 9, 18, 0.3);
}


.episode-card-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0c1118;
}


.episode-card-poster img,
.episode-card-poster .video-poster-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.episode-card-overlay {
    position: absolute;
    inset: auto 10px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}


.episode-card-number,
.episode-card-quality,
.video-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}


.episode-card-number {
    background: rgba(11, 16, 24, 0.74);
    color: #fff;
    backdrop-filter: blur(10px);
}


.episode-card-quality {
    background: rgba(77, 141, 255, 0.18);
    color: #c8ddff;
    backdrop-filter: blur(10px);
}


.episode-card-body {
    display: grid;
    gap: 8px;
    padding: 12px 14px 14px;
}


.episode-card-body strong {
    line-height: 1.35;
}


.episode-card-status {
    color: #8fa2c0;
    font-size: 12px;
    line-height: 1.4;
}


.video-title-preview-notice {
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(245, 158, 11, 0.56);
    border-radius: 16px;
    background: rgba(120, 53, 15, 0.28);
    color: #fde68a;
}


.video-title-preview-notice span {
    color: #fcd9a0;
    font-size: 13px;
    line-height: 1.5;
}


@media (max-width: 900px) {

    .video-title-meta-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }


    .episode-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }


    .video-title-user-screenshots-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 680px) {

    .video-latest-episode-notice {
        align-items: flex-start;
        padding: 13px 14px;
    }


    .video-latest-episode-action {
        display: none;
    }


    .video-title-copy {
        gap: 14px;
    }


    .video-title-heading {
        font-size: clamp(1.7rem, 9vw, 2.2rem);
    }


    .video-title-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    .video-title-user-screenshots-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }


    .video-title-fact-wide {
        grid-column: span 1;
    }
}


.video-title-filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.5;
}


.video-title-filter-links a {
    color: #9fd0ff;
    text-decoration: none;
}


.video-title-filter-links a:hover {
    color: #d9f2ff;
}


.video-title-score-copy {
    color: #f6fbff;
}


.video-season-browser {
    margin-top: 18px;
}


.video-season-stack {
    display: grid;
    gap: 14px;
}


.video-season-group {
    border: 1px solid rgba(61, 74, 95, 0.75);
    border-radius: 8px;
    padding: 14px;
    background: rgba(10, 15, 23, 0.45);
}


.video-season-group.active {
    border-color: rgba(144, 208, 96, 0.65);
}


.video-season-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}


.video-season-head span {
    color: #9fb3c8;
    font-size: 13px;
}


.video-season-episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}


/* Title page: favorite + notify controls */
.video-title-fav-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  position: relative;
  flex-wrap: wrap;
}

.video-title-notify-btn.is-hidden,
.video-title-notify-panel.is-hidden,
.video-title-notify-block.is-hidden,
.video-title-notify-dubbings.is-hidden {
  display: none !important;
}

.video-title-notify-btn {
  white-space: nowrap;
}

.video-title-notify-btn.is-active {
  border-color: rgba(85, 231, 255, 0.55);
  color: #9ef3ff;
}

.video-title-notify-btn.is-partial {
  border-style: dashed;
  border-color: rgba(255, 170, 120, 0.5);
  color: #ffd0b0;
}

.video-title-notify-btn[aria-expanded="true"] {
  border-color: rgba(85, 231, 255, 0.65);
  box-shadow: 0 0 0 1px rgba(85, 231, 255, 0.12) inset;
}

.video-title-notify-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 40;
  width: min(28rem, calc(100vw - 1.25rem));
  max-height: min(78vh, 36rem);
  overflow: auto;
  padding: 0.95rem 1rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(120, 150, 180, 0.3);
  background: linear-gradient(180deg, rgba(16, 24, 36, 0.98), rgba(10, 15, 24, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.video-title-back-actions {
  position: relative;
}

.video-title-notify-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.video-title-notify-panel-head strong {
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.video-title-notify-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 0.1rem 0.35rem;
  border-radius: 8px;
}

.video-title-notify-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
}

.video-title-notify-block-title {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.62;
  margin-bottom: 0.4rem;
}

.video-title-notify-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Dubbing lists: multi-column wrap + scroll, not one endless row */
.video-title-notify-dubbings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.4rem;
  max-height: min(14rem, 36vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.15rem 0.1rem 0.25rem 0;
  margin-top: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 231, 255, 0.35) transparent;
}

.video-title-notify-dubbings .video-title-notify-chip {
  width: 100%;
  border-radius: 12px;
  justify-content: flex-start;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.5rem 0.65rem;
}

.video-title-notify-chip {
  appearance: none;
  border: 1px solid rgba(126, 160, 200, 0.22);
  background: rgba(14, 22, 34, 0.88);
  color: #d7e6f5;
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.video-title-notify-chip:hover {
  border-color: rgba(85, 231, 255, 0.45);
  color: #eefbff;
}

.video-title-notify-chip.is-active {
  border-color: rgba(85, 231, 255, 0.78);
  background: linear-gradient(180deg, rgba(28, 74, 88, 0.92), rgba(14, 34, 46, 0.95));
  color: #b8f6ff;
  box-shadow: 0 0 0 1px rgba(85, 231, 255, 0.12) inset;
}

.video-title-notify-chip.is-toggle.is-off {
  border-color: rgba(255, 140, 140, 0.35);
  color: #ffc9c9;
  background: rgba(48, 18, 22, 0.75);
}

.video-title-notify-chip.is-toggle.is-off.is-active {
  /* when off toggle is active visually as off-state */
}

.video-title-notify-chip[data-notify-source="kodik"].is-active {
  border-color: rgba(187, 134, 252, 0.78);
  background: linear-gradient(180deg, rgba(54, 30, 78, 0.92), rgba(22, 14, 36, 0.95));
  color: #e8d8ff;
  box-shadow: 0 0 0 1px rgba(187, 134, 252, 0.12) inset;
}

.video-title-notify-chip[data-notify-source="default"].is-active {
  border-color: rgba(126, 217, 87, 0.72);
  background: linear-gradient(180deg, rgba(28, 64, 42, 0.92), rgba(12, 28, 22, 0.95));
  color: #d9f8d4;
  box-shadow: 0 0 0 1px rgba(126, 217, 87, 0.12) inset;
}

.video-title-notify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  margin-top: 0.1rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(120, 150, 180, 0.14);
}

.video-title-notify-action {
  appearance: none;
  border: 1px solid rgba(126, 160, 200, 0.28);
  background: rgba(16, 24, 36, 0.9);
  color: #d7e6f5;
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.video-title-notify-action:hover {
  border-color: rgba(85, 231, 255, 0.45);
}

.video-title-notify-action.is-primary {
  border-color: rgba(85, 231, 255, 0.55);
  background: linear-gradient(180deg, rgba(28, 78, 92, 0.95), rgba(16, 42, 54, 0.96));
  color: #c9f7ff;
}

.video-title-notify-action:disabled {
  opacity: 0.55;
  cursor: default;
}

.video-title-notify-status {
  font-size: 0.82rem;
  opacity: 0.88;
}

.video-title-notify-status.is-error {
  color: #ff9b9b;
  opacity: 1;
}

.video-title-related {
    margin: 0 0 24px;
}

.video-title-related-header {
    margin: 0 0 12px;
}

.video-title-related-header h2 {
    margin: 0;
    color: var(--site-text, #fff);
    font-size: 1.15rem;
}

.video-title-related-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.video-title-related-card {
    overflow: hidden;
    min-width: 0;
    border-radius: var(--site-radius-md, 14px);
    background: var(--site-card, #171b22);
    border: 1px solid var(--site-border, #2a313d);
}

.video-title-related-card.is-current {
    border-color: var(--site-accent, #4caf50);
    box-shadow: 0 0 0 1px var(--site-accent-soft, rgba(76, 175, 80, 0.35));
}

.video-title-related-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.video-title-related-poster-shell {
    position: relative;
    overflow: hidden;
}

.video-title-related-poster {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: var(--site-surface-strong, #151922);
}

.video-title-related-count {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(8, 14, 24, 0.76);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.video-title-related-overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 28px 10px 10px;
    background: linear-gradient(180deg, rgba(4, 8, 14, 0) 0%, rgba(4, 8, 14, 0.9) 78%);
    text-align: center;
}

.video-title-related-name {
    margin: 0;
    color: #fff;
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 1100px) {
    .video-title-related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .video-title-related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .video-title-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
