:root {
    --nz-red: #de022c;
    --nz-black: #000000;
    --nz-dark-gray: #111111;
    --nz-sidebar: #1a1a1a;
    --nz-sidebar-hover: #2d2d2d;
}

body.ytlearn-player-page {
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--nz-sidebar);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--nz-red);
}

/* Layout Structure */
.nz-header {
    height: 64px;
    background-color: var(--nz-black);
    border-bottom: 1px solid #333;
    z-index: 1050;
    flex-shrink: 0;
}

.nz-main-wrapper {
    display: flex;
    flex: 1;
    width: 100%;
    overflow: hidden;
}

/* Left Sidebar (Course Content) Desktop Styling */
.nz-sidebar-left {
    width: 288px;
    min-width: 288px;
    max-width: 288px;
    flex: 0 0 288px;
    flex-shrink: 0;
    background-color: var(--nz-sidebar) !important;
    color: #ffffff !important;
    overflow-y: auto;
    border-right: 1px solid #2a2a2a;
    --bs-offcanvas-bg: var(--nz-sidebar);
    --bs-offcanvas-color: #ffffff;
}

.nz-sidebar-left.offcanvas-lg {
    background-color: var(--nz-sidebar) !important;
}

.nz-sidebar-left .btn:focus {
    box-shadow: none;
}

.sidebar-module-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-module-btn:hover {
    background-color: var(--nz-sidebar-hover);
    color: #ffffff;
}

.sidebar-module-btn svg {
    transition: transform 0.25s ease-in-out;
}

.sidebar-module-btn[aria-expanded="true"] svg,
.sidebar-module-btn:not(.collapsed) svg {
    transform: rotate(180deg);
}


.sidebar-lesson-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 24px;
    text-decoration: none;
    color: #a0a0a0;
    font-size: 13px;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-lesson-item:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.04);
}

.sidebar-lesson-item.sidebar-active {
    color: #ffffff;
    font-weight: 700;
    background-color: var(--nz-sidebar-hover);
    border-left-color: var(--nz-red);
}

.sidebar-lesson-item .lesson-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bg-nz-dark-gray {
    background-color: var(--nz-dark-gray) !important;
}

/* Main Content Typography & High Visibility Rules */
.nz-content {
    flex: 1 1 auto;
    min-width: 0;
    overflow-y: auto;
    background-color: #ffffff !important;
    color: #1e293b !important;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.nz-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

.nz-content h1,
.nz-content h2,
.nz-content h3,
.nz-content h4,
.nz-content h5,
.nz-content h6 {
    color: #0f172a !important;
    font-weight: 700;
}

.nz-content p {
    color: #334155 !important;
}

.nz-content .text-secondary {
    color: #475569 !important;
}

.nz-content .text-muted {
    color: #64748b !important;
}

.nz-content .text-dark {
    color: #0f172a !important;
}

.video-aspect-ratio .text-muted {
    color: #cbd5e1 !important;
}

.nz-content .nav-card {
    color: #0f172a !important;
    background-color: #ffffff;
}

.nz-content .nav-card .fw-bold {
    color: #0f172a !important;
}

.nz-content .nav-card .text-secondary {
    color: #64748b !important;
}

.nz-content .masterclass-card {
    background-color: var(--nz-black) !important;
    color: #ffffff !important;
}

.nz-content .masterclass-card h3 {
    color: #ffffff !important;
}

.nz-content .masterclass-card p,
.nz-content .masterclass-card .text-secondary {
    color: #cbd5e1 !important;
}

.nz-content .border-light {
    border-color: #e2e8f0 !important;
}

.nz-sidebar-right {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    flex: 0 0 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    border-left: 1px solid #dee2e6;
    overflow-y: auto;
}

/* Components */
.nz-logo-box {
    width: 32px;
    height: 32px;
    background-color: var(--nz-red);
    color: white;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    text-decoration: none;
}

.nz-logo-box-xs {
    width: 18px !important;
    height: 18px !important;
    font-size: 7px !important;
    font-weight: 900 !important;
    line-height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 3px !important;
    flex-shrink: 0 !important;
}

.sidebar-active {
    background-color: var(--nz-sidebar-hover);
    border-left: 4px solid var(--nz-red);
}

.video-aspect-ratio {
    aspect-ratio: 16 / 9;
    background-color: black;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-aspect-ratio iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
}

.play-btn {
    width: 80px;
    height: 80px;
    background-color: var(--nz-red);
    border-radius: 50%;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none;
    color: white;
    transition: transform 0.2s;
    margin: 0 auto !important;
    padding: 0 !important;
    cursor: pointer;
}

.play-btn svg {
    display: block;
    margin: auto;
    transform: translateX(2px);
}

.play-btn:hover {
    transform: scale(1.1);
}

.progress-bar-nz {
    height: 6px;
    background-color: #333;
    border-radius: 10px;
    width: 192px;
    overflow: hidden;
}

.progress-fill-nz {
    height: 100%;
    background-color: var(--nz-red);
    width: 0%;
    transition: width 0.3s ease;
}

.ad-placeholder {
    background-color: #f1f1f1;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #aaa;
}

.ad-sm {
    height: 80px;
}

.ad-lg {
    height: 128px;
    font-size: 14px;
}

.btn-outline-nz {
    border: 2px solid var(--nz-black);
    font-weight: 700;
    font-size: 14px;
    color: var(--nz-black);
    transition: all 0.2s;
}

.btn-outline-nz:hover {
    background-color: var(--nz-black);
    color: white;
}

.btn-masterclass {
    background-color: var(--nz-red);
    border: none;
}

.masterclass-card {
    background-color: var(--nz-black);
    color: white;
    border-left: 8px solid var(--nz-red);
    border-radius: 12px;
    padding: 32px;
}

/* Certificate Card & Mockup */
.certificate-card {
    background-color: var(--nz-dark-gray);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    color: white;
}

.cert-badge {
    background-color: #ffc107;
    color: black;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.cert-preview-card {
    transform: rotate(2deg);
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
}

.cert-preview-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.cert-preview-inner {
    height: 84px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0 !important;
}

.cert-mock-title {
    font-size: 7px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
    color: #64748b !important;
    text-transform: uppercase;
}

.cert-skeleton-bar-lg {
    height: 4px;
    width: 70%;
    background-color: #cbd5e1;
    border-radius: 2px;
}

.cert-skeleton-bar-sm {
    width: 24px;
    height: 3px;
    background-color: #e2e8f0;
    border-radius: 2px;
}

.cert-skeleton-bar-md {
    width: 36px;
    height: 3px;
    background-color: #de022c;
    border-radius: 2px;
}

.nav-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    transition: border-color 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.nav-card:hover {
    border-color: var(--nz-red);
}

.small-caps {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Helper Utilities */
.sidebar-icon-spacer {
    width: 16px;
}

.nz-content-container {
    max-width: 960px;
}

.video-progress-bg {
    height: 4px;
    background-color: #333;
}

.video-progress-fill {
    width: 25%;
    height: 100%;
    background-color: var(--nz-red);
}

.up-next-icon-box {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fw-black {
    font-weight: 900 !important;
}

.fs-9 {
    font-size: 9px !important;
}

.fs-10 {
    font-size: 10px !important;
}

.fs-11 {
    font-size: 11px !important;
}

/* ==========================================
   Responsive Breakpoints
   ========================================== */

/* Desktop Views (>= 992px) */
@media (min-width: 992px) {
    body.ytlearn-player-page {
        height: 100vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .admin-bar.ytlearn-player-page {
        height: calc(100vh - 32px);
    }

    .nz-main-wrapper {
        display: flex !important;
        flex-direction: row !important;
        flex: 1;
        height: calc(100vh - 64px);
        overflow: hidden;
    }

    .admin-bar .nz-main-wrapper {
        height: calc(100vh - 64px - 32px);
    }

    .nz-sidebar-left {
        width: 288px !important;
        min-width: 288px !important;
        max-width: 288px !important;
        flex: 0 0 288px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .nz-content {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow-y: auto !important;
    }

    .nz-sidebar-right {
        width: 320px !important;
        min-width: 320px !important;
        max-width: 320px !important;
        flex: 0 0 320px !important;
        display: flex !important;
        flex-direction: column !important;
        background-color: #f8f9fa;
        border-left: 1px solid #dee2e6;
        overflow-y: auto !important;
    }
}

/* Tablet & Mobile Views (< 992px) */
@media (max-width: 991.98px) {
    body.ytlearn-player-page {
        height: auto !important;
        min-height: 100vh;
        overflow-y: auto !important;
    }

    .nz-header {
        position: sticky;
        top: 0;
    }

    .admin-bar .nz-header {
        top: 32px;
    }

    .nz-main-wrapper {
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
    }

    .nz-content {
        width: 100% !important;
        flex: none !important;
        overflow: visible !important;
    }

    .nz-sidebar-right {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: visible !important;
        border-left: none !important;
        border-top: 1px solid #dee2e6 !important;
    }

    .nz-sidebar-left.offcanvas-lg {
        width: 288px !important;
        background-color: var(--nz-sidebar) !important;
        border-right: 1px solid #333;
    }

    .ad-placeholder.ad-lg {
        height: 96px;
        font-size: 12px;
    }
}

/* Mobile Small Views (< 576px) */
@media (max-width: 575.98px) {
    .progress-bar-nz {
        width: 100px;
    }

    .play-btn {
        width: 60px;
        height: 60px;
    }

    .play-btn svg {
        width: 24px;
        height: 24px;
    }

    .masterclass-card {
        padding: 20px;
        text-align: center;
    }

    .masterclass-card button {
        width: 100%;
    }
}
