@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fredoka:wght@600;700&family=Manrope:wght@600;700;800&display=swap');

: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: #fdf6ec url('../image/clean-plain-bg.webp?v=4') center/cover no-repeat 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;
    max-width: 1340px;
    width: calc(100% - 56px);
    padding: 14px 195px 12px;
    min-height: 64px;
    margin: 0 auto;
}

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

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

.header-titles h1 {
    font: 700 clamp(20px, 2.2vw, 28px)/1.2 'Fredoka', var(--display);
    letter-spacing: -0.3px;
    color: #103b4d;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.95), 0 0 4px #ffffff;
    margin: 0 0 3px;
}

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

.header-titles p {
    margin: 2px 0 0;
    color: #112e3b;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95), 0 0 3px #ffffff;
}

.pill.back, .video-header .back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Fredoka', var(--display);
    font-size: 13px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    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;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.pill.back:hover, .video-header .back:hover {
    border-color: #fde68a !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}

/* 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;
}

.player-panel {
    display: flex;
    flex-direction: column;
}

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

.video-wrapper iframe,
.video-wrapper video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    display: block !important;
}

.video-wrapper.video-status {
    display: grid;
    place-items: center;
    color: #cbd5e1;
    font: 600 16px/1.5 var(--display);
    padding: 24px;
    text-align: center;
}

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

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

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

.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-status {
    color: var(--muted);
    font-size: 13px;
    margin: 4px 0 0;
}

.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;
}

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

.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: 11.5px;
    color: var(--muted);
    line-height: 1.35;
    margin: 0;
}

@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;
    }
}

@media (max-width: 575.98px) {
    .video-header {
        width: calc(100% - 20px) !important;
        padding: 10px 0 8px !important;
    }
    .video-main {
        width: calc(100% - 20px) !important;
        gap: 14px !important;
    }
    .panel {
        border-radius: 16px !important;
    }
    .video-content-meta {
        padding: 14px !important;
    }
    .playlist-panel {
        padding: 14px !important;
    }
}
