/* ============================================================
   courses.css — Learning Hub, Course Page & Lesson Player
   Extracted from learnSongs.css for clean separation
   ============================================================ */

/* ================================================================
   Learning Course Full-Screen Page (lcp-*)
   Mirrors .song-detail-page positioning pattern exactly
   ================================================================ */

/* Page shell */
.lcp-page {
    display: none;
    position: fixed;
    top: 3rem;
    left: 260px;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a0514 0%, #1a0a2e 50%, #16001e 100%);
    z-index: 500;
    overflow-y: auto;
    padding-bottom: 120px;
}
.lcp-page.active { display: block; }

/* Inner container — full-width like tab-section, no narrow centering */
.lcp-container {
    max-width: 100%;
    padding: 2rem;
}

/* ── Back button ─────────────────────────────────────────── */


/* ── Course hero header ──────────────────────────────────── */
.lcp-course-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.6rem;
    margin-bottom: 1.5rem;
}

.lcp-hero-icon {
    font-size: 3.8rem;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 0 16px rgba(217,70,239,0.6));
}

.lcp-hero-info { flex: 1; }

.lcp-hero-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.lcp-course-title {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f0e7ff, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* Level badges */
.lcp-level-badge {
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}
.lcp-badge--beginner { background: rgba(74,222,128,0.18); color: #4ade80; border: 1px solid rgba(74,222,128,0.4); }
.lcp-badge--intermediate { background: rgba(251,191,36,0.18); color: #fbbf24; border: 1px solid rgba(251,191,36,0.4); }
.lcp-badge--advanced { background: rgba(239,68,68,0.18); color: #f87171; border: 1px solid rgba(239,68,68,0.4); }

.lcp-hero-meta {
    font-size: 0.88rem;
    color: var(--text-dim);
    margin-bottom: 0.9rem;
}
.lcp-hero-dot { margin: 0 0.4rem; opacity: 0.5; }

/* Progress bar */
.lcp-progress-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.lcp-progress-bar {
    flex: 1;
    max-width: 280px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 99px;
    overflow: hidden;
}
.lcp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d946ef, #a855f7);
    border-radius: 99px;
    transition: width 0.6s ease;
}
.lcp-progress-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    white-space: nowrap;
}

/* Divider */
.lcp-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(217,70,239,0.4), transparent);
    margin: 1.5rem 0 2rem;
}

/* Section title */
.lcp-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 1.4rem;
    letter-spacing: 0.02em;
}

/* ── Lesson cards grid ───────────────────────────────────── */
.lcp-lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
    margin-bottom: 3rem;
}

/* ── Individual lesson card ──────────────────────────────── */
.lcp-lesson-card {
    background: linear-gradient(135deg, rgba(26,15,46,0.92), rgba(18,8,32,0.92));
    border: 2px solid rgba(217,70,239,0.22);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    position: relative;
    animation: lsCardIn 0.5s ease both;
}

.lcp-lesson-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--primary);
    box-shadow: 0 16px 45px rgba(217,70,239,0.5);
}

/* First lesson highlight */
.lcp-lesson-card--first {
    border-color: rgba(217,70,239,0.55);
    box-shadow: 0 0 0 1px rgba(217,70,239,0.2), 0 8px 28px rgba(217,70,239,0.35);
}

.lcp-start-here {
    background: linear-gradient(135deg, rgba(217,70,239,0.25), rgba(168,85,247,0.25));
    color: #e879f9;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(217,70,239,0.2);
}

/* Thumbnail image area */
.lcp-lesson-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #0a0514;
    overflow: hidden;
    cursor: pointer;
}
.lcp-lesson-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.lcp-lesson-card:hover .lcp-lesson-thumb img {
    transform: scale(1.04);
}
.lcp-thumb-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.28);
    transition: background 0.25s;
}
.lcp-lesson-card:hover .lcp-thumb-play-overlay {
    background: rgba(0,0,0,0.15);
}
.lcp-thumb-play-icon {
    width: 52px;
    height: 52px;
    background: rgba(217,70,239,0.88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 24px rgba(217,70,239,0.6);
    transition: transform 0.25s, box-shadow 0.25s;
}
.lcp-lesson-card:hover .lcp-thumb-play-icon {
    transform: scale(1.12);
    box-shadow: 0 6px 32px rgba(217,70,239,0.8);
}


/* Card body */
.lcp-lesson-body {
    padding: 1.2rem 1.3rem 1.3rem;
}

.lcp-lesson-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.lcp-lesson-num {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-purple);
}

/* Difficulty badges */
.lcp-diff {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.lcp-diff--easy  { background: rgba(74,222,128,0.15);  color: #4ade80;  border: 1px solid rgba(74,222,128,0.3); }
.lcp-diff--mid   { background: rgba(251,191,36,0.15);  color: #fbbf24;  border: 1px solid rgba(251,191,36,0.3); }
.lcp-diff--hard  { background: rgba(239,68,68,0.15);   color: #f87171;  border: 1px solid rgba(239,68,68,0.3); }

.lcp-lesson-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.lcp-lesson-sub {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 0.9rem;
    line-height: 1.4;
}

.lcp-lesson-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.8rem;
}

.lcp-lesson-dur {
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* Start / Play button */
.lcp-start-btn {
    background: rgba(217,70,239,0.18);
    border: 1.5px solid rgba(217,70,239,0.45);
    color: var(--primary);
    padding: 0.45rem 1rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
}
.lcp-start-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(217,70,239,0.5);
}
.lcp-start-btn--primary {
    background: linear-gradient(135deg, #d946ef, #a855f7);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(217,70,239,0.45);
}
.lcp-start-btn--primary:hover {
    box-shadow: 0 6px 24px rgba(217,70,239,0.7);
    transform: scale(1.03);
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .lcp-page {
        left: 0;
        top: 3rem;
        padding-bottom: 100px;
    }
    .lcp-container {
        padding: 1rem;
        padding-top: 1.2rem;
    }
    .lcp-course-hero {
        flex-direction: column;
        gap: 0.8rem;
    }
    .lcp-hero-icon { font-size: 2.8rem; }
    .lcp-course-title { font-size: 1.6rem; }
    .lcp-lessons-grid {
        grid-template-columns: 1fr;
        gap: 1.3rem;
    }
}


/* ================================================================
   Lesson Watch Mode — Full Viewport Overlay (llp-*)
   Covers ticker + sidebar completely. z-index: 1001 beats both.
   ================================================================ */

/* ── Page shell: true full-screen, no sidebar gap ───────────── */
.llp-page {
    display: none;
    position: fixed;
    inset: 0;                        /* top:0 left:0 right:0 bottom:0 */
    z-index: 8000;                   /* above all modals, below mobile sidebar(9000) + header(9500) */
    background: #07030f;
    overflow: hidden;                /* inner .llp-scroll handles scroll */
    flex-direction: column;
}
.llp-page.active {
    display: flex;
}

/* ── Slim immersive top bar ──────────────────────────────────── */
.llp-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    height: 52px;
    flex-shrink: 0;
    background: rgba(10, 3, 22, 0.96);
    border-bottom: 1px solid rgba(217,70,239,0.15);
    backdrop-filter: blur(10px);
}
.llp-topbar-course {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(240,231,255,0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.llp-topbar-brand {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(217,70,239,0.7);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Scrollable content area below topbar ────────────────────── */
.llp-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1rem 5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(217,70,239,0.3) transparent;
}
.llp-container::-webkit-scrollbar { width: 5px; }
.llp-container::-webkit-scrollbar-track { background: transparent; }
.llp-container::-webkit-scrollbar-thumb { background: rgba(217,70,239,0.35); border-radius: 99px; }

/* ── Two-column watch layout ─────────────────────────────────── */
.llp-watch-layout {
    display: grid;
    width: 100%;                           /* force full container fill */
    grid-template-columns: 1fr 320px;      /* video fills ALL remaining, playlist fixed 320px */
    gap: 1.2rem;
    align-items: stretch;
}

/* ── Left: player column ─────────────────────────────────────── */
.llp-player-col { min-width: 0; }

.llp-meta-line {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--text-dim, #8b7aa3);
    margin-bottom: 0.5rem;
}
.llp-dot { opacity: 0.4; margin: 0 0.15rem; }
.llp-lesson-num-label {
    font-weight: 700;
    color: #a855f7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}
.llp-diff-badge {
    font-size: 0.71rem;
    font-weight: 700;
    padding: 0.14rem 0.52rem;
    border-radius: 10px;
    background: rgba(217,70,239,0.14);
    color: #d946ef;
    border: 1px solid rgba(217,70,239,0.28);
    letter-spacing: 0.03em;
}
.llp-dur-label { color: var(--text-dim, #8b7aa3); }

.llp-title {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f0e7ff, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.28rem;
    line-height: 1.25;
}
.llp-subtitle {
    font-size: 0.88rem;
    color: var(--text-dim, #8b7aa3);
    margin: 0 0 1.1rem;
}

/* Video — full column width, perfect 16:9 */
.llp-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 40px rgba(0,0,0,0.8), 0 0 0 1px rgba(217,70,239,0.15);
    margin-bottom: 1.1rem;
}
.llp-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Description below video */
.llp-desc-area {
    width: 100%;
    background: rgba(20,8,36,0.7);
    border: 1px solid rgba(217,70,239,0.13);
    border-radius: 12px;
    padding: 0.95rem 1.3rem;
}
.llp-desc-text {
    font-size: 0.87rem;
    color: var(--text-dim, #8b7aa3);
    line-height: 1.6;
    margin: 0;
}

/* ── Right: playlist column ──────────────────────────────────── */
.llp-playlist-col {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    /* Push playlist down to align with video top edge (below meta+title+subtitle) */
    padding-top: 6.3rem;
}

.llp-playlist-panel {
    background: rgba(14, 5, 28, 0.9);
    border: 1px solid rgba(217,70,239,0.2);
    border-radius: 14px;
    overflow: hidden;
    width: 100%;           /* fill the 320px column exactly */
    flex: 1;               /* stretch to full column height */
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.llp-playlist-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid rgba(217,70,239,0.13);
    background: rgba(217,70,239,0.07);
    flex-shrink: 0;
}
.llp-playlist-icon { font-size: 1rem; }
.llp-playlist-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f0e7ff;
    letter-spacing: 0.02em;
}

/* Scrollable rows */
.llp-playlist-items {
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(217,70,239,0.3) transparent;
}
.llp-playlist-items::-webkit-scrollbar { width: 4px; }
.llp-playlist-items::-webkit-scrollbar-track { background: transparent; }
.llp-playlist-items::-webkit-scrollbar-thumb { background: rgba(217,70,239,0.35); border-radius: 99px; }

/* Single row */
.llp-pl-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.18s;
    min-height: 44px;
}
.llp-pl-item:last-child { border-bottom: none; }
.llp-pl-item:hover { background: rgba(217,70,239,0.09); }
.llp-pl-item.active {
    background: rgba(217,70,239,0.15);
    border-left: 3px solid #d946ef;
    padding-left: calc(0.9rem - 3px);
}

/* Thumbnail */
.llp-pl-thumb {
    position: relative;
    width: 78px;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
    border-radius: 7px;
    overflow: hidden;
    background: #0a0514;
}
.llp-pl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.llp-pl-now-badge {
    position: absolute;
    inset: 0;
    background: rgba(217,70,239,0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

/* Text */
.llp-pl-info { flex: 1; min-width: 0; }
.llp-pl-num {
    font-size: 0.64rem;
    color: #a855f7;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
}
.llp-pl-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f0e7ff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}
.llp-pl-item.active .llp-pl-name { color: #e879f9; }

.llp-pl-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.llp-pl-dur { font-size: 0.68rem; color: var(--text-dim, #8b7aa3); }
.llp-pl-badge {
    font-size: 0.58rem;
    font-weight: 700;
    padding: 0.09rem 0.4rem;
    border-radius: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.llp-pl-badge.easy { background: rgba(74,222,128,0.14); color: #4ade80; border: 1px solid rgba(74,222,128,0.28); }
.llp-pl-badge.mid  { background: rgba(251,191,36,0.14); color: #fbbf24; border: 1px solid rgba(251,191,36,0.28); }
.llp-pl-badge.hard { background: rgba(239,68,68,0.14);  color: #f87171; border: 1px solid rgba(239,68,68,0.28); }
.llp-pl-badge.now  { background: linear-gradient(135deg,#d946ef,#a855f7); color:#fff; border:none; }

/* ── Responsive ──────────────────────────────────────────────── */

/* Tablet: stack columns, playlist scrolls in-place */
@media (max-width: 900px) {
    .llp-watch-layout {
        grid-template-columns: 1fr;
    }
    .llp-playlist-col {
        padding-top: 0; /* stacked layout — no offset needed */
    }
    .llp-playlist-panel {
        max-height: 420px;
    }
}

/* Mobile: tighten spacing */
@media (max-width: 640px) {
    .llp-topbar { padding: 0 1rem; }
    .llp-topbar-brand { display: none; }         /* hide brand on tiny screens */
    .llp-topbar-course { font-size: 0.8rem; }
    .llp-container { padding: 1rem 0.9rem 5rem; }
    .llp-title { font-size: 1.3rem; }
    .llp-video-wrap { border-radius: 10px; }
    .llp-desc-area, .llp-playlist-panel { border-radius: 10px; }
    .llp-playlist-panel { max-height: 340px; }
    .llp-pl-thumb { width: 68px; }
}

/* ══════════════════════════════════════════════════════
   Mobile Back Buttons — lesson player + course page
   Only visible on mobile (desktop uses OS back or sidebar nav)
   ══════════════════════════════════════════════════════ */
.llp-back-btn,
.lcp-back-btn {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
    .llp-back-btn {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        background: none;
        border: none;
        color: rgba(217, 70, 239, 0.85);
        font-family: 'Outfit', sans-serif;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        padding: 0.3rem 0.6rem;
        border-radius: 6px;
        flex-shrink: 0;
        white-space: nowrap;
        transition: color 0.2s;
    }
    .llp-back-btn:hover { color: var(--primary, #d946ef); }

    .lcp-back-btn {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        background: rgba(217, 70, 239, 0.08);
        border: 1px solid rgba(217, 70, 239, 0.22);
        color: rgba(217, 70, 239, 0.85);
        font-family: 'Outfit', sans-serif;
        font-size: 0.82rem;
        font-weight: 600;
        cursor: pointer;
        padding: 0.45rem 1rem;
        border-radius: 20px;
        margin-bottom: 1rem;
        transition: all 0.2s;
    }
    .lcp-back-btn:hover {
        background: rgba(217, 70, 239, 0.15);
        color: var(--primary, #d946ef);
    }
}

/* ══════════════════════════════════════════
   Mobile drag handle at top of ls-detail-modal
   Gives visual cue that swipe-down closes modal
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
    .ls-detail-content::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: rgba(217, 70, 239, 0.3);
        border-radius: 2px;
        margin: 0 auto 0.8rem;
    }
}

/* ================================================================
   Learning Hub — Sequential Lesson Unlock System  v1
   New states: locked, completed, complete button, playlist badges
   ================================================================ */

/* ── Locked lesson card ──────────────────────────────────────── */
.lcp-lesson-card--locked {
    opacity: 0.6;
    cursor: default;
}
.lcp-lesson-card--locked:hover {
    transform: none;
    border-color: rgba(217,70,239,0.15);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    cursor: not-allowed;
}
.lcp-lesson-card--locked .lcp-start-here--locked {
    background: rgba(100,100,120,0.25);
    color: rgba(200,200,220,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Lock overlay on thumbnail */
.lcp-thumb-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
}
.lcp-thumb-lock-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}

/* Locked button state */
.lcp-start-btn--locked {
    background: rgba(80,80,100,0.2);
    border-color: rgba(150,150,170,0.3);
    color: rgba(180,180,200,0.55);
    cursor: not-allowed;
    opacity: 0.7;
}
.lcp-start-btn--locked:hover {
    background: rgba(80,80,100,0.2);
    color: rgba(180,180,200,0.55);
    box-shadow: none;
    transform: none;
}

/* Guest login-to-unlock button */
.lcp-start-btn--guest-lock {
    background: linear-gradient(135deg, rgba(217,70,239,0.18), rgba(168,85,247,0.12));
    border-color: rgba(217,70,239,0.45);
    color: rgba(217,70,239,0.9);
    cursor: pointer;
    opacity: 1;
}
.lcp-start-btn--guest-lock:hover {
    background: linear-gradient(135deg, rgba(217,70,239,0.32), rgba(168,85,247,0.25));
    border-color: rgba(217,70,239,0.7);
    color: #e879f9;
    box-shadow: 0 4px 16px rgba(217,70,239,0.28);
    transform: translateY(-1px);
}

/* Lock note below lesson title */
.lcp-locked-note {
    font-size: 0.75rem;
    color: rgba(180,180,200,0.55);
    margin-bottom: 0.5rem;
    font-style: italic;
}

/* ── Completed lesson card ───────────────────────────────────── */
.lcp-lesson-card--completed {
    border-color: rgba(74,222,128,0.4);
    box-shadow: 0 0 0 1px rgba(74,222,128,0.15), 0 6px 20px rgba(0,0,0,0.35);
}
.lcp-lesson-card--completed:hover {
    border-color: rgba(74,222,128,0.7);
    box-shadow: 0 12px 36px rgba(74,222,128,0.3);
}
.lcp-start-here--done {
    background: linear-gradient(135deg, rgba(74,222,128,0.2), rgba(16,185,129,0.2));
    color: #4ade80;
    border-bottom: 1px solid rgba(74,222,128,0.2);
}

/* Green checkmark overlay on completed thumbnails */
.lcp-thumb-done-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16,185,129,0.3);
}
.lcp-thumb-done-icon {
    width: 52px;
    height: 52px;
    background: rgba(16,185,129,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 4px 20px rgba(16,185,129,0.6);
}

/* Completed button state */
.lcp-start-btn--done {
    background: rgba(74,222,128,0.12);
    border-color: rgba(74,222,128,0.4);
    color: #4ade80;
}
.lcp-start-btn--done:hover {
    background: rgba(74,222,128,0.22);
    color: #4ade80;
    box-shadow: 0 4px 14px rgba(74,222,128,0.3);
}

/* ── Skeleton loading shimmer for lesson cards ───────────────── */
.lcp-lesson-card--skeleton {
    pointer-events: none;
    animation: lcp-shimmer 1.4s ease-in-out infinite;
}
.lcp-skeleton-thumb {
    background: rgba(217,70,239,0.07);
    padding-top: 56.25%;
    width: 100%;
}
.lcp-skeleton-line {
    background: rgba(217,70,239,0.08);
    border-radius: 4px;
    animation: lcp-shimmer 1.4s ease-in-out infinite;
}
@keyframes lcp-shimmer {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 1;   }
}

/* ── Locked toast animation ──────────────────────────────────── */
@keyframes lcp-toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0);    }
}

/* ── Mark Complete button in lesson player ───────────────────── */
.llp-complete-area {
    margin-top: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.3rem;
    background: rgba(20,8,36,0.7);
    border: 1px solid rgba(217,70,239,0.15);
    border-radius: 12px;
}

.llp-complete-btn {
    background: linear-gradient(135deg, #d946ef, #a855f7);
    color: #fff;
    border: none;
    padding: 0.65rem 1.6rem;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s;
    box-shadow: 0 4px 18px rgba(217,70,239,0.4);
    flex-shrink: 0;
}
.llp-complete-btn:hover:not(:disabled) {
    box-shadow: 0 6px 28px rgba(217,70,239,0.65);
    transform: scale(1.03);
}
.llp-complete-btn:disabled {
    cursor: default;
    opacity: 0.8;
}

.llp-complete-btn--done {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 18px rgba(16,185,129,0.4);
}
.llp-complete-btn--done:hover {
    box-shadow: 0 4px 18px rgba(16,185,129,0.4) !important;
    transform: none !important;
}

.llp-complete-note {
    font-size: 0.82rem;
    color: var(--text-dim, #8b7aa3);
    margin: 0;
    line-height: 1.45;
}

/* ── Playlist: completed / locked item states ────────────────── */
.llp-pl-item.done {
    background: rgba(16,185,129,0.06);
}
.llp-pl-item.done:hover {
    background: rgba(16,185,129,0.12);
}
.llp-pl-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}
.llp-pl-item.locked:hover {
    background: transparent;
}

/* Playlist done/lock badges on thumbnail */
.llp-pl-done-badge,
.llp-pl-lock-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: 7px;
}
.llp-pl-done-badge {
    background: rgba(16,185,129,0.55);
    color: #fff;
    font-weight: 700;
}
.llp-pl-lock-badge {
    background: rgba(0,0,0,0.45);
}

/* Playlist done badge pill */
.llp-pl-badge.done {
    background: rgba(16,185,129,0.15);
    color: #4ade80;
    border: 1px solid rgba(74,222,128,0.3);
}

/* ================================================================
   Learning Hub — Auth Gate  v1
   Full-width overlay over course cards for guests.
   Cards are blurred underneath (preview effect).
   ================================================================ */

/* Wrapper that holds both the cards grid and the gate overlay */
.lhub-content-wrap {
    position: relative;
}

/* When gate is showing — blur the cards behind it */
.lhub-content-wrap:has(#lhubLoginGate[style*="flex"]) .learning-grid {
    filter: blur(6px) brightness(0.45);
    pointer-events: none;
    user-select: none;
}

/* Gate overlay */
.lhub-gate {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 2rem 1rem;
    /* Subtle gradient from transparent to dark so blur context merges nicely */
    background: radial-gradient(ellipse at 50% 40%, rgba(15,6,30,0.82) 0%, rgba(8,3,18,0.72) 100%);
}

/* Gate card box */
.lhub-gate-box {
    background: linear-gradient(135deg, rgba(26,12,52,0.97), rgba(14,6,28,0.97));
    border: 1.5px solid rgba(217,70,239,0.45);
    border-radius: 24px;
    padding: 2.8rem 2.4rem 2.4rem;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 0 0 1px rgba(217,70,239,0.12),
        0 30px 80px rgba(0,0,0,0.7),
        0 0 60px rgba(168,85,247,0.2);
    backdrop-filter: blur(20px);
    animation: lhub-gate-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes lhub-gate-in {
    from { opacity: 0; transform: scale(0.92) translateY(16px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);     }
}

/* Big emoji icon */
.lhub-gate-icon {
    font-size: 3.6rem;
    margin-bottom: 0.8rem;
    display: block;
    filter: drop-shadow(0 0 24px rgba(217,70,239,0.7));
    animation: lhub-icon-pulse 2.4s ease-in-out infinite;
}
@keyframes lhub-icon-pulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(217,70,239,0.6)); }
    50%       { filter: drop-shadow(0 0 36px rgba(217,70,239,0.95)); }
}

/* Title */
.lhub-gate-title {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f0e7ff, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.7rem;
    line-height: 1.25;
}

/* Description */
.lhub-gate-desc {
    font-size: 0.9rem;
    color: rgba(200,185,240,0.8);
    line-height: 1.6;
    margin: 0 0 1.4rem;
    font-family: 'Outfit', sans-serif;
}

/* Perks row */
.lhub-gate-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.9rem;
    justify-content: center;
    margin-bottom: 1.8rem;
}
.lhub-gate-perks span {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(168,85,247,0.9);
    background: rgba(168,85,247,0.1);
    border: 1px solid rgba(168,85,247,0.25);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

/* CTA button */
.lhub-gate-btn {
    width: 100%;
    background: linear-gradient(135deg, #d946ef, #a855f7);
    color: #fff;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all 0.25s;
    box-shadow: 0 6px 28px rgba(217,70,239,0.45);
    letter-spacing: 0.01em;
    margin-bottom: 1.1rem;
}
.lhub-gate-btn:hover {
    box-shadow: 0 8px 40px rgba(217,70,239,0.7);
    transform: translateY(-2px) scale(1.01);
}
.lhub-gate-btn:active {
    transform: translateY(0) scale(0.99);
}

/* Footer note */
.lhub-gate-footer {
    font-size: 0.8rem;
    color: rgba(160,140,200,0.65);
    margin: 0;
    font-family: 'Outfit', sans-serif;
}
.lhub-gate-link {
    color: rgba(217,70,239,0.85);
    text-decoration: underline;
    text-decoration-color: rgba(217,70,239,0.4);
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
}
.lhub-gate-link:hover {
    color: #d946ef;
    text-decoration-color: #d946ef;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .lhub-gate-box {
        padding: 2rem 1.4rem 1.8rem;
    }
