Puedes decirme que parte va al index.html, cual al style.ccs y cual al script.js? 
<!DOCTYPE html>
<html>
<head>
    <title>Juego de Mazmorras</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: space-between;
            margin: 0;
            padding: 0;
        }
        #game {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 70%;
            padding: 10px;
        }
        #inventory {
            width: 30%;
            padding: 10px;
            background: #f4f4f4;
            border-left: 1px solid #ccc;
        }
        #player-stats, #enemy-stats, #combat, #npc-popup, #item-popup, #compare-popup {
            margin: 10px 0;
        }
        #combat, #npc-popup, #item-popup, #compare-popup {
            display: none;
        }
        .popup {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            padding: 20px;
            border: 1px solid #ccc;
        }
        .inventory-slot {
            border: 1px solid #ccc;
            margin: 2px;
            padding: 5px;
            text-align: center;
            background: #e4e4e4;
        }
        .item-grade-used { color: grey; }
        .item-grade-normal { color: black; }
        .item-grade-magico { color: blue; }
        .item-grade-raro { color: green; }
        .item-grade-muy-raro { color: purple; }
        .item-grade-epico { color: orange; }
        .item-grade-legendario { color: red; }
        .item-grade-mitico { color: darkred; }
        .item-grade-divino { color: gold; }
    </style>
</head>
<body>
    <div id="game">
        <div id="player-stats">
            <h2>Jugador</h2>
            <p>Nivel: <span id="player-level"></span></p>
            <p>Salud: <span id="player-health"></span>/<span id="player-max-health"></span></p>
            <p>Ataque: <span id="player-attack"></span></p>
            <p>Defensa: <span id="player-defense"></span></p>
            <p>Evasión: <span id="player-evasion"></span>%</p>
            <p>Oro: <span id="player-gold"></span></p>
            <p>Experiencia: <span id="player-exp"></span>/<span id="player-next-level-exp"></span></p>
            <p>Pociones: <span id="player-potions"></span></p>
        </div>
        <div id="combat">
            <h2>Combate</h2>
            <div id="enemy-stats">
                <p>Enemigo: <span id="enemy-info"></span></p>
                <p>Salud: <span id="enemy-health"></span></p>
                <p>Ataque: <span id="enemy-attack"></span></p>
                <p>Defensa: <span id="enemy-defense"></span></p>
            </div>
            <button id="attack-btn">Atacar</button>
            <button id="flee-btn">Huir</button>
        </div>
        <button id="explore-btn">Explorar Mazmorra</button>
        <button id="npc-btn">Interactuar con NPC</button>
        <div id="log"></div>
        <div id="npc-popup" class="popup">
            <h2>NPC</h2>
            <button id="buy-potion-btn">Comprar Poción (50 oro)</button>
            <button id="buy-item-btn">Comprar Objeto (15 oro)</button>
            <button id="random-npc-btn">Lo que sea (30 oro)</button>
            <button id="close-npc-btn">Cerrar</button>
        </div>
        <div id="item-popup" class="popup">
            <h2>Objeto Encontrado</h2>
            <p id="item-description"></p>
            <button id="keep-btn">Mantener</button>
            <button id="sell-btn">Vender</button>
            <button id="equip-btn">Equipar</button>
            <button id="compare-btn">Comparar</button>
        </div>
        <div id="compare-popup" class="popup">
            <h2>Comparar Objetos</h2>
            <p id="compare-description"></p>
            <button id="close-compare-btn">Cerrar</button>
        </div>
    </div>
    <div id="inventory">
        <h2>Inventario</h2>
        <ul id="inventory-list"></ul>
        <div id="equipped-items">
            <h3>Equipamiento</h3>
            <div class="inventory-slot" id="slot-helmet">Cabeza</div>
            <div class="inventory-slot" id="slot-chest">Pecho</div>
            <div class="inventory-slot" id="slot-rings">Anillos</div>
            <div class="inventory-slot" id="slot-necklace">Colgante</div>
            <div class="inventory-slot" id="slot-weapon">Arma</div>
            <div class="inventory-slot" id="slot-secondary">Segunda Arma/Escudo</div>
            <div class="inventory-slot" id="slot-pants">Pantalones</div>
            <div class="inventory-slot" id="slot-belt">Cinturón</div>
            <div class="inventory-slot" id="slot-boots">Botas</div>
            <div class="inventory-slot" id="slot-shoulders">Hombreras</div>
        </div>
    </div>

    <script>
        const itemGrades = [
            { grade: 'usado', value: 5, bonus: 1 },
            { grade: 'normal', value: 10, bonus: 2 },
            { grade: 'magico', value: 20, bonus: 5 },
            { grade: 'raro', value: 50, bonus: 10 },
            { grade: 'muy raro', value: 100, bonus: 20 },
            { grade: 'epico', value: 200, bonus: 40 },
            { grade: 'legendario', value: 500, bonus: 80 },
            { grade: 'mitico', value: 1000, bonus: 150 },
            { grade: 'divino', value: 2000, bonus: 300 }
        ];

        const itemTypes = {
            helmet: 'Casco',
            chest: 'Pecho',
            rings: 'Anillos',
            necklace: 'Colgante',
            weapon: 'Arma',
            secondary: 'Segunda Arma/Escudo',
            pants: 'Pantalones',
            belt: 'Cinturón',
            boots: 'Botas',
            shoulders: 'Hombreras'
        };

        const npcs = ['Mercader', 'Entrenador', 'Hechicero'];

        let player = {
            level: 1,
            health: 100,
            maxHealth: 100,
            attack: 50,
            defense: 50,
            evasion: 0,
            gold: 0,
            experience: 0,
            nextLevelExp: 100,
            potions: 0,
            inventory: [],
            equippedItems: {
                helmet: null,
                chest: null,
                rings: null,
                necklace: null,
                weapon: null,
                secondary: null,
                pants: null,
                belt: null,
                boots: null,
                shoulders: null
            }
        };

        let currentEnemy = null;
        let currentItemIndex = null;
        let enemiesDefeated = 0;

        function getRandomInt(min, max) {
            return Math.floor(Math.random() * (max - min)) + min;
        }

        function logMessage(message) {
            const log = document.getElementById('log');
            const p = document.createElement('p');
            p.textContent = message;
            log.appendChild(p);
            log.scrollTop = log.scrollHeight;
        }

        function generateRandomEnemy(level) {
            const gradeIndex = getRandomInt(1, itemGrades.length);
            const itemGrade = itemGrades[gradeIndex];
            const health = getRandomInt(level * 10, level * 20);
            return {
                level: level,
                health: health,
                maxHealth: health,
                attack: getRandomInt(level * 5, level * 10),
                defense: getRandomInt(level * 3, level * 7),
                grade: itemGrade.grade,
                exp: level * 10,
                gold: itemGrade.value * 2
            };
        }

        function generateBossEnemy(level) {
            const gradeIndex = getRandomInt(2, itemGrades.length);
            const itemGrade = itemGrades[gradeIndex];
            const health = getRandomInt(level * 100, level * 200);
            return {
                level: level,
                health: health,
                maxHealth: health,
                attack: getRandomInt(level * 50, level * 100),
                defense: getRandomInt(level * 30, level * 70),
                grade: itemGrade.grade,
                exp: level * 100,
                gold: itemGrade.value * 20
            };
        }

        function generateRandomItem() {
            const gradeIndex = getRandomInt(0, itemGrades.length);
            const itemGrade = itemGrades[gradeIndex];
            const itemTypeKeys = Object.keys(itemTypes);
            const itemType = itemTypeKeys[getRandomInt(0, itemTypeKeys.length)];
            return {
                type: itemType,
                description: `${itemTypes[itemType]} ${itemGrade.grade}`,
                grade: itemGrade.grade,
                value: itemGrade.value,
                healthBonus: getRandomInt(0, itemGrade.bonus),
                attackBonus: getRandomInt(0, itemGrade.bonus),
                defenseBonus: getRandomInt(0, itemGrade.bonus),
                evasionBonus: getRandomInt(0, itemGrade.bonus / 2)
            };
        }

        function exploreDungeon() {
            if (Math.random() < 0.5) {
                currentEnemy = generateRandomEnemy(player.level);
                startCombat();
            } else {
                const newItem = generateRandomItem();
                player.inventory.push(newItem);
                showItemPopup(newItem);
                updateInventory();
            }
        }

        function startCombat() {
            document.getElementById('combat').style.display = 'block';
            document.getElementById('enemy-info').textContent = `${currentEnemy.grade} Nivel ${currentEnemy.level}`;
            document.getElementById('enemy-health').textContent = `${currentEnemy.health}/${currentEnemy.maxHealth}`;
            document.getElementById('enemy-attack').textContent = currentEnemy.attack;
            document.getElementById('enemy-defense').textContent = currentEnemy.defense;
        }

        function attackEnemy() {
            if (!currentEnemy) return;

            const playerAttack = player.attack - currentEnemy.defense;
            currentEnemy.health -= playerAttack > 0 ? playerAttack : 1;
            logMessage(`Atacas al enemigo y le causas ${playerAttack > 0 ? playerAttack : 1} de daño.`);

            if (currentEnemy.health <= 0) {
                endCombat(true);
            } else {
                const enemyAttack = currentEnemy.attack - player.defense;
                player.health -= enemyAttack > 0 ? enemyAttack : 1;
                logMessage(`El enemigo te ataca y te causa ${enemyAttack > 0 ? enemyAttack : 1} de daño.`);
                updatePlayerInfo();

                if (player.health <= 0) {
                    endGame();
                } else {
                    updateCombat();
                }
            }
        }

        function fleeCombat() {
            logMessage('Huyes del combate.');
            endCombat(false);
        }

        function endCombat(victory) {
            if (victory) {
                logMessage(`Derrotaste al enemigo y obtuviste ${currentEnemy.gold} oro y ${currentEnemy.exp} experiencia.`);
                player.gold += currentEnemy.gold;
                player.experience += currentEnemy.exp;
                enemiesDefeated++;
                checkLevelUp();
            }
            currentEnemy = null;
            document.getElementById('combat').style.display = 'none';
            updatePlayerInfo();
        }

        function checkLevelUp() {
            if (player.experience >= player.nextLevelExp) {
                player.level++;
                player.experience -= player.nextLevelExp;
                player.nextLevelExp = player.level * 100;
                player.maxHealth += 20;
                player.health = player.maxHealth;
                player.attack += 10;
                player.defense += 5;
                logMessage(`¡Subiste al nivel ${player.level}!`);
            }
        }

        function interactWithNpc() {
            document.getElementById('npc-popup').style.display = 'block';
        }

        function buyPotion() {
            if (player.gold >= 50) {
                player.gold -= 50;
                player.potions++;
                updatePlayerInfo();
                logMessage('Compraste una poción.');
            } else {
                logMessage('No tienes suficiente oro.');
            }
        }

        function buyRandomItem() {
            if (player.gold >= 15) {
                player.gold -= 15;
                const newItem = generateRandomItem();
                player.inventory.push(newItem);
                updateInventory();
                logMessage('Compraste un objeto.');
            } else {
                logMessage('No tienes suficiente oro.');
            }
        }

        function randomNpcAction() {
            if (player.gold >= 30) {
                player.gold -= 30;
                const action = Math.random();
                if (action < 0.33) {
                    player.potions++;
                    logMessage('El NPC te dio una poción.');
                } else if (action < 0.66) {
                    const newItem = generateRandomItem();
                    player.inventory.push(newItem);
                    updateInventory();
                    logMessage('El NPC te dio un objeto.');
                } else {
                    player.level++;
                    player.experience = 0;
                    player.nextLevelExp = player.level * 100;
                    player.maxHealth += 20;
                    player.health = player.maxHealth;
                    player.attack += 10;
                    player.defense += 5;
                    logMessage(`El NPC te entrenó y subiste al nivel ${player.level}.`);
                }
                updatePlayerInfo();
            } else {
                logMessage('No tienes suficiente oro.');
            }
        }

        function showItemPopup(item) {
            document.getElementById('item-description').textContent = `${item.description} - Salud: +${item.healthBonus}, Ataque: +${item.attackBonus}, Defensa: +${item.defenseBonus}, Evasión: +${item.evasionBonus}%`;
            document.getElementById('item-popup').style.display = 'block';
        }

        function closeComparePopup() {
            document.getElementById('compare-popup').style.display = 'none';
        }

        function keepItem() {
            document.getElementById('item-popup').style.display = 'none';
        }

        function sellItem() {
            player.gold += player.inventory[currentItemIndex].value;
            player.inventory.splice(currentItemIndex, 1);
            updateInventory();
            document.getElementById('item-popup').style.display = 'none';
            updatePlayerInfo();
        }

        function equipItem() {
            const item = player.inventory[currentItemIndex];
            player.equippedItems[item.type] = item;
            player.inventory.splice(currentItemIndex, 1);
            updateInventory();
            document.getElementById('item-popup').style.display = 'none';
            updatePlayerStats();
        }

        function compareItem() {
            const item = player.inventory[currentItemIndex];
            const equippedItem = player.equippedItems[item.type];
            if (equippedItem) {
                document.getElementById('compare-description').textContent = `Comparando con ${equippedItem.description} - Salud: +${equippedItem.healthBonus}, Ataque: +${equippedItem.attackBonus}, Defensa: +${equippedItem.defenseBonus}, Evasión: +${equippedItem.evasionBonus}%`;
            } else {
                document.getElementById('compare-description').textContent = 'No tienes ningún objeto equipado en esta ranura.';
            }
            document.getElementById('compare-popup').style.display = 'block';
        }

        function updatePlayerInfo() {
            document.getElementById('player-level').textContent = player.level;
            document.getElementById('player-health').textContent = player.health;
            document.getElementById('player-max-health').textContent = player.maxHealth;
            document.getElementById('player-attack').textContent = player.attack;
            document.getElementById('player-defense').textContent = player.defense;
            document.getElementById('player-evasion').textContent = player.evasion;
            document.getElementById('player-gold').textContent = player.gold;
            document.getElementById('player-exp').textContent = player.experience;
            document.getElementById('player-next-level-exp').textContent = player.nextLevelExp;
            document.getElementById('player-potions').textContent = player.potions;
        }

        function updateInventory() {
            const inventoryList = document.getElementById('inventory-list');
            inventoryList.innerHTML = '';
            player.inventory.forEach((item, index) => {
                const li = document.createElement('li');
                li.textContent = `${item.description} - ${item.grade}`;
                li.className = `item-grade-${item.grade}`;
                li.onclick = () => {
                    currentItemIndex = index;
                    showItemPopup(item);
                };
                inventoryList.appendChild(li);
            });

            for (const slot in player.equippedItems) {
                const equippedItem = player.equippedItems[slot];
                document.getElementById(`slot-${slot}`).textContent = equippedItem ? equippedItem.description : itemTypes[slot];
            }
        }

        function updateCombat() {
            document.getElementById('enemy-health').textContent = `${currentEnemy.health}/${currentEnemy.maxHealth}`;
        }

        function endGame() {
            document.getElementById('explore-btn').disabled = true;
            document.getElementById('npc-btn').disabled = true;
            document.getElementById('attack-btn').disabled = true;
            document.getElementById('flee-btn').disabled = true;
            logMessage('Has muerto. Fin del juego.');
        }

        document.getElementById('explore-btn').onclick = exploreDungeon;
        document.getElementById('npc-btn').onclick = interactWithNpc;
        document.getElementById('attack-btn').onclick = attackEnemy;
        document.getElementById('flee-btn').onclick = fleeCombat;
        document.getElementById('buy-potion-btn').onclick = buyPotion;
        document.getElementById('buy-item-btn').onclick = buyRandomItem;
        document.getElementById('random-npc-btn').onclick = randomNpcAction;
        document.getElementById('close-npc-btn').onclick = () => document.getElementById('npc-popup').style.display = 'none';
        document.getElementById('keep-btn').onclick = keepItem;
        document.getElementById('sell-btn').onclick = sellItem;
        document.getElementById('equip-btn').onclick = equipItem;
        document.getElementById('compare-btn').onclick = compareItem;
        document.getElementById('close-compare-btn').onclick = closeComparePopup;

        updatePlayerInfo();
    </script>
</body>
</html>