:root {
    --ink: #34464e;
    --muted: #61717a;
    --navy: #174d62;
    --teal: #216c4e;
    --orange: #a14a25;
    --gold: #ecc982;
    --panel-bg: #ffffff;
    --font: 'DM Sans', sans-serif;
    --display: 'Manrope', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100dvh;
    background: #3d0607 url('../assets/clean-plain-bg.webp?v=1') center/cover fixed;
    font: 14px/1.5 var(--font);
    color: var(--ink);
    display: flex;
    flex-direction: column;
}

button, a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button {
    font: inherit;
    cursor: pointer;
    border: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background: #ffe2be;
    color: #174d62;
}

:focus-visible {
    outline: 3px solid #216c4e;
    outline-offset: 3px;
}

/* Header */
.video-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 18px;
    padding: 20px 32px 14px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.video-header .back {
    position: absolute;
    left: 32px;
}

@media (max-width: 700px) {
    .video-header .back {
        position: static;
    }
}

.header-titles {
    text-align: center;
}

.header-titles h1 {
    font: 800 clamp(26px, 3.2vw, 38px)/1.2 var(--display);
    letter-spacing: -1px;
    color: #103b4d;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.95), 0 0 4px #ffffff;
    margin: 0;
}

.header-titles h1 span {
    color: #a96a17;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.95), 0 0 4px #ffffff;
}

.header-titles p {
    margin: 4px 0 0;
    color: #112e3b;
    font-size: 15px;
    font-weight: 800;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95), 0 0 3px #ffffff;
}

.pill {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 9px 18px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(23, 77, 98, 0.12), 0 2px 0 #9badad55;
    transition: transform .2s, background .2s, box-shadow .2s;
    color: var(--navy);
}

.pill:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(23, 77, 98, 0.18), 0 3px 0 #9badad55;
    color: var(--teal);
}

.pill.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #a92559 0%, #7a133c 100%);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 15px rgba(169, 37, 89, 0.45);
    padding: 10px 18px;
    font-size: 12.5px;
}

.pill.back:hover {
    background: linear-gradient(135deg, #c22b67 0%, #8f1747 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(169, 37, 89, 0.6);
}

/* Main Content Layout */
.video-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 22px;
    width: calc(100% - 56px);
    max-width: 1340px;
    margin: 0 auto auto;
    padding-bottom: 24px;
}

.panel {
    background: var(--panel-bg);
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(25, 58, 54, 0.12), 0 3px 0 #9badad44;
    overflow: hidden;
}

/* Left Panel: Player & Info */
.player-panel {
    display: flex;
    flex-direction: column;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #08151c;
    overflow: hidden;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #08151c;
    display: block;
}

.video-content-meta {
    padding: 22px 26px 26px;
}

.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tag {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.tag-chapter {
    background: #e8f5ed;
    color: #1b6345;
}

.tag-type {
    background: #e6f4fb;
    color: #175475;
}

.tag-quality {
    background: #fdf5e2;
    color: #8c5b16;
}

.video-content-meta h2 {
    font: 800 22px/1.3 var(--display);
    color: var(--navy);
    letter-spacing: -0.4px;
    margin: 0 0 10px;
}

.video-description {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0 0 18px;
    max-width: 82ch;
}

/* Quick Controls */
.video-quick-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #edf1f3;
}

.ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0f6f8;
    color: var(--navy);
    padding: 9px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    transition: all .2s;
}

.ctrl-btn:hover {
    background: var(--navy);
    color: #fff;
    transform: translateY(-1px);
}

.ctrl-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

#ctrl-play-pause {
    background: var(--navy);
    color: #fff;
}

#ctrl-play-pause:hover {
    background: var(--teal);
}

/* Connected Activities */
.learning-connections h3 {
    font: 800 14px/1.2 var(--display);
    color: var(--navy);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.connection-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.conn-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f7fafb;
    border: 1px solid #e3ebef;
    border-radius: 14px;
    transition: transform .2s, border-color .2s, background .2s;
}

.conn-card:hover {
    transform: translateY(-2px);
    background: #ffffff;
    border-color: #216c4e;
    box-shadow: 0 4px 12px rgba(23, 77, 98, 0.08);
}

.conn-card img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.conn-card strong {
    display: block;
    font-size: 13px;
    color: var(--navy);
    line-height: 1.25;
}

.conn-card span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.3;
    margin-top: 2px;
}

.conn-arrow {
    margin-left: auto;
    font-size: 15px;
    color: #a0b3bb;
    transition: transform .2s;
}

.conn-card:hover .conn-arrow {
    transform: translateX(3px);
    color: var(--teal);
}

/* Right Panel: Playlist */
.playlist-panel {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.playlist-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf1f3;
}

.playlist-heading h2 {
    font: 800 18px/1.2 var(--display);
    color: var(--navy);
    margin: 0;
}

.playlist-count {
    font-size: 11px;
    color: var(--muted);
    background: #f0f6f8;
    padding: 3px 8px;
    border-radius: 10px;
}

.playlist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.playlist-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background: #f7fafb;
    border: 2px solid transparent;
    text-align: left;
    transition: all .22s;
    width: 100%;
}

.playlist-card:hover {
    background: #ffffff;
    border-color: #d0e4e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 77, 98, 0.08);
}

.playlist-card.active {
    background: #ffffff;
    border-color: var(--teal);
    box-shadow: 0 4px 14px rgba(33, 108, 78, 0.15);
}

.playlist-thumb-wrap {
    position: relative;
    width: 100px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #102f3f;
}

.playlist-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(16, 47, 63, 0.85);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
}

.thumb-play-icon {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity .2s;
}

.thumb-play-icon svg {
    width: 22px;
    height: 22px;
    fill: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.playlist-card:hover .thumb-play-icon {
    opacity: 1;
}

.playlist-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pl-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.pl-title {
    font: 800 13px/1.25 var(--display);
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.pl-desc {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.now-playing-label {
    display: none;
    font-size: 10px;
    font-weight: 800;
    color: var(--teal);
    margin-top: 4px;
}

.playlist-card.active .now-playing-label {
    display: block;
}

/* Playlist Book Card */
.playlist-book-card {
    margin-top: 18px;
    padding: 14px;
    background: #fdfaf3;
    border: 1px dashed #d9caa7;
    border-radius: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.book-card-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.book-card-body strong {
    display: block;
    font-size: 12px;
    color: #724c16;
}

.book-card-body p {
    font-size: 11px;
    color: #636b6f;
    margin: 2px 0 8px;
    line-height: 1.3;
}

.primary-btn {
    display: inline-block;
    background: #a96a17;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 16px;
    transition: background .2s;
}

.primary-btn:hover {
    background: #89520e;
}

/* Footer */
.video-footer {
    text-align: center;
    color: #315e71;
    font-size: 12px;
    padding: 10px 20px 18px;
    margin-top: auto;
}

.footer-star {
    color: #a96a17;
    margin: 0 6px;
}

/* Responsive */
@media (max-width: 1020px) {
    .video-main {
        grid-template-columns: 1fr;
    }
    .connection-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .video-header {
        padding: 14px 18px;
        flex-wrap: wrap;
    }
    .header-titles {
        order: -1;
        width: 100%;
        margin-bottom: 8px;
    }
    .video-main {
        width: calc(100% - 24px);
    }
    .video-content-meta {
        padding: 16px;
    }
    .video-content-meta h2 {
        font-size: 18px;
    }
    .video-description {
        font-size: 12px;
    }
}

/* === NAVDEEP VIDEO PAGE CLEANUP & RESPONSIVE === */
.playlist-panel {
    align-self: start;
}
@media (max-width: 575.98px) {
    .video-header {
        padding: 12px 12px 8px !important;
        gap: 8px !important;
    }
    .header-titles h1 {
        font-size: clamp(20px, 6vw, 26px) !important;
    }
    .header-titles p {
        font-size: 12.5px !important;
    }
    .pill.back {
        padding: 8px 14px !important;
        font-size: 11.5px !important;
    }
    .video-main {
        width: calc(100% - 20px) !important;
        gap: 14px !important;
        padding-bottom: 18px !important;
    }
    .panel {
        border-radius: 16px !important;
    }
    .video-content-meta {
        padding: 14px !important;
    }
    .video-content-meta h2 {
        font-size: 16.5px !important;
    }
    .ctrl-btn {
        padding: 7px 12px !important;
        font-size: 11px !important;
    }
    .playlist-panel {
        padding: 14px !important;
    }
    .playlist-thumb-wrap {
        width: 86px !important;
        height: 60px !important;
    }
}
/* === GLOBAL FULL-BLEED VIDEO WRAPPER IFRAME FIX === */
.video-wrapper iframe,
.video-wrapper video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    display: block !important;
}

/* === UMA v32 VIDEOS RESPONSIVE POLISH (DESKTOP, TABLET & MOBILE) === */
.video-header {
    max-width: 1340px;
    width: calc(100% - 56px);
    padding: 14px 195px 12px;
    min-height: 64px;
}
.video-header .back {
    left: 0;
}
.header-titles h1 {
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.2;
    letter-spacing: -0.3px;
    margin: 0 0 3px;
}
.header-titles p {
    font-size: 13px;
    line-height: 1.4;
}
@media (max-width: 1020px) {
    .video-main {
        max-width: 860px;
        width: calc(100% - 32px);
        grid-template-columns: 1fr;
    }
    .video-header {
        max-width: 860px;
        width: calc(100% - 32px);
    }
}
@media (max-width: 960px) {
    .video-header {
        padding: 12px 0 10px;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .video-header .back {
        position: static;
        align-self: flex-start;
    }
    .header-titles {
        order: 0;
        width: 100%;
        margin-bottom: 0;
    }
}
@media (max-width: 575.98px) {
    .video-header {
        width: calc(100% - 20px) !important;
        padding: 10px 0 8px !important;
    }
    .video-main {
        width: calc(100% - 20px) !important;
    }
}

.pill.back, .video-header .back {
    background: linear-gradient(180deg, #b91c1c 0%, #851013 52%, #5a0a0c 100%) !important;
    border: 2px solid #f59e0b !important;
    border-bottom: 4.5px solid #3d0607 !important;
    border-radius: 15px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 7px 18px 9px !important;
    text-shadow: 0 1.5px 0 rgba(45, 4, 5, 0.55) !important;
    box-shadow: 0 6px 15px rgba(61, 6, 7, 0.3), inset 0 1.5px 3px rgba(255, 255, 255, 0.28) !important;
}
.pill.back:hover, .video-header .back:hover {
    border-color: #fde68a !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}
