<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>조달청 2050: 나르미 & 달이와 함께하는 미래 나라장터 어드벤처</title>
    <style>
        body {
            margin: 0;
            overflow: hidden;
            background-color: #0b0f19;
            font-family: 'Malgun Gothic', sans-serif;
            color: #ffffff;
            user-select: none;
        }
        #game-container {
            position: relative;
            width: 100vw;
            height: 100vh;
        }
        canvas { display: block; }
        #ui-overlay {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            pointer-events: none;
            display: flex; flex-direction: column; justify-content: space-between;
            padding: 20px; box-sizing: border-box;
        }
        .hud-panel {
            background: rgba(15, 23, 42, 0.85);
            border: 1px solid rgba(56, 189, 248, 0.4);
            border-radius: 12px;
            padding: 15px 25px;
            backdrop-filter: blur(8px);
            pointer-events: auto;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5);
        }
        h1 { margin: 0 0 5px 0; font-size: 22px; color: #38bdf8; text-shadow: 0 0 10px rgba(56,189,248,0.5); }
        p { margin: 0; font-size: 13px; color: #94a3b8; }
        #interaction-prompt {
            position: absolute; bottom: 40px; left: 50%;
            transform: translateX(-50%);
            background: rgba(14, 165, 233, 0.9); color: white;
            padding: 12px 24px; border-radius: 30px; font-size: 16px; font-weight: bold;
            display: none; pointer-events: auto; cursor: pointer;
            box-shadow: 0 0 20px rgba(14,165,233,0.6);
            animation: pulse 1.5s infinite;
        }
        @keyframes pulse {
            0% { transform: translateX(-50%) scale(1); }
            50% { transform: translateX(-50%) scale(1.05); }
            100% { transform: translateX(-50%) scale(1); }
        }
        #modal-box {
            position: absolute; top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            width: 650px; background: rgba(15, 23, 42, 0.95);
            border: 2px solid #38bdf8; border-radius: 16px; padding: 25px;
            display: none; pointer-events: auto;
            box-shadow: 0 10px 40px rgba(0,0,0,0.9);
        }
        #modal-title { color: #38bdf8; font-size: 20px; font-weight: bold; margin-bottom: 12px; }
        #modal-text { font-size: 15px; line-height: 1.6; margin-bottom: 20px; color: #e2e8f0; }
        .modal-btn {
            background: #0284c7; color: white; border: none;
            padding: 10px 20px; border-radius: 8px; cursor: pointer;
            font-weight: bold; font-size: 14px; float: right; margin-left: 10px;
        }
        .modal-btn:hover { background: #0ea5e9; }
        .quiz-option {
            background: rgba(30, 41, 59, 0.9); border: 1px solid #38bdf8;
            color: white; padding: 12px 15px; border-radius: 8px;
            margin-bottom: 10px; cursor: pointer; display: block; width: 100%;
            text-align: left; font-size: 14px;
        }
        .quiz-option:hover { background: rgba(56, 189, 248, 0.2); }
    </style>
</head>
<body>

<div id="game-container">
    <canvas id="gameCanvas"></canvas>
    
    <div id="ui-overlay">
        <div style="display: flex; justify-content: space-between; align-items: flex-start;">
            <div class="hud-panel">
                <h1>조달청 2050: 나르미 & 달이와 미래 여행</h1>
                <p>4개의 조달 스테이션을 탐험하고 나르미·달이와 함께 미션을 완수해 명예 조달관이 되어보세요!</p>
            </div>
            <div class="hud-panel" style="text-align: right;">
                <div style="font-size: 13px; color: #38bdf8; font-weight: bold;" id="score-board">완료한 미션: 0 / 4</div>
                <div style="font-size: 12px; color: #94a3b8; margin-top: 4px;">이동: W, A, S, D / 상호작용: [E]</div>
            </div>
        </div>
    </div>

    <div id="interaction-prompt">[E] 스테이션 조사 및 미션 시작</div>

    <div id="modal-box">
        <div id="modal-title">제목</div>
        <div id="modal-text">내용</div>
        <div id="modal-actions"></div>
    </div>
</div>

<script>
    const canvas = document.getElementById('gameCanvas');
    const ctx = canvas.getContext('2d');

    function resize() {
        canvas.width = window.innerWidth;
        canvas.height = window.innerHeight;
    }
    window.addEventListener('resize', resize);
    resize();

    const player = { x: window.innerWidth / 2, y: window.innerHeight / 2 + 150, size: 18, speed: 4 };

    const stations = [
        {
            id: 1, x: window.innerWidth / 2, y: window.innerHeight / 2 - 220, name: "Stage 1. AI 나라장터 2050",
            desc: "나르미: \"초고속 AI와 블록체인으로 서류 없는 완벽한 투명 계약을 실현하는 차세대 전자조달 허브야!\"",
            cleared: false,
            quiz: {
                question: "2050년 AI 나라장터가 도입한 핵심 시스템의 특징은?",
                options: ["1. 블록체인 기반 서류 없는 투명 자동 계약", "2. 종이 서류 수작업 검토", "3. 우편 접수를 통한 오프라인 입찰"],
                answer: 0
            }
        },
        {
            id: 2, x: window.innerWidth / 2 - 320, y: window.innerHeight / 2 + 20, name: "Stage 2. 혁신조달 & 우주기술관",
            desc: "달이: \"대한민국 혁신벤처의 첨단 기술과 우주 물품을 공공부문이 첫 번째로 구매해주는 곳이지!\"",
            cleared: false,
            quiz: {
                question: "조달청이 혁신제품을 공공부문에서 먼저 구매해 주는 주요 이유는?",
                options: ["1. 기업의 초기 판로 개척 및 성장을 지원하기 위해", "2. 물건을 창고에 오래 쌓아두기 위해", "3. 수입품을 비싸게 사기 위해"],
                answer: 0
            }
        },
        {
            id: 3, x: window.innerWidth / 2 + 320, y: window.innerHeight / 2 + 20, name: "Stage 3. 녹색·ESG 조달관",
            desc: "나르미: \"탄소중립과 친환경 자재 사용을 의무화하여 지속 가능한 미래를 이끄는 조달 영역이야!\"",
            cleared: false,
            quiz: {
                question: "녹색·ESG 조달이 추구하는 가장 올바른 방향은?",
                options: ["1. 환경을 파괴하는 제품 대량 구매", "2. 탄소중립과 친환경 자재 우선 공공구매", "3. 에너지 효율 무시"],
                answer: 1
            }
        },
        {
            id: 4, x: window.innerWidth / 2, y: window.innerHeight / 2 + 240, name: "Stage 4. 글로벌 공급망 비축기지",
            desc: "달이: \"희소금속과 원자재를 안전하게 비축하여 국가 경제 안보를 든든하게 지키는 중이야!\"",
            cleared: false,
            quiz: {
                question: "공공비축 제도가 국가에 기여하는 핵심 역할은?",
                options: ["1. 글로벌 공급망 위기 시 핵심 원자재 안정적 공급", "2. 모든 물건 가격 무조건 인상", "3. 해외 수출 전면 금지"],
                answer: 0
            }
        }
    ];

    const npcs = [
        { x: window.innerWidth / 2 - 80, y: window.innerHeight / 2 - 80, name: "나르미", type: "narmi", desc: "안녕! 나는 조달청 스마트 마스코트 나르미야! 하늘색 고글과 스카프를 두르고 2050년 첨단 조달 현장을 누비고 있지!" },
        { x: window.innerWidth / 2 + 80, y: window.innerHeight / 2 - 80, name: "달이", type: "dali", desc: "반가워! 나는 든든한 다람쥐 탐험가 달이야! 우주와 친환경 기술, 자원 비축까지 완벽하게 안내해 줄

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: