/* ==========================================================================
   "C do Zero" YouTube series on the homepage, see js/cdozero.js
   ========================================================================== */

.np-cdz {
    position: relative;
    background:
        radial-gradient(ellipse 60% 40% at 15% 0%, rgba(233, 18, 112, .12), transparent 70%),
        radial-gradient(ellipse 50% 40% at 90% 100%, rgba(33, 222, 222, .08), transparent 70%),
        linear-gradient(135deg, #0f1419 0%, #1a202c 50%, #2d3748 100%);   /* opaque: the footer sits fixed behind */
}
.np-cdz > p { max-width: 720px; }

/* a line of C, typed out by the decode effect, with a blinking cursor */
.np-cdz-code {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 6px auto 34px !important;
    padding: 10px 18px !important;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(10, 12, 22, .7);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    color: #21dede;
    letter-spacing: 0;
}
.np-cdz-code i {
    width: 9px;
    height: 18px;
    background: #e91270;
    animation: np-cdz-blink 1s steps(1) infinite;
}
@keyframes np-cdz-blink { 50% { opacity: 0; } }

/* ---- main player + episode list ---- */
.np-cdz-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
    gap: 22px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
}
.np-cdz-player {
    border-radius: 16px;
    overflow: hidden;
    background: #11131f;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08);
}
.np-cdz-player > .np-cdz-facade,
.np-cdz-player > iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}
.np-cdz-facade {
    position: relative;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}
.np-cdz-facade img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.16, 1, .3, 1), filter .4s;
}
.np-cdz-facade:hover img,
.np-cdz-facade:focus-visible img { transform: scale(1.04); filter: brightness(.8); }
.np-cdz-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 74px;
    height: 74px;
    margin: -37px 0 0 -37px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 26px;
    background: linear-gradient(135deg, #e91270, #8b0fa3);
    box-shadow: 0 0 0 8px rgba(233, 18, 112, .25), 0 14px 30px -8px rgba(233, 18, 112, .9);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s;
}
.np-cdz-btn i { margin-left: 4px; }
.np-cdz-facade:hover .np-cdz-btn { transform: scale(1.1); box-shadow: 0 0 0 14px rgba(233, 18, 112, .2), 0 18px 36px -8px rgba(233, 18, 112, 1); }
@media (prefers-reduced-motion: no-preference) {
    .np-cdz-player:not(.np-cdz-live) .np-cdz-btn { animation: np-cdz-pulse 2.4s ease-out infinite; }
}
@keyframes np-cdz-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(233, 18, 112, .5), 0 14px 30px -8px rgba(233, 18, 112, .9); }
    70%  { box-shadow: 0 0 0 22px rgba(233, 18, 112, 0), 0 14px 30px -8px rgba(233, 18, 112, .9); }
    100% { box-shadow: 0 0 0 0 rgba(233, 18, 112, 0), 0 14px 30px -8px rgba(233, 18, 112, .9); }
}
.np-cdz-now { padding: 16px 20px 20px; }
.np-cdz-now small {
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9aa1c0;
}
.np-cdz-now small b { color: #fff; }
.np-cdz-now small span { color: #e91270; font-weight: 700; }
.np-cdz-now h3 {
    margin: 6px 0 0;
    letter-spacing: normal;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    text-align: left;
}

.np-cdz-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 560px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.np-cdz-ep {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    color: #fff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .25s cubic-bezier(.16, 1, .3, 1);
}
.np-cdz-ep:hover { background: rgba(255, 255, 255, .07); border-color: rgba(233, 18, 112, .5); transform: translateX(3px); }
.np-cdz-ep.np-cdz-on { border-color: #e91270; background: rgba(233, 18, 112, .1); box-shadow: inset 3px 0 0 #e91270; }
.np-cdz-ep img {
    flex: none;
    width: 128px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    background: #11131f;
}
.np-cdz-ep span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.np-cdz-ep small {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #21dede;
}
.np-cdz-ep b {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- shorts ---- */
.np-cdz-sub {
    margin: 56px 0 18px;
    letter-spacing: .02em;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}
.np-cdz-sub i { color: #e91270; margin-right: 6px; }
.np-cdz-shorts {
    display: flex;
    gap: 16px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 4px 20px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(233, 18, 112, .5) transparent;
}
.np-cdz-short:first-child { margin-left: auto; }   /* centred, yet scrollable when it overflows */
.np-cdz-short:last-child { margin-right: auto; }
.np-cdz-short {
    flex: 0 0 184px;
    border-radius: 16px;
    overflow: hidden;
    scroll-snap-align: center;
    background: #11131f;
    box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .08);
}
.np-cdz-short > .np-cdz-facade,
.np-cdz-short > iframe {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    border: 0;
}
.np-cdz-short .np-cdz-btn { width: 52px; height: 52px; margin: -26px 0 0 -26px; font-size: 18px; }
.np-cdz-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 12px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    text-align: left;
    background: linear-gradient(transparent, rgba(0, 0, 0, .85));
}
.np-cdz-cap small { color: #21dede; }

/* ---- calls to action ---- */
.np-cdz-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px 26px;
    margin-top: 40px;
}
.np-cdz-sub-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    color: #fff !important;
    text-decoration: none;
    background: linear-gradient(135deg, #ff0033, #e91270 55%, #8b0fa3);
    box-shadow: 0 14px 30px -12px rgba(233, 18, 112, .9);
    transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s;
}
.np-cdz-sub-btn i { font-size: 20px; }
.np-cdz-sub-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -12px rgba(233, 18, 112, 1); }
.np-cdz-all { color: #c9cddd !important; font-weight: 600; text-decoration: none; }
.np-cdz-all:hover { color: #fff !important; }

/* ---- smaller screens ---- */
@media (max-width: 900px) {
    .np-cdz-stage { grid-template-columns: 1fr; }
    .np-cdz-list { max-height: none; }
}
@media (max-width: 600px) {
    .np-cdz-stage { padding: 0 12px; gap: 16px; }
    .np-cdz-now h3 { font-size: 17px; }
    .np-cdz-ep img { width: 112px; height: 63px; }
    .np-cdz-short { flex-basis: 158px; }
    .np-cdz-code { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .np-cdz-code i { animation: none; }
}
