/* Title Details hero, artwork, metadata, and overview. */

.title-detail-hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(405px, 112vw, 470px);
    padding: 10px 10px 18px;
    background:
        linear-gradient(180deg, rgba(7, 6, 6, 0.34) 0%, rgba(7, 6, 6, 0.06) 24%, rgba(7, 6, 6, 0.12) 58%, rgba(7, 6, 6, 0.76) 100%),
        linear-gradient(90deg, rgba(7, 6, 6, 0.6) 0%, rgba(7, 6, 6, 0.08) 22%, rgba(7, 6, 6, 0.08) 70%, rgba(7, 6, 6, 0.58) 100%),
        linear-gradient(180deg, #34111d 0%, #070606 100%);
    background-position: center top, center top, center top;
    background-size: cover, cover, cover;
    box-shadow: inset 0 -26px 52px rgba(0, 0, 0, 0.48);
    isolation: isolate;
}

.title-detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

.title-detail-hero::before {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 54% 26%, rgba(255, 255, 255, 0.08), transparent 34%),
        radial-gradient(circle at 78% 28%, rgba(242, 90, 0, 0.12), transparent 34%),
        linear-gradient(90deg, rgba(7, 6, 6, 0.3) 0%, rgba(7, 6, 6, 0) 32%, rgba(7, 6, 6, 0.24) 100%);
    content: "";
    pointer-events: none;
    z-index: 1;
}

.title-detail-hero::after {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 7, 8, 0.18) 0%, transparent 28%, transparent 58%, rgba(8, 7, 8, 0.66) 100%);
    content: "";
    pointer-events: none;
    z-index: 1;
}

.title-detail-hero-top-actions {
    position: absolute;
    top: 10px;
    inset-inline: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.title-detail-hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: clamp(112px, 34vw, 148px) minmax(0, 1fr);
    gap: clamp(9px, 2.8vw, 14px);
    align-items: start;
    direction: ltr;
    margin: clamp(132px, 39vw, 164px) 0 0;
}

.title-detail-hero-stack {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.8vw, 9px);
    align-items: center;
}

.title-detail-hero-visual {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: #111010;
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.34),
        0 10px 18px rgba(0, 0, 0, 0.3);
}

.title-detail-hero-visual::before {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 28%, rgba(0, 0, 0, 0.14) 100%),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.05) 0 1px,
            transparent 1px 32px
        );
    content: "";
    opacity: 0.34;
    pointer-events: none;
}

.title-detail-poster {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}

.title-detail-poster-placeholder {
    min-height: 100%;
    display: grid;
    place-items: center;
    color: #d8cec5;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    background:
        radial-gradient(circle at 50% 28%, rgba(242, 90, 0, 0.18), transparent 38%),
        linear-gradient(180deg, rgba(29, 24, 22, 0.95), rgba(7, 6, 6, 0.98));
}

.title-detail-poster-rating {
    position: absolute;
    left: 2px;
    bottom: 2px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.1), transparent 32%),
        linear-gradient(180deg, #df6a15 0%, #7d2d06 100%);
    color: #fff8ef;
    border: 1px solid rgba(255, 192, 110, 0.22);
    box-shadow:
        0 7px 14px rgba(0, 0, 0, 0.34),
        inset 0 0 0 1px rgba(255, 221, 160, 0.08);
    border-radius: 50%;
    text-align: center;
}

.title-detail-poster-rating strong {
    display: block;
    color: #fff8ef;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.title-detail-poster-rating-count {
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(16, 14, 16, 0.72);
    color: rgba(255, 248, 239, 0.88);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    backdrop-filter: blur(4px);
}

.title-detail-icon-button {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    background: rgba(24, 18, 20, 0.74);
    color: #f7f1eb;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
    text-decoration: none;
}

.title-detail-icon-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.title-detail-share-message {
    margin: 10px 16px 0;
    color: #d7f7df;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.6;
    text-align: center;
}

.title-detail-share-message.is-error {
    color: #ff9d64;
}

.title-detail-hero-action-spacer {
    visibility: hidden;
    pointer-events: none;
}

.title-detail-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    padding: clamp(10px, 4.8vw, 24px) 2px 0 0;
    text-align: right;
    direction: rtl;
}

.title-detail-hero h1 {
    margin: 0 0 2px;
    color: #ffffff;
    font-size: clamp(24px, 7vw, 31px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.title-detail-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(13px, 3.6vw, 15px);
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.title-detail-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: right;
    gap: 5px 8px;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.title-detail-meta span {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.title-detail-meta span + span::before {
    display: inline-block;
    width: 1px;
    height: 10px;
    margin-inline-end: 8px;
    background: rgba(255, 255, 255, 0.35);
    content: "";
}

.title-detail-genres {
    display: flex;
    flex-wrap: wrap;
    justify-content: right;
    gap: 6px;
    margin-top: 9px;
}

.title-detail-genres span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .title-detail-genres {
        max-width: 100%;
        gap: 4px;
        margin-top: 6px;
    }

    .title-detail-genres span {
        min-height: 18px;
        padding: 3px 7px;
        font-size: 9px;
        line-height: 1.05;
    }
}

.title-detail-overview-block {
    margin-top: clamp(10px, 3.6vw, 14px);
}

.title-detail-overview-block h2 {
    margin: 0 0 7px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
}


@media (min-width: 768px) {
    .title-detail-hero {
        min-height: 460px;
        padding: 14px 14px 22px;
    }

    .title-detail-hero::after {
        background:
            linear-gradient(180deg, rgba(8, 7, 8, 0.1) 0%, transparent 28%, transparent 66%, rgba(8, 7, 8, 0.9) 100%);
    }

    .title-detail-hero-content {
        margin-top: 108px;
        grid-template-columns: minmax(140px, 0.44fr) minmax(0, 1.56fr);
        gap: 16px;
    }

    .title-detail-hero-stack {
        gap: 8px;
    }

    .title-detail-hero-visual {
        border-radius: 14px;
    }

    .title-detail-poster-rating {
        left: 8px;
        bottom: 8px;
        width: 40px;
        height: 40px;
    }

    .title-detail-poster-rating strong {
        font-size: 12px;
    }

    .title-detail-poster-rating-count {
        font-size: 10px;
    }

    .title-detail-hero-copy {
        padding-top: 16px;
    }

    .title-detail-hero h1 {
        font-size: 31px;
    }

    .title-detail-subtitle {
        font-size: 15px;
    }

    .title-detail-meta {
        margin-top: 10px;
        font-size: 11px;
    }

    .title-detail-overview-block {
        margin-top: 16px;
    }

    .title-detail-overview {
        max-height: 170px;
        font-size: 12px;
        line-height: 1.72;
    }
}

@media (max-width: 340px) {
    .title-detail-hero {
        min-height: 0;
    }

    .title-detail-hero-content {
        gap: 10px;
    }

    .title-detail-hero-copy {
        min-height: 150px;
    }

    .title-detail-hero h1 {
        font-size: 25px;
    }

    .title-detail-subtitle {
        font-size: 13px;
    }

    .title-detail-meta {
        font-size: 10px;
    }
}
