:root {
    --bg-main: #0d0d0f;
    --sidebar-bg: #141417;
    --card-bg: #1c1c21;
    --border: rgba(255, 255, 255, 0.08);
    --primary: #f59e0b; 
    --primary-soft: rgba(245, 158, 11, 0.1);
    --primary-glow: rgba(245, 158, 11, 0.5);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden; 
}

.app-shell {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.sidebar {
    width: 320px;
    background-color: var(--sidebar-bg);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-top {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.brand-logo-img { height: 30px; }

.progress-card {
    background: var(--card-bg);
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.card-header b { color: var(--primary); }

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    box-shadow: 0 0 8px var(--primary-glow);
}

.course-nav {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-nav::-webkit-scrollbar { width: 6px; }
.course-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.lesson-btn {
    padding: 14px 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.lesson-btn:hover { background: rgba(255, 255, 255, 0.06); }

.lesson-btn.active-lesson {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-weight: 700;
}

.lesson-btn.locked { opacity: 0.6; }

.status-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.lock-icon-right {
    margin-left: auto;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.2);
}

.content-area-player {
    flex: 1;
    overflow-y: auto;
    background-color: var(--bg-main);
    display: flex;
    justify-content: center;
}

.player-wrapper {
    width: 100%;
    max-width: 1000px;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.back-link-player {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.back-link-player:hover { color: var(--text-main); }

.video-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
}

.video-frame.is-locked {
    aspect-ratio: auto;
    min-height: 380px; 
}

#vdo-player {
    border: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 15, 0.92);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    text-align: center;
    padding: 20px;
}

.locked-content {
    width: 100%;
    max-width: 450px;
    padding: 35px 25px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lock-icon-large {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px var(--primary-glow));
}

.locked-content h2 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}

.locked-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.button-glow {
    background: var(--primary);
    color: #000;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.button-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.7);
}

.content-footer { margin-top: 25px; }

.badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#lesson-title {
    margin-top: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.mobile-nav {
    display: none; 
    background: var(--sidebar-bg);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    justify-content: space-between;
    align-items: center;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.4rem;
    cursor: pointer;
}

/* --- TVOJ MODAL CSS --- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 9999; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-container { background: var(--sidebar-bg); border: 1px solid var(--border); padding: 40px; border-radius: 24px; max-width: 500px; width: 90%; position: relative; text-align: center; }
.close-modal { position: absolute; top: -50px; right: 0; font-size: 2rem; cursor: pointer; color: var(--text-muted); transition: 0.3s; }
.close-modal:hover { color: #fff; }
.modal-title { font-size: 1.8rem; margin-bottom: 20px; color: #fff; }
.modal-img { max-width: 100%; border-radius: 12px; margin-bottom: 20px; border: 1px solid var(--border); }
.wa-link { display: inline-flex; align-items: center; gap: 10px; background: #25D366; color: #fff; padding: 15px 25px; border-radius: 12px; text-decoration: none; font-weight: 700; margin-top: 15px; transition: 0.3s; justify-content: center; width: 100%; }
.wa-link:hover { background: #1ebe57; transform: translateY(-2px); }


@media (max-width: 992px) {
    .app-shell { flex-direction: column; }
    .mobile-nav { display: flex; }
    
    .sidebar {
        position: fixed;
        top: 60px; 
        right: -100%;
        left: auto;
        width: 100%;
        height: calc(100vh - 60px);
        transition: right 0.3s ease;
        border-left: none;
    }
    
    .sidebar.open { right: 0; }
    .desktop-only { display: none; }
    .player-wrapper { padding: 15px; }
    
    .locked-content { padding: 25px 20px; }
    .lock-icon-large { font-size: 2.5rem; }
    .locked-content h2 { font-size: 1.25rem; }
    .locked-content p { font-size: 0.85rem; }
    .button-glow { padding: 12px 20px; font-size: 0.9rem; }
}

@media (max-width: 768px) {
    .modal-container { 
        padding: 30px 20px; 
        width: 95%;
        border-radius: 16px;
    }
    .modal-title { font-size: 1.5rem; }
    .close-modal { 
        top: -45px; 
        right: 0;
    }
    .wa-link { 
        font-size: 1rem; 
        padding: 12px 15px; 
    }
}