/* The detail page keeps the player and list contracts while using real media art. */
.anime-detail-page {
    --detail-sidebar: 300px;
    --detail-gap: 48px;
    --detail-line: rgba(255, 255, 255, .12);
    --detail-muted: #a6a6af;
    --detail-surface: #0b0b0d;
    padding-bottom: 72px;
    background: #000;
    color: #f5f5f7;
}

.anime-detail-page .container { width: 100%; max-width: 1664px; padding-inline: 32px; }
.anime-detail-page .anime-hero { position: relative; margin: 0; padding-top: 176px; }
.anime-detail-page .anime-banner { top: -56px; height: 720px; }
.anime-detail-page .anime-banner img { object-fit: cover; object-position: center 24%; filter: none; opacity: .67; }
.anime-detail-page .anime-banner::after {
    background: linear-gradient(90deg, rgba(0, 0, 0, .26), rgba(0, 0, 0, .1) 70%, rgba(0, 0, 0, .25)),
        linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .93) 20%, rgba(0, 0, 0, .25) 68%, rgba(0, 0, 0, .22));
}
.anime-detail-page .anime-info-container { position: relative; padding-top: 0; margin-top: 0; }
.anime-detail-page .anime-info-grid { position: relative; display: block; padding-left: calc(var(--detail-sidebar) + var(--detail-gap)); text-align: left; }
.anime-detail-page .anime-poster { position: absolute; top: 0; left: 0; width: var(--detail-sidebar); margin: 0; }
.anime-detail-page .anime-poster > img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; box-shadow: 0 14px 48px rgba(0, 0, 0, .4); }
.anime-detail-page .quick-meta-list { gap: 0; margin-top: 24px; padding: 12px 16px; background: #080808; border-color: var(--detail-line); border-radius: 10px; }
.anime-detail-page .quick-meta-item { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; }
.anime-detail-page .quick-meta-item + .quick-meta-item { border-top: 1px solid rgba(255, 255, 255, .06); }
.anime-detail-page .quick-meta-item .label { font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--detail-muted); }
.anime-detail-page .quick-meta-item .value { font-size: 12px; font-weight: 500; text-align: right; }
.anime-detail-page .anime-details { padding: 0; min-width: 0; }
.anime-detail-page .anime-detail-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.anime-detail-page .anime-detail-score { display: inline-flex; align-items: center; gap: 5px; height: 27px; padding: 0 9px; border: 1px solid var(--detail-line); border-radius: 5px; background: rgba(12, 12, 14, .72); color: #fff; font-size: 12px; font-weight: 700; }
.anime-detail-page .anime-detail-score svg { color: #f4d07a; }
.anime-detail-page .anime-genres { display: contents; margin: 0; }
.anime-detail-page .genre-tag { padding: 4px 9px; font-size: 11px; line-height: 1.4; border-radius: 5px; background: rgba(12, 12, 14, .7); border-color: rgba(255, 255, 255, .08); color: #c1c6d3; }
.anime-detail-page .genre-tag:hover { background: #1d1d21; border-color: rgba(255, 255, 255, .3); color: #fff; }
.anime-detail-page .studio-tag { background: rgba(12, 12, 14, .7) !important; border-color: rgba(255, 255, 255, .12) !important; color: #dedee4 !important; font-weight: 600; }
.anime-detail-page .studio-tag:hover { background: #1d1d21 !important; border-color: rgba(255, 255, 255, .3) !important; box-shadow: none; transform: none; }
.anime-detail-page .anime-title-row { display: flex; align-items: center; gap: 18px; min-width: 0; }
.anime-detail-page .anime-title { flex: 0 1 620px; min-width: 0; margin: 0; font-size: clamp(36px, 4.3vw, 66px); letter-spacing: -.045em; line-height: 1.12; text-align: left; }
.anime-detail-page .anime-title [data-title-artwork] { max-width: 100%; }
.anime-detail-page .anime-title [data-title-artwork] img { width: auto; max-width: 100%; max-height: 96px; object-fit: contain; object-position: left center; }
.anime-detail-page .anime-copy-title { display: inline-flex; flex: 0 0 40px; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--detail-line); border-radius: 9px; background: rgba(5, 5, 6, .5); color: #a1a1aa; cursor: pointer; }
.anime-detail-page .anime-copy-title:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
.anime-detail-page .anime-display-title { margin: 18px 0 4px; color: #b5b5c0; font-size: 15px; }
.anime-detail-page #anime-copy-status { color: #acd4bc; font-size: 12px; margin-left: 8px; }
.anime-detail-page .anime-alt-title { margin: 0; color: #9999a2; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.anime-detail-page .anime-stats { gap: 30px; margin: 24px 0 20px; padding: 17px 0; border-top: 1px solid var(--detail-line); border-bottom: 1px solid var(--detail-line); }
.anime-detail-page .stat-item { gap: 5px; text-align: left; }
.anime-detail-page .stat-item:hover { transform: none; }
.anime-detail-page .stat-value { font-size: 15px; font-weight: 650; line-height: 1.4; }
.anime-detail-page .stat-label { color: #9999a2; font-size: 10px; font-weight: 600; letter-spacing: .055em; }
.anime-detail-page .stat-label svg { color: #9999a2; stroke: currentColor; }
.anime-detail-page .ep-status-pills { gap: 8px; margin-bottom: 16px; }
.anime-detail-page .ep-pill { padding: 4px 10px; font-size: 12px; font-weight: 600; }
.anime-detail-page .anime-actions { flex-direction: row; gap: 10px; margin: 0; align-items: center; justify-content: flex-start; }
.anime-detail-page .anime-actions .btn { min-height: 48px; padding: 10px 18px; font-size: 14px; border-radius: 10px; font-weight: 650; box-shadow: none; }
.anime-detail-page .anime-actions .btn-primary { color: #090909; background: #fff; border-color: #fff; }
.anime-detail-page .anime-actions .btn-primary:hover { background: #dedee4; border-color: #dedee4; }
.anime-detail-page .anime-actions .btn-secondary { background: rgba(7, 7, 8, .62); color: #e6e6ec; border-color: rgba(255, 255, 255, .21); }
.anime-detail-page .anime-actions .btn-secondary:hover { border-color: rgba(255, 255, 255, .45); background: #19191c; }
.anime-detail-page .anime-actions .anime-manga-cta { font-size: 13px; color: #c1c1cb; }
.anime-detail-page .next-episode-banner { margin-top: 24px; }
.anime-detail-page .anime-detail-content { position: relative; margin-top: 24px; padding-left: calc(32px + var(--detail-sidebar) + var(--detail-gap)); min-height: 500px; }
.anime-detail-page .info-tabs { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; overflow-x: auto; margin: 0 0 30px; padding: 4px; border: 0; border-radius: 10px; background: rgba(0, 0, 0, .87); scrollbar-width: thin; }
.anime-detail-page .info-tab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: 0 0 auto; min-height: 44px; margin: 0; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 9px; background: #0b0b0d; color: #a4a4af; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.anime-detail-page .info-tab-btn svg { margin: 0 !important; }
.anime-detail-page .info-tab-btn:hover { color: #fff; background: #17171a; }
.anime-detail-page .info-tab-btn.active { border-color: #fff; background: #fff; color: #090909; box-shadow: none; }
.anime-detail-page .info-tab-btn::after { display: none; }
.anime-detail-page .info-tab-content[hidden] { display: none; }
.anime-detail-page .anime-synopsis { margin: 0 0 34px; padding-bottom: 28px; border-bottom: 1px solid var(--detail-line); }
.anime-detail-page .anime-synopsis h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.025em; }
.anime-detail-page .anime-synopsis p { color: #b4b4bf; font-size: 14px; line-height: 1.85; white-space: pre-line; }
.anime-detail-page .anime-synopsis-text.is-collapsed { display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.anime-detail-page .anime-synopsis-text.is-expanded { display: block; }
.anime-detail-page .anime-synopsis-toggle { padding: 7px 0; border: 0; background: transparent; color: #e7e7ed; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.anime-detail-page .anime-synopsis-toggle[hidden] { display: none; }
.anime-detail-page .external-pill { width: 32px; height: 32px; border-radius: 50%; box-shadow: none; }
.anime-detail-page .external-pill img { width: 18px; height: 18px; }
.anime-detail-page .anime-related-manga { margin: 0 0 36px; scroll-margin-top: 88px; }
.anime-detail-page .anime-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.anime-detail-page .anime-section-title { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.025em; }
.anime-detail-page .anime-section-caption { margin: 5px 0 0; color: #9999a4; font-size: 12px; line-height: 1.6; }
.anime-detail-page .anime-text-link { display: inline-flex; align-items: center; gap: 9px; border: 0; padding: 8px 0; background: transparent; color: #d9d9e1; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.anime-detail-page .anime-text-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.anime-detail-page .anime-manga-relations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.anime-detail-page .anime-manga-relation { display: flex; align-items: center; min-width: 0; gap: 16px; padding: 12px; border: 1px solid var(--detail-line); border-radius: 10px; background: #080808; transition: border-color .18s, background .18s; }
.anime-detail-page .anime-manga-relation:hover { background: #111113; border-color: rgba(255, 255, 255, .32); }
.anime-detail-page .anime-manga-relation > img, .anime-detail-page .anime-manga-placeholder { flex: 0 0 72px; width: 72px; height: 104px; border-radius: 5px; object-fit: cover; background: #151518; }
.anime-detail-page .anime-manga-placeholder { display: grid; place-items: center; color: #8b8b95; }
.anime-detail-page .anime-manga-copy { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
.anime-detail-page .anime-manga-relation-label { color: #aaaab5; font-size: 10px; font-weight: 600; letter-spacing: .025em; }
.anime-detail-page .anime-manga-copy strong { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; color: #f0f0f5; font-size: 15px; font-weight: 650; line-height: 1.45; }
.anime-detail-page .anime-manga-copy small { color: #9696a2; font-size: 11px; overflow-wrap: anywhere; }
.anime-detail-page .anime-manga-open { margin-top: 5px; color: #d8eee1; font-size: 12px; font-weight: 600; }
.anime-detail-page .anime-manga-open > span { display: inline-block; margin-left: 6px; }
.anime-detail-page .anime-manga-empty { padding: 16px 20px; border: 1px dashed var(--detail-line); border-radius: 10px; color: #a6a6b1; font-size: 13px; }
.anime-detail-page .anime-manga-empty p { margin: 0; }
.anime-detail-page .anime-episodes-section .anime-view-toggle.active, .anime-detail-page .anime-episodes-section .anime-view-toggle[aria-pressed="true"] { background: #fff; border-color: #fff; color: #090909; }
.anime-detail-page .anime-episodes-section .anime-episode-item { background: #0a0a0c; border-color: var(--detail-line); }
.anime-detail-page .anime-episodes-section .anime-episode-item:hover { background: #1a1a1e; border-color: rgba(255, 255, 255, .38); }
.anime-detail-page .anime-episodes-section .is-watched { border-color: rgba(122, 184, 153, .45); }
.anime-detail-page .anime-episodes-section .anime-episode-search, .anime-detail-page .anime-episodes-section .anime-view-toggle:not(.active):not([aria-pressed="true"]), .anime-detail-page .anime-episodes-section .anime-episode-page-button { background: #0b0b0d; border-color: var(--detail-line); }
.anime-detail-page .anime-season-shortcut { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 36px; padding: 18px 0; border-bottom: 1px solid var(--detail-line); }
.anime-detail-page .anime-season-shortcut h2 { margin: 0; font-size: 20px; }
.anime-detail-page .anime-season-shortcut p { margin: 5px 0 0; font-size: 12px; color: #9999a4; }
.anime-detail-page .section-title { font-size: 20px; }
.anime-detail-page .section-title::before { display: none; }
.anime-detail-page .season-card.current { border-color: #dedee6; box-shadow: none; transform: none; }
.anime-detail-page .season-card.current .season-badge { background: #fff !important; color: #090909; }
.anime-detail-page .anime-artwork-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.anime-detail-page .anime-artwork-card { display: block; min-width: 0; overflow: hidden; border: 1px solid var(--detail-line); border-radius: 10px; background: #080808; }
.anime-detail-page .anime-artwork-card:hover { border-color: rgba(255, 255, 255, .38); }
.anime-detail-page .anime-artwork-image { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; overflow: hidden; background: #111113; }
.anime-detail-page .anime-artwork-image img { width: 100%; height: 100%; object-fit: cover; }
.anime-detail-page .anime-artwork-card--logo .anime-artwork-image { background: repeating-conic-gradient(#0f0f11 0% 25%, #151517 0% 50%) 50% / 24px 24px; }
.anime-detail-page .anime-artwork-card--logo img { width: 86%; height: 65%; object-fit: contain; }
.anime-detail-page .anime-artwork-card--poster img { object-fit: contain; }
.anime-detail-page .anime-artwork-card > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; color: #c8c8d2; font-size: 12px; }
.anime-detail-page .anime-artwork-empty { padding: 48px 20px; border: 1px dashed var(--detail-line); border-radius: 10px; color: #a6a6b1; text-align: center; }
.anime-detail-page :is(a, button, input):focus-visible, .anime-detail-page .anime-episodes-section .anime-episode-search:focus-within { outline: 2px solid #d5dfeb; outline-offset: 3px; }
.anime-detail-page .info-tabs { scroll-margin-top: 88px; }

@media (max-width: 1199px) {
    .anime-detail-page { --detail-sidebar: 230px; --detail-gap: 32px; }
    .anime-detail-page .anime-hero { padding-top: 148px; }
    .anime-detail-page .container { padding-inline: 24px; }
    .anime-detail-page .anime-detail-content { padding-left: calc(24px + var(--detail-sidebar) + var(--detail-gap)); }
    .anime-detail-page .anime-title [data-title-artwork] img { max-height: 80px; }
    .anime-detail-page .anime-stats { gap: 22px; }
    .anime-detail-page .anime-manga-relations { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
    .anime-detail-page { padding-bottom: 40px; }
    .anime-detail-page .container { padding-inline: 20px; }
    .anime-detail-page .anime-hero { padding-top: 88px; }
    .anime-detail-page .anime-banner { height: 520px; }
    .anime-detail-page .anime-banner img { object-position: 65% 10%; opacity: .65; }
    .anime-detail-page .anime-info-grid { padding-left: 0; }
    .anime-detail-page .anime-poster { position: relative; display: flex; align-items: flex-end; gap: 20px; width: 100%; min-width: 0; max-width: none; top: auto; left: auto; margin: 0 0 28px; }
    .anime-detail-page .anime-poster > img { flex: 0 0 116px; width: 116px; height: 174px; border-radius: 9px; }
    .anime-detail-page .quick-meta-list { flex: 1; min-width: 0; align-items: stretch; margin: 0; padding: 6px 0; background: transparent; border: 0; }
    .anime-detail-page .quick-meta-item { width: 100%; min-width: 0; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 0; }
    .anime-detail-page .quick-meta-item .label { font-size: 10px; }
    .anime-detail-page .quick-meta-item .value { width: 100%; font-size: 12px; text-align: left; white-space: nowrap; }
    .anime-detail-page .anime-detail-eyebrow { gap: 7px; margin-bottom: 18px; }
    .anime-detail-page .genre-tag { font-size: 10px; padding: 4px 7px; }
    .anime-detail-page .anime-title-row { gap: 12px; }
    .anime-detail-page .anime-title { flex: 1; font-size: clamp(29px, 7.5vw, 42px); }
    .anime-detail-page .anime-title [data-title-artwork] img { max-height: 74px; }
    .anime-detail-page .anime-copy-title { width: 36px; height: 36px; flex-basis: 36px; }
    .anime-detail-page .anime-display-title { margin-top: 12px; font-size: 13px; }
    .anime-detail-page .anime-alt-title { font-size: 11px; }
    .anime-detail-page .anime-stats { gap: 20px; margin: 20px 0 16px; padding: 14px 0; }
    .anime-detail-page .stat-value { font-size: 13px; }
    .anime-detail-page .stat-label { font-size: 9px; }
    .anime-detail-page .anime-actions { flex-direction: row; gap: 8px; }
    .anime-detail-page .anime-actions .btn { width: auto; max-width: 100%; height: 48px; min-height: 48px; max-height: none; aspect-ratio: auto; font-size: 12px; line-height: 1.35; padding: 9px 12px; }
    .anime-detail-page .anime-actions .btn-primary { flex: 1 1 110px; }
    .anime-detail-page .anime-actions #add-to-watchlist { flex: 1 1 165px; }
    .anime-detail-page .anime-actions .anime-manga-cta { min-height: 38px; font-size: 12px; }
    .anime-detail-page .anime-detail-content { padding-left: 20px; margin-top: 22px; }
    .anime-detail-page .info-tabs { gap: 6px; margin-bottom: 24px; padding: 3px 0 9px; border-radius: 0; }
    .anime-detail-page .info-tab-btn { padding: 9px 12px; font-size: 12px; }
    .anime-detail-page .anime-synopsis { margin-bottom: 28px; padding-bottom: 24px; }
    .anime-detail-page .anime-synopsis p { font-size: 13px; line-height: 1.8; }
    .anime-detail-page .anime-section-heading { gap: 10px; }
    .anime-detail-page .anime-section-title, .anime-detail-page .anime-synopsis h2, .anime-detail-page .section-title, .anime-detail-page .anime-season-shortcut h2 { font-size: 18px; }
    .anime-detail-page .anime-manga-relations { gap: 10px; }
    .anime-detail-page .anime-season-shortcut { flex-wrap: wrap; }
    .anime-detail-page .anime-artwork-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .anime-detail-page *, .anime-detail-page *::before, .anime-detail-page *::after { animation-duration: .01ms !important; transition: none !important; scroll-behavior: auto !important; }
}
