/* YouTube Video Library front-end styles — designed for the TMTR dark theme. */

.dhyt-video-embed {
    position: relative;
    height: 0;
    margin: 0 0 18px;
    padding-top: 56.25%;
    overflow: hidden;
    background: #000;
    border: 1px solid #2b2b2b;
    border-radius: 12px;
}

.dhyt-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.dhyt-watch-row {
    margin: 0 0 24px;
}

.dhyt-watch-button,
.dhyt-library button,
.dhyt-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 18px;
    border: 0;
    border-radius: 7px;
    background: #ff315c !important;
    color: #fff !important;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.dhyt-watch-button:hover,
.dhyt-library button:hover,
.dhyt-card-link:hover {
    background: #df1743 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(255, 49, 92, .24);
}

.dhyt-exact-description {
    margin: 22px 0;
    color: #dedede;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.dhyt-exact-description a {
    color: #ff5a7c;
    word-break: break-word;
}

.dhyt-description-timestamp {
    color: #ff5a7c;
    font-weight: 800;
}

.dhyt-key-moments {
    margin: 32px 0;
}

.dhyt-key-moments ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dhyt-key-moments li a {
    display: block;
    padding: 11px 13px;
    border: 1px solid #323232;
    border-radius: 8px;
    background: #111;
    color: #efefef;
    text-decoration: none;
}

.dhyt-key-moments li a:hover {
    border-color: #ff315c;
    color: #fff;
}

.dhyt-key-moments .dhyt-time {
    margin-right: 8px;
    color: #ff5a7c;
    font-weight: 800;
}

.dhyt-transcript {
    margin: 30px 0;
    overflow: hidden;
    border: 1px solid #333;
    border-radius: 10px;
    background: #0d0d0d;
}

.dhyt-transcript summary {
    padding: 14px 16px;
    background: #171717;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.dhyt-transcript-scroll {
    max-height: 430px;
    padding: 16px;
    overflow: auto;
    color: #d3d3d3;
    line-height: 1.65;
}

.dhyt-library {
    width: 100%;
    color: #e6e6e6;
}

.dhyt-library h1,
.dhyt-library h2,
.dhyt-library h3,
.dhyt-library h4 {
    color: #fff !important;
}

.dhyt-library-search {
    display: flex;
    gap: 10px;
    margin: 0 0 30px;
}

.dhyt-library-search input {
    flex: 1;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #353535;
    border-radius: 7px;
    outline: none;
    background: #111 !important;
    color: #fff !important;
}

.dhyt-library-search input::placeholder {
    color: #8f8f8f;
}

.dhyt-library-search input:focus {
    border-color: #ff315c;
    box-shadow: 0 0 0 2px rgba(255, 49, 92, .16);
}

.dhyt-topic-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 38px;
}

.dhyt-topic-tile {
    display: flex;
    min-height: 150px;
    padding: 18px;
    flex-direction: column;
    gap: 8px;
    border: 1px solid #2d2d2d;
    border-radius: 10px;
    background: linear-gradient(145deg, #171717, #0c0c0c);
    color: #d8d8d8 !important;
    text-decoration: none !important;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.dhyt-topic-tile:hover {
    border-color: #ff315c;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.dhyt-topic-tile strong {
    color: #fff;
    font-size: 1.05rem;
}

.dhyt-topic-tile span {
    color: #bdbdbd;
    font-size: .92rem;
    line-height: 1.45;
}

.dhyt-video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.dhyt-video-card {
    display: flex;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #303030 !important;
    border-radius: 12px;
    background: #0d0d0d !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}

.dhyt-card-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111;
}

.dhyt-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s ease;
}

.dhyt-video-card:hover .dhyt-card-image img {
    transform: scale(1.025);
}

.dhyt-card-body {
    display: flex;
    min-height: 245px;
    padding: 18px;
    flex: 1;
    flex-direction: column;
    border-top: 3px solid #ff315c;
    background: linear-gradient(180deg, #181818 0%, #0c0c0c 100%) !important;
    color: #d0d0d0 !important;
}

.dhyt-card-body h3 {
    margin: 0 0 11px;
    color: #fff !important;
    font-size: 1.1rem;
    line-height: 1.34;
}

.dhyt-card-body h3 a,
.dhyt-card-body h3 a:visited {
    color: #fff !important;
    text-decoration: none !important;
}

.dhyt-card-body h3 a:hover {
    color: #ff5a7c !important;
}

.dhyt-card-body p {
    margin: 0 0 18px;
    color: #c5c5c5 !important;
    font-size: .95rem;
    line-height: 1.55;
}

.dhyt-card-link {
    align-self: flex-start;
    margin-top: auto;
}

.dhyt-pagination {
    display: flex;
    margin: 30px 0;
    gap: 8px;
    flex-wrap: wrap;
}

.dhyt-pagination .page-numbers {
    padding: 8px 11px;
    border: 1px solid #353535;
    border-radius: 5px;
    background: #111;
    color: #e8e8e8;
    text-decoration: none;
}

.dhyt-pagination .page-numbers.current,
.dhyt-pagination .page-numbers:hover {
    border-color: #ff315c;
    background: #ff315c;
    color: #fff;
}

.dhyt-topic-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    color: #e6e6e6;
}

.dhyt-topic-intro {
    max-width: 850px;
    margin-bottom: 30px;
}

.dhyt-back-library {
    margin: 24px 0;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .dhyt-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dhyt-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .dhyt-library-search {
        flex-direction: column;
    }

    .dhyt-topic-grid,
    .dhyt-video-grid {
        grid-template-columns: 1fr;
    }

    .dhyt-topic-tile {
        min-height: 0;
    }

    .dhyt-card-body {
        min-height: 0;
    }

    .dhyt-card-link,
    .dhyt-library button {
        width: 100%;
    }
}
